1

我正在使用 Realex API 与 DCC 的集成,下面是我的代码:

MD5哈希创建:

$tmp = "$timestamp.$merchantid.$orderid.$amountinCents.$currency.$cardnumber";
$md5hash = md5($tmp);
$tmp = "$md5hash.$secret";
$md5hash = md5($tmp);

DCC 请求 xml:

<?xml version='1.0' encoding='UTF-8'?>
<request type='dccrate' timestamp='$timestamp'>
    <merchantid>$merchantid</merchantid>
    <account>$account</account>
    <orderid>$orderid</orderid>
    <amount currency='$currency'>$amountinCents</amount>
    <card> 
        <number>$cardnumber</number>
        <expdate>$expdate</expdate>
        <type>$cardtype</type> 
        <chname>$cardname</chname>
        <cvn> 
            <number>$cvvno</number> 
            <presind>1</presind> 
        </cvn>
    </card> 
    <dccinfo>
        <ccp>fexco</ccp>
        <type>1</type>
        <ratetype>S</ratetype>
    </dccinfo>
    <autosettle flag='1'/>
    <md5hash>$md5hash</md5hash>
    <tssinfo>
        <address type=\"billing\">
            <country>ie</country>
        </address>
    </tssinfo>
</request>

验证请求 xml:

<?xml version='1.0' encoding='UTF-8'?>
<request type='auth' timestamp='".$timestamp."'>
    <merchantid>".$merchantid."</merchantid>
    <account>".$account."</account>
    <orderid>".$orderid."</orderid>
    <amount currency='".$currency."'>".$amountinCents."</amount>
    <card>
        <number>".$cardnumber."</number>
        <expdate>".$expdate."</expdate>
        <chname>".$cardname."</chname>
            <type>$cardtype</type> 
        <cvn>
            <number>".$cvvno."</number>
            <presind>1</presind>
        </cvn>
    </card>
    <autosettle flag='1' />
    <md5hash>".$md5hash."</md5hash>
    <dccinfo>
        <ccp>fexco</ccp>
        <type>1</type>
        <rate>".$authrate."</rate>
        <ratetype>S</ratetype>
        <amount currency='".$curr."'>".$amountDcc."</amount>
    </dccinfo>
</request>

并使用 curl 将两个 xml 一个接一个地发送到“ https://epage.payandshop.com/epage-remote.cgi ”,付款过程正常。但它没有显示任何弹出窗口供客户选择要收费的货币。

我正在寻找这个窗口 在此处输入图像描述

这是用于检查的示例表格

你能告诉我为什么它没有显示或者我需要做任何改变吗?

4

1 回答 1

1

谢谢你的问题。首先,正如我在上一个问题的答案中提到的,我们强烈建议您使用 SHA1 而不是 MD5 作为交易哈希。

此外,该 URL:https://epage.payandshop.com/epage-remote.cgi是旧版,新版是:

实时网址 - https://api.realexpayments.com/epage-remote.cgi

沙盒 URL - https://api.sandbox.realexpayments.com/epage-remote.cgi

请问您指的是什么开发人员文档?我强烈建议您按照最新的 Realex Developer Hub 中的指南进行操作。(如果集线器有问题,请告诉我)。

最后,因为您通过我们的 API 使用 DCC,所以您所描述的窗口/页面必须由您的应用程序使用从 DCC 速率查找请求返回的值生成。它在此处的第 2 步中概述,以及一个 PHP 示例:https ://developer.realexpayments.com/#!/integration-api/dcc/php/html_js

您没有使用我们的托管支付页面 (HPP) 来处理交易是否有特殊原因?它为您处理向客户显示费率选择。您还将受益于减少应用程序的 PCI 范围。见这里:https ://developer.realexpayments.com/#!/hpp/dcc

最好的,

肖恩

Realex 支付

于 2017-11-08T09:25:29.597 回答