Hi,
You should give the payment notification URL for the approveURL:
$notify_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment='.$this->name.'&tmpl=component';
That way, when the user comes back to your website after the payment, your plugin onPaymentNotification function will be called.
There, you can confirm the order with a call to the modifyOrder function (as per the example payment plugin on our developer documentation) and then you can redirect the customer to the thank you page with the after_end URL:
$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id='.$order_id.$this->url_itemid;
For the CancelURL and the DeclineURL, you can provide the cancel URL:
$cancel_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id='.$order_id.$this->url_itemid;
That way, when the payment fails, the customer will be redirected back to the checkout with an error message and he will be able to try again, select another payment method, etc.
Just in case you didn't see it yet, I would recommend to check on the example payment plugin that we provide there:
www.hikashop.com/support/documentation/6...on.html#howtopayment
It's heavily commented and explains the different parts of the code including the pieces I'm talking about here.