Authorize.net Invoice Number

  • Posts: 24
  • Thank you received: 1
6 years 3 months ago #286545

-- url of the page with the problem -- : pacificcenterforlifelonglearning.com
-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.3
-- PHP version -- : 7.0.18
-- Browser(s) name and version -- : Chrome 63.0.3239.132
-- Error-message(debug-mod must be tuned on) -- : Invoice Number does not appear in authorize.net invoice.

How do we send the invoice number to authrorize.net?
Currently, no invoice number appears under the order information in authorize.net.

Looking at the API documentation, "invoiceNumber" can be sent under the "order" object in JSON.
I have no clue how the data is sent in the authorize.net HikaShop plugin.

I was hoping you can help me add a couple of lines of code to pass the invoice number.
See the attached screenshot for a visual of the missing information.

Thank you!

Attachments:

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 years 3 months ago #286558

Hi,

The invoice number is generated by HikaShop when an order is confirmed.
An order is confirmed when the payment plugin of the selected payment method of that order changes the status of the order to "confirmed".
A payment plugin will do that after it receives the confirmation from the payment gateway that the payment has been made.

So when the payment plugin places the order for the payment, the invoice number hasn't been generated yet and thus cannot be sent.

Now, in SIM, the "order id" is sent to authorize.net as "invoice number". In AIM mode, it's potentially possible to guess the order_id and send it:
www.hikashop.com/support/forum/payment-m...ber-description.html
But for the invoice number it's more complex to guess it.
I would recommend hiring a developer to do that.

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

  • Posts: 24
  • Thank you received: 1
6 years 3 months ago #286637

Thanks for the quick response.

We are using AIM.

Looking at the database table hikashop_order, the columns order_invoice_id is 0, order_invoice_number is blank, and order_invoice_created is 0.

Looking at the API document from the link at the end of the other forum post, it sounds like the API being used is deprecated:
www.authorize.net/content/dam/authorize/documents/AIM_guide.pdf

I think my confusion is coming from different versions of the API, where the new one allows you to POST a generated invoice number.

Attachments:
Last edit: 6 years 3 months ago by pcomelearning.

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 years 3 months ago #286641

Hi,

Regarding the columns you're talking about, these columns are filled in when the status of the order goes from created to confirmed.
If the order is only created, then the invoice is not generated. Similarily, if you change the "invoice" statuses in the menu System>Order statuses, it can affect how the invoice is generated.

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

  • Posts: 24
  • Thank you received: 1
6 years 3 months ago #286693

Thank you for the reply.

Since the invoice isn't generated until the order is confirmed, it can't be sent to authorize.net. Sounds like the Authorize AIM API being used doesn't take an invoice number anyway.

Are there any plans on building a new Authroize.net Payment plugin, since the current API being used is deprecated?

There are two features from the payment processing that are crucial:.

  1. Ability to do refunds automatically.
  2. Invoice number on the Authorize side to refer to and separate purchases from multiple components.

We have another component in the store that uses AIM authorize.net that populates the invoice number into the Authorize.net invoice.If it did not, we would have no way of separating out HikaShop products from event sales.

Finally, the orders in the database are mostly confirmed, but no invoice number is showing in the database for any order id. Here are the settings for "system > order".

Attachments:

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 years 3 months ago #286705

Hi,

We don't have plans to implement the new API in the short term as we're working on other things.
We'll do it before the API will be discontinued.

Maybe someone one might work on such plugin in the mean time. Any PHP developer can write payment plugins for HikaShop and we encourage that.

Regarding the matching of payments in Authorize.net and the orders in HikaShop, you'll find the transaction id in the history data of each order when you edit it in the backend. And you can easily find the payment corresponding to the transaction id in your Authorize.net merchant account.

As I said in my previous message, if you change the "invoice" statuses in the menu System>Order statuses, it can affect how the invoice is generated. So that's where you should first look if the invoice number is not generated for the orders even when confirmed.

The following user(s) said Thank You: pcomelearning

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

  • Posts: 24
  • Thank you received: 1
6 years 2 months ago #288757

Currently, are there any payment plugins that allow refunds to be made from within HikaShop?

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
6 years 2 months ago #288776

Hi,

Not that I know of. Most payment gateways don't support that and sometimes, you want to change the status of the order without necessarily refunding the order. So we're not sure yet as to how we would add that in a generic way.
But any payment plugin can be modified to support it if the API of the payment gateway supports it. The trigger is already available in HikaShop (onAfterOrderUpdate) so then it's about writting the code to contact the payment gateway.
So if you need it, you can have a developer add it for you.

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

Time to create page: 0.048 seconds
Powered by Kunena Forum