@defra-fish/gafl-webapp-service 1.62.0-rc.9 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra-fish/gafl-webapp-service",
|
|
3
|
-
"version": "1.62.0
|
|
3
|
+
"version": "1.62.0",
|
|
4
4
|
"description": "The websales frontend for the GAFL service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"prepare": "gulp --gulpfile build/gulpfile.cjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@defra-fish/business-rules-lib": "1.62.0
|
|
40
|
-
"@defra-fish/connectors-lib": "1.62.0
|
|
39
|
+
"@defra-fish/business-rules-lib": "1.62.0",
|
|
40
|
+
"@defra-fish/connectors-lib": "1.62.0",
|
|
41
41
|
"@defra/hapi-gapi": "^2.0.0",
|
|
42
42
|
"@hapi/boom": "^9.1.2",
|
|
43
43
|
"@hapi/catbox-redis": "^6.0.2",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"./gafl-jest-matchers.js"
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "1f00bb713b3a160a8dfa3c355df23bb44f14c4f2"
|
|
83
83
|
}
|
|
@@ -438,7 +438,7 @@ describe('The govuk-pay-service', () => {
|
|
|
438
438
|
})
|
|
439
439
|
|
|
440
440
|
it('should return response body when payment status check is successful', async () => {
|
|
441
|
-
const resBody = { card_details: { foo: Symbol('foo') },
|
|
441
|
+
const resBody = { card_details: { foo: Symbol('foo') }, card_brand: Symbol('bar'), baz: Symbol('baz') }
|
|
442
442
|
govUkPayApi.fetchPaymentStatus.mockResolvedValue(getMockFetchPaymentStatus(resBody))
|
|
443
443
|
|
|
444
444
|
const result = await getPaymentStatus(paymentId)
|
|
@@ -448,7 +448,7 @@ describe('The govuk-pay-service', () => {
|
|
|
448
448
|
|
|
449
449
|
it('should log debug message when response.ok is true', async () => {
|
|
450
450
|
const expectedLoggedOutput = { bar: Symbol('bar'), baz: Symbol('baz') }
|
|
451
|
-
const resBody = { card_details: { foo: Symbol('foo') }, ...expectedLoggedOutput }
|
|
451
|
+
const resBody = { card_details: { foo: Symbol('foo') }, card_brand: Symbol('foobarbaz'), ...expectedLoggedOutput }
|
|
452
452
|
govUkPayApi.fetchPaymentStatus.mockResolvedValue(getMockFetchPaymentStatus(resBody))
|
|
453
453
|
|
|
454
454
|
await getPaymentStatus(paymentId)
|
|
@@ -528,7 +528,7 @@ describe('The govuk-pay-service', () => {
|
|
|
528
528
|
})
|
|
529
529
|
})
|
|
530
530
|
|
|
531
|
-
const getMockFetchPaymentStatus = (resBody = { card_details: 'foo' }) => ({
|
|
531
|
+
const getMockFetchPaymentStatus = (resBody = { card_details: 'foo', card_brand: 'bar' }) => ({
|
|
532
532
|
ok: true,
|
|
533
533
|
status: 200,
|
|
534
534
|
json: jest.fn().mockResolvedValue(resBody)
|
|
@@ -94,7 +94,7 @@ export const getPaymentStatus = async (paymentId, recurring = false) => {
|
|
|
94
94
|
if (response.ok) {
|
|
95
95
|
const resBody = await response.json()
|
|
96
96
|
// eslint-disable-next-line camelcase
|
|
97
|
-
const { card_details, ...loggableBody } = resBody
|
|
97
|
+
const { card_brand, card_details, ...loggableBody } = resBody
|
|
98
98
|
debug('Payment status response: %o', loggableBody)
|
|
99
99
|
return resBody
|
|
100
100
|
} else {
|