Php ARB过程后在XML上授权.Net简单Chekout方法
在授权的网络ARB上付款成功后,我如何添加第二次直接邮寄方式。让我详细说明一下 假设一个用户将订阅会员资格,网站也将要求捐款。在ARB(XML版本)上支付会员费后,我如何通过授权的网络再次支付一次捐款。我试图使用ARB,但出现重复输入错误。让我将代码粘贴到这里以了解更多详细信息 我使用的ARB代码Php ARB过程后在XML上授权.Net简单Chekout方法,php,curl,payment-gateway,authorize.net,authorize.net-arb,Php,Curl,Payment Gateway,Authorize.net,Authorize.net Arb,在授权的网络ARB上付款成功后,我如何添加第二次直接邮寄方式。让我详细说明一下 假设一个用户将订阅会员资格,网站也将要求捐款。在ARB(XML版本)上支付会员费后,我如何通过授权的网络再次支付一次捐款。我试图使用ARB,但出现重复输入错误。让我将代码粘贴到这里以了解更多详细信息 我使用的ARB代码 $SubscrName = $FirstName." ".$LastName; $length = 12; $unit = "months";
$SubscrName = $FirstName." ".$LastName;
$length = 12;
$unit = "months";
$totatltenure = $CardExpYear-date("Y");
$start_date = date("Y-m-d");
$totalOccurrences = 1*$totatltenure;
$trialOccurrences = 0;
$trialAmount = 0;
$expirationDate = $CardExpYear."-".$CardExpMonth;
$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>" . $SubscrName . "</name>".
"<paymentSchedule>".
"<interval>".
"<length>". $length ."</length>".
"<unit>". $unit ."</unit>".
"</interval>".
"<startDate>" . $start_date . "</startDate>".
"<totalOccurrences>". $totalOccurrences . "</totalOccurrences>".
"<trialOccurrences>". $trialOccurrences . "</trialOccurrences>".
"</paymentSchedule>".
"<amount>". $TotalCosting ."</amount>".
"<trialAmount>" . $trialAmount . "</trialAmount>".
"<payment>".
"<creditCard>".
"<cardNumber>" . $CardNumber . "</cardNumber>".
"<expirationDate>" . $expirationDate . "</expirationDate>".
"<cardCode>".$CVV_Code."</cardCode>".
"</creditCard>".
"</payment>".
"<billTo>".
"<firstName>". $CardFirstName . "</firstName>".
"<lastName>" . $CardLastName . "</lastName>".
"<address>" . $CardStreet . "</address>".
"<city>" . $CardCity . "</city>".
"<state>" . $CardState . "</state>".
"<zip>" . $CardZip . "</zip>".
"</billTo>".
"</subscription>".
"</ARBCreateSubscriptionRequest>";
$response = send_request_via_curl($host,$path,$content);
if ($response)
{
list ($refId, $resultCode, $code, $text, $subscription_id) =parse_return($response);
if($resultCode == "Ok")
{
if($_SESSION['willdonate'] == 'donated' && $_SESSION['donateammount'] != '')
{
$SubscrName = $FirstName." ".$LastName;
$length = 2;
$unit = "months";
$totatltenure = 1;
$start_date = date("Y-m-d");
$totalOccurrences = 1;
$trialOccurrences = 0;
$trialAmount = 0;
$expirationDate = date("Y-m");
$TotalCosting = $_SESSION['donateammount'];
$contentDonation =
"<?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>" . $SubscrName . "</name>".
"<paymentSchedule>".
"<interval>".
"<length>". $length ."</length>".
"<unit>". $unit ."</unit>".
"</interval>".
"<startDate>" . $start_date . "</startDate>".
"<totalOccurrences>". $totalOccurrences . "</totalOccurrences>".
"<trialOccurrences>". $trialOccurrences . "</trialOccurrences>".
"</paymentSchedule>".
"<amount>". $TotalCosting ."</amount>".
"<trialAmount>" . $trialAmount . "</trialAmount>".
"<payment>".
"<creditCard>".
"<cardNumber>" . $CardNumber . "</cardNumber>".
"<expirationDate>" . $expirationDate . "</expirationDate>".
"<cardCode>".$CVV_Code."</cardCode>".
"</creditCard>".
"</payment>".
"<billTo>".
"<firstName>". $CardFirstName . "</firstName>".
"<lastName>" . $CardLastName . "</lastName>".
"<address>" . $CardStreet . "</address>".
"<city>" . $CardCity . "</city>".
"<state>" . $CardState . "</state>".
"<zip>" . $CardZip . "</zip>".
"</billTo>".
"</subscription>".
"</ARBCreateSubscriptionRequest>";
$responseDonation = send_request_via_curl($host,$path,$contentDonation);
if ($responseDonation)
{
var_dump($responseDonation);
exit;
list ($refId, $resultCodeDonation, $code, $text, $subscription_id) =parse_return($responseDonation);
if($resultCodeDonation == "Ok")
{}
}
}
}
}
$SubscrName=$FirstName.“$LastName;
$length=12;
$unit=“月”;
$TOTATLEHERITION=$CardExpYear日期(“Y”);
$start_date=日期(“Y-m-d”);
$TotalOccurrencess=1*$TotalLexture;
$trialOccurrences=0;
$trialAmount=0;
$expirationDate=$CardExpYear.“-”$CardExpMonth;
$content=
"" .
"" .
"".
"" . $罗金纳姆。"".
"" . $transactionkey。"".
"".
"" . $refId。"".
"".
"" . $我的名字。"".
"".
"".
"". $长度。”。
"". $单位。”。
"".
"" . $开始日期。"".
"". $全部事件。"".
"". $三元货币。"".
"".
"". $总成本计算。”。
"" . $特里亚拉蒙特。"".
"".
"".
"" . $卡号。"".
"" . $到期日。"".
“.$CVV_代码”。
"".
"".
"".
"". $CardFirstName。"".
"" . $CardLastName。"".
"" . $卡德街。"".
"" . $卡迪奇。"".
"" . $卡德斯塔。"".
"" . $卡兹普。"".
"".
"".
"";
$response=send_request_via_curl($host,$path,$content);
如果($答复)
{
列表($refId、$resultCode、$code、$text、$subscription\u id)=解析返回($response);
如果($resultCode==“确定”)
{
如果($U会话['Willdovate']=“捐赠”&$U会话['donateammount']!=”)
{
$SubscrName=$FirstName.“$LastName;
$length=2;
$unit=“月”;
$TOTATLE=1;
$start_date=日期(“Y-m-d”);
$totaloccurrents=1;
$trialOccurrences=0;
$trialAmount=0;
$expirationDate=日期(“Y-m”);
$TotalCosting=$\会话['donateammount'];
元捐款=
"" .
"" .
"".
“.$loginname.”。
“.$transactionkey.”。
"".
“.$refId.”。
"".
“.$SubscrName.”。
"".
"".
“.$length.”。
“.$单位。”。
"".
“.$start_date.”。
“.$totaloccurrents.”。
“.$trialOccurrences.”。
"".
“.$TotalCosting.”。
“.$trialAmount.”。
"".
"".
“.$CardNumber.”。
“.$expirationDate.”。
“.$CVV_代码”。
"".
"".
"".
“.$CardFirstName.”。
“.$CardLastName.”。
“.$CardStreet.”。
“.$CardCity.”。
“.$CardState.”。
“.$CardZip.”。
"".
"".
"";
$responseDonation=send_request_via_curl($host,$path,$content捐赠);
如果($响应国家)
{
var_转储(响应国家);
出口
列表($refId、$resultcodionation、$code、$text、$subscription\u id)=解析返回($responseDonation);
如果($ResultDedonation==“Ok”)
{}
}
}
}
}
这是我使用的代码,我尝试了两次ARB脚本来支付第二次,但我认为这不是正确的过程,所以我得到了一个重复输入的错误。有谁能帮我提供Direct Post方法的XML CUrl代码,比如我使用的ARB XML CUrl。我找了很多,没有找到合适的例子