1. Go to this page and download the library: Download zjpay/laravel-cpcn 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/ */
zjpay / laravel-cpcn example snippets
use Zjpay\Cpcn\Facades\Cpcn;
$resp = Cpcn::tx('5011', [
'PaymentNo' => 'P202604160001',
'Amount' => '100',
'SettlementFlag' => '10',
// ...按文档拼 Body 字段
]);
if (! $resp->isSystemAccepted()) {
throw new RuntimeException($resp->systemCode() . ':' . $resp->systemMessage());
}
$body = $resp->body();