Skip to content

Commit

Permalink
Best2Pay: fixed a crash when order doesn't have e-mail or phone data
Browse files Browse the repository at this point in the history
  • Loading branch information
entdark committed Jun 4, 2019
1 parent cd81a5c commit 20b6ddb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public string RequestString(int sector, string password, string forwardURL)
if (ID != -1) data += "&id=" + ID;
if (!string.IsNullOrEmpty(firstname) && firstname.Length != 0) data += "&firstname=" + firstname;
if (!string.IsNullOrEmpty(lastname) && lastname.Length != 0) data += "&lastname=" + lastname;
if (email.Length != 0) data += "&email=" + email;
if (!string.IsNullOrEmpty(email) && email.Length != 0) data += "&email=" + email;
data += "&wm=" + (wm ? "1" : "0");
data += "&ym=" + (ym ? "1" : "0");
data += "&qiwi=" + (qiwi ? "1" : "0");
Expand All @@ -48,7 +48,7 @@ public string RequestString(int sector, string password, string forwardURL)

if (!string.IsNullOrEmpty(lastname) && lastname.Length != 0) data.Add("lastname", lastname);

if (email.Length != 0) data.Add("email", email);
if (!string.IsNullOrEmpty(email) && email.Length != 0) data.Add("email", email);

data.Add("wm", (wm ? "1" : "0"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public string RequestString(int sector, string password, string forwardURL)
if (description.Length != 0) data += "&description=" + description;
data += "&sector=" + sector;
data += "&url=" + forwardURL;
if (email.Length != 0) data += "&email=" + email;
if (phone.Length != 0) data += "&phone=" + phone;
if (!string.IsNullOrEmpty(email) && email.Length != 0) data += "&email=" + email;
if (!string.IsNullOrEmpty(phone) && phone.Length != 0) data += "&phone=" + phone;
if (signature.Length != 0) data += "&signature=" + signature;
if (bank_name.Length != 0) data += "&bank_name=" + bank_name;
if (address.Length != 0) data += "&address=" + address;
Expand Down Expand Up @@ -71,9 +71,9 @@ public string RequestString(int sector, string password, string forwardURL)
data.Add("sector", sector.ToString());
data.Add("url", forwardURL);

if (email.Length != 0) data.Add("email", email);
if (!string.IsNullOrEmpty(email) && email.Length != 0) data.Add("email", email);

if (phone.Length != 0) data.Add("phone", phone);
if (!string.IsNullOrEmpty(phone) && phone.Length != 0) data.Add("phone", phone);

if (signature.Length != 0) data.Add("signature", signature);

Expand Down

0 comments on commit 20b6ddb

Please sign in to comment.