PHP code example of davidxu / yii2-alipay
1. Go to this page and download the library: Download davidxu/yii2-alipay 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/ */
davidxu / yii2-alipay example snippets
php composer.phar
use davidxu\alipay\Alipay;
$alipay = new Alipay();
$alipay->alipayrsaPublicKey = <alipay_public_key_NOT_DEVELOPER_PUBLIC_KEY>;
$flag = $alipay->rsaCheckV1($request, null, 'RSA2');
// Other code such as deal with business logic and etc
// Response ali post request
echo 'success';