开发者

Magento "place order" redirection for payment gateway

开发者 https://www.devze.com 2023-04-13 04:10 出处:网络
this is my first actual post on StackOverflow. I\'m on here quite often because you guys always solve my queries!

this is my first actual post on StackOverflow. I'm on here quite often because you guys always solve my queries!

We have a problem in a checkout cart on a Magento on localhost.

We have Magento version 1.5 and are using the direcpay payment module(Created the module manually by using the blog by roi smikes).

The problem appears when a customer adds products to their cart . When they click on the 'Place Order' button, they should be taken to a form in which the user have to enter customer detail field before redirecting to payment gateway like merchantid,name and address etc, in which they can send these information through url to the direcpay payment gateway.I dont know what to do next,should i have to make 开发者_开发百科a new form in which these information should be entered and how the place order button can be handle.

Any help/advice/solution/anything! would be much appreciated!

Thanks!


I suppose what you desire is as below

Click Place order ---> Customer Details Page -----> External payment gateway

Steps to achieve this

  1. modifty saveOrderAction() in the file app\code\core\Mage\Checkout\controllers\OnepageController.php

add this file code which checks what payment method was selected

    if($data['method']=='cashondelivery')
    {
        $redirectUrl='';
    }
    else
    {
        $redirectUrl = 'https://mysite.com/customer_details.php';
    }
  1. Add a proceed button in the customer_details.php page which now takes customer to bank website with the posted information
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号