To create an offsite payment processor provider for the payment processor you must perform the following:
IPaymentResponse HandleOffsiteReturn(int orderNumber, HttpRequest request, PaymentMethod paymentMethod);
IPaymentResponse HandleOffsiteNotification(int orderNumber, HttpRequest request, PaymentMethod paymentMethod);
The methods are responsible for handing the offsite return which is when the offsite payment gateway redirects back to our site. The redirect is automatically handled by a handler on our site which then calls the HandleOffsiteReturn method. The request object passed there contains all the information which the offsite gateway has returned to us. The other method HandleOffsiteNotification is also invoked from the offsite gateway (if supported) but this call is made from their backend to our site to tell us the result of a transaction. This call is not visible on the client browser, it is direct call between them (PayPal IPN service for example) and our handler, which then invokes this method.
Use the following code sample:
After you have implemented your provider class, depending on your custom provider, you may want to specify a return and redirect URL. You specify these in SubmitTransaction method. In this class, you can specify either of the following Sitefinity CMS properties:
The way you pass the properies in the SubmitTransaction method is also specified in your payment provender documentation.
EXAMPLE: postValues.Add("notificationURL", data.GatewayNotificationUrl);
In the above example, notificationURL is a property specified by the payment provider.
Back To Top