Skip to content

Commit

Permalink
PP-11578 Improve code comment and remove unused param from test
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencdaly committed Nov 10, 2023
1 parent 8cbc780 commit 9c87d94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/browsered/web-payments/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ const getGooglePaymentsConfiguration = (paymentProvider) => {
gateway: 'worldpay',
gatewayMerchantId: window.googlePayGatewayMerchantID
}),
// Providing 'worldpay' as the gateway with a blank gatewayMerchantId allows us to initiate a Google Pay payment
// when we're using the Google Pay test environment, which allows us to complete a Google Pay payment for sandbox
// In order to initiate a Google Pay payment in the Google Pay test environment without going to a real payment
// provider, the workaround is to specify ‘worldpay’ without a merchant id.
...(paymentProvider === 'sandbox' && {
gateway: 'worldpay',
gatewayMerchantId: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ describe('Connector Client - Google Pay authorisation API - Sandbox payment', fu
connectorClient({ baseUrl: BASEURL }).chargeAuthWithWallet({
chargeId: TEST_CHARGE_ID,
wallet: 'google',
payload: payload,
paymentProvider: 'worldpay'
payload: payload
}).then(res => {
expect(res.body.status).to.be.equal('AUTHORISATION SUCCESS')
done()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ describe('Connector Client - Google Pay authorisation API - Worldpay payment', f
connectorClient({ baseUrl: BASEURL }).chargeAuthWithWallet({
chargeId: TEST_CHARGE_ID,
wallet: 'google',
payload: payload,
paymentProvider: 'worldpay'
payload: payload
}).then(res => {
expect(res.body.status).to.be.equal('AUTHORISATION SUCCESS')
done()
Expand Down Expand Up @@ -98,8 +97,7 @@ describe('Connector Client - Google Pay authorisation API - Worldpay payment', f
connectorClient({ baseUrl: BASEURL }).chargeAuthWithWallet({
chargeId: TEST_CHARGE_ID,
wallet: 'google',
payload: payload,
paymentProvider: 'worldpay'
payload: payload
}).then(res => {
expect(res.body.status).to.be.equal('AUTHORISATION SUCCESS')
done()
Expand Down Expand Up @@ -130,8 +128,7 @@ describe('Connector Client - Google Pay authorisation API - Worldpay payment', f
connectorClient({ baseUrl: BASEURL }).chargeAuthWithWallet({
chargeId: TEST_CHARGE_ID,
wallet: 'google',
payload: payload,
paymentProvider: 'worldpay'
payload: payload
}).then(res => {
expect(res.body.status).to.be.equal('AUTHORISATION SUCCESS')
done()
Expand Down

0 comments on commit 9c87d94

Please sign in to comment.