2

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.

2

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.

2

You can find skeleton to integrate custom payment gateway

Git Link for Magento_Payment_Gateway_Skeleton

Compatible with all magento 1.x version

1

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');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.