Skip to content

Return Google Pay payment method type - #76

Open
Max Harrison (maxharrison) wants to merge 2 commits into
mainfrom
max/google-pay-payment-method-type-parity
Open

Return Google Pay payment method type#76
Max Harrison (maxharrison) wants to merge 2 commits into
mainfrom
max/google-pay-payment-method-type-parity

Conversation

@maxharrison

@maxharrison Max Harrison (maxharrison) commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

CARD-844

Android did not return card.paymentMethodType, although the web SDK returned the Google wallet funding source on both FPAN and DPAN responses. This left merchants with different Google Pay response data by platform.

Android now maps Google Pay cardFundingSource values CREDIT, DEBIT, and PREPAID to the web-compatible lowercase values and attaches them after credentials-response deserialization. The parity test deserializes representative FPAN and DPAN responses, then enriches them with Google PaymentData containing email, billing address, and funding source.

Note: Google Pay reports no STORE funding source. UNKNOWN and absent values remain unset, as on web.

Toggling the whitespace thing in the diff helps viewing it, and a lot of the lines are secondary constructors to make it a safer change

@maxharrison
Max Harrison (maxharrison) force-pushed the max/google-pay-payment-method-type-parity branch from 4985b91 to cc1d25b Compare August 24, 2026 12:54
@maxharrison
Max Harrison (maxharrison) force-pushed the max/google-pay-payment-method-type-parity branch from cc1d25b to b596678 Compare August 24, 2026 12:54
@maxharrison
Max Harrison (maxharrison) marked this pull request as ready for review August 24, 2026 13:01
@maxharrison
Max Harrison (maxharrison) requested a review from a team as a code owner August 24, 2026 13:01
)
val paymentMethodType: String? = null,
) {
/** Retains the constructor signature from releases before `paymentMethodType`. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants