我已經使用以下代碼集成了2Checkout Payment API,但在授權客戶時出錯。「Value can not be null。Parameter name:s」2Checkout payment API
如下:https://www.2checkout.com/documentation/libraries-net-tutorial
代碼:
public ActionResult Process()
{
TwoCheckoutConfig.SellerID = "801785575";
TwoCheckoutConfig.PrivateKey = "SA7947DS-CWE1-1233-4EE-33331DA607B6";
TwoCheckoutConfig.Sandbox = true;
try
{
var Billing = new AuthBillingAddress();
Billing.addrLine1 = "123 test st";
Billing.city = "Columbus";
Billing.zipCode = "43123";
Billing.state = "OH";
Billing.country = "USA";
Billing.name = "Testing Tester";
Billing.email = "[email protected]";
var Customer = new ChargeAuthorizeServiceOptions();
Customer.total = (decimal)1.00;
Customer.currency = "USD";
Customer.merchantOrderId = "123";
Customer.billingAddr = Billing;
Customer.token = Request["token"];
var Charge = new ChargeService();
var result = Charge.Authorize(Customer);
Console.Write(result);
}
catch (TwoCheckoutException e)
{
Console.Write(e);
}
return View();
}
遇到錯誤 「值不能爲空參數名:的」 請幫助我..
感謝,
感謝您的答覆,但我在哪裏可以找到更新TwoCheckOut.dll。我已經從這裏申請DLL https://github.com/2Checkout/2checkout-dotnet – Pratik
更新包後得到同樣的錯誤 – Pratik