Magento – Redirect to third party payment gateway using POST authentication without any server side redirection

payment-gateway

I am new in magento development. i am developing payment gateway and i am stucked on checkout process please help me to out. I couldn't find how to do this let say

I don't find how to do following tasks

  1. User submit checkout page then he will redirect to third party site fill credentials on site and site will redirect to specific url for complete checkout

  2. How generate Cancel Url and Accept url ( url for complete checkout process ) because gateway need. Gateway will redirect to Cancel url if user click on cancel button on gateway site but if he successfull in payment then redirect to complete url with some post data

Please help me to solve this problem; i can't use curl or any sort of php server side post validations

Best Answer

You don't want to use any curl or server side stuff. This would mean the user submits his credentials to you and not the payment provider. Man in the middle for free.

Have a look on the paypal redirect: \Mage_Paypal_Block_Standard_Redirect.

Use a <form> with all the informations and submit it with JavaScript