本文整理汇总了PHP中Braintree_Configuration::merchantPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Braintree_Configuration::merchantPath方法的具体用法?PHP Braintree_Configuration::merchantPath怎么用?PHP Braintree_Configuration::merchantPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Braintree_Configuration
的用法示例。
在下文中一共展示了Braintree_Configuration::merchantPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: all
/**
*
* @return Braintree_AddOn[]
*/
public function all()
{
$path = $this->_config->merchantPath() . '/add_ons';
$response = $this->_http->get($path);
$addOns = array("addOn" => $response['addOns']);
return Braintree_Util::extractAttributeAsArray($addOns, 'addOn');
}
示例2: generate
/**
*
* @param string $settlement_date
* @param string $groupByCustomField
* @return Braintree_SettlementBatchSummary|Braintree_Result_Error
*/
public function generate($settlement_date, $groupByCustomField = NULL)
{
$criteria = array('settlement_date' => $settlement_date);
if (isset($groupByCustomField)) {
$criteria['group_by_custom_field'] = $groupByCustomField;
}
$params = array('settlement_batch_summary' => $criteria);
$path = $this->_config->merchantPath() . '/settlement_batch_summary';
$response = $this->_http->post($path, $params);
if (isset($groupByCustomField)) {
$response['settlementBatchSummary']['records'] = $this->_underscoreCustomField($groupByCustomField, $response['settlementBatchSummary']['records']);
}
return $this->_verifyGatewayResponse($response);
}
示例3: testMerchantPath
function testMerchantPath()
{
Braintree_Configuration::merchantId('abc123');
$mp = Braintree_Configuration::merchantPath();
$this->assertEquals('/merchants/abc123', $mp);
Braintree_Configuration::reset();
}
示例4: _doGenerate
/**
* sends the generate request to the gateway
*
* @ignore
* @param var $url
* @param array $params
* @return mixed
*/
public function _doGenerate($subPath, $params)
{
$fullPath = $this->_config->merchantPath() . $subPath;
$response = $this->_http->post($fullPath, $params);
return $this->_verifyGatewayResponse($response);
}