Skip to content

Commit

Permalink
Update Node enum to updated variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Martinak committed Oct 29, 2024
1 parent 49643ec commit c901a04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions advanced-integration/v2/server/node/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ordersController = new OrdersController(client);
const createOrder = async (cart) => {
const collect = {
body: {
intent: CheckoutPaymentIntent.CAPTURE,
intent: CheckoutPaymentIntent.Capture,
purchaseUnits: [
{
amount: {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions standard-integration/server/node/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ordersController = new OrdersController(client);
const createOrder = async (cart) => {
const collect = {
body: {
intent: CheckoutPaymentIntent.CAPTURE,
intent: CheckoutPaymentIntent.Capture,
purchaseUnits: [
{
amount: {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit c901a04

Please sign in to comment.