PHP code example of lmh / wechatpay-v3

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

    

lmh / wechatpay-v3 example snippets


$options = [
    // 加密
    'encode_params' => [
        'id_card_info.id_card_name',
        'id_card_info.id_card_number',
        'account_info.account_name',
        'account_info.account_number',
        'contact_info.contact_name',
        'contact_info.contact_id_card_number',
        'contact_info.mobile_phone',
        'contact_info.contact_email',
    ],
    // 解密
    'decode_params' => [
        'account_validation.account_name',
        'account_validation.pay_amount',
    ]
];