我在首页中使用Stripe付款方式,效果很好。我只想更改“付款”按钮的颜色,如所附图像所示。
这是用来显示弹出窗口的代码
<script>
var handler = StripeCheckout.configure({
key: '[KEY]',
image: 'https://www.emotionacademy.com.au/images/emotion-academy-logo.png',
locale: 'auto',
token: function(token) {
$( "#stripeToken" ).val( token.id);
$( "#stripeEmail" ).val( token.email);
$( "#paymentForm" ).submit();
}
});
$( ".btn-price-table" ).click(function(event) {
var price = $(this).closest('.pricing-table').find('.price span').text()*100;
var title = $(this).closest('.pricing-table').find('.pricing-title').text().toUpperCase();
handler.open({
name: title,
description: '',
zipCode: true,
currency: 'aud',
amount: price
});
event.preventDefault();
});
</script>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句