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

Automated refund handling eligibility should be exposed via REST API #18951

Closed
5 of 7 tasks
callumstrubi opened this issue Feb 13, 2018 · 1 comment
Closed
5 of 7 tasks

Comments

@callumstrubi
Copy link

callumstrubi commented Feb 13, 2018

Use case:
When checking an order, you can query the payment method. The payment method can be queried but at no stage can I query whether a refund can be processed automatically or not. If you issue a refund where you request automated payment gateway refund processing and the feature is not available with the customer's chosen gateway, the refund fails entirely. If this information was exposed over the API we could pre-mitigate this issue in external applications that interface with the woo commerce API.

I can see two possible resolutions:

  1. When submitting a refund request over the API, allow the request to succeed even if automatic payment gateway refunding was requested despite it not being available.
  2. Display in the payment gateway REST response whether it is eligible for automatic payment gateway refund.

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate
  • The issue still exists against the latest master branch of WooCommerce on Github (this is not the same version as on WordPress.org!)
  • I have attempted to find the simplest possible steps to reproduce the issue
  • I have included a failing test as a pull request (Optional)

Steps to reproduce the issue

  1. Query the REST API for payment methods

Expected/actual behavior

When I follow those steps, I see...

No reference to whether an automated refund can be processed

I was expecting to see...

Whether automated refunds could be processed with that gateway or not.

Isolating the problem

  • This bug happens with only WooCommerce plugin active
  • This bug happens with a default WordPress theme active, or Storefront
  • I can reproduce this bug consistently using the steps above

WordPress Environment

``` Not relevant ```
@mikejolley
Copy link
Member

Logged here for v3 woocommerce/wc-api-dev#87 since this is an addition/schema change.

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

No branches or pull requests

2 participants