PHP code example of nahuomall / construct-pay

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

    

nahuomall / construct-pay example snippets


        $obj = \Hyperf\Support\make(\ConstructPay\Api\Wechat::class)
        
        $obj->setMchId('你的商户ID');
        // app
        $res =$obj->app->createOrder([]);
        
        var_dump($res);