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

标签 paypal paypal-sandbox

我已经实现了 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/

相关文章:

android - 如何从 Card.io Phonegap iOS 和 Android 中删除/隐藏 Paypal Logo ?

Paypal 沙箱阻止交易

paypal - Sandbox api curl (5) SSL 连接错误

paypal - 没有交易ID的付款自适应付款返回网址

Android Paypal 启动按钮 OnClick 在 Activity 生命周期内只执行一次

paypal - Omnipay 和 Payum 的区别

ios - PayPal MPL 的内部服务器错误

asp.net-mvc - Paypal Sandbox直接支付内部错误10001超时处理请求

PayPal Sandbox 帐户新设计,无法登录

c# - PayPal 快速结帐在 MVC .net 中以 html 形式返回响应