Page 1 of 1

Redirect page link?

PostPosted: Wed Dec 04, 2019 10:21 am
by konstantinos
Hello,

We are using a 3rd party Credit Card payment plugin.
The Bank who handles the card processing, has asked for links that will be used when payments have succeeded, or failed.

Example links we have provided:
Success URL: *****/index.php?option=com_virtuemart&b=winbank&task=ok
Failure URL: *****/index.php?option=com_virtuemart&b=winbank&task=cancel

etc...

We are now doing the credit card tests, and it seems that on failed payments, the user is directed to a default VM checkout (which looks bad), not the Rupostel OPC.

Is there something we have missed in the configuration?

Thanks

Re: Redirect page link?

PostPosted: Wed Dec 11, 2019 1:59 pm
by admin
hello, please let me know at email what is the exact URL of the VM core checkout page when you cancel the payment. it is possible that the plugin does not use VM's official way on doing this and thus OPC cannot recognize that it has to load OPC checkout on that particular URL.

OPC checkout is loaded by including:

Code: Select all
if (!class_exists('vmPlugin')) {
   if (file_exists(JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_onepage'.DIRECTORY_SEPARATOR.'overrides'.DIRECTORY_SEPARATOR.'vmplugin.php'))
      {
         require(JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_onepage'.DIRECTORY_SEPARATOR.'overrides'.DIRECTORY_SEPARATOR.'vmplugin.php');
      }       
}      
if (!class_exists('VirtueMartViewCart')) {
require_once(JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_onepage'.DIRECTORY_SEPARATOR.'overrides'.DIRECTORY_SEPARATOR.'virtuemart.cart.view.html.php');
}

it is NOT triggered when a plugins renders it's own checkout :
Code: Select all
if (stripos($cart->layoutPath, DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR)!==false)


(i.e. OPC gets disabled for checkout with amazon and other payment methods which are checkout themselves)

i'll probably will need to check your site to see if it's possible to load OPC realiably if the payment method renders it's own layout.

best regards, stan