1. 附录
EVO Cloud Gateway API
  • 网关接入
    • 版本记录
    • 讯联数据网关接口接入指引
      • 安全要求及报文格式
        • 安全要求及报文格式
        • 消息签名
        • 卡信息加密
        • PIN加密
        • 安全要求及报文格式(网联断直连)更新中
        • 消息签名(网联断直连)更新中
      • 线上支付场景
        • 授权
        • 授权完成
        • 再次完成
        • 绑卡
        • 退货
        • 无源退货
        • 撤销
        • 关单
        • 3DS认证
        • Network token 管理
        • 订阅性支付
        • DCC
      • 线下支付场景
        • 支付
        • 预授权
        • 预授权完成
        • 退货
        • 无源退货
        • 撤销
        • 冲正
        • DCC
        • 订阅性支付
      • 附录
        • 应答码
        • 常见问题
        • 万事达卡商户建议代码
    • Online API Specification
      • PaymentMethod
        • PaymentMethod
        • PaymentMethod
        • PaymentMethod
        • PaymentMethod
      • PaymentInstrument
        • PaymentInstrument
        • PaymentInstrument
        • PaymentInstrument
        • PaymentInstrument
      • Payment
        • Payment
        • Payment
        • Payment
      • Cancel
        • Cancel
        • Cancel
      • Capture
        • Capture
        • Capture
      • Refund
        • Refund
        • Refund
      • MerchandiseCredit
        • MerchandiseCredit
        • MerchandiseCredit
      • CancelOrRefund
        • CancelOrRefund
        • CancelOrRefund
      • Cryptogram
        • Cryptogram
        • Cryptogram
      • MultipleCapture
        • MultipleCapture
        • MultipleCapture
      • StandaloneCapture
        • StandaloneCapture
        • StandaloneCapture
      • Recapture
        • Recapture
        • Recapture
      • AsynchronousNotification
        • PaymentMethod 异步通知
        • Payment 异步通知
        • Cancel 异步通知
        • Capture 异步通知
        • Refund 异步通知
        • MerchandiseCredit 异步通知
        • Cryptogram 异步通知
        • MultipleCapture 异步通知
        • StandaloneCapture 异步通知
        • Network Token 更新通知
        • Network Token 认证完成通知
        • Recapture 异步通知
        • PaymentInstrument 异步通知
      • HealthCheck
        • HealthCheck
      • TransactionHistoryInquiry
        • TransactionHistoryInquiry
      • FxRateInquiry
        • FX rate inquiry
        • FX rate inquiry
    • Offline API Specification
      • Payment
        • Payment
        • Payment
      • Cancel
        • Cancel
        • Cancel
      • Capture
        • Capture
        • Capture
      • Refund
        • Refund
        • Refund
      • Reversal
        • Reversal
      • MerchandiseCredit
        • Merchandise Credit
        • Merchandise Credit
      • FxRateInquiry
        • FX rate inquiry
        • FX rate inquiry
      • TipsAdjustment
        • Tips adjustment
        • Tips adjustment
      • StandaloneCapture
        • StandaloneCapture
        • StandaloneCapture
      • MultipleCapture
        • MultipleCapture
        • MultipleCapture
      • ZPK
        • ZPK
      • Notification
        • Payment 异步通知
        • Cancel 异步通知
        • Capture 异步通知
        • Refund 异步通知
        • MerchandiseCredit 异步通知
        • StandaloneCapture 异步通知
        • MultipleCapture 异步通知
  1. 附录

常见问题

3DS 集成模式对接指引#

3DS method 样例(result.action=IdentifyShopper)#

Post 参数#

threeDSMethodData: Base64url encode
image.png
3DS Method允许ACS在收到AReq报文前收集额外的浏览器信息,以帮助交易风险评估。ACS可以选择性使用3DS Method。
如 EMVCo 3DS 规范所述,3DS 请求者应在持卡人浏览器中渲染一个隐藏的 HTML iframe,并通过 HTTP POST 向 ACS 3DS Method URL 发送一个名为 threeDSMethodData的JSON对象的表单。
3DS请求方在指定时间内(例如5秒)接收到由ACS发送的3DS方法设备收集完成请求后,应将threeDSCompInd设置为“Y”。如果在规定时间内未收到请求,则应在超过制定时间后将threeDSCompInd设置为“N”。该字段的状态需要在AReq消息请求中发送。
3DS 设备信息收集的结果不会影响后续的 AReq 流程。

样例报文#

创建一个隐藏的 iframe 并向 ACS 发3DS请求,每 500 毫秒监控一次响应。如果ACS在500ms内无响应,则跳过3DS,执行 AReq。
<html>

