商户接入指南 商户接入指南
  • V2 (opens new window)
  • V3 (opens new window)
  • V4 (opens new window)
  • V4-English (opens new window)
  • V2 (opens new window)
  • V3 (opens new window)
  • V4 (opens new window)
  • V4-English (opens new window)
  • 接入指南

    • 起步
    • 名词约定
    • 对接流程(必读)
    • 沙箱环境测试资源
    • 对接验收
    • 签名规约
  • 接入方案

    • 收银台模式

      • 内嵌JS-SDK
      • 跳转接入
    • 端到端模式

      • 快速开始
      • 商户收银台规范
    • 交易状态

      • 交易状态
      • 风险订单REVIEW
      • 异步通知
    • 交易场景

      • 交易模式-DEBIT和AUTH
      • Tokenization
      • NetworkToken
      • 本地支付
      • 3D集成指南
      • recurring集成指南
      • 退款集成指南
      • dispute API集成指南
      • 一键支付集成指南
    • 开源建站工具插件支持

      • Magento235
      • Woocommerce
      • OpenCart
      • Prestashop
      • ZenCart
  • APIs

    • 交易下单

      • 获取跳转收银台
      • 收银台SDK参数
      • 端到端直连-仅信用卡
      • 统一下单-本地支付&信用卡
      • 退款
      • 预授权确认
      • 预授权取消
      • 修改交易信息
    • 交易查询

    • 快捷支付

    • 一键支付

    • 拒付管理

    • 风控管理

    • 物流信息

    • 交易账单

    • 币种汇率

    • 商户信息

    • KYB方案

  • 工具

  • 附录

  • v3

3D Secure 认证集成-riskJS组件

# 3D Secure-riskJS组件集成指南

# 引入riskJs组件

 <script src="https://pay-cdn.pingpongx.com/production-fra/static/risk-control/dist/acquirerRiskControl.min.js"></script>
1

# 初始化

# 构造方法

window.PingPongRiskControl(options, callback)
1
属性 类型 必填 描述
options.env String(12) M 沙箱-sandbox 生产-prod
options.accId String(32) M PingPong商户号
options.clientId String(32) M PingPong店铺号
options.merchantUserId String(64) M 商户网站唯一标识
options.requestId String(64) M 订单关联唯一标识
callback(this) Function O 回调函数

# 调用示例

//初始化参数
let options = {
    env: env, // 沙箱-sandbox 生产-prod
    accId: accId,
    clientId: clientId,
    merchantUserId: merchantUserId,
    requestId: requestId
}

const client = new window.PingPongRiskControl(options, callback)

1
2
3
4
5
6
7
8
9
10
11

# 调用 installLight_S2S

client.installLight_S2S()
1

至此,riskJs组件初始化部分已经完成。

# 收集卡信息进行3D init

  • 为了收集完整正确的卡号,该方法可在 卡号 和 卡有效期 input 失焦后进行触发,调用后插件将自行进行3DS初始化操作。
  • 初始化完成之后,插件将jsGeneratedData注入回调函数-callback。
  • 需要定时等待获取到jsGeneratedData提交订单,超时未获未获取到jsGeneratedData可以先提交订单,但当前交易若决策为需要3DS验证,则无法进行3DS challenge流程。

# 构造方法

client.complexInit(options, callback)
1

# 3D init入参


参数必填属性说明:必填(M),可选(O),条件必填(C)。

属性 类型 必填 描述
options.accId String(64) M PingPong 商户店铺编号
options.merchantUserId String(64) M 商户网站会员唯一标识
options.requestId String(64) M 订单关联唯一标识
callback(this) Function O 回调函数

cardInfo和cardToken,二者必须传送其中一项。

# cardInfo

属性 类型 必填 描述
options.cardNumber String(12) C 国际信用卡卡号
options.cardExpireMonth String(32) C 有效期-月,2位数字
options.cardExpireYear String(64) C 有效期-年,4位数字

# cardToken

属性 类型 必填 描述
options.cardToken String(32) C 可以用来替代cardInfo

# 调用示例

let initOptions = {
    cardNumber: cardNumber, // 卡号: 插件会自己判断当前卡号长度是否 >= 15
    cardToken: cardToken,
    cardExpireMonth: cardExpireMonth,
    cardExpireYear: cardExpireYear, // 2022 || 22
    cardBrand: cardBrand,
    accId: accId,
    merchantUserId: merchantUserId,
    requestId: requestId
}

client.complexInit(initOptions, callback)

function callback(jsGeneratedData){
    // 自动注入jsGeneratedData
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# jsGeneratedData 的属性


参数必填属性说明:必填(M),可选(O),条件必填(C)。

属性 备注
threeDInitTransId
threeDSecureReferenceId
channel
correlationId
fingerPrint
forterSiteId
forterTokenCookie
threeDSServerTransID
version

# 统一下单报文组装

在统一下单API中,上送下列参数:

  • jsGeneratedData (执行3DS流程的必要条件)
  • browserInfo (可选,建议上送,可以提高交易成功率)

# 3DS 验证处理

# 如何处理

  • 商户在调用接口-统一下单之后,根据响应的交易状态与 threeDContinue 处理标识判断是否需要3DS验证处理。
  • 如果支付状态 status 为 PROCESSING并且threeDContinue 为 true,商户前端需要执行风控JS提供的complexTrigger函数。
  • 将接口返回 的 threeDUnionParams 作为入参调用 complexTrigger 函数,风控JS会引导浏览器到3D挑战页,持卡人需要正确的完成3D验证,才能成功交易。

# complexTrigger

client.complexTrigger(threeDUnionParams, callback)
1
属性 必填 备注
threeDUnionParams M 调用PingPongCheckout创建订单后返回的threeDUnionParams
callback O 商户可在此处理正常支付流程。若该笔交易进入3D流程,则该回调不会执行,否则执行该回调函数,处理正常支付逻辑

``

上次更新: 2023/04/26, 20:55:11
杭州乒乓智能技术有限公司 | Copyright © 2015-2026 checkout.pingpongx.com.All Rights Reserved.
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式