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

Issue with refunding a Recurly_Transaction #119

Closed
iricketson opened this issue Nov 20, 2014 · 3 comments
Closed

Issue with refunding a Recurly_Transaction #119

iricketson opened this issue Nov 20, 2014 · 3 comments
Labels
V2 V2 Client

Comments

@iricketson
Copy link

If you create a transaction and attempt to refund it right afterwards, Recurly throws an error: "uuid" is not supplied.

Sample code:

$trans = new Recurly_Transaction();
$trans->account = $account; // Recurly_Account object
$trans->billing_info = $billingInfo; // Recurly_BillingInfo object
$trans->amount_in_cents = 100;
$trans->currency = 'USD'
$trans->description = 'Temp Auth';

// Create the transaction
$trans->create();

// Void the transaction
$trans->refund();

It seems like this is the proper way to immediately void a temp auth, but as I mentioned it throws an error. I don't see that the transaction object is storing the uuid after the create method, nor is it storing any refund links, as shown in the documentation.

Am I doing this wrong, or is there an issue with this? As it is, I see no way to void the transaction.

@drewish
Copy link

drewish commented Nov 20, 2014

It does seem like there might be a bug there... but we perform the authorization for you when you add billing_info... so maybe you could say more about your use case here.

@drewish
Copy link

drewish commented Nov 20, 2014

What version of the client are you using? I just tested this out with the current version:

$transaction = new Recurly_Transaction();
$transaction->amount_in_cents = 100; // $1.00
$transaction->currency = 'USD';
$transaction->description = 'Temp Auth';
$transaction->account = new Recurly_Account();
$transaction->account->account_code = 'ad151fcc7fa96b39f5d75972426cfa';

$transaction->create();
var_dump($transaction->status);
$transaction->refund();
var_dump($transaction->status);

And it worked the way you'd expect:

string(7) "success"
string(4) "void"

@drewish
Copy link

drewish commented Dec 16, 2014

I'm going to close this. It worked for me and there was no feedback so I'm assuming you got it working.

@drewish drewish closed this as completed Dec 16, 2014
@bhelx bhelx added the V2 V2 Client label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 V2 Client
Projects
None yet
Development

No branches or pull requests

3 participants