我可以成功创建 ARB 订阅。但据我从文档中可以看出,信用卡在收费之前不会被验证。
所以我的理解是我需要使用 AIM 和 VOID 0.01 的费用。
$content =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" .
"<ARBCreateSubscriptionRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">" .
"<merchantAuthentication>".
"<name>" . $loginname . "</name>".
"<transactionKey>" . $transactionkey . "</transactionKey>".
"</merchantAuthentication>".
"<refId>" . $refId . "</refId>".
"<subscription>".
"<name>" . "Payment" . "</name>".
"<paymentSchedule>".
"<interval>".
"<length>". 1 ."</length>".
"<unit>". "months" ."</unit>".
"</interval>".
"<startDate>" . $today . "</startDate>".
"<totalOccurrences>". 9999 ."</totalOccurrences>".
"<trialOccurrences>". 0 . "</trialOccurrences>".
"</paymentSchedule>".
"<amount>". $contractorRate ."</amount>".
"<trialAmount>" . 0.00 . "</trialAmount>".
"<payment>".
"<creditCard>".
"<cardNumber>" . $ccnumber . "</cardNumber>".
"<expirationDate>" . $ccexpire . "</expirationDate>".
"</creditCard>".
"</payment>".
"<billTo>".
"<firstName>". $firstname . "</firstName>".
"<lastName>" . $lastname . "</lastName>".
"</billTo>".
"</subscription>".
"</ARBCreateSubscriptionRequest>";
//send the xml via curl
$response = send_request_via_curl($host,$path,$content);
因此,在我收到 $response 的成功回复之前,我需要取消对他们信用卡的收费。
我的理解正确吗?这样做的最佳方法是什么?