adjust payment step

This commit is contained in:
Pete Matsyburka
2024-06-09 23:31:37 +03:00
parent 5ae56bd50c
commit 7568f563cb
@@ -116,7 +116,7 @@ export default {
methods: { methods: {
async submit () { async submit () {
if (this.sessionId) { if (this.sessionId) {
return fetch((this.baseUrl || '/embed').replace('/embed', '/api/stripe_payments/' + this.sessionId), { return fetch(this.baseUrl + '/api/stripe_payments/' + this.sessionId, {
method: 'PUT', method: 'PUT',
body: JSON.stringify({ body: JSON.stringify({
submitter_slug: this.submitterSlug submitter_slug: this.submitterSlug
@@ -147,11 +147,12 @@ export default {
startCheckout () { startCheckout () {
this.isCreatingCheckout = true this.isCreatingCheckout = true
fetch((this.baseUrl || '/embed').replace('/embed', '/api/stripe_payments'), { fetch(this.baseUrl + '/api/stripe_payments', {
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
submitter_slug: this.submitterSlug, submitter_slug: this.submitterSlug,
field_uuid: this.field.uuid field_uuid: this.field.uuid,
referer: document.location.href
}), }),
headers: { 'Content-Type': 'application/json' } headers: { 'Content-Type': 'application/json' }
}).then(async (resp) => { }).then(async (resp) => {