I found this on the forums from awhile back
viewtopic.php?f=47&t=5926&start=25
I did what was mentioned above, creating my own payment form. The form redirects the user to the the payment processors page, and then I have another page waiting for a response. However, I'm not inheriting from AC Payment Gateway class at all, and I'm wondering how it would even fit in with this scenario and if it's even necessary. I looked at PayPal but I don't want the client to be redirected on the receipt page but as soon as the choose to pay with the selected method. The main reason I didn't use the AC gateway code was because I have to send the request using a separate form with hidden values and I didn't see how this would fit in with the AC gateway code. So, I guess my questions are what have others done in this scenario and is it really necessary to use the AC gateway code?sohaib wrote:Payment gateways that depend on call-back notifications require some extra work. They are not as straightforward to implement as the ones that support direct processing.
During the checkout control needs to be transferred to the payment gateway sites that work using call-back notifications. Once the payment is completed on the payment processor's web site the control is returned back to a page on your store.
So you basically need to do two more things
- Write code that transfers the control during checkout to the payment provider's website.
- Write a page or pages in your store that receives call-backs from your payment provider.
In order to write a code that transfers control to the payment processor during checkout the proper way to do it is to create a new payment method (say My-CustomPaymentGateway-Method) and write a corresponding payment form control for that payment method. See controls in Website/Checkout/PaymentForms for examples. Your payment form should display whatever is appropriate for making payment using your processor and once the user chooses to make payment using this processor, transfer the control to the processors web-site along with all the parameters that are required. Once the payment is completed by the user on the processors web-site the processor will send notification back to your store on a URL that you would have configured.
The second part is to write the code that handles the call-back notifications from your processor. You can write a new page for this purpose or you can make appropriate modifications in some existing page.