passing key using form
This commit is contained in:
@ -75,7 +75,7 @@ const cardMessages = document.getElementById("card-messages");
|
||||
const payButton = document.getElementById("pay-button");
|
||||
const processing = document.getElementById("processing-payment");
|
||||
|
||||
stripe = Stripe(''); // TODO: Publish key to be added
|
||||
stripe = Stripe('{{index .StringMap "publishable_key"}}');
|
||||
|
||||
function hidePayButton() {
|
||||
payButton.classList.add("d-none");
|
||||
@ -128,7 +128,7 @@ function val() {
|
||||
body: JSON.stringify(payload),
|
||||
};
|
||||
|
||||
fetch("http://localhost:4001/api/payment-intent", requestOptions)
|
||||
fetch("{{index .API}}/api/payment-intent", requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(response => {
|
||||
let data;
|
||||
|
Reference in New Issue
Block a user