<head>
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
                    // If 3ds method URL is empty,
                    // 3ds requestor can pass 3DS method processing and threeDSCompInd=U
                    var threeDSCompInd = "${threeDSCompInd}";
                    if (threeDSCompInd == "U") {
                        submitForm1(threeDSCompInd);
                        return;
                    }
                    // send 3DS Method request in iframe
                    var iframe = $("#3dsmethod");
                    var formContent = ""
                        .concat("<form name='form2' id='form2'
                            action = '${threeDSMethodUrl}'
                            method = 'post' > ")
                            .concat(" <input type='hidden' name='threeDSMethodData'
                                id = 'threeDSMethodData'
                                value = '${threeDSMethodData}' / > ")
                                .concat("</form>"); iframe.contents().find('body').html(formContent); iframe.contents().find('#form2').submit();
                                // monitor 3DS Method response
                                var t1 = window.setInterval(function() {
                                    console.log('monitor method result.');
                                    console.log($("#3dsmethod").attr("src"));
                                    if ($("#3dsmethod").contents().find('#threeDSCompInd').val() == "Y") {
                                        console.log('monitor method result GOTTEN.');
                                        window.clearInterval(t1);
                                        window.clearTimeout(t2);
                                        threeDSCompInd = "Y";
                                        submitForm1(threeDSCompInd);
                                    }
                                }, 500);
                                // if reach timeout setting, set threeDSCompInd = N and go next step
                                var t2 = window.setTimeout(function() {
                                    console.log('monitor timeout.');
                                    if (threeDSCompInd != "Y")
                                        threeDSCompInd = "N";
                                    window.clearInterval(t1);
                                    window.clearTimeout(t2);
                                    submitForm1(threeDSCompInd);
                                }, 5 * 1000);
                            });
                    //next step
                    function submitForm1(threeDSCompInd) {
                        console.log('before form1 submited, threeDSCompInd =',
                            threeDSCompInd);
                        $("#threeDSCompInd").val(threeDSCompInd);
                        $("#form1").submit();
                    }
    </script>
</head>

<body>
    <div>
        <form id="form1" name="form1" action="${next step URL}" method="post">
            <input type="hidden" name="threedsIntegratorOid" id="threedsIntegratorOid" value="${threedsIntegratorOid}" />
            <input type="hidden" name="threeDSCompInd" id="threeDSCompInd" value="" />
        </form>
    </div>
    <div id="iframe_3dsmethod">
        <iframe id="3dsmethod" src="about:blank" allow="geolocation" frameborder="0" allowfullscreen=true style="width: 100%; height: 0vh; position: relative; border-width:
0px">
        </iframe>
    </div>
</body>

</html>

Post Creq 样例(result.action=ChallengeShopper)#

Post 参数#

creq: Base64url encode
threeDSSessionData: ACS 在 CRes 消息 POST 中向 3DS 请求者返回3DS 请求者会话数据。可用于适应3DS请求者系统处理会话信息的不同方法。

Acs URL 样例#

https://{host}:8050/acs-auth-web/challenge/brw/V/210/1/123/creq

ACS 请求#

(creq): eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMS4wIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiI4OGVmNGIyNC1iOWRkLTQ0YTAtOTk2Yi1jYTYxMDcyYTFjOTIiLCJhY3NUcmFuc0lEIjoiMTE4ZDNiNjEtYjU5Ny00Nzg2LTg1ZWMtNzA0Mzc3ZDhjMWU4IiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjAyIn0=
image.png
浏览器挑战将在持卡人的浏览器中进行,ACS 将在浏览器挑战窗口中向持卡人展示标准化的挑战界面。
为获得更好的用户体验,3DS 请求者可在持卡人浏览器中创建一个 HTML iframe 以进行挑战,并在收到 CRes 信息后通过刷新页面和删除 HTML iframe 关闭挑战窗口。

样例报文#

生成一个 HTTP 请求持卡人浏览器到 ACS 挑战页面。
<html>

<head>
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#form1').submit();
        });
    </script>
</head>

<body>
    <div>
        <form id="form1" name="form1" action="${acsURL}" method="post">
            <input type="hidden" name="creq" value="${creq}" />
            <input type="hidden" name="threeDSSessionData" value="${threeDSSessionData}" />
        </form>
    </div>
</body>

</html>
ACS 应答: 显示类似页面
image.png

3DS 集成模式结果判断方式#

3DS 集成模式发卡行回调类型判断#

可以通过回调 body 的参数来区分是 IdentifyShopper 还是 ChallengeShopper 的回调。
IdentifyShopper 的发卡行回调中参数名称是 threeDSMethodData
ChallengeShopper 的发卡行回调中参数名称是 cres
上一页
应答码
下一页
万事达卡商户建议代码
Built with