jlp/payment

A Laravel 5 package to verify and accept payments from bitcoin

dev-master 2022-02-28 17:11 UTC

This package is not auto-updated.

Last update: 2024-04-21 01:09:34 UTC


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:

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

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

Use example

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

class CheckoutConfirmOrderController extends BaseController {


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

    public function __construct(.. PaymentGateway $paymentGateway ...)
    {
        ...
        $this->paymentGateway = $paymentGateway;
        ...
    }
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

Remarks

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

Licence

This project is licensed under the MIT License