如何删除authorize.net发送xml请求的账单信息?

时间:2015-08-10 13:43:43

标签: php payment-gateway authorize.net

如何在向authorize.net cim api发送请求时删除结算或发货信息。我试过这样但没有得到任何回应 下面是xml格式

$input_xml = '<?xml version="1.0" encoding="utf-8" ?>
<getHostedProfilePageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>xxxxxxx</name>
<transactionKey>xxxxxxxxx</transactionKey>
</merchantAuthentication>
<hostedProfileSettings>
<setting>
<settingName>hostedProfileReturnUrl</settingName>
<settingValue>https://www.google.co.in/</settingValue>
</setting>
<setting>
<settingName>hostedProfileReturnUrlText</settingName>
<settingValue>Continue to xtg.</settingValue>
</setting>
<setting>
<settingName>hostedProfilePageBorderVisible</settingName>
<settingValue>true</settingValue>
</setting>
</hostedProfileSettings>
</getHostedProfilePageRequest>';

    //setting the curl parameters.
$url = "https://test.authorize.net/profile/addPayment";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_POSTFIELDS,
                "xmlRequest=" . $input_xml);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 300);
    $data = curl_exec($ch);
    curl_close($ch);
    //convert the XML result into array
    $array_data = json_decode(json_encode(simplexml_load_string($data)), true);
    print_r('<pre>');
    print_r($array_data);
    print_r('</pre>');

1 个答案:

答案 0 :(得分:0)

是的,现在它正在运作。我给出了正确的api登录ID