Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Franckapik/89f747f02c50791c5d3beaa7862abc63 to your computer and use it in GitHub Desktop.
Save Franckapik/89f747f02c50791c5d3beaa7862abc63 to your computer and use it in GitHub Desktop.
buy() {
// Send the nonce to your server
return this.instance.requestPaymentMethod()
.then(({nonce}) => fetch(`/paiement/nonce/${nonce}`), {
method: 'GET',
credentials: 'include',
})
.then(resp => resp.json())
.then(res => {
console.log(res);
});
commandeStore.status = '100vw';
commandeStore.display = 'success';
}
@Franckapik
Copy link
Author

why() {
fetch("/paiement/pourquoi")
.then(resp => resp.json())
.then(res => {
console.log(res);
});
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment