PHP code example of ck-developer / payline-module

1. Go to this page and download the library: Download ck-developer/payline-module 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/ */

    

ck-developer / payline-module example snippets


       use PaylineModule\Utils\Action;
       use PaylineModule\Utils\Currency;
       use PaylineModule\Utils\Payment;

       $response = $this->getServiceLocator->get('payline')->doWebPayment([
            'payment'      => [
                'amount'         => 100,
                'action'         => Action::AUTHORIZATION_VALIDATION,
                'currency'       => Currency::EURO,
                'mode'           => Payment::CASH,
            ],
            'order'        => [
                'ref'      => 1,
            ]
        ]);