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.

Vaibhav Ahalpara
5,2854 gold badges43 silver badges81 bronze badges
asked Aug 3, 2015 at 16:55
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

answered Nov 18, 2016 at 7:07
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.

answered Aug 3, 2015 at 17:43
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');
}
answered Mar 12, 2018 at 20:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.