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

Set transaction URL for Stripe APMs #3383

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Aug 26, 2024

Fixes #3061

Changes proposed in this Pull Request:

When viewing order details, we want the charge ID to link to the Stripe dashboard. We are already doing this for CCs, by overriding get_transaction_url() inside WC_Stripe_Payment_Gateway. We want to do this inside WC_Stripe_UPE_Payment_Method as well, to have the same behavior for APMs.

BEFORE: charge ID does not link to Stripe dashboard
Screenshot 2024-08-28 at 9 59 16 AM

AFTER: charge ID links to Stripe dashboard
Screenshot 2024-08-28 at 9 59 36 AM

Testing instructions

  1. Enable APMs (e.g. Alipay) as a payment method in the Stripe settings: wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=methods
  2. As a shopper, add a product to your cart and go to checkout. Use an APM, e.g. Alipay, to pay.
  3. As the merchant, go to the order details page: wp-admin/admin.php?page=wc-orders&action=edit&id=<ORDER-ID-FROM-PREVIOUS-STEP>
  4. Under the "Order # details" header, you should see something like "AlipayPayment via Alipay (py_3Ps8zuIMUtoK6Gfh0UF2DfWd)." The charge ID should link to the Stripe dashboard payments page, e.g. https://dashboard.stripe.com/test/payments/py_3Ps8zuIMUtoK6Gfh0UF2DfWd
  5. Test for regressions by going through checkout using a credit card, and verifying that credit card order IDs are still linked to the Stripe dashboard.

  • 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

When viewing order details, we want the charge ID to link to the Stripe dashboard.
We are already doing this for CCs, by overriding get_transaction_url() in
WC_Stripe_Payment_Gateway. We want to do this in WC_Stripe_UPE_Payment_Method as
well, to have the same behavior for APMs.
@annemirasol annemirasol force-pushed the fix/3061-charge-id-dashboard-link branch from 4fcbf9a to 7114913 Compare August 28, 2024 15:44
@annemirasol annemirasol marked this pull request as ready for review August 28, 2024 15:47
@annemirasol annemirasol requested review from a team, Mayisha and wjrosa and removed request for a team August 28, 2024 15:47
Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

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

Code is good and it works as expected!
Screenshot 2024-08-28 at 14 03 04

Left a minor comment.

@annemirasol annemirasol merged commit a5d3ce0 into develop Aug 29, 2024
34 of 35 checks passed
@annemirasol annemirasol deleted the fix/3061-charge-id-dashboard-link branch August 29, 2024 16:04
@annemirasol annemirasol self-assigned this Sep 3, 2024
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.

[APM] Charge ID on the Edit order page isn't linking to the Stripe dashboard
2 participants