PayPal SEPA付款按钮未显示



我正在使用PayPal,希望在我当前的网站上添加付款方式SEPA。以下是我关注的一些例子:

  1. https://developer.paypal.com/docs/checkout/integration-features/standalone-buttons/#funding-来源
  2. https://demo.paypal.com/de/demo/go_platform/pcRestServerV2/paymentOptions

所以基本上我没有得到上面第二个链接上显示的SEPA按钮。

这是我的代码,可以帮助您识别我做错了什么

var FUNDING_SOURCES = [
paypal.FUNDING.PAYPAL,
paypal.FUNDING.VENMO,
paypal.FUNDING.CREDIT,
paypal.FUNDING.CARD,
paypal.FUNDING.SEPA,
];
FUNDING_SOURCES.forEach(function(fundingSource) {
// Initialize the buttons
var button = paypal.Buttons({
fundingSource: fundingSource
});
// Check if the button is eligible
if (button.isEligible()) {
// Render the standalone button for that funding source
button.render('#paypalCheckoutContainer');
}
});

您检查和提供特定资金来源有什么原因吗?你可以让PayPal自动处理,而不是forEach循环。基本上,在中使用更简单的代码;https://developer.paypal.com/demo/checkout/#/pattern/client

如果您所在的国家/地区不默认显示SEPA,请在沙箱模式下测试时将&buyer-country=DE添加到SDK脚本查询字符串行。这样做只是为了在沙箱模式下测试其他国家,它在live中不是一个有效的参数。买家所在的国家/地区将在直播中自动检测。

最新更新