-
Notifications
You must be signed in to change notification settings - Fork 1k
Added static client_attribution_metadata fields to API requests on payment method tokenization #5177
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
StripePaymentSheet- case flatWithDisclosure
+ case flatWithChevron
- public var disclosure: StripePaymentSheet.PaymentSheet.Appearance.EmbeddedPaymentElement.Row.Flat.Disclosure
- public var chevron: StripePaymentSheet.PaymentSheet.Appearance.EmbeddedPaymentElement.Row.Flat.Chevron
- public struct Disclosure : Swift.Equatable {
- public struct Chevron : Swift.Equatable {
- public static func == (a: StripePaymentSheet.PaymentSheet.Appearance.EmbeddedPaymentElement.Row.Flat.Disclosure, b: StripePaymentSheet.PaymentSheet.Appearance.EmbeddedPaymentElement.Row.Flat.Disclosure) -> Swift.Bool
- public static func == (a: StripePaymentSheet.PaymentSheet.Appearance.EmbeddedPaymentElement.Row.Flat.Chevron, b: StripePaymentSheet.PaymentSheet.Appearance.EmbeddedPaymentElement.Row.Flat.Chevron) -> Swift.Bool If you are adding a new public API consider the following:
If you are modifying or removing a public API:
If you confirm these APIs need to be added/updated and have undergone necessary review, add the label ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with |
…-ios into joyceqin/mobile_session_id
…-ios into joyceqin/mobile_session_id
…-ios into joyceqin/mobile_session_id
StripeApplePay/StripeApplePay/Source/PaymentsCore/API/PaymentMethod+API.swift
Outdated
Show resolved
Hide resolved
StripeApplePay/StripeApplePay/Source/PaymentsCore/API/Models/PaymentMethodParams.swift
Show resolved
Hide resolved
StripeApplePay/StripeApplePay/Source/PaymentsCore/API/Models/PaymentMethodParams.swift
Outdated
Show resolved
Hide resolved
AnalyticsHelper.shared.clearSessionID() | ||
AnalyticsHelper.shared.generateSessionID() |
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.
👀 huh this is like, doing the opposite now - why'd we make this change? Seems like it'd make sense to clear the session ID before every network test?
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 originally added the clearSessionID there when I was adding mobile_session_id
to the API call to retrieve an ElementsSession so that network tests wouldn't hit the live network unless I explicitly generated a session ID. However, all of those network tests that would have been affected have had their stubs changed in this PR, and now that I've edited the paramsAddingClientAttributionMetadata to not include client_session_id
in the request unless it's non-nil, it feels like it would make more sense to always generate a session ID and include client_attribution_metadata[client_session_id]
in all the stubs
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.
Actually not all of those original network tests that would have been affected are affected here, I can revert to clearing the session ID but I'll have to rerecord these tests
Summary
Added client attribution metadata with fields client_session_id, merchant_integration_source, merchant_integration_subtype, and merchant_integration_version
Under payment_method_data[client_attribution_metadata] in API calls for confirmPaymentIntent, confirmSetupIntent.
Top-level under client_attribution_metadata for createPaymentMethod
Under payment_method_options[client_attribution_metadata] for sharePaymentDetails.
More client_attribution_metadata fields to come, but I thought I'd just get this one out first for less complexity.
A lot of files changed, but they're almost all network stubs
Motivation
MOBILESDK-3759
For more context, here are all the notes I have at the moment: https://docs.google.com/document/d/1NNTf3TKRJ6Ftgk6PYtDjPMSAYU-RMUezUjGndJr81Eg/edit?usp=sharing
Testing
Network stubs, manually inspected requests
confirmPaymentIntent request: https://admin.corp.stripe.com/request-log/req_3jspitgU8NcFUm
confirmSetupIntent request: https://admin.corp.stripe.com/request-log/req_E3hihx6DTYAYhy
createPaymentMethod request: https://admin.corp.stripe.com/request-log/req_gwBYjtzWxvCqPx
sharePaymentDetails request: https://admin.corp.stripe.com/request-log/req_OHbC2Nv9lfc2ot
createPaymentMethod request from ApplePay: https://admin.corp.stripe.com/request-log/req_0qmm7pYZxY1R72
Changelog
N/A