-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Cash App Pay payment method #53
Conversation
…o feature/cash-app-pay
@iamdharmesh Nice work here, this all looks great! I've left a few minor comments / suggestions but those things don't need to block QA, so moving this along for @qasumitbagthariya to start testing. |
Note for other reviewers, there are some PHPCS failures getting flagged here but in looking at those, they all are around |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions to handle. Also curious if there are any e2e tests that are feasible here, admitting an actual test payment flow may not be feasible / something we can mock.
typo fixes. Co-authored-by: Darin Kotter <[email protected]>
@qasumitbagthariya, I have fixed this in commit 35e7f42 |
QA Update ✅Thanks @iamdharmesh I checked and confirmed now there is no error related Deprecated warning with PHP Version: 8.2.10 and 8.3.0 👍 |
Nice work here @iamdharmesh! No action required on this point, but I wanted to call it out in case it catches up anyone else. I was been doing some testing and noticed that if you have a checkout failure (eg invalid US post code), the checkout fails as it should, however, I noticed this in the Cash App elements. I couldn't find in the code a reference to that variable but it turns out this is how Cash App displays the customer's token in sandbox after they have authorized the payment. Docs reference. Declining the paymentIf I press the decline button on the phone (see left below) while processing the payment, the checkout just hangs forever it seems (see right below).
To continue you have to refresh the page. Note: this only impacts the shortcode/classic checkout. The Block checkout is unblocked on decline, however, you cannot then complete the payment again, you need to refresh. Other tests
block.checkout.decline.mov
|
Thanks for the detailed review @james-allan. I have addressed the reported issue/feedback in the commit 9d3bc1f, could you please help to check it once. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In running through testing with @iamdharmesh and @dkotter earlier today, this PR feels solid for initial release to our Square merchants. I had wanted to do a full test of the CashApp integration using our Production test site, but I did not realize that would require a "live" bank account creation (which we do not currently have) so I'm investigating how to solve for that for future testing in Production.
For now, the flows in a "classic" front-end approach and via the block-based checkout works as expected. Subscriptions and Pre-Orders set for future payment properly do not show the CashApp button. Gift cards appear to function as expected with CashApp as do refunds on orders.
Two areas that are not covered in this initial PR/release that we'll likely want to follow up on quickly are:
- Adding support for partial payments (wherein a shopper might use a credit card or gift card in tandem with CashApp to fully pay for an order)
- Confirm with Square, but in reading their docs it appears that the
autocomplete
variable set toAUTHORIZED
may allow us to support bothCharge
andAuthorization
methods for merchants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. Thanks @iamdharmesh
…erce-square into e2e/cash-app-pay
Regression / Smoke Test Report ✅Tested with Archive File created via "php woorelease.phar build repo_URL" (Composer version 2.5.5, npm version 8.19.4, node version 16.20.0) Testing Environment
Status- Working expected with Plugin Archive/Zip file same as fix specific branch. Next Step- Ready to Merge 🚀 Status update |
[Cash App Pay] Added end-to-end (E2E) tests for the Cash App Pay payment method.
All Submissions:
Changes proposed in this Pull Request:
PR adds support for the "Cash App Pay" payment method to the extension. Additionally, the PR includes changes to support the block checkout.
Cash App Pay does not support stored payment methods; therefore, it cannot be used to place subscriptions or pre-order products.
Important Note:
PR is not tested with the Square production environment, it should be tested with the Square production environment before we merge/release this.
Payment method settings page:
Notes for reviewer:
Closes #50
Documentation updates:
The Cash App Pay section provided in the Google Docs below needs to be added to the Square Payments documentation page.
https://docs.google.com/document/d/1-OIyJ3uwaSTQ_-HLWgI4eZ_JsbCoP-cmpouxESfIbag/edit?usp=sharing
Steps to test the changes in this Pull Request:
Admin:
US
as the base store location country if not already selected.Frontend: (Block-based and shortcode checkout)
Order Pay page:
Refunds:
Inventory sync:
Changelog entry