PHP code example of kanazaca / easypay

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

    

kanazaca / easypay example snippets


'providers' => array(
	// ...
	kanazaca\easypay\EasypayServiceProvider::class,
)

$payment_info = [
            'o_name' => "Your name",
            'o_email' => 'Your email',
            't_value' => '29.00',
            'o_description' => 'Here is your description',
            'o_obs' => 'Here is your observations',
            'o_mobile' => 'Here is your mobile',
            't_key' => 'Here is the ID of your order'
    ];
    
$easypay = new EasyPay($payment_info);

$reference = $easypay->createReference();

$easypay = new EasyPay($payment_info);

$xml = $easypay->processPaymentInfo();

//do your code here if needed

return \Response::make($xml, '200')->header('Content-Type', 'text/xml'); //must return in text/xml for easypay

$easypay = new EasyPay();

$all_payments = $easypay->fetchAllPayments();

php artisan vendor:publish

php artisan migrate