PHP code example of allivcorp / iamport

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

    

allivcorp / iamport example snippets


    'providers' => [
        // ...
        Alliv\Iamport\IamportServiceProvider::class,
    ]

    'aliases' => [
        // ...
        'Iamport' => Alliv\Iamport\Facades\IamportFacade::class,
    ]

return [
    'apiKey' => env('IAMPORT_REST_API_KEY', 'imp_apikey'),
    'apiSecret' => env('IAMPORT_REST_API_SECRET', 'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f')
];

use Iamport;

// Add subscribe customer (Issue billing key)
Iamport::addSubscribeCustomer('customer_1234', '1234123412341234', '2020-10', '920327', '00');

// Checkout merchant(order)
Iamport::subscribeAgain('customer_1234', 'merchant_1234', 6000, 'Coffee');
bash
php artisan vendor:publish --provider="Alliv\Iamport\IamportServiceProvider"