Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/jluispcardenas/payment
- Owner: jluispcardenas
- Created: 2018-03-09T04:08:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-28T17:11:39.000Z (over 2 years ago)
- Last Synced: 2024-10-10T12:44:40.975Z (about 1 month ago)
- Topics: accept-payments, bitcoin, laravel, laravel-5-package, laravel-framework, payment-gateway
- Language: PHP
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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