update lock clucknut
All checks were successful
All checks were successful
This commit is contained in:
@@ -13,7 +13,8 @@ class Client extends Resource
|
||||
public static function grantClientCredentials()
|
||||
{
|
||||
list($response, $opts) = static::_staticRequest(
|
||||
'post', '/oauth/token',
|
||||
'post',
|
||||
'/oauth/token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => FedaPay::getOauthClientId(),
|
||||
|
||||
38
vendor/fedapay/fedapay-php/lib/PaymentSource.php
vendored
Normal file
38
vendor/fedapay/fedapay-php/lib/PaymentSource.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace FedaPay;
|
||||
|
||||
/**
|
||||
* Class PhoneNumber
|
||||
*
|
||||
* @property int $id
|
||||
* @property string product
|
||||
* @property string channel
|
||||
* @property string referrer
|
||||
* @property string lib
|
||||
* @property string lib_version
|
||||
* @property string api_version
|
||||
* @property string ip
|
||||
* @property string device
|
||||
* @property string os
|
||||
* @property string browser
|
||||
* @property string country
|
||||
* @property string city
|
||||
* @property string region
|
||||
* @property string latitude
|
||||
* @property string longitude
|
||||
* @property string account_id
|
||||
* @property string sourceable_type
|
||||
* @property string sourceable_id
|
||||
* @property string os_version
|
||||
* @property string browser_version
|
||||
* @property string device_vendor
|
||||
* @property string created_at
|
||||
* @property string updated_at
|
||||
*
|
||||
* @package FedaPay
|
||||
*/
|
||||
class PaymentSource extends Resource
|
||||
{
|
||||
|
||||
}
|
||||
9
vendor/fedapay/fedapay-php/lib/Requestor.php
vendored
9
vendor/fedapay/fedapay-php/lib/Requestor.php
vendored
@@ -125,9 +125,12 @@ protected function defaultHeaders()
|
||||
$accountId = FedaPay::getAccountId();
|
||||
|
||||
$default = [
|
||||
'X-Version' => FedaPay::VERSION,
|
||||
'X-Api-Version' => $apiVersion,
|
||||
'X-Source' => 'FedaPay PhpLib',
|
||||
// Deprecated 'X-Version' => FedaPay::VERSION,
|
||||
'X-FedaPay-Lib-Version' => FedaPay::VERSION,
|
||||
// Deprecated 'X-Api-Version' => $apiVersion,
|
||||
'X-FedaPay-Api-Version' => $apiVersion,
|
||||
// Deprecated 'X-Source' => 'FedaPay PhpLib',
|
||||
'X-FedaPay-Lib' => 'FedaPay PhpLib',
|
||||
'Authorization' => "Bearer $auth"
|
||||
];
|
||||
|
||||
|
||||
12
vendor/fedapay/fedapay-php/lib/Resource.php
vendored
12
vendor/fedapay/fedapay-php/lib/Resource.php
vendored
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* @package FedaPay
|
||||
*/
|
||||
abstract class Resource extends FedaPayObject
|
||||
class Resource extends FedaPayObject
|
||||
{
|
||||
use ApiOperations\Request;
|
||||
|
||||
@@ -103,4 +103,14 @@ public function instanceUrl()
|
||||
{
|
||||
return static::resourcePath($this['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send any request
|
||||
* @return FedaPay\FedaPayObject
|
||||
*/
|
||||
public static function request($method, $url, $params = [], $headers = [])
|
||||
{
|
||||
list($response, $opts) = static::_staticRequest($method, $url, $params, $headers);
|
||||
return Util::arrayToFedaPayObject($response, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
1
vendor/fedapay/fedapay-php/lib/Util/Util.php
vendored
1
vendor/fedapay/fedapay-php/lib/Util/Util.php
vendored
@@ -58,6 +58,7 @@ public static function convertToFedaPayObject($resp, $opts)
|
||||
'v1/page' => 'FedaPay\\Page',
|
||||
'v1/invoice' => 'FedaPay\\Invoice',
|
||||
'v1/balance' => 'FedaPay\\Balance',
|
||||
'v1/payment_source' => 'FedaPay\\PaymentSource',
|
||||
];
|
||||
|
||||
if (self::isList($resp)) {
|
||||
|
||||
Reference in New Issue
Block a user