当前位置: 首页>>代码示例>>PHP>>正文


PHP Braintree_Configuration::merchantUrl方法代码示例

本文整理汇总了PHP中Braintree_Configuration::merchantUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Braintree_Configuration::merchantUrl方法的具体用法?PHP Braintree_Configuration::merchantUrl怎么用?PHP Braintree_Configuration::merchantUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Braintree_Configuration的用法示例。


在下文中一共展示了Braintree_Configuration::merchantUrl方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _doRequest

 private static function _doRequest($httpVerb, $path, $requestBody = null)
 {
     $curl = curl_init();
     curl_setopt($curl, CURLOPT_TIMEOUT, 60);
     curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpVerb);
     curl_setopt($curl, CURLOPT_URL, Braintree_Configuration::merchantUrl() . $path);
     curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/xml', 'Content-Type: application/xml', 'User-Agent: Braintree PHP Library ' . Braintree_Version::get(), 'X-ApiVersion: ' . Braintree_Configuration::API_VERSION));
     curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
     curl_setopt($curl, CURLOPT_USERPWD, Braintree_Configuration::publicKey() . ':' . Braintree_Configuration::privateKey());
     // curl_setopt($curl, CURLOPT_VERBOSE, true);
     if (Braintree_Configuration::sslOn()) {
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
         curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
         curl_setopt($curl, CURLOPT_CAINFO, Braintree_Configuration::caFile());
     }
     if (!empty($requestBody)) {
         curl_setopt($curl, CURLOPT_POSTFIELDS, $requestBody);
     }
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
     $response = curl_exec($curl);
     $httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE);
     curl_close($curl);
     if (Braintree_Configuration::sslOn()) {
         if ($httpStatus == 0) {
             throw new Braintree_Exception_SSLCertificate();
         }
     }
     return array('status' => $httpStatus, 'body' => $response);
 }
开发者ID:kingsolmn,项目名称:CakePHP-Braintree-Plugin,代码行数:29,代码来源:Http.php

示例2: testParseAndValidateQueryString_throwsDownForMaintenanceErrorIfDownForMaintenance

 function testParseAndValidateQueryString_throwsDownForMaintenanceErrorIfDownForMaintenance()
 {
     Braintree_TestHelper::suppressDeprecationWarnings();
     $trData = Braintree_TransparentRedirect::createCustomerData(array("redirectUrl" => "http://www.example.com"));
     $queryString = Braintree_TestHelper::submitTrRequest(Braintree_Configuration::merchantUrl() . '/test/maintenance', array(), $trData);
     $this->setExpectedException('Braintree_Exception_DownForMaintenance');
     Braintree_Customer::createFromTransparentRedirect($queryString);
 }
开发者ID:kingsolmn,项目名称:CakePHP-Braintree-Plugin,代码行数:8,代码来源:TransparentRedirectTest.php

示例3: createTransactionUrl

 /**
  *
  * @access public
  * @param none
  * @return string
  */
 public static function createTransactionUrl()
 {
     trigger_error("DEPRECATED: Please use Braintree_TransparentRedirectRequest::url", E_USER_NOTICE);
     return Braintree_Configuration::merchantUrl() . '/transactions/all/create_via_transparent_redirect_request';
 }
开发者ID:anmolview,项目名称:yiidemos,代码行数:11,代码来源:Transaction.php

示例4: _doRequest

 private static function _doRequest($httpVerb, $path, $requestBody = null)
 {
     return self::_doUrlRequest($httpVerb, Braintree_Configuration::merchantUrl() . $path, $requestBody);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:Http.php

示例5: updateCreditCardUrl

 /**
  *
  * @access public
  * @param none
  * @return string
  */
 public static function updateCreditCardUrl()
 {
     trigger_error("DEPRECATED: Please use Braintree_TransparentRedirectRequest::url", E_USER_NOTICE);
     return Braintree_Configuration::merchantUrl() . '/payment_methods/all/update_via_transparent_redirect_request';
 }
开发者ID:anmolview,项目名称:yiidemos,代码行数:11,代码来源:CreditCard.php

示例6: testmerchantUrl

 function testmerchantUrl()
 {
     Braintree_Configuration::merchantId('abc123');
     Braintree_Configuration::environment('sandbox');
     $mu = Braintree_Configuration::merchantUrl();
     $this->assertEquals('https://sandbox.braintreegateway.com:443/merchants/abc123', $mu);
     Braintree_Configuration::reset();
 }
开发者ID:kingsolmn,项目名称:CakePHP-Braintree-Plugin,代码行数:8,代码来源:ConfigurationTest.php

示例7: url

 public static function url()
 {
     return Braintree_Configuration::merchantUrl() . "/transparent_redirect_requests";
 }
开发者ID:anmolview,项目名称:yiidemos,代码行数:4,代码来源:TransparentRedirect.php


注:本文中的Braintree_Configuration::merchantUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。