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;

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

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

// PayPay\OpenPaymentAPI\Controller\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::shouldReceive('code->createQRCode')->once()->andReturn([]);