是否可以在Authorize.net php代码中给出amount = 0

时间:2014-01-22 14:18:29

标签: php authorize.net

是否可以将amount = 0传递给Authorize.net  我使用了Authorize.net重复发布的PHP代码

我的xml代码是

$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>" . $name . "</name>".
                        "<paymentSchedule>".
                        "<interval>".
                        "<length>". $length ."</length>".
                        "<unit>". $unit ."</unit>".
                        "</interval>".
                        "<startDate>" . $startDate . "</startDate>".
                        "<totalOccurrences>". $totalOccurrences . "</totalOccurrences>".
                        "<trialOccurrences>". $trialOccurrences . "</trialOccurrences>".
                        "</paymentSchedule>".
                        "<amount>". $amount ."</amount>".
                        "<trialAmount>" . $trialAmount . "</trialAmount>".
                        "<payment>".
                        "<creditCard>".
                        "<cardNumber>" . $cardNumber . "</cardNumber>".
                        "<expirationDate>" . $expirationDate . "</expirationDate>".
                        "</creditCard>".
                        "</payment>".
                        "<billTo>".
                        "<firstName>". $firstName . "</firstName>".
                        "<lastName>" . $lastName . "</lastName>".
                        /*"<address>" . $address . "</address>".
                        "<city>" . $city . "</city>".
                        "<state>" . $state . "</state>".
                        "<zip>" . $postalcode . "</zip>".
                        "<country>US</country>".*/
                        "</billTo>".
                        "</subscription>".
                        "</ARBCreateSubscriptionRequest>";

1 个答案:

答案 0 :(得分:0)

不是定期订阅,因为零不是有效值。