I’m new to magento , I want to integrate magento with quickfile , every time when I get an invoice in magento to be pulled on quickfile !
I tried to do something but I don’t know what client id to put in this code `
<?php $ accountNumber = '####'; // QuickFile account number $ applicationID = '####'; // Application ID $ apiKey = '####'; // Account API Key $ submissionCode = uniqid(); // Randomly generated submission number, but this can be anything unique $ endPoint = 'https://api.quickfile.co.uk/1_2/invoice/create'; $ data = [ 'payload' => [ 'Header' => [ 'MessageType' => 'Request', 'SubmissionNumber' => $ submissionCode, 'Authentication' => [ 'AccNumber' => $ accountNumber, 'MD5Value' => md5($ accountNumber . $ apiKey . $ submissionCode), 'ApplicationID' => $ applicationID ] ], 'Body' => [ 'InvoiceData' => [ 'InvoiceType' => 'INVOICE', 'ClientID' => 12345, 'ClientAddress' => [ 'Address' => '123 High Street<br>London<br>AA1 1AA<br>United Kingdom', 'CountryISO' => 'GB' ], 'Currency' => 'GBP', 'TermDays' => 14, 'Language' => 'en', 'InvoiceLines' => [ 'ItemLines' => [ 'ItemLine' => [ 'ItemID' => 0, 'ItemName' => 'USB Cable', 'ItemDescription' => '2.5m USD Cable (Blue)', 'ItemNominalCode' => 4000, 'Tax1' => [ 'TaxName' => 'VAT', 'TaxPercentage' => '20.00', 'TaxAmount' => '2' ], 'UnitCost' => '10.00', 'Qty' => 1 ] ] ], 'Scheduling' => [ 'SingleInvoiceData' => [ 'IssueDate' => '2018-01-25' ] ] ] ] ] ]; $ ch = curl_init($ endPoint); curl_setopt_array($ ch, array( CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPHEADER => array('Content-Type: text/json'), CURLINFO_HEADER_OUT => TRUE, CURLOPT_POSTFIELDS => json_encode($ data), CURLOPT_SSL_VERIFYPEER => TRUE // This may need to be false if testing from localhost )); $ response = curl_exec($ ch); $ httpCode = curl_getinfo($ ch, CURLINFO_HTTP_CODE); $ return = json_decode($ response); if($ httpCode != 200) { echo 'Curl bad!'; } else { echo 'Curl successful!'; }`
Can somebody help me with this ! Thank you