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

default parameter gives error #503

Merged
merged 2 commits into from
Jun 15, 2020
Merged

default parameter gives error #503

merged 2 commits into from
Jun 15, 2020

Conversation

visualex
Copy link

@visualex visualex commented Jun 6, 2020

$refund_apply_order argument in Recurly_Adjustment::refund method is set to string 'credit'.
The API responds with an error "Invalid refund_method (must be one of transaction_first, credit_first, all_transaction, all_credit)"
Recurly_Invoice::function argument however $refund_method is set to 'credit_first'
therefore I found this error when doing refunds with the following use-case

$adjustment = \Recurly_Adjustment::get('53f47d7....');
$adjustment->refund();

Thanks

$refund_apply_order argument in Recurly_Adjustment::refund method is set to string 'credit'. 
The API responds with an error "Invalid refund_method (must be one of transaction_first, credit_first, all_transaction, all_credit)"
Recurly_Invoice::function argument however $refund_method is set to 'credit_first'
therefore I found this error when doing refunds with the following use-case 
```
$adjustment = \Recurly_Adjustment::get('53f47d7....');
$adjustment->refund();
```
Thanks
@bhelx bhelx self-requested a review June 6, 2020 18:58
@bhelx bhelx added the bug label Jun 6, 2020
@bhelx
Copy link
Contributor

bhelx commented Jun 6, 2020

@visualex I've confirmed that this does indeed seem to be a bug in the code. Thanks for offering up the fix! We'll get it reviewed and put into the next v2 release.

@joannasese joannasese self-assigned this Jun 8, 2020
@joannasese joannasese self-requested a review June 8, 2020 20:05
@visualex
Copy link
Author

@bhelx Hi, yes sorry about that, corrected the docs. Thank you.

@joannasese joannasese merged commit 2103ad5 into recurly:v2 Jun 15, 2020
@joannasese joannasese added the V2 V2 Client label Jun 15, 2020
@joannasese
Copy link
Contributor

@visualex Thank you! We'll be cutting a release at the end of the month that will include this patch, but if you need an earlier release, let us know.

@joannasese joannasese mentioned this pull request Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug V2 V2 Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants