2017-07-11 36 views
0

我们与Authorize.net进行了集成,并且我们正在实施Accept.js以支持信用卡付款。唯一的问题是,在API参考文件(http://developer.authorize.net/api/reference/features/acceptjs.html)中似乎没有字段/方法来接收客户的账单信息并将其传递给Authorize.net,因此交易详情中将提供相同的信息。如何通过Authorize.net使用accept.js传递账单信息

任何人都可以帮助我们了解如何使用Accept.js来询问客户账单信息吗?

回答

1

这是非常简单,您只需更换支付数据与下面包括您使用Accept.js收到付款现时的XML规则的API调用...

<payment> 
     <opaqueData> 
      <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor> 
      <dataValue>PAYMENT_NONCE</dataValue > 
     </opaqueData> 
     </payment> 

代替:

<payment> 
     <creditCard> 
     <cardNumber>5424000000000015</cardNumber> 
     <expirationDate>1220</expirationDate> 
     <cardCode>999</cardCode> 
     </creditCard> 
    </payment> 
在常规API调用

,如下图所示:

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> 
      <merchantAuthentication> 
      <name>YOUR_API_LOGIN</name> 
      <transactionKey>YOUR_TRANSACTION_KEY</transactionKey> 
      </merchantAuthentication> 
      <refId>123456</refId> 
      <transactionRequest> 
      <transactionType>authCaptureTransaction</transactionType> 
      <amount>10</amount> 
      <payment> 
       <opaqueData>    
     <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor> 
        <dataValue>PAYMENT_NONCE</dataValue > 
       </opaqueData> 
       </payment> 
      <order> 
      <invoiceNumber>INV-12345</invoiceNumber> 
      <description>Product Description</description> 
      </order> 
      <lineItems> 
       <lineItem> 
       <itemId>1</itemId> 
       <name>vase</name> 
       <description>Nice Vase </description> 
       <quantity>1</quantity> 
       <unitPrice>45.00</unitPrice> 
       </lineItem> 
      </lineItems> 
       <shipping> 
       <amount>4.26</amount> 
       <name>level2 tax name</name> 
       <description>level2 tax</description> 
      </shipping> 
      <poNumber>456654</poNumber> 
      <customer> 
       <id>99999456654</id> 
      </customer> 
      <billTo> 
       <firstName>Sue</firstName> 
       <lastName>Smith</lastName> 
       <company>ACME Vases</company> 
       <address>102 Main Street</address> 
       <city>Palm Springs</city> 
       <state>CA</state> 
       <zip>92234</zip> 
       <country>USA</country> 
      </billTo> 
      </transactionRequest> 
     </createTransactionRequest>