2017 © Pedro Peláez
 

library rocketr-payments-php

Rocketr PHP library

image

rocketr/rocketr-payments-php

Rocketr PHP library

  • Tuesday, March 20, 2018
  • by Rocketr
  • Repository
  • 2 Watchers
  • 1 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Rocketr Payments API

Composer

The easiest way to use the library is through Composer:, (*1)

composer require rocketr/rocketr-payments-php

Then in your code, load the Autoloader:, (*2)

require_once('vendor/autoload.php');

Manual Installation

To manually use the library, download the latest release and include the init.php file in your code:, (*3)

require_once('/path-to-rocketr-payments-php/init.php');

Getting Started

Please take a look in the examples/ folder to see how to use different API functions., (*4)

If you want to simply create a payment request, it's really simple:, (*5)

\RocketrPayments\RocketrPayments::setApiKey('API_CLIENT_ID', 'API_SECRET'); //From https://rocketr.net/merchants/api-keys
$o = new \RocketrPayments\Order();

$o->setPaymentMethod(\RocketrPayments\PaymentMethods::BitcoinPayment);
$o->setAmount(12.31);
$o->setBuyerEmail('saad@rocketr.net');
$o->addCustomField('internal_id', '2195342212');
$o->setIpnUrl('https://rocketr.net/webhook.php');

$result = $o->createOrder();

echo 'Please send ' . $result['paymentInstructions']['amount']  . $result['paymentInstructions']['currencyText'] . ' to ' . $result['paymentInstructions']['address'];

Support

The Versions

20/03 2018

dev-master

9999999-dev https://rocketr.net/

Rocketr PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Avatar Rocketr

20/03 2018

1.1

1.1.0.0 https://rocketr.net/

Rocketr PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Avatar Rocketr

28/02 2018

1

1.0.0.0 https://rocketr.net/

Rocketr PHP library

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Avatar Rocketr