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

Can't Update Account Info, But Can Update Billing Info #252

Closed
ram651 opened this issue Jul 15, 2016 · 9 comments
Closed

Can't Update Account Info, But Can Update Billing Info #252

ram651 opened this issue Jul 15, 2016 · 9 comments
Labels
V2 V2 Client

Comments

@ram651
Copy link

ram651 commented Jul 15, 2016

The Problem:

I cannot use the Recurly PHP Library to update account info, even though I immediately prior could update the billing info.

The Code:

            $billingInfo = new Recurly_BillingInfo();
            $billingInfo->account_code = $user->recurly_account_code;
            $billingInfo->token_id = $request->input('recurly-token');

            $billingInfo->update();

            $accountInfo = Recurly_Account::get($user->recurly_account_code);
            $accountInfo->email = $request->input('email');

            $accountInfo->update(); //<-Offending line

The Error:

The error thrown is by the account info update line

Recurly_UnauthorizedError in response.php line 50:
Your API Key is not authorized to connect to Recurly.
in response.php line 50
at Recurly_ClientResponse->assertValidResponse() in resource.php line 88
at Recurly_Resource->_save('PUT', 'https://streamguyssandbox.recurly.com/v2/accounts/Robert_Minnix_superTesterino') in account.php line 46
at Recurly_Account->update() in AccountController.php line 90
@ram651
Copy link
Author

ram651 commented Jul 15, 2016

I also attempted to do a single call, adding the billing info as the $accountInfo->billing_info property, as the Docs say you can, and still received the 'Your API Key is not authorized' error.

@drewish
Copy link

drewish commented Jul 16, 2016

Did you check your API key? Perhaps some else revoked it?

@ram651
Copy link
Author

ram651 commented Jul 16, 2016

It's the correct key and authorizes properly. As I said in my post, the
billing update works as expected but the account update call is when the
auth error is thrown. Both are in the same block of code.

On Jul 15, 2016 6:26 PM, "andrew morton" notifications@github.com wrote:

Did you check your API key? Perhaps some else revoked it?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#252 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIZ5IriMNcJgDWCkCnFf_NRNiYNS9HPHks5qWDNHgaJpZM4JN2KS
.

@drewish
Copy link

drewish commented Jul 16, 2016

I would try a few other type of requests because that's really strange. Are you sure the billing info changes are actually saving?

@ram651
Copy link
Author

ram651 commented Jul 16, 2016

The billing changes are indeed saving. I'll try some other exchanges.
Anything that generates references to the Recurly_Base addLinks method are
currently having issues as I have referenced in another issue, so I'll see
what other one's dont.

On Jul 15, 2016 7:21 PM, "andrew morton" notifications@github.com wrote:

I would try a few other type of requests because that's really strange.
Are you sure the billing info changes are actually saving?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#252 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIZ5IkFEr_JUmQPsPBQ0-xtOECge3ZUuks5qWEA3gaJpZM4JN2KS
.

@drewish
Copy link

drewish commented Jul 16, 2016

Oh so this is with your edited code?

@drewish
Copy link

drewish commented Jul 16, 2016

If so please try and replicate it with a stock version of the library.

@ram651
Copy link
Author

ram651 commented Jul 16, 2016

I can't because of Laravel 5.1. I had to add namespacing to the files in
order to reference the Recurly classes in a Laravel Controller without
references in the Recurly classes conflicting with the namespacing
constraints in place in Laravel.

On Jul 15, 2016 9:00 PM, "andrew morton" notifications@github.com wrote:

If so please try and replicate it with a stock version of the library.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#252 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIZ5Is_kRR56OeX0tmkkJfqPgnTqBfqSks5qWFdegaJpZM4JN2KS
.

@drewish
Copy link

drewish commented Jul 16, 2016

Yeah but in that case this sounds like a bug with your changes and not something that we can support directly. I'll try to look at your other issue on Monday.

@drewish drewish closed this as completed Jul 16, 2016
@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