Adyen Salesforce PWA
This npm package provides the opportunity to use Adyen as a payment service provider when building your Salesforce PWA application.
Instalation
-
Install the npm package using the following command
npm install @adyen/adyen-salesforce-pwa
-
Import the Adyen endpoints function in the ssr.js
file:
import {registerAdyenEndpoints} from '@adyen/adyen-salesforce-pwa/dist/ssr/index.js'
-
Include it as part of the server handler callback in the ssr.js
file before last app.get()
handler:
const {handler} = runtime.createHandler(options, (app) => {
// ...
registerAdyenEndpoints(app, runtime)
app.get('*', runtime.render)
})
-
Include Adyen checkout pages in the routes.jsx
of your retail-react-app
. Check routes.jsx file for reference.
-
In your retail-react-app
you would need to create a .env file. Check the example file in our reference application.
-
To run the app locally with env variables execute the following command:
npm run start:env
-
To push your env variables to the MRT environment execute the following command:
npm run upload-env
-
To see which env variables are present in the MRT environment execute the following command:
npm run get-env
Prerequisites
Support
To request a feature, report a bug, or report a security vulnerability, create a GitHub issue.
For other questions, contact our support team.
License
This repository is available under the MIT license.