J2Store4/j2store4

404 Page Not Found Error After Successful Transaction Using SquareUp Payment Plugin

Closed this issue · 3 comments

Just installed 4.0.5 PRO on our newly updated Joomla 4.4.5 site.

It's working well with one exception: J2Store tries to redirect the customer to a different article than that specified, an article that doesn't exist. This is the URL that is visible in the address bar:

https://www.northants-huntsmasons.org.uk/index.php/component/j2store/confirmPayment?orderpayment_type=payment_squareup&paction=display&Itemid=4819

We're using the latest SquareUp payment plugin, which I purchased and downloaded yesterday.

The issue doesn't occur with free products because the article redirection is handled by the plugin code.

Many thanks.

We have checked the Squareup payment method and ensured that the article message is displayed and redirected correctly after the payment is completed. For your reference, please check this video:[video].

If you are still facing the same issue, please share a video reference showing the steps to reproduce the issue. This will help us better understand and resolve the problem from our end.

Thanks for the reply.

I do not understand why I should use a product-ID instead of an article-ID for the order confirmation message.

The plugin configuration page states that an article-ID should be used and that works just fine for J2Store 3.3.20.

Regardless, even if I do make the thank-you article a store-item, using the item-ID makes no difference.

The ID referenced in the URL that is generating the error would appear to be the ID of the Checkout menu. I don't know if that's the way things should be.

Interestingly enough, the confirmation URL generated by J2Store 3.3.20 under Joomla 3 works absolutely fine with J2Store 4.0.5 on our Joomla 4 site. It's locating the thank-you article using the article-ID, not the product-ID:

https://www.northants-huntsmasons.org.uk/index.php/checkout/confirmPayment?orderpayment_type=payment_squareup&paction=display

I am not prepared to post a video here, but I've added one to the ticket that I raised, #37774.

BTW, in case you were wondering, backup.northants-huntsmasons.org.uk hosted the backup of our site used for the Joomla 4 upgrade. It now hosts a password-protected backup of the old Joomla 3 site.

I fixed this by making the following edits in payment_square.php

  • Commented-out lines 673 and 676
  • Inserted line 675
payment_squareup_4_0_error_fix

I don't profess to understand why the original plugin code worked for you and not for me, but the edits are inline with the code in the payment_banktransfer.php and payment_moneyorder.php plugin files.