PHP code example of revolution / laravel-paypay

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

    

revolution / laravel-paypay example snippets


use Revolution\PayPay\Facades\PayPay;

/* @var PayPay\OpenPaymentAPI\Controller\Code $code */
$code = PayPay::code();

/* @var PayPay\OpenPaymentAPI\Controller\Payment $payment */
$payment = PayPay::payment();

/* @var PayPay\OpenPaymentAPI\Controller\Refund $refund */
$refund = PayPay::refund();

use Revolution\PayPay\Facades\PayPay;
use PayPay\OpenPaymentAPI\Models\CreateQrCodePayload;

$payload = new CreateQrCodePayload();
// ...

$response = PayPay::code()->createQRCode($payload);

// ...

use Revolution\PayPay\Facades\PayPay;

PayPay::expects('code->createQRCode')->once()->andReturn([]);