2017 © Pedro Peláez
 

library bitpaymagic

A Laravel 5 wrapper package for an amazing BitPay payment system

image

aimagician/bitpaymagic

A Laravel 5 wrapper package for an amazing BitPay payment system

  • Monday, April 2, 2018
  • by aimagician
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 22 % Grown

The README.md

bitpaymagic

Simple Laravel 5 wrapper for the Bitpay php client, (*1)

Installation

Add this package to your project, with Composer, (*2)

composer require aimagician/bitpaymagic

Configuration

Run the following command to have Laravel set up a configuration file for you., (*3)

php artisan vendor:publish

This will create in config folder a "bitpaymagic.php" config file. Config file uses a .env variables. Update .env file with these keys., (*4)

BITPAY_STORAGE_PASS=YourTopSecretPassword
BITPAY_PAIRING_CODE=YourPairingCode
BITPAY_PAIRING_CODE_LABEL="Test Token Label - optional"
BITPAY_ENV=testnet
BITPAY_GENERATED_TOKEN="Put here generated token"

Pairing code can be setup here in: Payment Tools -> Manage API tokens -> Add new token -> Add token, (*5)

To generate needed keys, (*6)

run this artisan command, and update generated token value in .env file(BITPAY_GENERATED_TOKEN), (*7)

php artisan bitpaymagic:setup

This step is needed to run just once, if error is being shown, please revoke and update pairing code, and try again, or follow this tutorial and do everything manually., (*8)

Trait

A Bitpaymagic Trait initBitpaymagicClient() function will return a client, (*9)

use BitpaymagicTrait;
...
...
$client = $this->initBitpaymagicClient();

Facades

Simply use Laravel facades:, (*10)

use Bitpay\Buyer;
use Bitpay\Currency;
use Bitpay\Invoice;
use Bitpay\Item;

Bitpay documentation, (*11)

How to setup test environment, (*12)

A full working example: https://github.com/aimagician/bitpay-test, (*13)

The Versions

02/04 2018

dev-master

9999999-dev

A Laravel 5 wrapper package for an amazing BitPay payment system

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Popov

library bitcoin bitpay

02/04 2018

1.0.0

1.0.0.0

A Laravel 5 wrapper package for an amazing BitPay payment system

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Popov

library bitcoin bitpay