[英]Hiding the PayPal Credit button on Braintree JavaScript v4 SDK
我將此張貼在這里,希望有一些 Braintree/PayPal 工程師在 StackOverflow 上尋找支持問題。 我已經兩次通過他們的新表格提交支持票,但沒有得到回復。
我們最近注意到,“PayPal Credit”按鈕出現在我們的支付頁面上,我們沒有更改任何代碼來打開它。
我們將如何禁用它?
此外,僅在沙盒帳戶上顯示此內容是默認行為嗎? 這似乎並沒有影響我們的生產環境(還)。
我們正在使用 JavaScript SDK 的 v4:
braintreeClient: "https://js.braintreegateway.com/web/3.87.0/js/client.min",
hosted_fields: "https://js.braintreegateway.com/web/3.87.0/js/hosted-fields.min",
checkoutJs: "https://www.paypalobjects.com/api/checkout.min",
paypalCheckout: "https://js.braintreegateway.com/web/3.87.0/js/paypal-checkout.min"
我試過通過offerCredit: false
,但這沒有效果:
// Set up PayPal with the checkout.js library
paypal.Button.render({
env: '{{ braintree_env }}', // 'sandbox' or 'production'
style: {
label: 'paypal',
size: 'responsive', // small | medium | large | responsive
shape: 'rect', // pill | rect
color: 'white', // gold | blue | silver | black
tagline: false,
width: 500,
height: 55
},
payment: function () {
return paypalCheckoutInstance.createPayment({
flow: 'vault', // required to allow us to charge the account in future without re-authentication
offerCredit: false
});
},
對於已棄用的 (v4) checkout.js,啟用或禁用現有帳戶上的信用按鈕可能需要帳戶級別的切換,因此 Braintree/PayPal 需要為您完成。
編輯:嘗試在paypal.Button.render(
:
funding: {
disallowed: [window.paypal.FUNDING.CREDIT]
},
當前 (v5) JS SDK 集成具有 fundingSource 參數來呈現特定按鈕。 (如果渲染多個智能的,還有一個 disable-funding 腳本參數,但它對 Braintree 沒那么有用)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.