private void HandleSuccessfulCredit(Money payout) { try { PTCOfferWallView.Add(externalUsername, ptcOfferWallId, publishersWebsite.Id, payout); GlobalPostback.Create(GlobalPostbackType.PtcOfferWall, ptcOfferWallId, ptcOfferWallTitle, publishersWebsite.Id, externalUsername, subId2, subId3, ip, countryCode, payout, gender, age).Send(); } catch (Exception ex) { ErrorLogger.Log(ex); } }
private void HandleSuccessfulCredit(Money payout) { try { GlobalPostback.Create(GlobalPostbackType.Cpa, OfferId, Offer.Title, PublishersWebsiteId, ExternalUsername, SubId2, SubId3, Ip, CountryCode, payout, Gender, Age).Send(); Payout = payout; Status = OfferStatus.Completed; DateAccepted = AppSettings.ServerTime; Save(); } catch (Exception ex) { ErrorLogger.Log(ex); } }
protected void TestPostbackButton_Click(object sender, EventArgs e) { if (Page.IsValid) { try { ErrorMessagePanel.Visible = false; SuccessMessagePanel.Visible = false; var subId = InputChecker.HtmlEncode(TestPostback_SubIdTextBox.Text, TestPostback_SubIdTextBox.MaxLength, GlobalPostback.Parameters.SubId); var payout = Money.Parse(TestPostback_PayoutTextBox.Text); string response = GlobalPostback.GetTestResponse(PostbackUrlsDDL.SelectedValue, subId, payout); if (response == GlobalPostback.Parameters.SuccessfulResponse) { SuccessMessagePanel.Visible = true; SuccessMessage.Text = string.Format(U6000.THERESPONSEWAS, response) + " " + U6000.POSTBACKIMPLEMENTEDCORRECTLY; } else { ErrorMessagePanel.Visible = true; response = HttpUtility.HtmlEncode(response); if (response.Length > 50) { response = response.Substring(0, 50) + "(...)"; } ErrorMessage.Text = string.Format(U6000.THERESPONSEWAS, response) + " " + U6000.EXPECTEDOK; } } catch (Exception ex) { //if (ex is MsgException) //{ ErrorMessagePanel.Visible = true; ErrorMessage.Text = ex.Message; //} //else // ErrorLogger.Log(ex); } } }