gpt4 book ai didi

paypal - 很抱歉,我们现在无法完成您的付款。请稍后再试 - PayPal Payments Pro

转载 作者:太空宇宙 更新时间:2023-11-03 15:55:14 31 4
gpt4 key购买 nike

我已经实现了 Website Payments Pro Hosted 的 IFrame 版本.我使用按钮 API 注册我的按钮,取回一个 Url 以输入到一个 IFrame,该 IFrame 显示 PayPal 通过信用卡支付或登录和支付选项。

我的集成在登录和使用我的 PayPal 帐户时正常工作,但是当我输入信用卡详细信息时,出现错误:

We’re sorry, we can’t complete your payment now. Please try again later.

我没有得到任何其他信息表明这个和我的通知 Url 没有被错误代码或任何东西触及。

这是我用来获取要输入到 IFrame 的 Url 的代码(注意:我添加了帐单地址字段,假设它可能会引发错误,因为我需要地址详细信息才能通过卡支付。

public PayPalPaymentProRegistrationResponse RegisterTransaction(PayPalPaymentProRequest request)
{
CountryCodeType countryCodeType;
if (!Enum.TryParse(request.Order.BillingContact.Address.Country.Iso2Code, true, out countryCodeType))
return new PayPalPaymentProRegistrationResponse(PayPalPaymentProRegistrationResponseType.Error, "Billing country not supported.");

var service = new PayPalAPIInterfaceServiceService(GetConfig(request));
var createButtonResponse = service.BMCreateButton(new BMCreateButtonReq
{
BMCreateButtonRequest = new BMCreateButtonRequestType
{
ButtonType = ButtonTypeType.PAYMENT,
ButtonCode = ButtonCodeType.TOKEN,
ButtonCountry = countryCodeType,
ButtonVar = new List<string>
{
String.Format("subtotal={0}", _salesOrderPriceService.GetGrossTotal(request.Order)),
String.Format("notify_url={0}", request.NotifyUrl),
String.Format("return={0}", request.ReturnUrl),
String.Format("invoice={0}", request.Order.Id),
String.Format("currency_code={0}", request.Order.Currency.Code),
String.Format("cancel_return={0}", request.CancelReturnUrl),
"billing_first_name=my",
"billing_last_name=name",
"billing_address1=address 1",
"billing_city=town",
"billing_state=county",
"billing_zip=PO CODE",
"billing_country=GB",
"showHostedThankyouPage=true",
"template=templateD"
}
}
});

return new PayPalPaymentProRegistrationResponse
{
ForwardingUrl = createButtonResponse.Email,
Status = PayPalPaymentProRegistrationResponseType.Ok
};
}

注意:我使用的信用卡号是 4111111111111111。如果我尝试使用其他号码 4929000000006,它将返回一个不同的错误,指出信息无效并突出显示信用卡号码字段,因此我确信我使用的测试号码是正确的。

我正在使用我的 Sandbox 帐户进行集成。

有没有人对可能出现的问题有任何看法?

最佳答案

原来我用于 SandBox 的信用卡号是错误的。您需要登录您的 Sandbox 帐户并查看配置文件。在其中,您会看到一个可以用来测试的信用卡号码。

我还在我的按钮请求中添加了 "paymentaction=sale"

完成这两项后,它现在需要付款。

关于paypal - 很抱歉,我们现在无法完成您的付款。请稍后再试 - PayPal Payments Pro,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30106441/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com