Php Sagepay表格-输入值
我使用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
<?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>
不幸的是,这是不可能的。您必须通过密码字符串中的表单交易注册传递所需金额。当用户输入金额时,必须访问服务器以生成密码
,因此这将是一个两阶段的过程。