how can i create a payment gateway module that will redirect the customer to an external url when the customer places an order? I have tried using ultimate module creator but my module isn't appearing in the payment methods tab in the configurations menu.
- 
 What's your Magento Version?Khoa Truong– Khoa Truong2016年05月16日 10:26:49 +00:00Commented May 16, 2016 at 10:26
3 Answers 3
You can find skeleton to integrate custom payment gateway
Git Link for Magento_Payment_Gateway_Skeleton
Compatible with all magento 1.x version
You must create a public function in your payment model called: getOrderPlaceRedirectUrl() and returns the (internal) URL where you should implement the code for the redirection. You can take a look at paypalStandard method to figure out exactly what to do.
Follow steps to create a custom payment gateway, here are some options. Then for the redirect to an external url, use this function: _redirectUrl().
$this->_redirectUrl('https://www.yourwebsite.com');
To redirect when the customer places an order:
In your gateway Model:
public function getOrderPlaceRedirectUrl()
{
return Mage::getUrl('payment_gateway/index/redirect');
}
In your gateway Index Controller:
public function redirectAction() 
{
$this->_redirectUrl('https://www.yourwebsite.com');
}
Explore related questions
See similar questions with these tags.