dtry54612 2014-08-14 09:01
浏览 39

Sagepay表格 - 输入值

Im using a sagepay form, as below. The value on this form is set but i need to so that a customer can input the amount themselves.

   <?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>

This successfully goes to Sagepay with the value of 500, but im wanting to user to put in there own value within the form section, could anyone assist with this.

  • 写回答

1条回答 默认 最新

  • dongwang3066 2015-07-16 12:35
    关注

    Not possible, unfortunately. You must pass the required amount with a Form transaction registration within the Crypt string.

    评论

报告相同问题?

悬赏问题

  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计