Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jluispcardenas/payment

Laravel module to accept payments from bitcoin
https://github.com/jluispcardenas/payment

accept-payments bitcoin laravel laravel-5-package laravel-framework payment-gateway

Last synced: 13 days ago
JSON representation

Laravel module to accept payments from bitcoin

Awesome Lists containing this project

README

        

Screen

# Accept payments from bitcoin

This package enables you to accept payments from bitcoin.

## Installation
The package can be installed through Composer:

```
composer require jlp/payment
```

This service provider must be installed:

```php

//for laravel <=4.2: app/config/app.php

'providers' => [
...
'Jlp\Payment\PaymentServiceProvider'
...
];
```

## Use example

```php
use Jlp\Payment\Gateways\Bitcoin\PaymentGateway as BitcoinPaymentGateway;

class CheckoutConfirmOrderController extends BaseController {

/**
* @var PaymentGateway
*/
protected $paymentGateway;

public function __construct(.. PaymentGateway $paymentGateway ...)
{
...
$this->paymentGateway = $paymentGateway;
...
}
```

```php
public function showOrderDetails()
{
$order = Order::findOrFail(1);

$this->paymentGateway->setOrder($order);

$this->paymentGateway->preparePayment();

$paymentGateway = $this->paymentGateway;

return view('store.payment')->with(compact('order', 'paymentGateway'));
}
```

![Ejemplo](/images/logo.png)

## Remarks
This module is derived from the WooComerce module for bitcoin: http://www.bitcoinway.com/

## Licence

This project is licensed under the MIT License