Plisio / blesta-plugin

Blesta Plisio plugin
1 stars 0 forks source link

Not working with Blesta #1

Open LaynoDev opened 2 months ago

LaynoDev commented 2 months ago

Callback is not working with the lastest version of Blesta, it seems that the callback is never called. Also the "Integration Type" form on Plisio Dashboard is not changing from "Custom" to "Blesta". Is it normal?

timurwcd commented 2 months ago

Tested again on the latest version of Blesta. Everything works fine. Сallbacks will not work if there is no real domain name for Blesta site. Also about the "Integration Type" form on Plisio Dashboard. Tested again in chrome, chromium, firefox, brave and everything works as expected

LaynoDev commented 2 months ago

Tried on Safari, Chrome, Firefox and Edge. Even differents IPs. Its still the same. I've shared account details to support@plisio.net.

wpexpertinbd commented 3 weeks ago

I also faced same issue with callback, I am using Blesta 5.10.2. I mean callback not working. I have installed Blesta in a sub-domain. I am not sure what you mean by "Сallbacks will not work if there is no real domain name for Blesta site." @timurwcd . In my plisio setting also have URL register with that same sub-domain.

wpexpertinbd commented 3 weeks ago

@LaynoDev if you already got the solutions then kindly help me, please!

wpexpertinbd commented 3 weeks ago

@timurwcd , I am using Blesta 5.10.2 & PHP 7.4. I don't see any logs in my Blesta Gateway logs history! Can you describe where the real domain name needs to be in Blesta? Also, can you recheck with latest Blesta & PHP 7.4 to 8.3 and let us know which & which PHP version is actually working or if all of them working.

timurwcd commented 2 weeks ago

@timurwcd , I am using Blesta 5.10.2 & PHP 7.4. I don't see any logs in my Blesta Gateway logs history! Can you describe where the real domain name needs to be in Blesta? Also, can you recheck with latest Blesta & PHP 7.4 to 8.3 and let us know which & which PHP version is actually working or if all of them working.

I setup a fresh environment on vps with Blesta 5.10.2 & PHP8.1 on real subdomain blesta.plisio.info Callback called successfully, also have a record in logs about callback

image image image

wpexpertinbd commented 2 weeks ago

@timurwcd, thanks for the update. Then I need to check again where is the problem can be. As I don't see any logs that why don't understand where from I will start debugging. However, will try to reset the module & see if it's works or not.

wpexpertinbd commented 1 week ago

wrong call by plisio

@timurwcd , I think I found something regarding my issues. I believe you was tested with single gateway installation. I mean your Blesta had only 1 gateway installed that why it's working fine. But if you install any others single or multiple gateway module then you will find out that plisio callback no longer works. As, my screenshot you can see I was trying to debug plisio by trying to a test transaction & in my logs I found it's trying to interact with 2checkout module & given error. Now, if disable 2checkout module then it's trying to my next module "Perfect Money". I mean plisio always trying to interact with first gateway module in the serial. Like, if you have 5 modules & pliso serial is number 5 then it will try to interact first with #1 then if you disable this then it will try with #2, so, it will not work until you disable all & keep only plisio.

So, there have something wrong with your module callback code or somewhere. Kindly, install one or more gateway & retry then give us a solution asap. I'm here if you still not get the issue. Thank you.

wpexpertinbd commented 1 week ago

working callback

@timurwcd, I think I got a work around by the help of Perfect Money module & ChatGPT.

Change plisio.php module file code line number 90 like below:

Current Code: $callbackURL = Configure::get('Blesta.gw_callback_url') . '?client_id=' . ($contactInfo['client_id'] ?? null) . '&invoices=' . ($invoices ?? null);

Should Be: $callbackURL = Configure::get('Blesta.gw_callback_url') . Configure::get('Blesta.company_id') . '/plisio/?client_id=' . (isset($contact_info['client_id']) ? $contact_info['client_id'] : null) . '&invoices=' . ($invoices ?? null);

Now, it's perfectly able to records my logs with Plisio module. However, I still don't do any live transaction. Just was trying to do the transaction & that was the logs. As it's correctly able to logs the records, so hopefully it will work. However, you can cross check the code & can give us the modified code if needed. Also, update your main package file that why no one faces same issue as us. Thank you.