1- # CoinPayments v2
1+ # CoinPayments v3
22
33[ ![ Latest Stable Version] ( https://poser.pugx.org/hexters/coinpayment/v/stable )] ( https://packagist.org/packages/hexters/coinpayment )
44[ ![ Total Downloads] ( https://poser.pugx.org/hexters/coinpayment/downloads )] ( https://packagist.org/packages/hexters/coinpayment )
1010
1111CoinPayment is a Laravel package for handling transactions from [ CoinPayment] ( https://www.coinpayments.net/index.php?ref=3dc0c5875304cc5cc1d98782c2741cb5 ) like a create transaction, history transaction, etc.
1212
13- ![ Example Image] ( https://github.com/hexters/CoinPayment/blob/master/sample/examplev2 .png?raw=true )
13+ ![ Example Image] ( https://github.com/hexters/CoinPayment/blob/master/sample/examplev3 .png?raw=true )
1414
1515### Version support
1616| version | laravel |
1717| -| -|
1818| [ v1.1.3] ( https://github.com/hexters/CoinPayment/releases/tag/v1.1.3 ) | 5.6|
1919| [ v2.0.0] ( https://github.com/hexters/CoinPayment ) | 5.8|
2020| [ v2.0.3] ( https://github.com/hexters/CoinPayment ) | ^6.x|
21- | [ v2.1.0] ( https://github.com/hexters/CoinPayment ) | ^8.x|
22-
23- ## Requirement
24- * Laravel ^5.8
25- * PHP >= ^7.2
21+ | [ Current Version] ( https://github.com/hexters/CoinPayment ) | ^8.x|
2622
2723## Installation
2824You can install this package via composer:
29- ```
25+ ``` bash
3026$ composer require hexters/coinpayment
3127```
3228
3329Publishing vendor
34- ```
30+ ``` bash
3531$ php artisan vendor:publish --tag=coinpayment
3632```
3733
3834Install CoinPayment configuration
39- ```
35+ ``` bash
4036$ php artisan coinpayment:install
4137```
4238
4339Installation finish.
4440
4541## Getting Started
4642Create Button transaction. Example placed on your controller
47- ```
48- use Hexters\CoinPayment\Helpers\CoinPaymentFacade as CoinPayment;
43+ ``` php
44+ use Hexters\CoinPayment\CoinPayment;
4945 . . .
5046 /*
5147 * @required true
5248 */
5349 $transaction['order_id'] = uniqid(); // invoice number
5450 $transaction['amountTotal'] = (FLOAT) 37.5;
55- $transaction['note'] = 'Note for your transaction ';
51+ $transaction['note'] = 'Transaction note ';
5652 $transaction['buyer_name'] = 'Jhone Due';
57- $transaction['buyer_email'] = 'buyer@mailinator.com';
58- $transaction['redirect_url'] = url('/back_to_tarnsaction');
53+ $transaction['buyer_email'] = 'buyer@mail.com';
54+ $transaction['redirect_url'] = url('/back_to_tarnsaction'); // When Transaction was comleted
55+ $transaction['cancel_url'] = url('/back_to_tarnsaction'); // When user click cancel link
56+
5957
6058 /*
6159 * @required true
@@ -108,25 +106,33 @@ This function will execute orders without having to wait for the process from IP
108106
109107We can also make cron to run this function if we don't use IPN
110108
111- ```
109+ ``` php
110+ use Hexters\CoinPayment\CoinPayment;
111+
112+ . . .
113+
112114/**
113115* this is triger function for running Job proccess
114116*/
115- return \CoinPayment::getstatusbytxnid("CPDA4VUGSBHYLXXXXXXXXXXXXXXX");
116- /**
117- output example: "celled / Timed Out"
118- */
117+ return CoinPayment::getstatusbytxnid("CPDA4VUGSBHYLXXXXXXXXXXXXXXX");
118+ // output example: "celled / Timed Out"
119+
119120```
120121
121122## Get histories transaction Eloquent
122- ```
123- \CoinPayment::gettransactions()->where('status', 0)->get();
123+ ``` php
124+
125+ use Hexters\CoinPayment\CoinPayment;
126+
127+ . . .
128+
129+ CoinPayment::gettransactions()->where('status', 0)->get();
124130```
125131
126132# IPN Route
127133
128134Except this path ` /coinpayment/ipn ` into csrf proccess in ` App\Http\Middleware\VerifyCsrfToken `
129- ```
135+ ``` php
130136. . .
131137/**
132138 * The URIs that should be excluded from CSRF verification.
@@ -145,4 +151,4 @@ Visit the [**CoinPayment API Keys**](https://www.coinpayments.net/index.php?cmd=
145151# Donate
146152If this Laravel package was useful to you, please consider donating some coffee ☕☕☕☕
147153
148- Bitcoin (BTC): ``` 1388MHjeHmq6kUC7WpSS6pPtgG7hm7fCau `` `
154+ Bitcoin (BTC): ` 1388MHjeHmq6kUC7WpSS6pPtgG7hm7fCau `
0 commit comments