-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from Adyen/release/1.0.0
Release/1.0.0
- Loading branch information
Showing
23 changed files
with
399 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/adyen-salesforce-pwa/lib/api/controllers/apple-domain-association.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Logger from './logger' | ||
import {getAdyenConfigForCurrentSite} from '../../utils/getAdyenConfigForCurrentSite.mjs' | ||
|
||
function appleDomainAssociation(req, res, next) { | ||
try { | ||
const adyenConfig = getAdyenConfigForCurrentSite() | ||
res.setHeader('content-type', 'text/plain') | ||
Logger.info('AppleDomainAssociation') | ||
res.send(`${adyenConfig.appleDomainAssociation}\n`) | ||
} catch (err) { | ||
return next(err) | ||
} | ||
} | ||
|
||
export {appleDomainAssociation} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/adyen-salesforce-pwa/lib/api/controllers/tests/apple-domain-association.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {appleDomainAssociation} from '../apple-domain-association' | ||
|
||
describe('appleDomainAssociation Controller', () => { | ||
let req, res, next, consoleInfoSpy | ||
|
||
beforeEach(() => { | ||
req = {} | ||
res = { | ||
send: jest.fn(), | ||
setHeader: jest.fn() | ||
} | ||
next = jest.fn() | ||
consoleInfoSpy = jest.spyOn(console, 'info').mockImplementation(() => {}) | ||
}) | ||
it('update order when success notification is received', async () => { | ||
await appleDomainAssociation(req, res, next) | ||
expect(res.send).toHaveBeenCalledWith('test\n') | ||
expect(res.setHeader).toHaveBeenCalledWith('content-type', 'text/plain') | ||
expect(consoleInfoSpy).toHaveBeenCalledTimes(1) | ||
expect(consoleInfoSpy.mock.calls[0][0]).toContain('AppleDomainAssociation') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.