Payment form action work on localhost, but is not working on server

梦想的初衷 提交于 2019-12-25 01:17:38

问题


The form action works fine on localhost, however it doesn't work on server.

When I click the button pay now on localhost it directs me to the correct URL. But on server it directs me to mywebsite.com/Gateways/Migs/hitmigs.

Here is the code in migs:-

$form = '<form action="'.base_url('Gateways/Migs/hitmigs').'" method="post" accept-charset="UTF-8">
<input type="hidden" name="Title" value = "Migs Transaction - PHPTravels">
<input type="hidden" name="virtualPaymentClientURL" size="65" 
value="https://migs.mastercard.com.au/vpcpay" maxlength="250"/>
<input type="hidden" name="vpc_Version" value="1" size="20" maxlength="8"/>
<input type="hidden" name="vpc_Command" value="pay" size="20" maxlength="16"/>

migs in controller folder

<?php if (!defined('BASEPATH')) exit ('No direct script access allowed');

class Migs extends MX_Controller{

    public function hitmigs(){      
        $redirect_url = "";
        require_once(__DIR__."/../migs/PaymentCodesHelper.php");
        include_once(__DIR__."/../migs/VPCPaymentConnection.php");
        include_once(__DIR__."/../migs/PHP_VPC_3Party_Order_DO.php");
        redirect($redirect_url);

I have tried to change PHP versions to 5.5 and 5.6 and asked hosting company to change [] to array()

来源:https://stackoverflow.com/questions/58677100/payment-form-action-work-on-localhost-but-is-not-working-on-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!