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.

1
  • What's your Magento Version? Commented May 16, 2016 at 10:26

3 Answers 3

3

You can find skeleton to integrate custom payment gateway

Git Link for Magento_Payment_Gateway_Skeleton

Compatible with all magento 1.x version

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.

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 and acknowledge you have read our privacy policy.

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