Add note when payment authorised
Add note when payment authorised

The update_post_meta call was broken, as it expects 3 arguments and we
were only supplying 2. Since a payment authorised event is effectively
just a status change notification, it doesn't make much sense to add an
additional meta row just for this information.

The reason the state change and adding an order are occurring as 2
separate commands and not the same one is because the state should
already by pending payment (setting the state to this is in place more
as a guard) and in the event the order status doesn't change the
optional note value passed in is not saved either. So the adding the
order note is a separate command to ensure that there is always some
feedback to the WooCommerce admins that the payment was successfully
authorised.

komoju/komoju-woocommerce,komoju/komoju-woocommerce