Skip to content

Instantly share code, notes, and snippets.

View cesarbarone's full-sized avatar

César Barone cesarbarone

View GitHub Profile
@cesarbarone
cesarbarone / coverage.svg
Last active February 18, 2025 13:58
Gist for NS specs coverage
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function createOneTimePayment({ paymentMethodId, priceId, email, fullName, recaptchaToken }) {
fetch(`${GRAPHQL_HOST}/graphql`, { method: 'post', referrerPolicy: 'unsafe-url', headers: { 'Content-type': 'application/json', 'Client-Captcha-Token': recaptchaToken }, body: JSON.stringify({
query:
`mutation createStripeOneTimePayment {
createStripeOneTimePayment(paymentMethodId: "${paymentMethodId}", priceId: "${priceId}", email: "${email}", fullName: "${fullName}", phone: "${phone}")
{ status error }
}`,
})
})
.then(responseToJson)