PHP code example of mydevcodes / ipaymer-php

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

    

mydevcodes / ipaymer-php example snippets


use Mydevcodes\IpaymerPhp\IpaymerPhp;
IpaymerPhp::init('Your_Secret_Key', 'production|development');

$customerData = [
    'name' => 'Jimm',
    'email' => '[email protected]'
];

$ipaymer_customer_id = IpaymerPhp::init('Your_Secret_Key')->create($customerData);

IpaymerPhp::init('Your_Secret_Key')->checkoutLink('CUSTOMER_IPAYMER_ID', 'PLAN_CODE', 'RETURN_URL');

IpaymerPhp::init('Your_Secret_Key')->newCardLink('CUSTOMER_IPAYMER_ID');

IpaymerPhp::init('Your_Secret_Key')->assign('CUSTOMER_IPAYMER_ID', 'PLAN_ID', 'QUANTITY');

IpaymerPhp::init('Your_Secret_Key')->change('CUSTOMER_IPAYMER_ID', 'FROM_PLAN_ID', 'TO_PLAN_ID');

IpaymerPhp::init('Your_Secret_Key')->plans($customerId);

IpaymerPhp::init('Your_Secret_Key')->status('CUSTOMER_IPAYMER_ID');

IpaymerPhp::init('Your_Secret_Key')->invoices('CUSTOMER_IPAYMER_ID');

use Mydevcodes\IpaymerPhp\IpaymerPhp;
IpaymerPhp::init('Your_Secret_Key')->generateInvoice('CUSTOMER_IPAYMER_ID', 'PLAN_CODE', 'PRICE', 'QUANTITY', 'DESCRIPTION');

IpaymerPhp::init('Your_Secret_Key')->cancel('CUSTOMER_IPAYMER_ID', 'PACKAGE_CODE');

IpaymerPhp::init('Your_Secret_Key')->remove('CUSTOMER_IPAYMER_ID', 'IPAYMER_CARD_ID');
bash
composer