digital-pros / commerce-authorize

Authorize.net - Craft Commerce 2 Plugin
Other
3 stars 9 forks source link

Control over what is used for 'invoiceNumber' #33

Closed sparkalow closed 1 year ago

sparkalow commented 1 year ago

Is your feature request related to a problem? Please describe. Matching orders in CraftCommerce and other systems that integrate with Authorize.net is difficult without control over the invoice number.

Describe the solution you'd like I would like to request the ability to control what cart/order property is used for the invoice number. Perhaps an event developers could use to return what should be set from the cart for 'invoiceNumber'. Hooking into the event would customize it, otherwise it behaves as it does currently. This would also allow use of the order reference number where developers have complete control over the format.

Describe alternatives you've considered none, I see no way without editing source.

Additional context In my use case order id would be most useful since it is numeric and easier for humans to read compared to the cart number hash.

benlobach commented 1 year ago

Thanks, @sparkalow! Creating an event it a great suggestion, we'll look into this and see what we can do.

benlobach commented 1 year ago

@sparkalow, thanks again for your feedback! Version 4.0.5 just shipped with a custom event that allows you to set the Invoice Number and Description before the payment is sent to Authorize.net.