Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
165 stars 67 forks source link

PRB tokenized cart on block-based cart and checkout #8527

Open frosso opened 3 months ago

frosso commented 3 months ago
### Compatibility
- [ ] Ensure compatibility with "Product Add-Ons"
- [ ] Ensure compatibility with "WooCommerce Deposits"
- [ ] Ensure compatibility with "WooCommerce Bookings"
- [ ] Ensure compatibility with base product types: simple, variable, downloadable, subscriptions, virtual products
### Functionality
- [ ] On PRB click, customer can check out with items on the cart
- [ ] Price, tax, shipping, line items are displayed accurately
- [ ] Order page reflects selected product and paid amount
- [ ] Uses Store API to update totals when a different shipping address/method is selected within the PRB dialog
frosso commented 1 week ago

I'm currently pausing this work in favor of implementing a sessionhandler. To make the code review faster, we discussed as a team to copy the existing PRB implementation and then create a separate PR with the necessary modifications. The first PR to copy the implementation has been implemented: https://github.com/Automattic/woocommerce-payments/pull/8989

While working on this, I also noticed that the data store has a different data contract than the Store API. All the utilities in the tokenized cart leverage the Store API data contract. So we have two options:

After consulting with the blocks team ( p1718815646160629-slack-C02TS23QJ1X ) , they recommended the second option - which is what I'll be going with.