Skip to content

Commit

Permalink
Merge branch 'main' into phone-number-validations
Browse files Browse the repository at this point in the history
  • Loading branch information
prafulkoppalkar authored May 6, 2024
2 parents f3c1eba + cabc25f commit 5c4a474
Show file tree
Hide file tree
Showing 17 changed files with 491 additions and 907 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV_BACKEND_URL=""
ENV_LOGGING_URL=""
28 changes: 14 additions & 14 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ docs/ @akash-c-k
LICENSE @akash-c-k
README.md @akash-c-k
SECURITY.md @akash-c-k
.gitignore @prafulkoppalkar @ArushKapoorJuspay
.gitignore @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja

Hyperswitch-React-Demo-App/ @prafulkoppalkar @JeevaRamu0104
Hyperswitch-React-Demo-App/ @prafulkoppalkar @JeevaRamu0104 @PritishBudhiraja
Hyperswitch-React-Demo-App/Dockerfile @JeevaRamu0104 @prafulkoppalkar
Hyperswitch-React-Demo-App/Makefile @JeevaRamu0104 @prafulkoppalkar
Hyperswitch-React-Demo-App/promptScript.js @prafulkoppalkar @ArushKapoorJuspay
Hyperswitch-React-Demo-App/webpack.common.js @prafulkoppalkar @ArushKapoorJuspay
Hyperswitch-React-Demo-App/webpack.dev.js @prafulkoppalkar @ArushKapoorJuspay
Hyperswitch-React-Demo-App/promptScript.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja
Hyperswitch-React-Demo-App/webpack.common.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja
Hyperswitch-React-Demo-App/webpack.dev.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja

.husky/ @harsh-Juspay @prafulkoppalkar @PritishBudhiraja
.github/ @harsh-Juspay @prafulkoppalkar @PritishBudhiraja
.husky/ @prafulkoppalkar @PritishBudhiraja
.github/ @prafulkoppalkar @PritishBudhiraja

aws/ @prafulkoppalkar

webpack.dev.js @prafulkoppalkar @ArushKapoorJuspay
webpack.common.js @prafulkoppalkar @ArushKapoorJuspay
webpack.dev.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja
webpack.common.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja

src/orca-log-catcher @vsrivatsa-juspay @prafulkoppalkar
src/orca-loader @prafulkoppalkar
src/LoaderConroller.res @prafulkoppalkar
src/Utilities @prafulkoppalkar
src/libraries @prafulkoppalkar
src/Hooks @prafulkoppalkar
src/Payment.res @prafulkoppalkar
src/LoaderConroller.res @prafulkoppalkar @PritishBudhiraja
src/Utilities @prafulkoppalkar @PritishBudhiraja
src/libraries @prafulkoppalkar @PritishBudhiraja
src/Hooks @prafulkoppalkar @PritishBudhiraja
src/Payment.res @prafulkoppalkar @PritishBudhiraja
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## [0.50.1](https://github.com/juspay/hyperswitch-web/compare/v0.50.0...v0.50.1) (2024-05-06)

# [0.50.0](https://github.com/juspay/hyperswitch-web/compare/v0.49.2...v0.50.0) (2024-05-06)


### Features

