src/Twisto/Invoice.php
public static function create(Twisto $twisto, $transaction_id, $eshop_invoice_id = null)
    {
        $data = array(
            'transaction_id' => $transaction_id
        );

        if ($eshop_invoice_id !== null) {
            $data['eshop_invoice_id'] = $eshop_invoice_id;
        }

        $data = $twisto->requestJson('POST', 'invoice/', $data);
        $invoice = new Invoice($twisto, null);
        $invoice->deserialize($data);
        return $invoice;
    }
public static function create(Twisto $twisto, $transaction_id, $eshop_invoice_id = null)
    {
        $data = array(
            'transaction_id' => $transaction_id
        );

        if ($eshop_invoice_id !== null) {
            $data['eshop_invoice_id'] = $eshop_invoice_id;
        }

        $data = $twisto->requestJson('POST', 'invoice/', $data);
        $invoice = new Invoice($twisto, null);
        $invoice->deserialize($data);
        return $invoice;
    }
public static function create ( Twisto $ twisto , $ transaction_id , $ eshop_invoice_id = null ) { $ data = array ( 'transaction_id' => $ transaction_id ) ; if ( $ eshop_invoice_id !== null ) { $ data [ 'eshop_invoice_id' ] = $ eshop_invoice_id ; } $ data = $ twisto -> requestJson ( 'POST' , 'invoice/' , $ data ) ; $ invoice = new Invoice ( $ twisto , null ) ; $ invoice -> deserialize ( $ data ) ; return $ invoice ; }
Create new invoice using transaction_id from check
@param Twisto $twisto
@param string $transaction_id
@param string $eshop_invoice_id
@return Invoice
Create new invoice using transaction_id from check