BeelabPaypalBundle
BeelabPaypalBundle copied to clipboard
getting "503 Service Unavailable" in prod env.
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!}
;)
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.
@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
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?
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
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.
Are you using test_mode
option?
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.
@garak any last idea before I give up? :)
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
But it works in dev environment... I dont get it haha. Thanks anyway.
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.
Ok I didn't know that, I'll try to reset my credentials then. Thank you very mush.
Hi!
I have the same problem. did you manage to enter the mode?
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.