* hideExpiredPaymentMethods prop added ([#350](https://github.com/juspay/hyperswitch-web/issues/350)) ([f2a8c42](https://github.com/juspay/hyperswitch-web/commit/f2a8c4295953e8743ad9d5f2c4d7df9c3eba6a96))

## [0.49.2](https://github.com/juspay/hyperswitch-web/compare/v0.49.1...v0.49.2) (2024-05-06)

## [0.49.1](https://github.com/juspay/hyperswitch-web/compare/v0.49.0...v0.49.1) (2024-05-03)


Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,21 @@ Ways to get started with Hyperswitch:

Before you start the local setup, you will need an understanding of few keys -

### About Env Configs
### About Env Configs for Demo App

- `HYPERSWITCH_PUBLISHABLE_KEY` - Publishable key of your Hyperswitch Account. This key will start with `pk_dev_` for local development, `pk_snd_` for sandbox and `pk_prd_` for production.
- `HYPERSWITCH_SECRET_KEY` - API key of your Hyperswitch Account
- `HYPERSWITCH_SERVER_URL` - URL of your hosted Hyperswitch Backend server or you can use our Sandbox URL (https://sandbox.hyperswitch.io) or use your backend running locally (eg. http://localhost:8080).
- `HYPERSWITCH_CLIENT_URL` - URL of your hosted Hyperswitch SDK or you can use our Sandbox URL (https://beta.hyperswitch.io/v1) or use your app running locally (eg http://localhost:9050).
- **`HYPERSWITCH_PUBLISHABLE_KEY`:** The publishable key of your Hyperswitch account. This key will start with `pk_dev_` for local development, `pk_snd_` for sandbox, and `pk_prd_` for production.

- **`HYPERSWITCH_SECRET_KEY`:** The API key of your Hyperswitch account.

- **`HYPERSWITCH_SERVER_URL`:** The URL of your hosted Hyperswitch backend server. Alternatively, you can use our Sandbox URL (https://sandbox.hyperswitch.io) or specify your backend running locally (e.g., http://localhost:8080).

- **`HYPERSWITCH_CLIENT_URL`:** The URL of your hosted Hyperswitch SDK. You can also use our Sandbox URL (https://beta.hyperswitch.io/v1) or specify your app running locally (e.g., http://localhost:9050).

### About Env Configs for SDK

- **`ENV_BACKEND_URL`:** Sets the endpoint for all the APIs used within the SDK to interact with the backend service. If you are running your own backend service, you can configure and specify its endpoint here for local setups.

- **`ENV_LOGGING_URL`:** Specifies a custom logging endpoint where logs generated by the SDK can be sent. This allows you to view and manage logs according to your requirements.

### Setup Node

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.49.1",
"version": "0.50.1",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
20 changes: 14 additions & 6 deletions src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let make = (
~isAllStoredCardsHaveName,
(),
)
->DynamicFieldsUtils.updateDynamicFields(billingAddress, ())
->DynamicFieldsUtils.updateDynamicFields(billingAddress, ~list, ~paymentMethod, ~isSavedCardFlow, ())
->Belt.SortArray.stableSortBy(PaymentMethodsRecord.sortPaymentMethodFields)
//<...>//
}, (requiredFields, isAllStoredCardsHaveName, isSavedCardFlow))
Expand Down Expand Up @@ -149,7 +149,7 @@ let make = (
cardRef,
icon,
cardError,
_,
setCardError,
maxCardLength,
) = switch cardProps {
| Some(cardProps) => cardProps
Expand All @@ -165,7 +165,7 @@ let make = (
expiryRef,
_,
expiryError,
_,
setExpiryError,
) = switch expiryProps {
| Some(expiryProps) => expiryProps
| None => defaultExpiryProps
Expand All @@ -181,7 +181,7 @@ let make = (
cvcRef,
_,
cvcError,
_,
setCvcError,
) = switch cvcProps {
| Some(cvcProps) => cvcProps
| None => defaultCvcProps
Expand Down Expand Up @@ -276,9 +276,17 @@ let make = (
~isSavedCardFlow,
~isAllStoredCardsHaveName,
~setRequiredFieldsBody,
~list,
)

let submitCallback = DynamicFieldsUtils.useSubmitCallback()
let submitCallback = DynamicFieldsUtils.useSubmitCallback(
~cardNumber,
~setCardError,
~cardExpiry,
~setExpiryError,
~cvcNumber,
~setCvcError,
)
useSubmitPaymentData(submitCallback)

let bottomElement = <InfoElement />
Expand Down Expand Up @@ -326,7 +334,7 @@ let make = (
key={`outside-billing-${index->Int.toString}`}
className="flex flex-col w-full place-content-between"
style={ReactDOMStyle.make(
~marginTop=index !== 0 || paymentMethod === "card" ? themeObj.spacingGridColumn : "",
~marginTop=index !== 0 ? themeObj.spacingGridColumn : "",
~gridColumnGap=themeObj.spacingGridRow,
(),
)}>
Expand Down
Loading

0 comments on commit 5c4a474

Please sign in to comment.