PHP code example of simplecms / payment

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

    

simplecms / payment example snippets


use SimpleCMS\Payment\Models\Payment;

//创建支付
Event::listen('plugin.payment.created',function(Payment $payment){
    //Todo...
});

//待支付
Event::listen('plugin.payment.pending',function(Payment $payment){
    //Todo...
});

//支付成功
Event::listen('plugin.payment.paid',function(Payment $payment){
    //Todo...
});

//退款申请中
Event::listen('plugin.payment.refunding',function(Payment $payment){
    //Todo...
});

//退款成功
Event::listen('plugin.payment.refunded',function(Payment $payment){
    //Todo...
});
Event::listen('plugin.payment.close',function(Payment $payment){
    //Todo...
});

//订单关闭
Event::listen('plugin.payment.pending',function(Payment $payment){
    //Todo...
});

use SimpleCMS\Payment\Facades\Payment; #支付