Authorize.Net中是否弃用了XML API?

时间:2019-07-10 19:26:18

标签: deprecated authorize.net

我听说authorize.net有一个新的API。我使用API​​管理定期付款,在该处我发送如下所示形式的XML请求(在PHP中,即$ authnet_等将由实际值代替)。不推荐使用吗?

<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<ARBCreateSubscriptionRequest xmlns= \"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">
      <merchantAuthentication>
          <name>$authnet_loginname</name>
          <transactionKey>$authnet_transactionkey</transactionKey>
      </merchantAuthentication>
<subscription>
    <name>{$name}</name>
    <paymentSchedule>
       <interval>
          <length>$length</length>
          <unit>$unit</unit>
       </interval>
       <startDate>$startDate</startDate>
       <totalOccurrences>$totalOccurrences</totalOccurrences>
    </paymentSchedule>
    <amount>$intern_amount</amount>
    <payment>
       <creditCard>
          <cardNumber>$x_card_number</cardNumber>
          <expirationDate>$expirationDate</expirationDate>
       </creditCard>
    </payment>
    <order>
      <invoiceNumber>$action_id</invoiceNumber>
      <description>$description</description>
    </order>
    <customer>
       <email>$x_email</email>
       <phoneNumber> $x_phone </phoneNumber>
    </customer>
    <billTo>
       <firstName>$intern_first_name</firstName>
       <lastName>$intern_last_name</lastName>
       <address>$intern_address</address>
       <city>$intern_city</city>
       <state>$intern_state</state>
       <zip>$intern_zip</zip>
       <country>$intern_country</country>
    </billTo>
    <shipTo>
       <firstName>$intern_ship_to_first_name</firstName>
       <lastName>$intern_ship_to_last_name</lastName>
       <address>$intern_ship_to_address</address>
       <city>$intern_ship_to_city</city>
       <state>$intern_ship_to_state</state>
       <zip>$intern_ship_to_zip</zip>
       <country>$intern_ship_to_country</country>
    </shipTo>
    </subscription>
</ARBCreateSubscriptionRequest>

1 个答案:

答案 0 :(得分:1)

Authorize.Net没有弃用XML格式的API请求。它们与更新的JSON格式并行工作。

他们仍然在API Referencedocumentation上列出它。