nicolas.juteau-nexun
-
6/23/2011 3:43:09 PM
Customized CMSPaymentGatewayProvider
Hello Kentico team,
We are currently designing a customized payment gateway provider to work with psigate and are having problem settings the PaymentResult datas into the cms database.
Here is the relevant snippet of code we are using:
public override void ProcessPayment() { // custom code ...
PsigateGateway gateway = new PsigateGateway();
NameValueCollection nvc = new NameValueCollection(); nvc.Add("Subtotal", "79"); nvc.Add("CardNumber", "4111111111111111"); nvc.Add("CardExpMonth", "02"); nvc.Add("CardExpYear", "12");
doc = gateway.DoPreAuth(nvc);
// Code ommited here ....
PaymentResultItemInfo inf1 = new PaymentResultItemInfo(); inf1.Header = "{$AuthorizeNet.AuthorizationCode$}"; inf1.Name = "authorizationcode"; inf1.Value = gateway.ResponseAuthCode;
this.PaymentResult.SetPaymentResultItemInfo(inf1);
//this.UpdateOrderPaymentResult(); }
As explainded in the E-commerce guide, we are using the SetPaymentResultItemInfo method to create xml nodes that makes the PaymentResultInfo object, but unfortunately even with the UpdateOrderPaymentResult method, it does not actually saves it to the database.
What are we actually making wrong? Any advice would be very appreciated.
Best Regards,
|