Adyen Salesforce PWA
This npm package provides the opportunity to use Adyen as a payment service provider when building your Salesforce PWA
application.
NOTE
This version is in beta and may not be suitable for production use.
We anticipate the general availability solution to be ready by Q1 2024.
Please be aware that the beta version is not supported by Adyen until general availability, will not be providing
technical support for this specific beta release.
We encourage users to explore the package, provide feedback, and report any issues via
our GitHub repository.
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.
-
Import countrylist
in constants.js
of your retail-react-app
and export it as SHIPPING_COUNTRY_CODES
:
import {countryList} from '@adyen/adyen-salesforce-pwa'
export const SHIPPING_COUNTRY_CODES = countryList
-
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.