Auth.net payment method to create order even on failed payment.

  • Posts: 8
  • Thank you received: 0
6 years 5 months ago #281382

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.1
-- PHP version -- : 5.6

Hi,

Is there a way to configure/change auth.net payment plugin to create orders (even if payment fails) and the order can be in "Created/Pending" status?

Thanks,

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 5 months ago #281399

Hi,

If you use it in SIM mode, the orders will be created before you're redirected to Authorize.net for the payment. Thus, whether the payment suceeds of fails, you'll have the order created, like you want.
If you use it in AIM mode, the payment is placed just before the order is created and the order is created only if the payment suceeds. So you can only get confirmed orders. If you want to change the way the AIM mode works to create the order before making the payment, it will require modifying the code of the plugin.

The following user(s) said Thank You: Chetanmadaan

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

  • Posts: 8
  • Thank you received: 0
6 years 5 months ago #281475

Nicholas,

Thanks for your reply. We want to use AIM mode and would be find making modifications to the plugin. Would you be able to suggest what modifications are to be made.

I see the payment processing is done in the event onBeforeOrderCreate and is carried over to onAfterOrderCreate.

I also see in administrator/components/com_hikashop/classes/order.php it calls onBeforeOrderUpdate if the order already exists.

So, here is what I tried... return true on onBeforeOrderCreate and then copy the same code to onBeforeOrderUpdate in the authorize.net plugin but that didn't work well.

Let me know if this is the correct path to follow?

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #281478

Hello,

Nicolas told you :

If you use it in AIM mode, the payment is placed just before the order is created and the order is created only if the payment suceeds. So you can only get confirmed orders. If you want to change the way the AIM mode works to create the order before making the payment, it will require modifying the code of the plugin.


If you want to affect how AIM is working ; you can still authorize the order creation but do not change its order status and let it be "created".
But be sure to not modify the plugin itself since it's a core plugin you will loose all of your modification with updates.

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: 8
  • Thank you received: 0
6 years 5 months ago #281673

Thanks guys.

Any guidance on what events to use for the creation? or any other notes that can be useful for the process?

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #281676

Hello,

The main triggers are in our dev documentation page :
www.hikashop.com/support/documentation/6...mentation.html#order

Otherwise, my last message already explain the workflow.
Please understand that you're doing some customization and your request is outside the limit of our support ; it's more related to custom development and custom work.

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: 149
  • Thank you received: 7
  • Hikashop Business
6 years 4 months ago #283338

Chetanmadaan,

Did you folks modify your Authorize.net payment plugin like you were asking about? I have a client that is interested in the same thing. They want to be able to track failed orders with folks using Authorize.net's using AIM mode.

Jerome and Nicolas. Maybe there are more people interested in this as well. If so, could we get this worked into the default Authorize.net payment plugin as an option?

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

  • Posts: 8
  • Thank you received: 0
6 years 4 months ago #283340

vanboke wrote: Chetanmadaan,

Did you folks modify your Authorize.net payment plugin like you were asking about? I have a client that is interested in the same thing. They want to be able to track failed orders with folks using Authorize.net's using AIM mode.

Jerome and Nicolas. Maybe there are more people interested in this as well. If so, could we get this worked into the default Authorize.net payment plugin as an option?


Hello,

It wasn't possible using the Hikashop plugin events and ended up writing custom code and insert/update queries.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 4 months ago #283344

Hello,

It wasn't possible using the Hikashop plugin events and ended up writing custom code and insert/update queries.

If you do let the plugin authorize the order creation ; depending the rest of your store configuration it can also empty the cart and provide a strange result for the customer.
But, it can also work in some cases.

Jerome and Nicolas. Maybe there are more people interested in this as well. If so, could we get this worked into the default Authorize.net payment plugin as an option?


All HikaShop plugin which are asking the credit card details during the checkout are working the same.
They all perform the payment gateway during the "onBeforeOrderCreate" and stop the processing if the payment platform return an error.
So unfortunately we won't update the Authorize.net plugin to change its behavior if the result is something different than every other plugin of the same kind.
I hope that you understand our point of view.

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: 149
  • Thank you received: 7
  • Hikashop Business
6 years 4 months ago #283446

Jerome,

I wasn't suggesting that the default behavior of the plugin be changed. I was suggesting that if enough people wanted it that there is an option of having some different behavior upon failed transactions for people that want it.

I have a customer that gets phone calls from folks that have issues using the website for payments. Typically it is something wrong they are doing, and nothing wrong with the website. They are able to help the customer by just taking the order over the phone, however, they would like the ability to know when people have issues so that they can proactively act on it without the customer needing to call them. They are afraid they are losing sales. Unfortunately, there is no way of knowing if that is the case with how things work at the moment.

Does this make sense?

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 4 months ago #283488

Hi,

Adding an option if enough people want it makes sense yes.

I don't see though why creating the order would help your merchant in the example you've provided.
The carts are also stored by HikaShop and accessible in the backend of HikaShop.
And since recently, there is even a button on the cart edition page in the backend you can use to create an order out of the cart, taking into account the address selected by the customer, the shipping method, etc.
But maybe I don't have the full picture of what your merchant need...

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

  • Posts: 149
  • Thank you received: 7
  • Hikashop Business
6 years 4 months ago #283503

The problem with trying to rely on the back end Cart functionality for this is that there is no way to tell when the cart was abandoned. Was it abandoned before they tried to complete the order, or was it abandoned when actually trying to check out and payment failed for some reason?

The reasons for both of those abandoned carts are completely different. As a store owner, you would want to address them completely differently. At the moment there is no way to know where they were in the shopping process when the cart was abandoned so there is no way to tailor your communications to the potential customer.

This is the core of the problem that needs to be solved here.

In the past, this customer has had a lot of fraud with orders so they have their Authorize.net settings tightened down. For one, the billing address for the order must 100% match the cards billing address. 9 times out of 10 when a user of that website has a failed transaction it is because of discrepancies with the billing address. They only know this because enough people call them to place the order over the phone. Their concern is about the folks that don't call after a failed order. They don't even know if they are losing sales and if so how much.

How do they know about a failed order? How can they reach out to that potential customer proactively to help them?

This is the problem that needs to be solved.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 4 months ago #283508

Hi,

I see what you mean and in your case that indeed makes sense.

Then a custom plugin of the group "hikashop" would allow you to have it work like you want.
A developer should have no problem doing that for you.
I would recommend doing it like that:
- implement the trigger onBeforeOrderCreate so that when the $do is set to false, then you set it back to true and set the order_status to "cancelled".
- implement the trigger onAfterOrderCreate so that when the order_status is "cancelled", you redirect to the cancel URL of HikaShop

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

Time to create page: 0.077 seconds
Powered by Kunena Forum