tzsk / payu

Payu Laravel Payment Gateway with Payment Verification Package. Payment for Payu Biz & PayuMoney India with Laravel.
https://payu.tzskr.com
MIT License
48 stars 31 forks source link

Verifiying a transaction on live server causes redirection issues? #103

Closed ghost closed 3 years ago

ghost commented 4 years ago

Hi, I want to verify a pending payment using the verify() function. I fetch my PayuTransaction and try to verify it using $transaction->verify() but it gives the following error in firefox : "The page isn’t redirecting properly". I first thought maybe there is some issue with the route but the same code works absolutely fine and verifies the transaction without any issue on localhost. Also other function like shouldVerify(), pending() etc work fine. The only issue lies with the verify() function. Any help in this matter? Thanks alot.

tzsk commented 3 years ago

@frhn404 There are no redirects in any of the verify calls. Can you explain more, where you are seeing the error? And can you also verify if you're getting the error without the verify call?

Also, try and put a try-catch on there and see if you are able to catch any errors there. That would help us debug.

ghost commented 3 years ago

All other functions are working fine. The verify() function itself works flawlessly on local host. After implementing error handling, the exception message it returns is "The given data was invalid." Also no error is encountered while implementing other functions.
Thank you.

tzsk commented 3 years ago

@frhn404 You have a validation error. Don't just catch generic exception. Catch validation exception and print errors. You'll find out what's wrong.

ghost commented 3 years ago

Invalid mode supplied for PayuBiz. So basically this is the issue.

ghost commented 3 years ago

i have set the mode to LIVE_MODE in both pay u money and pay u biz. Any insight into the error? Thank you.

tzsk commented 3 years ago

@frhn404 might be caused due to config cache on production.

ghost commented 3 years ago

I think i might delete the Laravel cache files and check whether the verify call works then.

tzsk commented 3 years ago

@frhn404 I hope it's resolved for you.