-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add the request to error response for apple pay validate #201
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,28 +37,24 @@ app.post('/validate', (req, res) => { | |
? payfacMerchantIdentityKey | ||
: partnershipMerchantIdentityKey, // key apple | ||
}) | ||
const requestData = { | ||
merchantIdentifier: | ||
merchantType === 'PayFac' ? payfacMerchantId : partnershipMerchantId, | ||
domainName, | ||
displayName: DISPLAY_NAME, | ||
} | ||
axios | ||
.post( | ||
appleUrl, | ||
{ | ||
merchantIdentifier: | ||
merchantType === 'PayFac' | ||
? payfacMerchantId | ||
: partnershipMerchantId, | ||
domainName, | ||
displayName: DISPLAY_NAME, | ||
}, | ||
{ | ||
httpsAgent, | ||
} | ||
) | ||
.post(appleUrl, requestData, { | ||
httpsAgent, | ||
}) | ||
.then((a) => { | ||
// return the json received from Apple Pay server unmodified | ||
res.send(a.data) | ||
}) | ||
.catch((a) => { | ||
res.send({ | ||
message: a.message, | ||
errorMessage: a.message, | ||
request: requestData, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this change make sensitive data like keys/certificates available? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It only makes the merchant identifier, domain name, and display name available, all of which were previously hard coded into the file |
||
responseStatus: a.response.status, | ||
responseData: a.response.data, | ||
responseHeaders: a.response.headers, | ||
|
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.
i d say send ALL (checksum of cert/key), applePayUrl, every possible detail and compare
if this is not due to domain verification revoked then it is down to SOMETHING being off, so better to verify all