gpt4 book ai didi

php - 将 Stripe 按钮文本 "Pay"更改为其他文本

转载 作者:行者123 更新时间:2023-12-01 04:36:38 25 4
gpt4 key购买 nike

我有下面的代码来使用 Stripe。但出现的按钮上有类似“Pay 10.05”的文字。您知道如何将文本“付款”更改为其他文本吗?

使用 data-panel-label 和 data-label 会出现错误“:预期”。

您知道如何正确地将“付款”更改为其他文本吗?

$(function () {
let stripe = StripeCheckout.configure({
key: "{{config('services.stripe.key')}}",
image: "",
locale: "auto",
token: (token) => {
document.querySelector('#stripeToken').value = token.id;
document.querySelector('#paymentForm').submit();
}
});

document.getElementById('payment').addEventListener('click', function(e){
stripe.open({
name: 'Payment',
description: '{{session('name')}}',
amount: '{{session('totalStripe')}}',
currency: 'eur',
allowRememberMe: false
});
e.preventDefault();
});
});

最佳答案

您可以使用 panelLabel 选项进行自定义。了解更多 here

let stripe = StripeCheckout.configure({
key: "{{config('services.stripe.key')}}",
image: "",
locale: "auto",
panelLabel: "GiveMeMoney"
token: (token) => {
document.querySelector('#stripeToken').value = token.id;
document.querySelector('#paymentForm').submit();
}
});

关于php - 将 Stripe 按钮文本 "Pay"更改为其他文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51748332/

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