Skip to content

Commit

Permalink
fix: HS-333: Fix : fixed endpoint for local development (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
prafulkoppalkar authored Nov 29, 2023
1 parent 15b72b4 commit a4a70e6
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Hyperswitch-React-Demo-App/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
61 changes: 61 additions & 0 deletions Hyperswitch-React-Demo-App/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]",
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(
Expand Down
2 changes: 1 addition & 1 deletion Hyperswitch-React-Demo-App/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let devServer = {
};

module.exports = merge([
common("/"),
common("/payments"),
{
mode: "development",
devServer: devServer,
Expand Down

0 comments on commit a4a70e6

Please sign in to comment.