2017 © Pedro Peláez
 

library coinpayment

CoinPayment PHP client for Laravel

image

pawelsome/coinpayment

CoinPayment PHP client for Laravel

  • Friday, July 20, 2018
  • by pawelsome
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 29 Versions
  • 0 % Grown

The README.md

CoinPayment

CoinPayment is a laravel module for handle transaction from CoinPayment like a create transaction, history transaction, etc. Example, (*1)

Requirement

  • Laravel ^5.6
  • PHP >= ^7.1
  • GuzzleHttp
  • Nesbot/Carbon

Installation

You can install the package via composer:, (*2)

$ composer require hexters/coinpayment

Publishing vendor, (*3)

$ php artisan vendor:publish --tag=coinpayment-publish

First you should add trait class on User model and use this trait Hexters\CoinPayment\Entities\CoinPaymentuserRelation check the example below:, (*4)

    <?php
        namespace App;

        use Illuminate\Notifications\Notifiable;
        use Illuminate\Foundation\Auth\User as Authenticatable;
        use Hexters\CoinPayment\Entities\CoinPaymentuserRelation;

        class User extends Authenticatable {
            use Notifiable, CoinPaymentuserRelation;
            ...

Install CoinPayment configuration, (*5)

$ php artisan coinpayment:install

Setting schedule for checking transaction succesed in your file app > console > kernel. example:, (*6)

...
    protected function schedule(Schedule $schedule) {
        // If IPN is enable set the schedule for ->daily()
        // And if IPN is disable set schedule for ->everyMinute()
         $schedule->command('coinpayment:transaction-check')
            ->daily();

    }
...

visit the Documentation Schedule, (*7)

Install the table transaction, (*8)

$ php artisan migrate

Installation finish., (*9)

Getting Started

Create Button transaction. Example placed on your controller, (*10)

use CoinPayment; // use outside the class
...
    /*
    *   @required true
    */
    $trx['amountTotal'] = 50; // USD
    $trx['note'] = 'Note for your transaction';

    /*
    *   @required true
    *   @example first item
    */
    $trx['items'][0] = [
        'descriptionItem' => 'Product one',
        'priceItem' => 10, // USD
        'qtyItem' => 2,
        'subtotalItem' => 20 // USD
    ];

    /*
    *   @example secound item
    */
    $trx['items'][1] = [
        'descriptionItem' => 'Product two',
        'priceItem' => 10, // USD
        'qtyItem' => 3,
        'subtotalItem' => 30 // USD
    ];

    /*
    *   if you want to remember your data at a later date, you can add the parameter below
    */
    $trx['payload'] = [
        // your cusotm array here
        'foo' => [
            'foo' => 'bar'
        ]
    ];

    $link_transaction = CoinPayment::url_payload($trx);
    ...
    /*
    *   On your balde
    *   <a href="{{ $link_transaction }}" target="_blank">Pay Now</a>
    */
...

Please except the route from csrf proccess, get the file app > Http > Middleware > VerifyCsrfToken.php, (*11)

    ...
    protected $except = [
        ...
        '/coinpayment/ipn'
        ...
    ];
    ...

Open file app > Jobs > coinPaymentCallbackProccedJob.php for handle transaction proccess, (*12)

And Open app > Jobs > IPNHandlerCoinPaymentJob.php for handle IPN proccess, (*13)

Route Access

Route Name Route URL Method Description
coinpayment.transaction.histories /transactions/histories GET Route for access transaction histories

The Versions

20/07 2018

dev-master

9999999-dev

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

19/07 2018

2.0.0

2.0.0.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

18/04 2018

v1.1.3

1.1.3.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

05/04 2018

v1.1.2

1.1.2.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

05/04 2018

v1.1.1

1.1.1.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

05/04 2018

v1.1.0

1.1.0.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

02/04 2018

dev-b1.0.13.1

dev-b1.0.13.1

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

02/04 2018

v1.0.13.1

1.0.13.1

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

02/04 2018

1.0.19

1.0.19.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

28/03 2018

dev-b1.0.13

dev-b1.0.13

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

28/03 2018

v1.0.13

1.0.13.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

26/03 2018

1.0.18

1.0.18.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

26/03 2018

1.0.17

1.0.17.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

26/03 2018

1.0.16

1.0.16.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

25/03 2018

v1.0.15

1.0.15.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

24/03 2018

v1.0.14

1.0.14.0

CoinPayment PHP client for Laravel

  Sources   Download

MIT

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

24/03 2018

dev-add-license-1

dev-add-license-1

CoinPayment PHP client for Laravel

  Sources   Download

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

24/03 2018

v1.0.12

1.0.12.0

CoinPayment PHP client for Laravel

  Sources   Download

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

24/03 2018

v1.0.11

1.0.11.0

CoinPayment PHP client for Laravel

  Sources   Download

The Requires

 

by Saifullah Syahidin

payment gateway cryptocurrency payment method coinpayment

24/03 2018

v1.0.10

1.0.10.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

24/03 2018

v1.0.9

1.0.9.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

24/03 2018

v1.0.8

1.0.8.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

24/03 2018

v1.0.7

1.0.7.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

24/03 2018

v1.0.6

1.0.6.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

23/03 2018

1.0.3

1.0.3.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

23/03 2018

1.0.4

1.0.4.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

23/03 2018

1.0.2

1.0.2.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

23/03 2018

1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by Saifullah Syahidin

23/03 2018

1.0.0

1.0.0.0

  Sources   Download

The Requires

 

by Saifullah Syahidin