From c901a04aa9be3886dfeb0f6fa875838d12f969f8 Mon Sep 17 00:00:00 2001 From: Tim Martinak Date: Tue, 29 Oct 2024 10:15:58 -0400 Subject: [PATCH] Update Node enum to updated variant --- advanced-integration/v2/server/node/server.js | 12 +++++++----- standard-integration/server/node/server.js | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/advanced-integration/v2/server/node/server.js b/advanced-integration/v2/server/node/server.js index 08aadad1..db41e0e6 100644 --- a/advanced-integration/v2/server/node/server.js +++ b/advanced-integration/v2/server/node/server.js @@ -42,7 +42,7 @@ const ordersController = new OrdersController(client); const createOrder = async (cart) => { const collect = { body: { - intent: CheckoutPaymentIntent.CAPTURE, + intent: CheckoutPaymentIntent.Capture, purchaseUnits: [ { amount: { @@ -56,8 +56,9 @@ const createOrder = async (cart) => { }; try { - const { body, ...httpResponse } = - await ordersController.ordersCreate(collect); + const { body, ...httpResponse } = await ordersController.ordersCreate( + collect + ); // Get more response info... // const { statusCode, headers } = httpResponse; return { @@ -83,8 +84,9 @@ const captureOrder = async (orderID) => { }; try { - const { body, ...httpResponse } = - await ordersController.ordersCapture(collect); + const { body, ...httpResponse } = await ordersController.ordersCapture( + collect + ); // Get more response info... // const { statusCode, headers } = httpResponse; return { diff --git a/standard-integration/server/node/server.js b/standard-integration/server/node/server.js index 08aadad1..db41e0e6 100644 --- a/standard-integration/server/node/server.js +++ b/standard-integration/server/node/server.js @@ -42,7 +42,7 @@ const ordersController = new OrdersController(client); const createOrder = async (cart) => { const collect = { body: { - intent: CheckoutPaymentIntent.CAPTURE, + intent: CheckoutPaymentIntent.Capture, purchaseUnits: [ { amount: { @@ -56,8 +56,9 @@ const createOrder = async (cart) => { }; try { - const { body, ...httpResponse } = - await ordersController.ordersCreate(collect); + const { body, ...httpResponse } = await ordersController.ordersCreate( + collect + ); // Get more response info... // const { statusCode, headers } = httpResponse; return { @@ -83,8 +84,9 @@ const captureOrder = async (orderID) => { }; try { - const { body, ...httpResponse } = - await ordersController.ordersCapture(collect); + const { body, ...httpResponse } = await ordersController.ordersCapture( + collect + ); // Get more response info... // const { statusCode, headers } = httpResponse; return {