Translation disclaimer

Documentation is written in English and subsequently translated. This page, therefore, might not have the most up-to-date content. If any questions arise relating to the accuracy of the translated content, please refer to the English version of the page.

Menu

请求与响应

在完成必要的测试之后,您就可以开始使用 API。

使用 FTP

  1. 提交账户更新器请求

  2. 从我们接收确认响应

    • 如果响应指出了任何错误,则您必须更正错误,然后再重新提交新的请求
  3. Visa 和 MasterCard 向我们发送包含所请求信息的文件

  4. 我们发送完成响应

  5. 使用 [FTP] 检索您的文件(/zh/docs/access-worldpay/account-updater/testing/ftp)

批量请求

流程的第一步是提交账户更新器批量请求。

请求 XML 结构

在提交请求时,您可以使用卡或 token 信息。您必须使用以下结构:

Copied!
<cnpRequest  version="12.0" xmlns="http://www.vantiv.cnp.com/schema&quot; id="requestId" numBatchRequests="1">
 <authentication>
     <user>JohnSmith</user>
     <password>Password1234</password>
 </authentication>
 <batchRequest  id="batchId" numAccountUpdates="2" merchantId="testMerchant01">
     <accountUpdate  id=”1234” reportGroup"merchant01ReportGrpoup">
     <orderId >123456</orderId>
     <card>
         <type>Visa</type>
         <number>123412312345123</number>
         <expDate>0721</expDate>
     </card>
     </accountUpdate>
     <accountUpdate id=”1235” reportGroup="merchant01ReportGrpoup">
         <orderId>123456</orderId>
         <token>
             <cnpToken >12345678912345</cnpToken>
             <expDate>0721</expDate>
         </token>
     </accountUpdate>
 </batchRequest>
</cnpRequest>

有关我们账户更新器元素的更多详情,请单击此处

确认响应

在您提交请求时,Worldpay 会返回确认响应。该响应确认请求已收到并且包含验证信息。

确认响应 XML 结构

Copied!
<cnpResponse  version= "11.2" response="0" message="Valid Format" cnpSessionId="1700000128">
 <batchResponse  cnpBatchId="1700000136" merchantId="TestMerchant01">
 <accountUpdateResponse  id=”1234” reportGroup="MerchantReportGroup01">
 <cnpTxnId>123456789</cnpTxnId>
 <orderId>123456</orderId>
 <response>000</response>
 <responseTime>2009-12-21T11:37:04</responseTime>
 <message>Approved</message>
 </accountUpdateResponse>
 </batchResponse>
</cnpResponse>

有关我们账户更新器元素的更多详情,请单击此处

确认响应代码

我们会在收到请求时通知您。如果响应文件指出了任何错误,则您必须解决问题,然后在新的账户更新器请求中提交已更正的账户信息。

响应代码响应消息解决方案
000已批准我们将这些账户转发给 Visa 和 MasterCard。
301无效账号卡号无效。更正账号,然后重新提交数据。
320无效过期日期过期日期无效。更正过期日期,然后重新提交卡数据。
821商户未授权使用 token您未授权使用 token 。
822未找到 token系统中未找到提交的 token 。更正 token 号,然后重新提交。
823token 无效提交的 token 未通过验证。更正 token 号,然后重新提交。
899通用 token 使用错误存在未规定的 token 使用错误;请联系客户服务部门。

完成响应

我们返回完成响应,其中包括更新后的客户账户信息和网络提供的原因代码。您可以使用该信息来更新客户账户信息。

通常,我们会在您首次提交批量请求的五天之后生成该文件。

完成响应格式

以下示例介绍了确认响应和完成响应的树形结构视图。

注释:如果提交的卡/ token 信息中没有更改,则系统会返回原始卡/ token 信息。但该响应不包含 updatedCardupdatedToken 子元素。

完成响应 XML 结构

Copied!
<cnpResponse  version= "11.2" response="0" message="Merchant Fiscal Day: 06102010" cnpSessionId="1700000128">
    <batchResponse  cnpBatchId="1700000136" merchantId="TestMerchant01">
        <accountUpdateResponse  id=”1234” reportGroup= "MerchantReportGroup01">
            <cnpTxnId >123456789</cnpTxnId>
            <orderId >123456</orderId>
            <response >000</response>
            <responseTime >2009-12-21T11:37:04</responseTime>
            <message >Approved</message>
            <originalCard >
                <type >Visa</type>
                <number >123412312345123</number>
                <expDate >0721</expDate>
            </originalCard>
            <updatedCard >
                <type >Visa</type>
                <number >1234123123451224</number>
                <expDate >0725</expDate>
            </updatedCard>
        </accountUpdateResponse>
            <accountUpdateResponse  id=”1235” reportGroup= "MerchantReportGroup01">
            <cnpTxnId>123456789</cnpTxnId>
            <response>000</response>
            <responseTime>2009-12-21T11:37:04</responseTime>
            <message>Approved</message>
            <originalToken>
                <cnpToken>12345678912345</cnpToken>
                <expDate>0721</expDate>
                <type>Visa</type>
                <bin>123456</bin>
            </originalToken>
            <updatedToken>
                <cnpToken>12345622912345</cnpToken>
                <expDate>0725</expDate>
                <type>Visa</type>
                <bin>123456</bin>
            </updatedToken>
            </accountUpdateResponse>
    </batchResponse>
</cnpResponse>

有关我们账户更新器元素的更多详情,请单击此处

完成响应代码

账户更新器完成响应代码及其相关消息(如账户更新器完成响应代码中所示)指定了账号是否已更改,以及更改的类型(如有更改)。

  • 响应代码值出现在“”元素中。
  • 响应消息值出现在“”元素中。
  • 解决方案列提供了建议的操作。
响应代码响应消息解决方案
191商户未在更新计划中注册将此问题上报给您的客户体验经理。这表示了在提交另一个请求文件之前必须解决的设置问题。
500该账号已更改提交在完成响应中返回的账号。该响应还可能表示账号和过期日期均已更改。
501该账户已关闭请联系持卡人提交更新信息。
502过期日期已更改提交在完成响应中返回的过期日期。
503发卡银行未参加更新计划。发卡机构未参加账户更新器计划。提交原始卡信息。
504请联系持卡人提交更新信息请联系持卡人提交更新信息。
505未找到匹配项在更新信息中未找到匹配项。提交原始卡信息。
506未找到更改提交原始卡信息。