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

Link v3: Connect passthrough mode #4219

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Link v3: Connect passthrough mode #4219

merged 6 commits into from
Nov 20, 2024

Conversation

davidme-stripe
Copy link
Contributor

Summary

If passthrough mode is enabled, call the /share endpoint to get the passthrough PM, then confirm using that PM.

Motivation

Enable passthrough mode in native Link.

Testing

In PaymentSheet Example.

Changelog

None

@davidme-stripe davidme-stripe marked this pull request as ready for review November 5, 2024 21:42
@davidme-stripe davidme-stripe requested review from a team as code owners November 5, 2024 21:42
Comment on lines 456 to +487
case .withPaymentDetails(let linkAccount, let paymentDetails):
// shouldSave is false, as we don't show a save checkbox in the Link VC
confirmWithPaymentDetails(linkAccount, paymentDetails, paymentDetails.cvc, false)
let shouldSave = false // always false, as we don't show a save-to-merchant checkbox in Link VC

if elementsSession.linkPassthroughModeEnabled {
linkAccount.sharePaymentDetails(id: paymentDetails.stripeID, cvc: paymentDetails.cvc) { result in
switch result {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like we should add a test to validate that these functions are being called when linkPassthroughModeEnabled == true.

wooj-stripe
wooj-stripe previously approved these changes Nov 8, 2024
Base automatically changed from relink/fix-todos to master November 18, 2024 19:46
@davidme-stripe davidme-stripe dismissed wooj-stripe’s stale review November 18, 2024 19:46

The base branch was changed.

Copy link

emerge-tools bot commented Nov 18, 2024

📸 Snapshot Test

No snapshots generated

Name Added Removed Modified Unchanged Errored Approval
StripeFinancialConnectionsSize
com.stripe.StripeFinancialConnectionsSize
0 0 0 0 0 N/A
StripeSize
com.stripe.StripeSize
0 0 0 0 0 N/A
StripeApplePaySize
com.stripe.StripeApplePaySize
0 0 0 0 0 N/A
StripePaymentsUISize
com.stripe.StripePaymentsUISize
0 0 0 0 0 N/A
StripePaymentSheetSize
com.stripe.StripePaymentSheetSize
0 0 0 0 0 N/A
StripePaymentsSize
com.stripe.StripePaymentsSize
0 0 0 0 0 N/A

🛸 Powered by Emerge Tools

Copy link

emerge-tools bot commented Nov 18, 2024

1 build increased size, 4 builds decreased size, 1 build had no size change

Name Version Download Change Install Change Approval
StripeSize
com.stripe.StripeSize
1.0 (1) 2.1 MB ⬇️ 862 B (-0.04%) 6.9 MB ⬇️ 4.2 kB (-0.06%) N/A
StripeApplePaySize
com.stripe.StripeApplePaySize
1.0 (1) 449.7 kB ⬇️ 6 B 1.6 MB - N/A
StripeFinancialConnectionsSize
com.stripe.StripeFinancialConnectionsSize
1.0 (1) 1.3 MB ⬆️ 520 B (0.04%) 4.4 MB ⬆️ 56 B N/A
StripePaymentsSize
com.stripe.StripePaymentsSize
1.0 (1) 1.2 MB ⬇️ 1.7 kB (-0.14%) 4.1 MB ⬇️ 8.3 kB (-0.2%) N/A
StripePaymentsUISize
com.stripe.StripePaymentsUISize
1.0 (1) 1.9 MB ⬇️ 1.4 kB (-0.07%) 6.3 MB ⬇️ 4.6 kB (-0.07%) N/A
StripePaymentSheetSize
com.stripe.StripePaymentSheetSize
1.0 (1) 3.7 MB ⬇️ 3.2 kB (-0.09%) 10.9 MB ⬇️ 8.8 kB (-0.08%) N/A

StripeSize 1.0 (1)
com.stripe.StripeSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 4.2 kB (-0.06%)
Total download size change: ⬇️ 862 B (-0.04%)

Largest size changes

Item Install Size Change
🗑 StripePayments.LinkConsumerIncentive ⬇️ -3.0 kB
DYLD.Exports ⬇️ -800 B
Other ⬇️ -393 B
View Treemap

Image of diff

StripeApplePaySize 1.0 (1)
com.stripe.StripeApplePaySize

No changes to report

StripeFinancialConnectionsSize 1.0 (1)
com.stripe.StripeFinancialConnectionsSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 56 B
Total download size change: ⬆️ 520 B (0.04%)

Largest size changes

Item Install Size Change
🗑 StripeFinancialConnections.FinancialConnectionsAPIClient.encodeAs... ⬇️ -572 B
Other ⬆️ 628 B
View Treemap

Image of diff

StripePaymentsSize 1.0 (1)
com.stripe.StripePaymentsSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 8.3 kB (-0.2%)
Total download size change: ⬇️ 1.7 kB (-0.14%)

Largest size changes

Item Install Size Change
🗑 StripePayments.LinkConsumerIncentive ⬇️ -3.0 kB
DYLD.Exports ⬇️ -752 B
Other ⬇️ -4.6 kB
View Treemap

Image of diff

StripePaymentsUISize 1.0 (1)
com.stripe.StripePaymentsUISize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 4.6 kB (-0.07%)
Total download size change: ⬇️ 1.4 kB (-0.07%)

Largest size changes

Item Install Size Change
🗑 StripePayments.LinkConsumerIncentive ⬇️ -3.0 kB
DYLD.Exports ⬇️ -800 B
Other ⬇️ -817 B
View Treemap

Image of diff

StripePaymentSheetSize 1.0 (1)
com.stripe.StripePaymentSheetSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 8.8 kB (-0.08%)
Total download size change: ⬇️ 3.2 kB (-0.09%)

Largest size changes

Item Install Size Change
🗑 StripePayments.LinkConsumerIncentive ⬇️ -3.0 kB
StripePaymentSheet.PaymentSheetLinkAccount.sharePaymentDetails(id... ⬆️ 1.2 kB
DYLD.Exports ⬇️ -1.1 kB
🗑 StripePaymentSheet.TextFieldElement.CensoredCVCConfiguration ⬇️ -968 B
🗑 StripePaymentSheet.UpdateCardViewController.expiryDateElement ⬇️ -728 B
View Treemap

Image of diff


🛸 Powered by Emerge Tools

@davidme-stripe davidme-stripe enabled auto-merge (squash) November 20, 2024 23:27
Comment on lines +174 to +176
completion: { _, _ in
exp.fulfill()
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like we should do some asserting here? e.g. ensure it has been completed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do, see the "confirm completed" expectation defined above. Additionally, each of the above stubs have their own expectations.

@davidme-stripe davidme-stripe merged commit cfb859a into master Nov 20, 2024
6 checks passed
@davidme-stripe davidme-stripe deleted the relink/passthrough branch November 20, 2024 23:40
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