0
好吧,這是我的問題。我正在嘗試爲我正在構建的產品構建定期付款服務。我現在使用Authorize.Net來構建它。我下載了他們的源代碼和API,並將其插入我的代碼隱藏文件中。如何使用Authorize.Net API更新SubscriptionRequest調用的發票號碼?
這裏是我的代碼看起來像現在:
try
{
// create the address
var address = new Address
{
Street = "123 4th Street",
City = "Awesome City",
State = "MD",
Zip = "12345",
Country = "US",
Company = "Doe's Company",
First = "John",
Last = "Doe",
ID = new Guid().ToString(),
Phone = "(123) 456-7890"
};
// create the request
SubscriptionRequest request =
SubscriptionRequest.CreateMonthly("[email protected]", "Test Subscription", 10.00M)
.UsingCreditCard("John", "Doe", "4007000000027", 2020, 12)
.WithBillingAddress(address);
// create the gateway, sending in your credentials
var gate = new SubscriptionGateway(ConfigurationManager.AppSettings["apiloginid"], ConfigurationManager.AppSettings["transactionkey"], ServiceMode.Test);
// make some money
ISubscriptionRequest response = gate.CreateSubscription(request);
return Json(response.SubscriptionID);
}
catch (Exception ex)
{
return Json(ex.Message);
}
每次我打電話,我得到一個錯誤說:
錯誤處理請求:E00012 - 您所提交的副本 訂閱1983944.重複訂閱不會被創建。
我查了一下,發現我需要更新發票號碼,只要我想提交新的訂閱。使用SubscriptionRequest,我似乎無法做到這一點。
有誰知道我可以怎樣去更新發票號碼?
我認爲這個錯誤信息會給你所有需要的見解。已創建重複的訂閱...創建訂閱後,您爲什麼需要更新發票號碼。 – Botonomous