angular - 如何更改 PayPal 按钮区域设置?

标签 angular paypal paypal-sandbox paypal-rest-sdk paypal-buttons

我在更改 PayPal 按钮上显示的语言时遇到问题:

PayPal Demo

当我添加以下代码时,语言不会改变(根据文档,它应该会改变):

paypal.Buttons({
    locale: 'de_DE',
    style: {
       layout: 'vertical',
       color: 'gold',
       shape: 'pill',
       label: 'pay',
       tagline: false,
    },
    ...
})

但是当我在脚本中更改它时,它确实发生了变化:
<script src="https://www.paypal.com/sdk/js?client-id=sb&currency=USD&locale=de_DE"></script>

如何使用 Button 配置对象设置语言以及为什么它没有按预期工作?

最佳答案

according to the documentation, it should change



您正在阅读哪些文档?旧版 checkout.js 的存档文档?

当前的 PayPal Checkout 文档明确指出,如果您需要设置按钮语言以匹配您的网站语言,locale should be specified on the script/SDK line .

但仅当您的网站使用特定语言并且需要匹配时才执行此操作。否则,可以自动检测最佳语言。

关于angular - 如何更改 PayPal 按钮区域设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60243323/

相关文章:

angular - 在 Angular 中更改 *ngFor 中的类

angular - 从实现它的地方传回对注入(inject)服务类的引用

html - 如何根据从 JSON 服务器收到的更改信息禁用 Angular 按钮

php - 通过paypal接收用户邮件

testing - Paypal 现场测试

angular - 如何解决 Angular CLI 错误 : Cannot find module 'ansi-colors' ?

Paypal IPN 意外更改

paypal - 在新的 PayPal 移动 SDK 和 3D 安全上输入地址

Paypal 在哪里设置接受沙盒中的数字商品支付

php - 如何集成 PayPal 快速结账?