Skip to content

Commit

Permalink
Merge pull request #152 from Adyen/release/2.0.1
Browse files Browse the repository at this point in the history
Release/2.0.1
  • Loading branch information
shanikantsingh authored Aug 1, 2024
2 parents 5e18719 + 409b835 commit 4d2d436
Show file tree
Hide file tree
Showing 10 changed files with 19,914 additions and 26,497 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This integration provides the opportunity to use Adyen as a payment service prov

In this GitHub repo there are two packages:
* `Adyen-salesforce-pwa`: source code for the Adyen PWA NPM package, that contains the default payments integration. This code is published to the [NPM](https://www.npmjs.com/package/@adyen/adyen-salesforce-pwa?activeTab=readme).
* `Adyen-retail-react-app`: a reference application that can be used for a demo of how to integrate the Adyen Payments Integration (NPM package) into your PWA Retail application. This reference application should not be used in production projects and we do not provide support on this implementaiotn.
* `Adyen-retail-react-app`: a reference application that can be used for a demo of how to integrate the Adyen Payments Integration (NPM package) into your PWA Retail application. This reference application should not be used in production projects and we do not provide support on this implementation.

## Prerequisites

Expand Down
2 changes: 0 additions & 2 deletions packages/adyen-retail-react-app/overrides/app/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {getRuntime} from '@salesforce/pwa-kit-runtime/ssr/server/express'
import {isRemote} from '@salesforce/pwa-kit-runtime/utils/ssr-server'
import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config'
import helmet from 'helmet'
import bodyParser from 'body-parser'
/* -----------------Adyen Begin ------------------------ */
import {registerAdyenEndpoints} from '@adyen/adyen-salesforce-pwa/dist/ssr/index.js'
/* -----------------Adyen End ------------------------ */
Expand All @@ -35,7 +34,6 @@ const options = {
const runtime = getRuntime()

const {handler} = runtime.createHandler(options, (app) => {
app.use(bodyParser.json())
/* -----------------Adyen Begin ------------------------ */
// Set HTTP security headers
app.use(
Expand Down
24,473 changes: 6,572 additions & 17,901 deletions packages/adyen-retail-react-app/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/adyen-retail-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "adyen-retail-react-app",
"version": "2.0.0",
"version": "2.0.1",
"license": "See license in LICENSE",
"engines": {
"node": "^16.0.0 || ^18.0.0",
"npm": "^7.0.0 || ^8.0.0 || ^9.0.0"
"node": "^16.0.0 || ^18.0.0 || ^20.0.0",
"npm": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0"
},
"ccExtensibility": {
"extends": "@salesforce/retail-react-app",
Expand Down
3 changes: 3 additions & 0 deletions packages/adyen-salesforce-pwa/lib/api/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {query} from 'express-validator'
import bodyParser from 'body-parser'
import EnvironmentController from '../controllers/environment'
import PaymentMethodsController from '../controllers/payment-methods'
import PaymentsDetailsController from '../controllers/payments-details'
Expand All @@ -22,6 +23,8 @@ function ErrorHandler(err, req, res, next) {
}

function registerAdyenEndpoints(app, runtime, overrides) {
app.use(bodyParser.json())

const environmentHandler = overrides?.environment || [EnvironmentController, SuccessHandler]
const paymentMethodsHandler = overrides?.paymentMethods || [
PaymentMethodsController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Adyen Endpoints', () => {
registerAdyenEndpoints(app, runtime, overrides)
expect(app.get).toHaveBeenCalledTimes(6)
expect(app.post).toHaveBeenCalledTimes(5)
expect(app.use).toHaveBeenCalledTimes(1)
expect(app.use).toHaveBeenCalledTimes(2)
})
})

Expand Down
2 changes: 1 addition & 1 deletion packages/adyen-salesforce-pwa/lib/utils/constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ export const ADYEN_ENVIRONMENT = {
TEST: 'TEST'
}

export const APPLICATION_VERSION = '2.0.0'
export const APPLICATION_VERSION = '2.0.1'
Loading

0 comments on commit 4d2d436

Please sign in to comment.