Closed staskus closed 1 hour ago
1 Warning | |
---|---|
:warning: | This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
Generated by :no_entry_sign: Danger
📲 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 | WooCommerce iOS | |
Build Number | pr14485-7dd66ad | |
Version | 21.1 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 7dd66add0f93d9c6d85ce1ec7f9293eb17e0b978 | |
App Center Build | WooCommerce - Prototype Builds #11724 |
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
@jaclync, thanks for the review!
Do you know if the email receipt works in POS as well? Some presentation logic in the error modal is UIKit specific, just wondering if this works for the adapted SwiftUI version in POS.
This is a great question. A current implementation builds on already existing receipt-related modals. However, as you mention, it implements specific UIKit modals within CollectOrderPaymentUseCase
which is not ideal.
We discussed it here as well pdfdoF-5RR-p2#comment-6896.
POS receipts functionality is being implemented right now. POS could use ReceiptState
when building CardPresentPaymentEventDetails
in CardPresentPaymentsTransactionAlertsProvider
. This way there could be a shared logic between POS and IPP. However, we discussed this and we are choosing to untangle receipts from payment flow within POS for more flexibility. In a longer term, it could mean that we should remove receipt-related functionality from CollectOrderPaymentUseCase
for clarity. I have a draft task for this on the project board so I could address it later or plan for the future.
Closes: #14163 Wraps up the work from:
Description
Allow inputting and sending receipts after failed payments. Equivalent changes to https://github.com/woocommerce/woocommerce-ios/pull/14422 but for failed payments.
I will enable feature flag only when both WooCommerce and WooPayments versions are officially released and additional CFT is performed.
Solution
To be consistent, now we have three types of alerts:
Since payment failure alert allows to retry the payment, when
ReceiptEmailViewController
is present, do not automatically dismiss the alert. If email is sent, update the alert to showEmail sent
message created in the previous PR.Steps to reproduce
Before testing:
sendReceiptAfterPayment
inDefaultFeatureFlagService
Main scenario: No customer + Failed Payment + Input Email
2nd scenario: No customer + Failed Payment + Retry + Input email
Testing information
I additionally tested:
Screenshots
Card Reader + Failed Payment + Input email
https://github.com/user-attachments/assets/81f5be07-25e7-477c-916a-5b09c2c896ea
TTP + Failed Payment + Retry + Input email
https://github.com/user-attachments/assets/f9f592ab-bb76-4e06-98ff-23bdb4d6f9ff
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: