PHP code example of ccpayment / php-sdk

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

    

ccpayment / php-sdk example snippets




use CCPayment\v1\CCPay;

$resp =  CCPay::CheckUser("9454818","202301310325561620262074393440256","c4600b8125b7ed23b5b7b8ee4acb42f4");
var_dump($resp);


use CCPayment\v1\CCPay;

$resp =  CCPay::CreateOrder([
      "remark"=>"",
      "token_id"=>"f36ad1cf-222a-4933-9ad0-86df8069f916",
      "amount"=>"0.5",
      "merchant_order_id"=>strval(time()).strval(rand(0,1000)),
      "denominated_currency"=> "USD"
     ], "202301310325561620262074393440256","c4600b8125b7ed23b5b7b8ee4acb42f4");
var_dump($resp);