【问题标题】:Having trouble with integrating Sagepay payment gateway in PHP在 PHP 中集成 Sagepay 支付网关时遇到问题
【发布时间】:2014-09-16 11:59:41
【问题描述】:

我正在用 PHP 实现 Sagepay 支付网关,它在 2.23 协议下运行良好。但是当我将其更改为 3.00 时,它给出了一个错误代码:3195,这意味着行项目金额详细信息没有正确加起来。

我已经尝试了所有解决方案,但没有任何帮助。

这是我目前正在使用的一些代码:

$sagePay = new SagePay();
$sagePay->setCurrency('GBP');
$sagePay->setAmount($_SESSION['amount']);
$sagePay->setDescription($_SESSION['tripcode']);
$sagePay->setBillingSurname('Mustermann');
$sagePay->setBillingFirstnames('Amrinder');
$sagePay->setBillingCity('London');
$sagePay->setBillingPostCode('GL51 3AA');
$sagePay->setBillingAddress1('Bahnhofstr. 1');
$sagePay->setBillingCountry('de');
$sagePay->setDeliverySameAsBilling();


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

我该如何解决这个问题?

【问题讨论】:

    标签: php payment-gateway opayo


    【解决方案1】:

    错误与篮子字段有关。您的第一个项目值为 100,税为 10,行总计为 100。 篮子中的字段是数量:项目价值:项目税:项目总计:行总计

    如果您要使用税款字段,项目值应该是净额,因此您的值应该是 1:90.00:10.00:100.00:100.00

    【讨论】:

    • 非常感谢,您节省了我的时间,为此答案 +1。 :)
    猜你喜欢
    • 2018-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-03
    • 2016-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多