Skip to content
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

Adding Amazon Pay to the classic checkout #3793

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Jan 29, 2025

Fixes #3733

Changes proposed in this Pull Request:

Testing instructions

  • Create an Amazon Pay sandbox account (if you don't have it already)
  • Checkout and build this branch on your test environment
  • Connect your Stripe account
  • Configure webhooks
  • As a merchant, enable the Amazon Pay express payment method
  • As a shopper, access your test store using a public-facing address (Ngrok or JN website)
  • Confirm you can see the Amazon Pay button on the classic checkout, product, and cart pages
Screenshot 2025-01-30 at 19 28 05
  • Confirm you can complete the checkout process on all the pages above (logged-in and anonymously). Try physical and virtual products
  • As a merchant, confirm the payment title is correctly displayed:
Screenshot 2025-01-30 at 19 26 51
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@wjrosa wjrosa self-assigned this Jan 29, 2025
Base automatically changed from add/amazon-pay-to-settings to develop January 30, 2025 04:17
@wjrosa wjrosa force-pushed the add/amazon-pay-to-classic-checkout branch from 56943b2 to ed5e933 Compare January 30, 2025 14:05
@@ -41,8 +41,9 @@ public function __construct() {
* @return string
*/
public function get_title( $payment_details = false ) {
if ( $payment_details && isset( $payment_details->card->wallet->type ) ) {
return $this->get_card_wallet_type_title( $payment_details->card->wallet->type );
$wallet_type = WC_Stripe_Payment_Methods::AMAZON_PAY === ( $payment_details->type ?? null ) ? WC_Stripe_Payment_Methods::AMAZON_PAY : ( $payment_details->card->wallet->type ?? null );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should replace this with another IF. A bit confusing to read.

@wjrosa wjrosa marked this pull request as ready for review January 30, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon Pay ECE: add to classic checkout
2 participants