eWay Payment system may have changed

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
7 months 4 days ago #360393

-- HikaShop version -- : 5.0.4 [2404151837]
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.2.1

Going to the point of finalizing a payment in eWay sandbox it refuses to complete and the customer gets a 404.
The admin shows orders as being "Created" but never "Confirmed"

Spent some time with eWay tech support with their monitoring while I was purchasing, and they came back referring to the following API documentation ... eway.io/api-v3/#responsive-shared-page

I'm thinking something may have changed at their end, that is causing the integration with the plugin that crashes the Responsive Shared Page connection process. May be wrong however ;)

On the page I referred to, you can place an order for the 12.5kg bag and using the card number below, and any other details you like, to place the order to see what the process failure looks like.

Fake CC number: 5105105105105100

I'm at a loss as to where the failure point is and figured I'd defer to your superior knowledge.

Thanks as always

Last edit: 7 months 4 days ago by yerg55. Reason: clarity

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 months 4 days ago #360398

Hi,

For the return of the user to work properly, the eway rapid plugin included in HikaShop has to create a file ewayrapid_xx.php (where xx is the id of the payment method) in the root folder of your website. This is done when the payment method is saved in your backend.
What you're describing seems to indicate that the plugin was not able to create that file.
So check it via FTP. If it's missing, it's probably that you have permissions on the root folder of your website which prevents the plugin from creating the file.
If the file is there, then it's likely that the problem is linked to the htaccess file. Maybe you have some custom rules in there which lead to the return URL being not found even though the file is there.

If you activate the "debug" setting of the payment method, the data sent to eway will be logged in the "payment log file" of the HikaShop configuration. So you can check that the data sent to eway is correct, and check that the file it is pointing at in the "redirectUrl" corresponds to the file in the root of your website.

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
7 months 3 days ago #360417

Brilliant Nicolas.
Time to go digging
Great clarity

---- update


The system worked until a specific date.
It stopped the day I installed AdminTools Pro.
Disabled that and reverted to the default .htaccess
:woohoo:
Went digging but nothing stands out
Time to chase down Nicholas Dionysopoulos to ascertain what is generated that is blocking this from working
Thanks again

Last edit: 7 months 3 days ago by yerg55. Reason: Update

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 months 3 days ago #360421

Hi,

Indeed, it might be a rule in the htaccess.
So reverting the htaccess didn't help ?
I doubt that AdminTools would be changing the ewayrapid_xx.php file in the root folder.

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
7 months 17 hours ago #360471

Removed Admin Tools and the issue went away.
Connected to Nicholas Dionysopoulos to ascertain what the issue is with the .htaccess edits AdminTools has created.
More so to ensure any updates etc don't cause that grief again

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
7 months 9 hours ago #360474

AkeebaTools blocks EVERYTHING in the rood directory for obvious reasons.

FWIW can there be a separate directory used, say /eway, that can be excluded from AkeebaTools via their settings?

Root directory enabled as write all is problematic

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 months 5 hours ago #360482

Hi,

Normally, the callback URL (the URL the payment gateway will call upon a successful payment) of payment plugins is quite long.
Something like this:

https://www.mywebsite.com/index.php?option=com_hikashop&ctrl=checkout&task=notif_payment&payment=xxx&lang=yy&Itemid=aaa
Some payment gateways, like eway, restrict the number of characters that can be used for the callback URL.
Also, some merchants have website domain names which are quite long.
In order to make sure that the callback URL is as small as possible, so that it works for all potential websites, we decided to write a callback file in the root folder of the website for these payment gateways.
While there is no option to move the file elsewhere it is technically possible.
Once you move the file elsewhere on your website, you need to change the lines:
		$notify_url = HIKASHOP_LIVE.$this->name.'_'.$method_id.'.php?order_id='.$order->order_id.$this->url_itemid;
		$notify_cancel_url = HIKASHOP_LIVE.$this->name.'_'.$method_id.'.php?order_id='.$order->order_id.'&user_cancel=1'.$this->url_itemid;
in the file plugins/hikashoppayment/ewayrapid/ewayrapid.php to point to the new location.
For example:
		$notify_url = HIKASHOP_LIVE.'eway/'.$this->name.'_'.$method_id.'.php?order_id='.$order->order_id.$this->url_itemid;
		$notify_cancel_url = HIKASHOP_LIVE.'eway/'.$this->name.'_'.$method_id.'.php?order_id='.$order->order_id.'&user_cancel=1'.$this->url_itemid;
to have the file in an "eway" folder.

Note that you only need to allow write access to the root folder for a short period of time. Just the time for you to click on the "save" button of the payment method in the backend will suffice. Once the file is written in the root folder, you don't need the root folder to be writable.
Also, if really you can't make the root folder writable at all, you can always make a copy of the website on your local computer with something like xampp and save the configuration of the payment method there. Once the file is generated locally in the root folder, you can upload it to your website's root folder via FTP or your hosting cpanel access.

The following user(s) said Thank You: yerg55

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
6 months 2 weeks ago #360737

Thanks for all of that Nicolas

Have ended up totally removing AdminTools

I'm not into hacking core code in anything to make something else functional.
The hacking continues when apps are updated.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum