init: 1.0.0

This commit is contained in:
Chang lue Tsen
2025-04-25 12:08:29 +09:00
commit 8addcc584b
1031 changed files with 76472 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://js.stripe.com/v3/"></script>
</head>
<body>
<button id="payment">提交</button>
<script>
const stripe = Stripe('pk_test_51L4gYuHqdC7TVcHRMpjoxpdlNM3MwlcWHFYHmSSUjkjzE9x0IlKqxcYvSxnPXD5ahxdxSxVf6kJf7AEwpwmTqATx005M6v5QDe');
const btn = document.getElementById('payment');
btn.addEventListener('click',async ()=>{
try {
// wechatpi_3Q8kM5HqdC7TVcHR10ESkDJD_secret_sEJxtzWruoYEPjLbpKIC4Z0Ae
// alipaypi_3Q8kTxHqdC7TVcHR08NCtdE5_secret_wpc54Pa1EXxoccznERFjKvxHr
const {error, paymentIntent}= await stripe.confirmAlipayPayment('',
{
payment_method_options: {
wechat_pay: {
client: 'web',
},
},
},
{
handleActions: false,
}
)
if (error) {
console.error(error)
} else {
console.log(paymentIntent)
}
}catch (e) {
console.log(e)
}
})
</script>
</body>
</html>