現象
Stripe-samples の checkout-one-time-payments の client-only を試してて、http://localhost:4242/ を開き Buy for $5.0 ボタンを押しても次に遷移しません
Console を見てみると掲題の Error で止まってます
調査
successUrl must start with either http:// or https://.
との事なので index.html で successUrl を探すと
successUrl:
DOMAIN + "/success.html?session_id={CHECKOUT_SESSION_ID}",
で、DOMAIN は
var DOMAIN = window.location.hostname;
console で見てみると
window.location.hostname
"localhost"
プロトコルないですね
workaround
var DOMAIN = "http://" + window.location.hostname;
無事にうごきました
おまけ
successUrl に遷移しようとしてまたエラーになるので、こっちのほうがいいかもしれません
var DOMAIN = "http://" + window.location.hostname + ":4242";