Muh*_*ifa 5 javascript strip manifest google-chrome-extension stripe-payments
工作时出现以下错误:
无法在脚本标记中使用 sr,如下所示:
<script src="https://js.stripe.com/v3/" async></script>
手动添加后,现在安装卡,但不知道如何在提交带有卡值的表单后创建结账。
以下功能不起作用:
fetch('/create-checkout-session', {
method: 'POST',
})
.then(function (response) {
console.log('response', response);
// return response.json();
})
.then(function (session) {
console.log('session', session);
// return stripe.redirectToCheckout({ sessionId: session.id });
})
.then(function (result) {
console.log('result', result)
// If `redirectToCheckout` fails due to a browser or network
// error, you should display the localized error message to your
// customer using `error.message`.
// if (result.error) {
// alert(result.error.message);
// }
});
Run Code Online (Sandbox Code Playgroud)
错误:
POST chrome-extension://nldmbdiekelgaahflcjkhigmiochfaib/create-checkout-session net::ERR_FILE_NOT_FOUND
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
204 次 |
| 最近记录: |