Changing cancelurl of epay payment plugin?

  • Posts: 59
  • Thank you received: 1
9 years 2 months ago #212949

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.x.x

Hi, I use ePay on my Hikashop.

At the moment the cancelurl is the same as the created URL?

How do I change the cancel url, so the user don't get confused....

And one more thing. I would like to have one more e-mail template (for status changing the order). Calling it "Cancel #2" or something. Is this possible?

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 2 months ago #212952

Hi,

You can add a return URL in the payment method by adding the code:
'return_url' => array('RETURN_URL', 'input'),
after the line:
'debug' => array('DEBUG', 'boolean','0'),
in the file plugins/hikashoppayment/epay/epay.php and then editing the payment method in the backend.

If that's not what you're talking about, please explain better what you want.

Regarding the emails, you can't create yourself new emails. However, you can modify the order status notification via the menu System>Emails so that it would display different things base on the order status with simple PHP:

<?php if($data->order_status=="confirmed){
echo "something";
}else{
echo "something else";
} ?>

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

  • Posts: 59
  • Thank you received: 1
9 years 2 months ago #213485

Hi, at the moment when the customer decides to cancel his card payment (while at redirected payment window), his order is not being cancelled in backend. It still shows up as "created" in hikashop backend. I have to manually change status to "cancel" the order.

I hope you understand and thank you for the help.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 2 months ago #213486

Hi,

The order will only be cancelled if the "order unpaid statuses" and the "cancelled order statuses" settings of the HikaShop configuration match with the status of the order.

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

  • Posts: 59
  • Thank you received: 1
9 years 2 weeks ago #219704

Hi thank you for your reply and sorry for my late one!

For example, when the user pays with card (ePay), after ePay has confirmed and notified me the order changes to confirmed and the user gets an e-mail that the order has been confirmed. All good.

But if the user decides to cancel (while at ePay payment gateway), he still gets a confusing e-mail saying that his order has been "created". Can I avoid sending a "created" notification e-mail to the buyer if he/she has chosen epay as payment method or alternatively send out a canceled order status when the buyer cancels or get declined?

*I just saw a "pending status" setting for my payment method in hikashop backend. I changed that to none and did a test payment. However I still received a created notifcation e-mail for my order despite not completing payment.

Last edit: 9 years 2 weeks ago by madjedo.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 weeks ago #219732

Hi,

In every case, when you got the ePay form ; the order has been created.
Like with the "paypal" payment plugin.

When the user cancel the order ; the cancel URL is used and HikaShop change the order with the "cancel" status that you have set in your HikaShop configuration.
www.hikashop.com/support/support/documen...nfig.html#main_order

The plugin also have an "invalid status" in his plugin configuration ; in case when the ePay validation is invalid.
Even if the plugin have a "pending status" option, that setting is not used by the plugin.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 59
  • Thank you received: 1
9 years 2 weeks ago #219783

Hi, at the moment when I cancel an order while at ePay payment gateway nothing happends. It does not go any cancelurl, it just stays at the page before (in this case the redirect url page to the payment gateway).

I have uploaded my hikashop configuration. I do not see any cancelurl option in the payment method settings aswell...

Attachments:

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 2 weeks ago #219835

Hi,

The cancel URL is not something you can configure.
It is sent to ePay automatically by the ePay plugin:
take.ms/9392B
It's a specific URL of HikaShop which automatically cancels the order and put you back on the checkout.

If that URL is not used by ePay, it's likely because your ePay merchant account is configured like that or because the behaviour you're thinking should be isn't what ePay thought it should be.
In any case, that's something you should seek advice with with the ePay merchant technical support.

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

  • Posts: 59
  • Thank you received: 1
9 years 1 week ago #220687

Hi, I contacted the ePay support and they asked me to change the payment window to fullscreen.

Now the cancel is functioning properly, the user is returned to store. But the order is still not having its status changed to canceled.

After that they asked me to check the given cancelurl/script: "I'm not that good with Hika's core functions/inner workings but I can suggest that you check the given cancelurl/script and program it to handle the necessary actions that you wish."

Best Regards

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 1 week ago #220741

Hi,

The order status will be changed to cancelled only of the order status settings of your HikaShop configuration are properly configured, as we had pointed out 2 months ago:
www.hikashop.com/forum/payment-methods/8...t-plugin.html#213486
More precisely, this means that the order status must be in the list of the "unpaid order statuses" before you click on cancel, and it must also be in the list of the "cancellable order statuses". And you need to have selected "cancelled" in the "cancelled order status" setting.
So please check these settings in your HikaShop configuration.

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

  • Posts: 59
  • Thank you received: 1
9 years 1 week ago #220804

Hi, I'm probably missing something big here...

But I have attached my order configuration, please have a look.

And maybe we are not talking about the same "cancel" button? I am talking about canceling the ePay payment window. After doing that the user is returned to the store. But the order status is still "created". I attached the payment window aswell just to make sure we are talking about the same cancel?

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 1 week ago #220812

Hi,

It's not a cancel button ; it's a "close" button.
When you use it ; it just close the ePay box and there is no interaction with HikaShop.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 59
  • Thank you received: 1
9 years 1 week ago #221084

aha, ok!

But then why is an order created everytime the user goes to the epay payment window. It would be better to not create the order until payment is confirmed then...

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 6 days ago #221085

Hi,

Because ePay requires an order work (order_id, order_number).
So HikaShop have to create an order in order to be able to have the required data for ePay and also to be able to update the order when receiving the payment notification.

Without any "cancel" event ; it is not possible to be notified when the customer close the modal, so the order would stay "created".
But in HikaShop it is possible to "pay later" a non confirmed order (in the customer order listing)..
You have also a cron plugin in HikaShop to automatically cancel a created order after a certain period of time.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 59
  • Thank you received: 1
9 years 3 days ago #221456

Ok sure. How do i prevent a created notification email to be sent to the customer. And only apply this rule to my epay payment method. Thus only sending a confirmed notification.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 2 days ago #221562

Hi,

To deactivate the order creation notification email, you can just unpublish it via the menu System>Emails.
To disable it only for some payment methods, it will require some custom coding in the HTML version of the email.
Something like that I guess:
<?php if($data->order_payment_method=="epay") $mail->published=0; ?>

The following user(s) said Thank You: madjedo

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

  • Posts: 59
  • Thank you received: 1
9 years 2 days ago #221623

Hi Nicolas, lovely! Now the customer wont be confused anymore :) Thank you for the help.

I need help with one more thing. I am not good at this. But I would like to display a text with a link on the confirmation e-mail, only if the customer had chosen hikashop collect on delivery payment method.

So its probably the same as above, but this time to have it display a text and a link :)

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 1 day ago #221642

Hi,

It's indeed similar:

<?php if($data->order_payment_method=="collectondelivery"){ ?>
<a href="my custom link">My custom text</a>
<?php } ?>

PS: please open new threads for questions unrelated to the initial subject of the thread.

Last edit: 9 years 2 days ago by nicolas.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum