Payment cancel

  • Posts: 25
  • Thank you received: 4
12 years 6 months ago #50340

Hi Nicolas,
I implemented a new standard payment gateway (credit card like: italian KeyClient).
I have two possible return url; the one if payment is ok and the other if user cancel payment.
Where i can reenter in the second case?
Suggestions?
Because, at the moment (same return address), is sent also the e-mail that notify the purchase also if is was cancelled.
Thanks in advance
Massimo

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #50430

Usually, we don't provide an option in the payment plugin to specify the cancel url in the payment plugin and HikaShop handles that automatically. You just have to specify that URL in the cancel URL parameter of your payment platform:
global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
$cancel_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id='.$order->order_id.$url_itemid;

You can see that code in use in the onAfterOrderConfirm function of the paypal plugin for example.

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

  • Posts: 25
  • Thank you received: 4
12 years 6 months ago #50446

Done :)
Thank you very much
Massimo

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

Time to create page: 0.054 seconds
Powered by Kunena Forum