Set Payment Information Set payment data in invoice

Payment details contains information about what was the mode of payment, any note or any other details related to payment. You can easily set "payment" data in invoice using setInvoicePayment function or You can set payment data directly by passing array using setInvoicePaymentData() function with "payment" parameter. "Payment" data normally includes "method", "note" etc. You can add or remove these fields.

                            $xinvoice = new Xinvoice();
                            //set payment array
                            $payment = array("method" => "Cash on delivery", "note"=>"Please make sure to have req. cash on delivery day");
                            //set payment data 
                            echo $xinvoice->render();