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

improper error code when instantiating WePay #33

Open
MerryPlace opened this issue Dec 21, 2023 · 0 comments
Open

improper error code when instantiating WePay #33

MerryPlace opened this issue Dec 21, 2023 · 0 comments

Comments

@MerryPlace
Copy link

MerryPlace commented Dec 21, 2023

WePay::useStaging($client_id, $client_secret);

$wepay = new WePay($access_token);

When I supply my app access token from my dashboard I get the error:

You are trying to use an access_token from production on stage

This error would make you think that I must be using my production app token (which I'm not), so why don't I try WePay::useProduction to match the token.
Nope! now I get the error:

You are trying to use an access_token from stage on production

Since I haven't changed the access_token, these two error codes are paradoxical.
I suspect it takes another type of access token but without a more useful error code, this is very very confusing.

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

1 participant