We have a payment gateway that worked correctly until we updated a Joomla component.
The payment gateway only works when URL rewriting is disabled. We need to make the modifications so that it works correctly with the URL rewrite option enabled.
Joomla Component Documentation:
[login to view URL]
Payment gateway Documentation (unfortunately only in spanish)
[login to view URL]
I attach the file that must be modified: [login to view URL]
Component developer suggestions:
1. POST, GET or REQUEST variables should be accessed by using the code $var = VikRequest::getString('NAME', '', 'request'); of course only in the main PHP file [login to view URL] which is called by Vik Booking.
2. I would recommend to store in a transaction file the rewritten notify, return and error URLs so that your static file [login to view URL] can read the correct URLs from this transaction file. This is the technique we use when gateways do not support dynamic notify URLs.
3. The line 51 mentioned above should not use str_replace, just compose the full URL to your static file like this JUri::root() . 'administrator/components/com_vikbooking/payments/webpay/[login to view URL]'.
There's clear error at the line 51 of the main file [login to view URL]:
$result = $webpay->getNormalTransaction()->initTransaction( intval($this->order_info['total_to_pay']), $this->order_info['details']['sid'], date('ymdhis'), str_replace('[login to view URL]', 'administrator/components/com_vikbooking/payments/webpay/[login to view URL]', $this->order_info['notify_url']), $this->order_info['return_url']);
As you can see, the function str_replace is searching for [login to view URL], which is obviously not present in the array property $this->order_info['notify_url'].
The goal is to solve the problem by modifying the gateway file, not the component.
The gateway today is only compatible with php 7.1, if it can be made compatible with php 7.3 better.
21 freelanceria on tarjonnut keskimäärin 134$ tähän työhön
Hello, i can help you check and fix this problem, but i need ftp go to your host because i cant see this problem if only check file code php kind regards
hi i am php developer having more than 7 year of exp also please check my profile done more than 120 projects and if u like we can more discuss on this project thanks
Hello sir/mam, I am ready to check your website payment file issue. I am a Joomla developer. I can check the issue once and try to fix. if all goes wellvhire me and pay in successful completion. Thank you.