PHP code example of cncal / alipay

1. Go to this page and download the library: Download cncal/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/ */

    

cncal / alipay example snippets


    Cncal\Alipay\AlipayServiceProvider::class,
    

    'Alipay' => Cncal\Alipay\Facades\Alipay::class,
    

return [
    'gateway_url' => "https://openapi.alipay.com/gateway.do",

    'app_id' => "",

    'alipay_public_key' => "",

    'merchant_private_key' => "",

    'charset' => "UTF-8",

    'sign_type' => "RSA2",

    'notify_url' => "",

    'return_url' => "",
];