-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: HS-333: Fix : fixed endpoint for local development (#49)
- Loading branch information
1 parent
15b72b4
commit a4a70e6
Showing
3 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters