Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Sagepay表格-输入值_Php_Opayo - Fatal编程技术网

Php Sagepay表格-输入值

Php Sagepay表格-输入值,php,opayo,Php,Opayo,我使用sagepay表格,如下所示。此表单上的值已设置,但我需要这样做,以便客户可以自己输入金额 <?php require_once ('SagePay.php'); $sagePay = new SagePay(); $sagePay->setCurrency('GBP'); $sagePay->setAmount('500'); $sagePay->setDescription('Payment'); $sag

我使用sagepay表格,如下所示。此表单上的值已设置,但我需要这样做,以便客户可以自己输入金额

   <?php
    require_once ('SagePay.php');

    $sagePay = new SagePay();
    $sagePay->setCurrency('GBP');
    $sagePay->setAmount('500');
    $sagePay->setDescription('Payment');
    $sagePay->setBillingSurname('Surname');
    $sagePay->setBillingFirstnames('First Name');
    $sagePay->setBillingCity('City');
    $sagePay->setBillingPostCode('Post Code');
    $sagePay->setBillingAddress1('Address Line One');
    $sagePay->setBillingCountry('GB');
    $sagePay->setDeliverySameAsBilling();

    $sagePay->setSuccessURL('https://www.XXXs.com/trade/success.php');
    $sagePay->setFailureURL('https://www.XXX.com/trade/fail.php');
    ?>

    <form method="POST" id="SagePayForm" action="https://test.sagepay.com/gateway/service/vspform-register.vsp">
        <input type="hidden" name="VPSProtocol" value= "2.23">
        <input type="hidden" name="TxType" value= "PAYMENT">
        <input type="hidden" name="Vendor" value= "wilsonscarpets">
        <input type="hidden" name="Crypt" value= "<?php echo $sagePay->getCrypt(); ?>">
            <input type="text" name="Amount" value= "">
        <input type="submit" value="continue to SagePay">
    </form>


不幸的是,这是不可能的。您必须通过密码字符串中的表单交易注册传递所需金额。

当用户输入金额时,必须访问服务器以生成
密码
,因此这将是一个两阶段的过程。