PHP code example of itelmenko / php-paddle-client

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

    

itelmenko / php-paddle-client example snippets



$client = new \Paddle\Client();
$client->setVendorId(111);
$client->setVendorAuthCode('dlkegvke3klge3mg3...');
$price = new \Paddle\Price($order->amount, new \Paddle\Currency('USD'));
$invoice = new \Paddle\Invoice();

$invoice->addPrice(5.95)
    ->setPassthrough('order-id-2464')
    ->setReturnUrl('https://yourdomain.com/return')
    ->setQuantity(1, FALSE)
    ->setExpires(time())
    ->setCustomerEmail('[email protected]');

$invoice->setProductId(111111);

$url = $client->createPaymentUrl($invoice);