Created
January 30, 2020 14:35
-
-
Save dmsysop/4a88cb1c03615fa210ba334aeb180453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function configure($token, $marketplace, $seller = null, $is_zend = null) | |
{ | |
$auth = array('token' => $token); | |
is_null($seller) ?: $auth += array('on_behalf_of' => $seller); | |
$configurations = [ | |
'marketplace' => $marketplace, | |
'gatway' => 'zoop', | |
'base_url' => 'https://api.zoop.ws', | |
'auth' => $auth, | |
'configurations' => [ | |
'limit' => 20, | |
'sort' => 'time-descending', | |
'offset' => 0, | |
'date_range' => null, | |
'date_range[gt]' => null, | |
'date_range[gte]' => null, | |
'date_range[lt]'=> null, | |
'date_range[lte]' => null, | |
'reference_id'=> null, | |
'status' => null, | |
'payment_type' => null, | |
], | |
'guzzle' => [ | |
'base_uri' => 'https://api.zoop.ws', | |
'timeout' => 10, | |
'headers' => [ | |
'Authorization' => 'Basic ' . \base64_encode($token . ':') | |
] | |
] | |
]; | |
return self::ClientHelper($configurations, $is_zend); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment