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

getting "503 Service Unavailable" in prod env. #17

Open
bycrea opened this issue May 23, 2019 · 15 comments
Open

getting "503 Service Unavailable" in prod env. #17

bycrea opened this issue May 23, 2019 · 15 comments
Labels

Comments

@bycrea
Copy link

bycrea commented May 23, 2019

Hi,

I installed beelab bundle on symfony 3.4.
Everything works fine in dev environment with paypal develloper (sandbox),
but i get "503 Service Unavailable" error in prod env.

Dumping Exception shows : 'Security header is not valid'
Seems to come from setTransaction($transaction)

       try {
            $response = $service->setTransaction($transaction)->start();
            $this->getDoctrine()->getManager()->persist($transaction);
            $this->getDoctrine()->getManager()->flush();
            return $this->redirect($response->getRedirectUrl());
        } catch (Exception $e) {
            throw new HttpException(503, 'Erreur de paiement', $e);
        }

I've tried cache:clear of course, look on the web for similar paypal issues, but nothing comes to me.
If (you have any idea?) {thanks!}
;)

@garak garak added the question label May 24, 2019
@garak
Copy link
Member

garak commented May 24, 2019

@bycrea
Copy link
Author

bycrea commented May 24, 2019

Hello @garak
I've just tried and got this :

TIMESTAMP=2019%2d05%2d24T08%3a11%3a36Z&CORRELATIONID=8e9d929e390f&ACK=Failure&VERSION=204&BUILD=52821064&L_ERRORCODE0=10002&L_SHORTMESSAGE0=Security%20error&L_LONGMESSAGE0=Security%20header%20is%20not%20valid&L_SEVERITYCODE0=Error

If something is wrong with my credentials, how come it works fine in dev env. ?
Do you have any idea how to fix that? ask for new security code?

thanks.

@garak
Copy link
Member

garak commented May 24, 2019

@bycrea I hope that in your dev env you're using sandbox credentials.
Anyway, if your credentials are not working with a plain call to Paypal, it's clearly impossible to get it working in this bundle

@bycrea
Copy link
Author

bycrea commented May 24, 2019

Of course I do, I can connect, pay, and get success return route in dev mode, with paypal credentials in parameters. It's weird it does not work in prod right?
Should I try asking for different credentials as they have been used in dev already?

@garak
Copy link
Member

garak commented May 24, 2019

Well, I'm not sure if you understood difference between sandbox credentials and "real" credentials.
But, again: this is not something you can solve inside this bundle, you need to get your Paypal working before

@bycrea
Copy link
Author

bycrea commented May 24, 2019

Sorry I may not have been clear enought.
All my credentials are in the symfony parameters.yml.
As long as I am in dev environement (mywebsite.com/app_dev.php/payement) everything works fine.
But if I try from prod env. (mywebsite.com/payement) I get this 503 service unavailable...

Can't be more specific :/ thanks anyway.

@garak
Copy link
Member

garak commented May 24, 2019

Are you using test_mode option?

@bycrea
Copy link
Author

bycrea commented May 27, 2019

ok, on your advise I tried test_mode: false instead of test_mode: "%kernel.debug%"
I double checked --env=prod --no-debug, but nothing helps...
Is there an other way to do it?

Here is what I get in prod.log :
[2019-05-26 23:53:03] request.CRITICAL: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\HttpException: "Payment error" at /var/www/"mywebsite"/src/AppBundle/Controller/User/PaymentController.php line 64 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\HttpException(code: 0): Payment error at /var/www/"mywebsite"/src/AppBundle/Controller/User/PaymentController.php:64, Beelab\\PaypalBundle\\Paypal\\Exception(code: 0): Security header is not valid at /var/www/"mywebsite"/vendor/beelab/paypal-bundle/Paypal/Service.php:108)"} []

Thanks.

@bycrea
Copy link
Author

bycrea commented May 29, 2019

@garak any last idea before I give up? :)

@garak
Copy link
Member

garak commented May 29, 2019

I cannot help you here. If you can't get your PayPal credentials working outside this bundle, you won't be able to get it working inside it

@bycrea
Copy link
Author

bycrea commented May 29, 2019

But it works in dev environment... I dont get it haha.
Thanks anyway.

@garak
Copy link
Member

garak commented May 29, 2019

If you try in dev with test_mode: true you're not actually doing a real request.
On the other hand, you reported above that your manual try resulted in an error.

@bycrea
Copy link
Author

bycrea commented May 29, 2019

Ok I didn't know that, I'll try to reset my credentials then.
Thank you very mush.

@artro8
Copy link

artro8 commented Jul 19, 2019

Hi!

I have the same problem. did you manage to enter the mode?

@bycrea
Copy link
Author

bycrea commented Jul 19, 2019

No sorry, never tried mush, I'll when ever I've got time.
What I understood was that you need to have a real sailor account to make it work properly.
Let us know if you find out please :)
Good luck with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants