From a4a70e60c6ccf6467f1a16cbd4d5d62452b7bea6 Mon Sep 17 00:00:00 2001 From: Praful Koppalkar <126236898+prafulkoppalkar@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:05:54 +0530 Subject: [PATCH] fix: HS-333: Fix : fixed endpoint for local development (#49) --- Hyperswitch-React-Demo-App/Makefile | 2 +- Hyperswitch-React-Demo-App/server.js | 61 +++++++++++++++++++++++ Hyperswitch-React-Demo-App/webpack.dev.js | 2 +- 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/Hyperswitch-React-Demo-App/Makefile b/Hyperswitch-React-Demo-App/Makefile index ab3761e79..00113ff7d 100644 --- a/Hyperswitch-React-Demo-App/Makefile +++ b/Hyperswitch-React-Demo-App/Makefile @@ -1,5 +1,5 @@ NS ?= juspaydotin -VERSION ?= v1.0.1 +VERSION ?= v1.0.2 IMAGE_NAME ?= hyperswitch-web BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) CONTAINER_NAME ?= hyperswitch-web diff --git a/Hyperswitch-React-Demo-App/server.js b/Hyperswitch-React-Demo-App/server.js index 00c5bb103..7d79ffd74 100644 --- a/Hyperswitch-React-Demo-App/server.js +++ b/Hyperswitch-React-Demo-App/server.js @@ -47,6 +47,67 @@ app.get("/create-payment-intent", async (req, res) => { const request = { currency: "USD", amount: 2999, + order_details: [ + { + product_name: "Apple iphone 15", + quantity: 1, + amount: 2999, + }, + ], + business_country: "US", + business_label: "default", + currency: "USD", + confirm: false, + capture_method: "automatic", + authentication_type: "three_ds", + customer_id: "hyperswitch_sdk_demo_id", + email: "hyperswitch_sdk_demo_id@gmail.com", + description: "Hello this is description", + // allowed_payment_method_types:["sofort"], + shipping: { + address: { + state: "zsaasdas", + city: "Banglore", + country: "US", + line1: "sdsdfsdf", + line2: "hsgdbhd", + line3: "alsksoe", + zip: "571201", + first_name: "joseph", + last_name: "doe", + }, + phone: { + number: "123456789", + country_code: "+1", + }, + }, + connector_metadata: { + noon: { + order_category: "applepay", + }, + }, + metadata: { + udf1: "value1", + new_customer: "true", + login_date: "2019-09-10T10:11:12Z", + }, + billing: { + address: { + line1: "1467", + line2: "Harrison Street", + line3: "Harrison Street", + city: "San Fransico", + state: "California", + zip: "94122", + country: "US", + first_name: "joseph", + last_name: "Doe", + }, + phone: { + number: "8056594427", + country_code: "+91", + }, + }, }; if (SERVER_URL) { const apiResponse = await fetch( diff --git a/Hyperswitch-React-Demo-App/webpack.dev.js b/Hyperswitch-React-Demo-App/webpack.dev.js index 5d8dc22d0..9368ac4af 100644 --- a/Hyperswitch-React-Demo-App/webpack.dev.js +++ b/Hyperswitch-React-Demo-App/webpack.dev.js @@ -21,7 +21,7 @@ let devServer = { }; module.exports = merge([ - common("/"), + common("/payments"), { mode: "development", devServer: devServer,