Conversation
server.js
Outdated
| var requestId = request.id; | ||
| tokenRequestId = request.id; | ||
| const d = "http://localhost:5000/app/request-token/" + requestId; | ||
| console.log('d', d) |
server.js
Outdated
| app.get('/callback', urlencodedParser, async function (req, res){ | ||
| var redirectUrl = req.protocol + '://' + req.get('host') + req.url; | ||
| var queryData = Token.parseSetTransferDestinationsUrl(redirectUrl); | ||
| if(queryData.supportedTransferDestinationTypes && queryData.supportedTransferDestinationTypes.includes('SEPA')){ |
There was a problem hiding this comment.
spacing after keywords, if and before {
server.js
Outdated
|
|
||
| // Connect to Token's development sandbox, if you change this, you also need to change window.Token({env}) in client.js | ||
| var Token = new TokenClient({ env: 'sandbox', developerKey: '4qY7lqQw8NOl9gng0ZHgT4xdiDqxqoGVutuZwrUYQsI', keyDir: './keys' }); | ||
| var Token = new TokenClient({ env: 'dev', developerKey: '4qY7lqQw8NOl9gng0ZHgT4xdiDqxqoGVutuZwrUYQsI', keyDir: './keys' }); |
There was a problem hiding this comment.
Why do we change this to dev? Would you need to change the developerKey (to make sure this works for dev)?
There was a problem hiding this comment.
No, I don't think there is a need to change the key. I think it's same for all env unless we pass some other
There was a problem hiding this comment.
Yeah but why are we changing this from sandbox to dev?
There was a problem hiding this comment.
popup + one step breaks Uncaught (in promise) EXCEPTION_INVALID_BANK: Could not find bank with ID ngp-cbi-05034
This bank needs a dev key in dev environment, in sandbox it will not need one. https://github.com/tokenio/configurations/blob/09694b2cfa431b35006513a5d7cd25c9f8732ff1/banks/nextgenpsd2.k8s.conf#L1282
You need to use global-test as the dev key
server.js
Outdated
|
|
||
| app.get('/callback', urlencodedParser, async function (req, res){ | ||
| var redirectUrl = req.protocol + '://' + req.get('host') + req.url; | ||
| console.log('object', req.protocol + '://' + req.get('host')) |
server.js
Outdated
| console.log('object', req.protocol + '://' + req.get('host')) | ||
| var queryData = Token.parseSetTransferDestinationsUrl(redirectUrl); | ||
| if(queryData.supportedTransferDestinationTypes && queryData.supportedTransferDestinationTypes.includes('SEPA')){ | ||
| console.log('object', queryData.supportedTransferDestinationTypes) |
There was a problem hiding this comment.
Have you walked through the flows to make sure they work? Cross border with pop up throws the following:
xhr.js:178 Refused to connect to 'http://localhost:3000/callback?bankName=Wood%20Bank&country=GB&supportedTransferDestinationTypes=FASTER_PAYMENTS&supportedTransferDestinationTypes=SEPA&supportedTransferDestinationTypes=BACS&supportedTransferDestinationTypes=CHAPS' because it violates the following Content Security Policy directive: "connect-src *.token.io".
server.js
Outdated
|
|
||
| // Connect to Token's development sandbox, if you change this, you also need to change window.Token({env}) in client.js | ||
| var Token = new TokenClient({ env: 'sandbox', developerKey: '4qY7lqQw8NOl9gng0ZHgT4xdiDqxqoGVutuZwrUYQsI', keyDir: './keys' }); | ||
| var Token = new TokenClient({ env: 'dev', developerKey: '4qY7lqQw8NOl9gng0ZHgT4xdiDqxqoGVutuZwrUYQsI', keyDir: './keys' }); |
There was a problem hiding this comment.
popup + one step breaks Uncaught (in promise) EXCEPTION_INVALID_BANK: Could not find bank with ID ngp-cbi-05034
This bank needs a dev key in dev environment, in sandbox it will not need one. https://github.com/tokenio/configurations/blob/09694b2cfa431b35006513a5d7cd25c9f8732ff1/banks/nextgenpsd2.k8s.conf#L1282
You need to use global-test as the dev key
|
@daniellin215 Can you try to do testing on local web-app. You can first generate a web-app URL having request-id and then change URL to localhost:5000. and test this functionality. It is working in that scenario. |
No description provided.