My requirement is to take the draft sales order and make confirm, invoice, delivery, payment. To do this i am using "sale_automatic_workflow" module but it is automating up to invoice. It's not making payment to that invoice. To automate payment using invoice, i have installed "sale_quick_payment" module. This module creating payment to the order but not the invoice. The sales order not going to "done" state. It means it's not reconcile the invoice with that payment. Can any one help me how to automaticaly pay the sales invoice. I have analysed the code of "Register payment button". This button calling "invoice_pay_customer" method, and "pay" button(in the payment wizard) calling the function "button_proforma_voucher". I unable to understand the relation between these two functions. Can any one give the code to automate customer payment using invoices?