PHP code example of calibr / ms-receipt-validator
1. Go to this page and download the library: Download calibr/ms-receipt-validator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
calibr / ms-receipt-validator example snippets
use Calibr\MSReceiptValidator\Validator;
$validator = new Validator();
// validation(omit exception handling)
$receipt = $validator->load($_POST["receiptXML"]);
// if we are here receipt has been successfully validated and we have all receipt data in the $receipt variable