Notice: Only variables should be assigned by reference in /var/www/clients/client4/web20/web/templates/shape5_vertex/vertex/responsive/responsive_mobile_sidebar.php on line 8

Notice: Only variables should be assigned by reference in /var/www/clients/client4/web20/web/templates/shape5_vertex/vertex/responsive/responsive_mobile_menu.php on line 278

VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Order and Invoice numbers

Order and Invoice numbers 17 May 2016 23:15 #1

I need the Order and Invoice numbers to be the same.

I am getting the correct Order number: #APR10920, however, in the Payment Gateway email it is shown as: Invoice Number: 36012.
The administrator has disabled public write access.

Order and Invoice numbers 21 May 2016 00:00 #2

Dear EntangledWeb,
Which Payment Gateway are you using?

The situation you describe seems to indicate that the payment gateway does not actually use the order number of the order, but rather the post ID (which is the default for WooCommerce's order numbers, but WC has a trigger so that plugins can implement other order numbers -- apparently the payment gateway does not use that trigger).

My first guess would be that the Payment Gateway does not handle WC order numbers correctly. It should call $order->get_order_number() and NOT $order->get_id() to retrieve the order number for the given order... But that is just a guess from the symptoms you describe.

Best regards,
Reinhold
The administrator has disabled public write access.

Order and Invoice numbers 26 May 2016 22:50 #3

That maybe so, here's the Authoirze.net Gateway plugin I am using:

Authorize.net for WooCommerce: wordpress.org/plugins/os-woocommerce-authorizenet-aim/

Would be nice to know what needs to be hacked to get the Order and Invoice number to be the same. I am also using:

MerchantOne Payment Gateway WooCommerce Addon: wordpress.org/plugins/webmicro-merchantone-woo-addon/

BitPay for WooCommerce: wordpress.org/plugins/bitpay-for-woocommerce/

And Coinbase Bitcoin: wordpress.org/plugins/coinbase-woocommerce/
The administrator has disabled public write access.

Order and Invoice numbers 26 May 2016 23:16 #4

Dear EntangledWeb,
Thank you for the pointers. I took a quick look:

1. Authorize.net for WooCommerce:
plugins.svn.wordpress.org/os-woocommerce...authorizenet-aim.php
Near the end of the file, the params that are sent to the payment gateway are defined, including the following:
'x_invoice_num'            => $order->id,
So, the authorize.net plugin for WooCommerce indeed assumes the invoice number to be the order ID (not even the order number). You might try to change this to $order->get_order_number(), but you'll need to do some testing (the payment gateway might expect a number rather than a string, which would break in your case).

2. MerchangeOne Payment Gateway for Woocommerce:
plugins.svn.wordpress.org/webmicro-merch...antone-woo-addon.php
That plugin properly calls get_order_number() on the order:
$gw->setOrder(
	$wc_order->get_order_number(),
	get_bloginfo('blogname').' Order #'.$wc_order->get_order_number(),
	number_format($wc_order->get_total_tax(),2,".",""), 
	number_format($wc_order->get_total_shipping(),2,".",""), 
	$wc_order->get_order_number(),
	$this->get_client_ip()
);
So I don't see any reason why this should not work as expected.

3. BitPay for WooCommerce:
plugins.svn.wordpress.org/bitpay-for-woo...c-gateway-bitpay.php
That plugin also appears to correctly use the order number (and even set the order number for the invoice):
$order_number = $order->get_order_number();
$invoice->setOrderId((string)$order_number);

4. Coinbase Bitcoin:
plugins.svn.wordpress.org/coinbase-wooco...base-woocommerce.php
That plugin seems to use the order ID rather than the order number:
$params = array(
	'name'               => 'Order #' . $order_id,
	'price_string'       => $order->get_total(),
	[...]
);
So, this Coinbase Bitcoin payment plugin also suffers from the same issue as the authorize.net plugin (both using the order ID rather than the order number).

Best regards,
Reinhold
The administrator has disabled public write access.

Order and Invoice numbers 27 May 2016 20:25 #5

Thanks .. I'll hack at two "broken" ones.

As for the Authorize.net gateway, sending it a string is fine ... doing this already with another cart which basically as "Advanced Ordernumbers" built in.
The administrator has disabled public write access.

[SOLVED] Order and Invoice numbers 01 Jun 2016 08:11 #6

Problem solved.
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular