Skip to content
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

PP-12853 Add the charset in Content-Type header for Apple Pay #3886

Merged

Conversation

marcotranchino
Copy link
Contributor

@marcotranchino marcotranchino commented Aug 2, 2024

With the previous PR[1], we have made some progress in communicating with Apple Pay via Axios and HttpsProxyAgent and we have tested that the validation is initiated correctly but then fails with the following message from Apple: Apple Pay Merchant ID not valid.

See screenshot in the new PR[2].

With this change, we are now adding the charset to the Content-Type header in the post request, in case that is what is expected by Apple Pay, and we are also adding the status to the error log, to have a little bit more information back.

Further information in JIRA[3].

[1]
#3885

[2]
#3886

[3]
https://payments-platform.atlassian.net/browse/PP-12853

SCREENSHOT

error from apple

With the previous PR[1], we have made some progress in communicating with
Apple Pay via Axios and HttpsProxyAgent and we have tested that the
validation is initiated correctly but then fails with the following message
from Apple: `Apple Pay Merchant ID not valid`.

See screenshot in the new PR[2].

With this change, we are now adding the charset to the Content-Type header in
the post request, in case that is what is expected by Apple Pay, and we are
also adding the status to the error log, to have a little bit more
information back.

Further information in JIRA[3].

[1]
#3885

[2]
#3886

[3]
https://payments-platform.atlassian.net/browse/PP-12853
@marcotranchino marcotranchino force-pushed the pp-12853-amendments-for-axios-plus-proxya-agent branch from 46931cd to c3cc7fe Compare August 2, 2024 13:32
@marcotranchino marcotranchino merged commit ca77f53 into master Aug 2, 2024
11 checks passed
@marcotranchino marcotranchino deleted the pp-12853-amendments-for-axios-plus-proxya-agent branch August 2, 2024 13:49
marcotranchino added a commit that referenced this pull request Aug 2, 2024
With the previous PRs[1][2], we have made some progress in communicating with
Apple Pay via Axios and HttpsProxyAgent and we have tested that the
validation is initiated correctly but then fails with the following message
from Apple: `Apple Pay Merchant ID not valid`.

See screenshot in the second PR[2].

With this change, we are now passing the certificate and key to the Proxy
Agent via additional options.

Further information in JIRA[3].

[1]
#3885

[2]
#3886

[3]
https://payments-platform.atlassian.net/browse/PP-12853
marcotranchino added a commit that referenced this pull request Aug 5, 2024
…axios

With the previous PRs[1][2][3], we have made some progress in communicating
with Apple Pay via Axios and HttpsProxyAgent and we have tested that the
validation is initiated correctly but then fails with the following message:
`Apple Pay Merchant ID not valid`.

See screenshot in the second PR[2].

With this change, we are now creating the HttpsProxyAgent with just the proxy
URL as an argument for its constructor, passing it together with the
certificate and key to the HttpsAgent, as arguments for its constructor, and
then creating an `axios` instance, passing the HttpsAgent to it.

Further information in JIRA[3].

[1]
#3885

[2]
#3886

[3]
#3887

[4]
https://payments-platform.atlassian.net/browse/PP-12853
marcotranchino added a commit that referenced this pull request Aug 5, 2024
…axios

With the previous PRs[1][2][3], we have made some progress in communicating
with Apple Pay via Axios and HttpsProxyAgent and we have tested that the
validation is initiated correctly but then fails with the following message:
`Apple Pay Merchant ID not valid`.

See screenshot in the second PR[2].

With this change, we are now creating the HttpsProxyAgent with just the proxy
URL as an argument for its constructor, passing it together with the
certificate and key to the HttpsAgent, as arguments for its constructor, and
then creating an `axios` instance, passing the HttpsAgent to it.

Further information in JIRA[3].

[1]
#3885

[2]
#3886

[3]
#3887

[4]
https://payments-platform.atlassian.net/browse/PP-12853
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants