From 9645a6b81fbfec780eb4f85d769379e57cb65b19 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Mon, 23 Jul 2018 11:19:56 -0400 Subject: [PATCH] disable button until items are in cart --- functions/src/index.ts | 6 ++++-- src/app/store/cart/cart.component.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/functions/src/index.ts b/functions/src/index.ts index 30eaf25..032aa81 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -19,8 +19,8 @@ export const checkout = functions.https.onRequest((request, response) => { intent: 'sale', payer: {payment_method: 'paypal'}, redirect_urls: { - return_url: 'https://fhsons.zakscode.com/success', - cancel_url: 'https://fhsons.zakscode.com/cart' + return_url: 'https://fhsons.zakscode.com/cart/success', + cancel_url: 'https://fhsons.zakscode.com/cart/cancelled' }, transactions: [ { @@ -52,6 +52,8 @@ export const checkout = functions.https.onRequest((request, response) => { return acc + row.price * row.quantity; }, 0); + console.info(req); + // Send request to PayPal let create = new Promise((res, rej) => { paypal.payment.create(req, (error, payment) => { diff --git a/src/app/store/cart/cart.component.html b/src/app/store/cart/cart.component.html index 1f00a2d..fd9a30f 100644 --- a/src/app/store/cart/cart.component.html +++ b/src/app/store/cart/cart.component.html @@ -33,7 +33,7 @@ {{total() | currency}} - + \ No newline at end of file