Skip to content

Instantly share code, notes, and snippets.

@dmsysop
Created January 30, 2020 14:35
Show Gist options
  • Save dmsysop/4a88cb1c03615fa210ba334aeb180453 to your computer and use it in GitHub Desktop.
Save dmsysop/4a88cb1c03615fa210ba334aeb180453 to your computer and use it in GitHub Desktop.
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