Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PBN Info #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": ">=5.5",
"kevupton/laravel-package-service-provider": "^0.0.5",
"doctrine/dbal": "^2.6"
"doctrine/dbal": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
18 changes: 18 additions & 0 deletions src/Kevupton/LaravelCoinpayments/Coinpayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,24 @@ private function isSetup ()
return (!empty($this->private_key) && !empty($this->public_key));
}

/**
* Gets the current CoinPayments.net merchant profile info.
*
* @return array|mixed
* @throws CoinPaymentsException
* @throws JsonParseException
* @throws MessageSendException
*/
public function getPBNInfo ()
{
return $this->apiCall(CoinpaymentsCommand::GET_PBN_INFO, ['merchant' => $this->merchant_id]);
}

public function getBasicInfo ()
{
return $this->apiCall(CoinpaymentsCommand::GET_BASIC_INFO);
}

/**
* @param string $cmd the command to be executed
* @param array $req
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ abstract class CoinpaymentsCommand
const BALANCES = 'balances';
const RATES = 'rates';
const GET_DEPOSIT_ADDRESS = 'get_deposit_address';
const GET_PBN_INFO = 'get_pbn_info';
const GET_BASIC_INFO = 'get_basic_info';
}