PHP code example of levpay / levpay-php

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

    

levpay / levpay-php example snippets


$client_id = "...";
$secret_key = "...";
$environment = "homolog"
$lp = new \Levpay\Levpay($client_id, $secret_key, $environment);
$object = array(
  'payment_method' => 'transferencia',
  'description' => 'testing create new order by Levpay php Class',
  'partner_reference' => 'lev20181226141600',
  'bank_slug' => 'bradesco',
  'amount' => 10.00,
  'expiration' => 3600,
  'data' => array(),
  'customer' => array(
    'name' => 'Thiago Avelino',
    'document_number' => '00000000000',
    'phone_number' => '+55 11 00000-0000',
    'email' => '[email protected]',
    'data' => array()
  )
);
print_r($lp->CreateOrder($object));
sh
composer