Skip to content

Conversation

@pgiacomo69
Copy link
Contributor

@pgiacomo69 pgiacomo69 commented Dec 22, 2025

Solve the issue #2282.
@remonh87, @jonasbark I'm aware that we shouldn't change code from StripeSDK, because it belongs to React Native SDK that we import in this project, but how should are we supposed to solve it?
Should I PR on Stripe repository for a rollback of

confirmPayment signature? Or there's another way to confirm Apple Pay payments?

return
}

let params = arguments["params"] as? NSDictionary
Copy link
Member

Choose a reason for hiding this comment

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

I think if you use NSNull() as fallback then you can revert the NSDictionary? => NSDictionary change in the other file and make it "survive" the next sync

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no way that confirmPayement would accept an NSNull as param, or not?
I get:
image

Copy link
Contributor Author

@pgiacomo69 pgiacomo69 Dec 23, 2025

Choose a reason for hiding this comment

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

@jonasbark , I didn't think that if this PR should be applied, we would be protected from regression, because the library won't compile if we don't make

nullable when a new SDK is 'imported'. We need just a comment in our caller method.

Copy link
Member

Choose a reason for hiding this comment

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

I think Stripe wants us to use the confirmplatformpayment method in this case so I prefer we use that one instead of fixing something here

Copy link
Member

Choose a reason for hiding this comment

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

@pgiacomo69 I think this dirty trick will work in stripeplugin.swift

let params = (arguments["params"] as? NSDictionary) ?? (NSNull() as Any as! NSDictionary)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @remonh87! I (or my colleague Luan, that commented the issue) wil check it tomorrow!

Copy link
Member

Choose a reason for hiding this comment

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

@pgiacomo69 did you try it out?

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.

4 participants