public ActionResult FakeSuccess(int paymentId, string commerceReturnUrl) { var payment = _paymentService.Find(paymentId); _paymentService.AcceptProcessResult(payment, ProcessPaymentResult.Success(Guid.NewGuid().ToString("N"))); return(Redirect(Url.Payment().DecorateReturn(commerceReturnUrl, payment))); }
public ActionResult Return(string commerceReturnUrl) { var paymentId = Convert.ToInt32(Request["add_paymentId"]); var payment = _paymentService.Find(paymentId); var method = _paymentMethodService.Find(payment.PaymentMethodId); var result = ProcessResponse(payment, method.LoadProcessorConfig <BuckarooConfig>()); _paymentService.AcceptProcessResult(payment, result); return(Redirect(Url.Payment().DecorateReturn(commerceReturnUrl, payment))); }
public void Report() { var iDealTransactionId = Request["transaction_id"]; var payment = _paymentService.Query().ByThirdPartyTransactionId(iDealTransactionId, "iDeal"); var paymentMethod = _paymentMethodService.Find(payment.PaymentMethodId); var settings = paymentMethod.LoadProcessorConfig <IDealConfig>(); var idealCheck = new IdealCheck(settings.PartnerId, settings.TestMode, iDealTransactionId); ProcessPaymentResult result = null; if (idealCheck.Error) { result = ProcessPaymentResult.Failed(idealCheck.ErrorMessage, iDealTransactionId); } else if (idealCheck.Payed) { result = ProcessPaymentResult.Success(iDealTransactionId); } if (result != null) { _paymentService.AcceptProcessResult(payment, result); } }