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

Not supported status code from the server. #27

Open
abdelatif2000 opened this issue Jan 4, 2023 · 1 comment
Open

Not supported status code from the server. #27

abdelatif2000 opened this issue Jan 4, 2023 · 1 comment

Comments

@abdelatif2000
Copy link

When i try to generate $token->getPaymentURL() , i got this error "Not supported status code from the server."
Here is my code :
//set the paramagers of youcanpay :

YouCanPay::setIsSandboxMode(true);
$youCanPay = YouCanPay::instance()->useKeys(
"pri_e6bcdcfd-ac32-48f5-b3fd-537432a2","pub_2fca06a4-907f-4787-b4e9-6f10e0b7"
);
$token = $youCanPay->token->create(
47586,
2000,
"USD",
"123.123.123.123",
"https://gymanager.club/",
"https://gymanager.club/",
);
return $token->getPaymentURL(
// lang: Support 3 languages: AR, EN and FR.
'EN'
);

@agounane
Copy link

agounane commented Jan 5, 2023

Double-check your keys the useKeys() first argument is the private key, It's possible that the correct error message you get is 'Account not found'.

To see the exact error, try to var_dump( $response) in the assertResponse() method located at API/Endpoints/TokenEndpoint.php

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