aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-07-20 19:36:39 +0200
committerMateja <mail@matejamaric.com>2021-07-20 19:36:39 +0200
commit85a5d7851d9bbda9da8b84fb1872f952e637de23 (patch)
treeb0770439303985e75b8d0b740d1566c949b0c81c /server
parent4bdafd24d923b81543802fbe54f16fac7066db1b (diff)
downloadmevn-ecommerce-85a5d7851d9bbda9da8b84fb1872f952e637de23.tar.gz
mevn-ecommerce-85a5d7851d9bbda9da8b84fb1872f952e637de23.zip
Added application_context(brand_name) and capture logging.
Diffstat (limited to 'server')
-rw-r--r--server/controllers/transaction.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/controllers/transaction.js b/server/controllers/transaction.js
index ee98523..57a0ec3 100644
--- a/server/controllers/transaction.js
+++ b/server/controllers/transaction.js
@@ -8,6 +8,9 @@ module.exports = {
async setup(req, res) {
let transactionSetupData = {
intent: 'CAPTURE',
+ application_context: {
+ brand_name: "MEVN Store"
+ },
purchase_units: [{
amount: {
currency_code: 'USD',
@@ -79,8 +82,13 @@ module.exports = {
try {
const capture = await paypalClient.execute(request);
+ console.log("CAPTURE======================================================");
console.log(capture);
+ console.log("CAPTURE.RESULT===============================================");
console.log(capture.result);
+ console.log("CAPTURE.RESULT.PURCHASE_UNITS[0].SHIPPING====================");
+ console.log(capture.result.purchase_units[0].shipping);
+ console.log("=============================================================");
} catch (err) {
console.error(err);
return res.sendStatus(500);