Skip to content

Commit

Permalink
Merge branch 'main' into test/adyen-card-e2e-success-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamchasing authored Dec 16, 2024
2 parents 7df9fd0 + 08a0f95 commit 5a16b6d
Show file tree
Hide file tree
Showing 17 changed files with 235 additions and 98 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ENV_BACKEND_URL=""
ENV_LOGGING_URL=""
ENABLE_LOGGING="false"
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
## [0.106.11](https://github.com/juspay/hyperswitch-web/compare/v0.106.10...v0.106.11) (2024-12-16)


### Bug Fixes

* samsung pay button rendering fixed ([#838](https://github.com/juspay/hyperswitch-web/issues/838)) ([904d103](https://github.com/juspay/hyperswitch-web/commit/904d10369cae6dd41b211493c932d94dad0943a6))

## [0.106.10](https://github.com/juspay/hyperswitch-web/compare/v0.106.9...v0.106.10) (2024-12-12)


### Bug Fixes

* cartes bancaires logo not appearing in firefox ([#837](https://github.com/juspay/hyperswitch-web/issues/837)) ([aa0182b](https://github.com/juspay/hyperswitch-web/commit/aa0182b92018dfb95284198e2610fb40a0b6387e))

## [0.106.9](https://github.com/juspay/hyperswitch-web/compare/v0.106.8...v0.106.9) (2024-12-11)

## [0.106.8](https://github.com/juspay/hyperswitch-web/compare/v0.106.7...v0.106.8) (2024-12-11)

## [0.106.7](https://github.com/juspay/hyperswitch-web/compare/v0.106.6...v0.106.7) (2024-12-11)

## [0.106.6](https://github.com/juspay/hyperswitch-web/compare/v0.106.5...v0.106.6) (2024-12-11)

## [0.106.5](https://github.com/juspay/hyperswitch-web/compare/v0.106.4...v0.106.5) (2024-12-11)

## [0.106.4](https://github.com/juspay/hyperswitch-web/compare/v0.106.3...v0.106.4) (2024-12-11)

## [0.106.3](https://github.com/juspay/hyperswitch-web/compare/v0.106.2...v0.106.3) (2024-12-11)

## [0.106.2](https://github.com/juspay/hyperswitch-web/compare/v0.106.1...v0.106.2) (2024-12-10)

## [0.106.1](https://github.com/juspay/hyperswitch-web/compare/v0.106.0...v0.106.1) (2024-12-09)


### Bug Fixes

* card validation focus check ([#827](https://github.com/juspay/hyperswitch-web/issues/827)) ([fd15e54](https://github.com/juspay/hyperswitch-web/commit/fd15e54ffd9d1bb4445a78567242d3ebc5a25b90))

# [0.106.0](https://github.com/juspay/hyperswitch-web/compare/v0.105.3...v0.106.0) (2024-12-09)


### Features

* added cb regex and typo fix ([#811](https://github.com/juspay/hyperswitch-web/issues/811)) ([e925e33](https://github.com/juspay/hyperswitch-web/commit/e925e33556531eb7142ee0a7b26cdbcacc920b15))

## [0.105.3](https://github.com/juspay/hyperswitch-web/compare/v0.105.2...v0.105.3) (2024-12-09)

## [0.105.2](https://github.com/juspay/hyperswitch-web/compare/v0.105.1...v0.105.2) (2024-12-05)


Expand Down
25 changes: 22 additions & 3 deletions Hyperswitch-React-Demo-App/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,26 @@ npm install
npm start
```

This will start the react server running on localhost:4242. Note that the
backend server runs on localhost:5252, but the React UI will be available at
localhost:4242. API requests to your backend are proxied by the
This will start the react server running on localhost:5252. API requests to your backend are proxied by the
create-react-app server using the `proxy` setting in `./package.json`.

## Example config using our Sandbox URL
```
STATIC_DIR=./dist
HYPERSWITCH_PUBLISHABLE_KEY=pk_snd_*** # Replace with your publishable key
HYPERSWITCH_SECRET_KEY=snd_*** # Replace with your API key
HYPERSWITCH_SERVER_URL=https://sandbox.hyperswitch.io # Our Sandbox server is used
HYPERSWITCH_CLIENT_URL=http://localhost:9050 # Your local running SDK
SELF_SERVER_URL=http://localhost:5252 # Your local running demo server
PROFILE_ID=""
```

## Troubleshooting
If your demo application is not working, you can check the following to hopefully find the issue.

- Make sure you have configured the [.env](.env) file correctly.
- Publishable Key `HYPERSWITCH_PUBLISHABLE_KEY` and API Key `HYPERSWITCH_SECRET_KEY` belong to the server `HYPERSWITCH_SERVER_URL`. If you use our Sandbox URL, use publishable key and API key from the hyperswitch website. If you are using your self-hosted backend, use your locally created publishable key and API Key.
- The URL's must not have a slash at the end.
- Check that you have opened the demo application on the correct port. The default should be [localhost:5252](http://localhost:5252). Check the [webpack.dev.js](./webpack.dev.js) file to see if it is different.
- Make sure you have three terminal windows open and running. If you are running your local backend, it has to be one more.
- Open your browser's development tools (F12 in most browsers) and check the network tab for failed rest calls and the console for errors.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,20 @@ Ways to get started with Hyperswitch:

### 🛠️ Try it in Local

    Before you start the local setup, you need to understand a few configs -
    You will need to understand and configure a few configurations before starting the local setup. -

- #### Env Configs for Demo App

- **`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 that is used to authenticate API requests from your merchant server. On the Hyperswitch Dashboard, locate the "Developers" section, then click on [API Keys](https://app.hyperswitch.io/developer-api-keys). Here, you can generate your API Key.
- **`HYPERSWITCH_SECRET_KEY`:** The API key of your Hyperswitch account that is used to authenticate API requests from your merchant server.

- **`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_SERVER_URL`:** The URL of the Hyperswitch backend server. You may use our Sandbox URL (https://sandbox.hyperswitch.io). To do this, go to the Hyperswitch Dashboard, find the "Developers" section, then click on [API Keys](https://app.hyperswitch.io/dashboard/developer-api-keys). Here you can generate an API key (`HYPERSWITCH_SECRET_KEY`) and copy your publishable key (`HYPERSWITCH_PUBLISHABLE_KEY`).<br>
Alternatively, you can specify that your backend is running locally (e.g. http://localhost:8080). In this case, you will need to create the API key and publishable key locally. Read this [hyperswitch docs](https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md) on how to do this.

- **`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).
- **`HYPERSWITCH_CLIENT_URL`:** The URL of your hosted Hyperswitch SDK (e.g. http://localhost:9050). You may also use our Sandbox URL (https://beta.hyperswitch.io/v1).

- **`SELF_SERVER_URL`:** The URL of the hosted server file for generating client-secret and for fetching urls & configs. (eg: http://localhost:9060/payments)
- **`SELF_SERVER_URL`:** The URL of the hosted server file for generating client-secret and for fetching urls & configs (eg: http://localhost:5252).

- #### Env Configs for SDK

Expand Down Expand Up @@ -106,7 +107,7 @@ Ways to get started with Hyperswitch:

### Setup the repo

1. First install all the node modules by running the following command
1. First install all the node modules by running the following command.

```bash
npm install
Expand All @@ -120,7 +121,7 @@ Ways to get started with Hyperswitch:
npm run re:start
```

- On the second terminal, run the following command for starting the server.
- On the second terminal, run the following command for starting the SDK server (by default on http://localhost:9050).

```bash
npm run start
Expand All @@ -136,7 +137,8 @@ Ways to get started with Hyperswitch:
npm run start
```

This will open a demo app where you can test your payments.
Now you can launch the demo app on http://localhost:5252/ where you can test your payments.<br>
If you encounter any problems, please refer to the troubleshooting section of the [Hyperswitch-React-Demo-App Readme](./Hyperswitch-React-Demo-App/README.md#troubleshooting).

> 💡 Alternatively, you can update `.env` file and use the commands
> above
Expand Down Expand Up @@ -182,7 +184,7 @@ let logEndpoint =
: "<YOUR_SANDBOX_LOGGING_ENDPOINT>";
// Set this to true to enable logging
let enableLogging = true;
let ENABLE_LOGGING = true;
// Choose from DEBUG, INFO, WARNING, ERROR, SILENT
let loggingLevel = "DEBUG";
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.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.105.2",
"version": "0.106.11",
"main": "index.js",
"private": true,
"dependencies": {
Expand All @@ -17,10 +17,10 @@
},
"scripts": {
"build": "webpack --config webpack.common.js",
"build:integ": "cross-env sdkEnv=integ enableLogging=false webpack --config webpack.common.js",
"build:integ": "cross-env sdkEnv=integ webpack --config webpack.common.js",
"build:playground": "npm run setup:playground && npm run build",
"build:prod": "cross-env sdkEnv=prod enableLogging=true webpack --config webpack.common.js",
"build:sandbox": "cross-env sdkEnv=sandbox enableLogging=true webpack --config webpack.common.js",
"build:prod": "cross-env sdkEnv=prod webpack --config webpack.common.js",
"build:sandbox": "cross-env sdkEnv=sandbox webpack --config webpack.common.js",
"deploy-to-s3": "node ./scripts/pushToS3.js",
"postinstall": "cd Hyperswitch-React-Demo-App && npm i",
"prepare": "husky install",
Expand All @@ -29,7 +29,7 @@
"re:format": "rescript format -all",
"re:start": "rescript -w",
"setup:playground": "npm run postinstall && cd Hyperswitch-React-Demo-App && node promptScript.js",
"start": "cross-env sdkEnv=local enableLogging=false webpack serve --config webpack.dev.js",
"start": "cross-env sdkEnv=local webpack serve --config webpack.dev.js",
"start:playground": "npm run setup:playground && npm run start",
"test": "cd cypress-tests && npm run cypress:run",
"test:hooks": "npx eslint src/"
Expand Down
53 changes: 37 additions & 16 deletions public/icons/orca.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5a16b6d

Please sign in to comment.