-
Notifications
You must be signed in to change notification settings - Fork 2
Cross border payment fix #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
server.js
Outdated
|
||
// store the token request | ||
var request = await member.storeTokenRequest(tokenRequest); | ||
var requestId = request.id; | ||
tokenRequestId = request.id; | ||
const d = "http://localhost:5000/app/request-token/" + requestId; | ||
console.log('d', d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm log pls
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing after keywords, if and before {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
server.js
Outdated
@@ -11,7 +11,7 @@ var urlencodedParser = bodyParser.json({ extended: false }); | |||
var TokenClient = require('@token-io/tpp').TokenClient; // main Token SDK entry object | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but why are we changing this from sandbox to dev?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -596,8 +596,10 @@ async function initServer(member, alias) { | |||
|
|||
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')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the logs.
server.js
Outdated
var queryData = Token.parseSetTransferDestinationsUrl(redirectUrl); | ||
if(queryData.supportedTransferDestinationTypes && queryData.supportedTransferDestinationTypes.includes('SEPA')){ | ||
console.log('object', queryData.supportedTransferDestinationTypes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -11,7 +11,7 @@ var urlencodedParser = bodyParser.json({ extended: false }); | |||
var TokenClient = require('@token-io/tpp').TokenClient; // main Token SDK entry object | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.