woocommerce-ios
woocommerce-ios copied to clipboard
[HACK Week] Other payment methods
Description
With this PR we add support for other payment methods, where the merchant can add a note to the order specifying their method. This is useful when they receive a payment with a different method -e.g. checks, gift cards, house accounts, etc- than those currently displayed in the payment methods screen, and they want to add a record of it.
Testing instructions
- Go to orders
- Tap on + to create a new order
- Add products to the order. Tap on create.
- Tap on Collect Payment
- Select Other Payment Methods
- Add a note and mark the order as complete.
- See that the order is set as complete and the order details are shown.
- Refresh the order. See that a note is added with the text you entered.
Try also without adding a note (no note should be added to the order). See that the events are tracked as well: when tapping on the Other Payment Methods row:
🔵 Tracked payments_flow_collect, properties: [AnyHashable("is_wpcom_store"): true, AnyHashable("site_url"): "https://americanwootester.wpcomstaging.com", AnyHashable("order_id"): 1898, AnyHashable("payment_method"): "other_payment_methods", AnyHashable("was_ecommerce_trial"): false, AnyHashable("plan"): "business-bundle", AnyHashable("blog_id"): 214354650, AnyHashable("flow"): "order_payment"]
("payment_method"): "other_payment_methods"
When adding a note:
🔵 Tracked other_payment_methods_note_added, properties: [AnyHashable("site_url"): "https://americanwootester.wpcomstaging.com", AnyHashable("was_ecommerce_trial"): false, AnyHashable("is_wpcom_store"): true, AnyHashable("blog_id"): 214354650, AnyHashable("plan"): "business-bundle"]
Please also check that the event payments_flow_completed is tracked with the right payment method.
Screenshots
https://github.com/woocommerce/woocommerce-ios/assets/1864060/fc9f8360-e300-4ab3-8e96-258fea70b768
- [ ] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
| App Name | ||
| Build Number | pr11366-c46b45c | |
| Version | 16.4 | |
| Bundle ID | com.automattic.alpha.woocommerce | |
| Commit | c46b45c99096c2c154237c897cb648068f8a876c | |
| App Center Build | WooCommerce - Prototype Builds #7085 |