0
스트라이프 체크 아웃 사용자 정의를 사용하려고하지만 동일한 정보가 처리 될 수 있도록 다음과 같은 게시물을 얻는 것처럼 보입니다.스트라이프가 같은 페이지에 게시되지 않습니다
<form action="" method="POST">
<script src="https://checkout.stripe.com/checkout.js"></script>
<button id="customButton">Purchase</button>
<script>
var handler = StripeCheckout.configure({
key: 'example_key_123',
image: 'https://stripe.com/img/documentation/checkout/marketplace.png',
locale: 'auto',
token: function(token) {
// You can access the token ID with `token.id`.
// Get the token ID to your server-side code for use.
}
});
document.getElementById('customButton').addEventListener('click', function(e) {
// Open Checkout with further options:
handler.open({
name: 'Test',
description: '2 widgets',
currency: 'aud',
amount: 2000
});
e.preventDefault();
});
// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
handler.close();
});
</script>
</form>