woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
299 stars 110 forks source link

[Mobile Payments] Create PaymentIntent via WCPay API instead of Stripe SDK #6709

Open joshheald opened 2 years ago

joshheald commented 2 years ago

In #6708 we will add a Canada-only workaround for not being able to use WCPay to charge fees for payments.

To remove fee logic from the app, we should move to using the WCPay API to create the PaymentIntent, so that fees can be applied there.

We can use the WCPay /payments/orders/{id}/create_terminal_intent endpoint for this, however it will first need to be updated to accept payment_method_types, metadata, customer and capture_method parameters, and we may also need to create the customer before the payment intent call.

We have the option to release this for Canada only, first, then simplify the apps to use this flow for all IPP transactions regardless of territory.

This is not needed for the initial release of IPP in Canada

See pdfdoF-Gj-p2#comment-1381 for full discussion

jaclync commented 2 years ago

I think this issue is currently blocked by https://github.com/Automattic/woocommerce-payments/issues/4196? I just changed the status to "Blocked" to be more clear 🙂