在我的项目中,我为每个用户注册创建了Authorize.net (CIM)中的客户配置文件(而不是支付配置文件),我已经成功地实现了这一点。但我必须删除这些客户配置文件(而不是一个支付配置文件)动态,即当网站管理员删除每个用户从这个项目,必须删除客户配置文件从Authorize.net商户帐户。
请大家帮帮我!
发布于 2011-02-18 13:50:04
根据Authorize.Net CIM XML Guide使用第57页上的deleteCustomerProfileResponse应用编程接口调用:
此功能用于删除现有客户配置文件以及所有关联的客户支付配置文件和客户发货地址。
<?xml version="1.0" encoding="utf-8"?>
<deleteCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>YourUserLogin</name>
<transactionKey>YourTranKey</transactionKey>
</merchantAuthentication>
<customerProfileId>10000</customerProfileId>
</deleteCustomerProfileRequest>发布于 2013-09-04 19:26:25
必须有一个删除客户配置文件ID的函数,但是如果您想要删除客户支付配置文件,请在C#中使用此方法
public string DeleteCustPmtProfId(Int64 custProfID, Int64 custPmtProfID)
{
CustomerProfileWS.DeleteCustomerPaymentProfileResponseType response = SoapAPIUtilities.Service.DeleteCustomerPaymentProfile(SoapAPIUtilities.MerchantAuthentication, custProfID, custPmtProfID);
for (int i = 0; i < response.messages.Length; i++)
{
lblStatus.Text = lblStatus.Text + "<br/>Message: " + response.messages[i].text + "<br/>Response Code: " + response.resultCode + "<br/>";
}
}发布于 2019-09-12 14:02:29
删除客户配置文件可以删除所有关联的付款配置文件和发货地址配置文件。你可以使用下面的代码,这肯定是有效的。
$xml = new AuthnetXML(AUTHNET_LOGIN, AUTHNET_TRANSKEY, AuthnetXML::USE_DEVELOPMENT_SERVER);
$xml->deleteCustomerProfileRequest(array(
'customerProfileId' => '5427896'
));https://stackoverflow.com/questions/5037700
复制相似问题