Currently, the Apple Pay session call is mandatory in all cases. This requirement also mandates configuring the initiative_context, which is the domain name where the Apple Pay payment is being processed. However, in the case of an iOS app, a domain is not required, so this field can be made optional. Additionally, in this case, the session call to Apple Pay can be skipped.
On the web, Apple Pay is supported only in Safari. Therefore, the session call should be skipped in web environments when the browser is not Safari.
Additional Changes
[ ] This PR modifies the API contract
[ ] This PR modifies the database schema
[ ] This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
-> Create merchant connector account with apple pay manual flow. Below is the metadata for the manual flow.
Type of Change
Description
Currently, the Apple Pay session call is mandatory in all cases. This requirement also mandates configuring the initiative_context, which is the domain name where the Apple Pay payment is being processed. However, in the case of an iOS app, a domain is not required, so this field can be made optional. Additionally, in this case, the session call to Apple Pay can be skipped.
On the web, Apple Pay is supported only in Safari. Therefore, the session call should be skipped in web environments when the browser is not Safari.
Additional Changes
Motivation and Context
How did you test it?
-> Create merchant connector account with apple pay manual flow. Below is the metadata for the manual flow.
-> Currently we make session call only if
x_client_platform
andbrowsername
header None or if it is web and Safari respectively.-> When mca is configured with write domain and header is not passed
-> When mca is configured with write domain and header is passed as
-> mac with write domain and wrong value in header
-> If only one header is passed
Checklist
cargo +nightly fmt --all
cargo clippy