composer require luohonen/receipt-verify-xml
<?php
use Luohonen\Receipt;
//要验证的收据-XML格式 Receipt to verify - XML format
$xml = 'receipt-xml';
try{
Receipt::verify($xml);
print_r("success");
}catch (\Exception $e){
print_r($e->getMessage());
}