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

Manually applying a gift card in an uncaptured order triggers a Level 3 invalid pricing error #10196

Open
pierorocca opened this issue Jan 17, 2025 · 3 comments
Labels

Comments

@pierorocca
Copy link
Contributor

Describe the bug

As reported by a top WooPayments client, on Dec 9th they manually applied a gift card to an uncaptured order and the encountered a Level 3 invalid pricing error.

Level 3 data submission requires that each line items, totals, discounts, etc. net out perfectly. We recently resolved an issue with gift cards and Level 3, however, that may not have been applied to manual application from the Orders screen. #9053

To Reproduce

  1. Set store to capture manually
  2. Shop and place an order with multiple simple products
  3. Setup a gift card for $20 using the WooCommerce Gift Card plugin (I have not verified this is the plugin they're using)
  4. Apply the gift card manually in the Orders screen
  5. Observe the Level 3: Invalid Pricing error
@pierorocca
Copy link
Contributor Author

@peterfabian do you think my hypothesis above is plausible or likely?

@peterfabian
Copy link
Contributor

Hi @pierorocca .

I'm not totally sure how the payment is captured here. Does it happen in the context of WP Admin?

I'm not aware of a way how to trigger the payment via Woo Payments from WP Admin.

I've tried creating the order from the backend, adding a gift card code and then going to customer's payment page to pay for the order, but that one was processed correctly.

Either way, the WC Gift Card solution is hooked to Level3Service::get_data_from_order, which is afaik WooPayment's solution to get the level 3 data based on the given order. Whenever this is called, it should trigger Level 3 data update. If this method is skipped during any of the flows that submit Level 3 data, then the L3 data would be incorrect.

@pierorocca
Copy link
Contributor Author

Hey @peterfabian the account first needs to change to manual capture in the WooPayments settings page.

Image

Then purchase a few products from the front-end including a gift card so you can use the code.

Then in the admin, find the order and you'll see a button for an Admin to apply the gift card.

Image

Apply it, hit recalc, then Update the order. I believe it's here where the Level 3 error occurred or when they then tried to capture the transaction in the Transactions page. I just tested it and I cannot replicate the error. Would you mind trying as well?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants