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


PHP Braintree_Util::verifyKeys方法代码示例

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


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

示例1: update

 public function update($subscriptionId, $attributes)
 {
     Braintree_Util::verifyKeys(self::_updateSignature(), $attributes);
     $path = $this->_config->merchantPath() . '/subscriptions/' . $subscriptionId;
     $response = $this->_http->put($path, array('subscription' => $attributes));
     return $this->_verifyGatewayResponse($response);
 }
开发者ID:portchris,项目名称:NaturalRemedyCompany,代码行数:7,代码来源:SubscriptionGateway.php

示例2: conditionallyVerifyKeys

 public function conditionallyVerifyKeys($params)
 {
     if (array_key_exists("customerId", $params)) {
         Braintree_Util::verifyKeys($this->generateWithCustomerIdSignature(), $params);
     } else {
         Braintree_Util::verifyKeys($this->generateWithoutCustomerIdSignature(), $params);
     }
 }
开发者ID:beevo,项目名称:disruptivestrong,代码行数:8,代码来源:ClientTokenGateway.php

示例3: testVerifyKeys

 function testVerifyKeys()
 {
     $signature = array('amount', 'customerId', 'orderId', 'paymentMethodToken', 'type', array('creditCard' => array('token', 'cvv', 'expirationDate', 'number')), array('customer' => array('id', 'company', 'email', 'fax', 'firstName', 'lastName', 'phone', 'website')), array('billing' => array('firstName', 'lastName', 'company', 'countryName', 'extendedAddress', 'locality', 'postalCode', 'region', 'streetAddress')), array('shipping' => array('firstName', 'lastName', 'company', 'countryName', 'extendedAddress', 'locality', 'postalCode', 'region', 'streetAddress')), array('options' => array('storeInVault', 'submitForSettlement', 'addBillingAddressToPaymentMethod')), array('customFields' => array('_anyKey_')));
     // test valid
     $userKeys = array('amount' => '100.00', 'customFields' => array('HEY' => 'HO', 'WAY' => 'NO'), 'creditCard' => array('number' => '5105105105105100', 'expirationDate' => '05/12'));
     $n = Braintree_Util::verifyKeys($signature, $userKeys);
     $this->assertNull($n);
     $userKeys = array('amount' => '100.00', 'customFields' => array('HEY' => 'HO', 'WAY' => 'NO'), 'bogus' => 'FAKE', 'totallyFake' => 'boom', 'creditCard' => array('number' => '5105105105105100', 'expirationDate' => '05/12'));
     // test invalid
     $this->setExpectedException('InvalidArgumentException');
     Braintree_Util::verifyKeys($signature, $userKeys);
 }
开发者ID:kingsolmn,项目名称:CakePHP-Braintree-Plugin,代码行数:12,代码来源:UtilTest.php

示例4: update

 public function update($token, $attribs)
 {
     Braintree_Util::verifyKeys(self::updateSignature(), $attribs);
     return $this->_doUpdate('/payment_methods/any/' . $token, array('payment_method' => $attribs));
 }
开发者ID:oscarsmartwave,项目名称:l45fbl45t,代码行数:5,代码来源:PaymentMethodGateway.php

示例5: create

 /**
  * @ignore
  * @access public
  * @param array $attribs
  * @return object
  */
 private static function create($attribs)
 {
     Braintree_Util::verifyKeys(self::createSignature(), $attribs);
     return self::_doCreate('/transactions', array('transaction' => $attribs));
 }
开发者ID:anmolview,项目名称:yiidemos,代码行数:11,代码来源:Transaction.php

示例6: update

 /**
  * updates the creditcard record
  *
  * if calling this method in static context, $token
  * is the 2nd attribute. $token is not sent in object context.
  *
  * @access public
  * @param array $attributes
  * @param string $token (optional)
  * @return object Braintree_Result_Successful or Braintree_Result_Error
  */
 public static function update($token, $attributes)
 {
     Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
     self::_validateId($token);
     return self::_doUpdate('put', '/payment_methods/' . $token, array('creditCard' => $attributes));
 }
开发者ID:anmolview,项目名称:yiidemos,代码行数:17,代码来源:CreditCard.php

示例7: update

 /**
  * updates the customer record
  *
  * if calling this method in static context, customerId
  * is the 2nd attribute. customerId is not sent in object context.
  *
  * @access public
  * @param array $attributes
  * @param string $customerId (optional)
  * @return object Braintree_Result_Successful or Braintree_Result_Error
  */
 public function update($customerId, $attributes)
 {
     Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
     $this->_validateId($customerId);
     return $this->_doUpdate('put', '/customers/' . $customerId, array('customer' => $attributes));
 }
开发者ID:beevo,项目名称:disruptivestrong,代码行数:17,代码来源:CustomerGateway.php

示例8: update

 /**
  * updates the address record
  *
  * if calling this method in context,
  * customerOrId is the 2nd attribute, addressId 3rd.
  * customerOrId & addressId are not sent in object context.
  *
  *
  * @access public
  * @param array $attributes
  * @param mixed $customerOrId (only used in call)
  * @param string $addressId (only used in call)
  * @return object Braintree_Result_Successful or Braintree_Result_Error
  */
 public function update($customerOrId, $addressId, $attributes)
 {
     $this->_validateId($addressId);
     $customerId = $this->_determineCustomerId($customerOrId);
     Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
     $path = $this->_config->merchantPath() . '/customers/' . $customerId . '/addresses/' . $addressId;
     $response = $this->_http->put($path, array('address' => $attributes));
     return $this->_verifyGatewayResponse($response);
 }
开发者ID:beevo,项目名称:disruptivestrong,代码行数:23,代码来源:AddressGateway.php

示例9: update

 public static function update($merchant_account_id, $attributes)
 {
     Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
     return self::_doUpdate('/merchant_accounts/' . $merchant_account_id . '/update_via_api', array('merchant_account' => $attributes));
 }
开发者ID:bobstermyang,项目名称:communityfoodshare,代码行数:5,代码来源:MerchantAccount.php

示例10: update

 /**
  * updates the address record
  *
  * if calling this method in static context,
  * customerOrId is the 2nd attribute, addressId 3rd.
  * customerOrId & addressId are not sent in object context.
  *
  *
  * @access public
  * @param array $attributes
  * @param mixed $customerOrId (only used in static call)
  * @param string $addressId (only used in static call)
  * @return object Braintree_Result_Successful or Braintree_Result_Error
  */
 public static function update($customerOrId, $addressId, $attributes)
 {
     self::_validateId($addressId);
     $customerId = self::_determineCustomerId($customerOrId);
     Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
     $response = Braintree_Http::put('/customers/' . $customerId . '/addresses/' . $addressId, array('address' => $attributes));
     return self::_verifyGatewayResponse($response);
 }
开发者ID:agency2016,项目名称:rothy_cloudynote,代码行数:22,代码来源:Address.php

示例11: update

 public static function update($subscriptionId, $attributes)
 {
     Braintree_Util::verifyKeys(self::_updateSignature(), $attributes);
     $response = Braintree_Http::put('/subscriptions/' . $subscriptionId, array('subscription' => $attributes));
     return self::_verifyGatewayResponse($response);
 }
开发者ID:agency2016,项目名称:rothy_cloudynote,代码行数:6,代码来源:Subscription.php

示例12: updateCustomerData

 /**
  * Returns the trData string for updating a customer.
  *
  *  The customerId of the customer to update is required.
  *
  * <code>
  * $trData = Braintree_TransparentRedirect::updateCustomerData(array(
  *     'redirectUrl' => 'http://example.com/redirect_here',
  *     'customerId' => 'customer123',
  *   ));
  * </code>
  *
  * @param array $params
  * @return string
  */
 public function updateCustomerData($params)
 {
     Braintree_Util::verifyKeys(self::$_updateCustomerSignature, $params);
     if (!isset($params['customerId'])) {
         throw new InvalidArgumentException('expected params to contain customerId of customer to update');
     }
     $params["kind"] = Braintree_TransparentRedirect::UPDATE_CUSTOMER;
     return $this->_data($params);
 }
开发者ID:buga1234,项目名称:buga_segforours,代码行数:24,代码来源:TransparentRedirectGateway.php

示例13: update

 /**
  * updates the paypalAccount record
  *
  * if calling this method in context, $token
  * is the 2nd attribute. $token is not sent in object context.
  *
  * @access public
  * @param array $attributes
  * @param string $token (optional)
  * @return object Braintree_Result_Successful or Braintree_Result_Error
  */
 public function update($token, $attributes)
 {
     Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
     $this->_validateId($token);
     return $this->_doUpdate('put', '/payment_methods/paypal_account/' . $token, array('paypalAccount' => $attributes));
 }
开发者ID:buga1234,项目名称:buga_segforours,代码行数:17,代码来源:PayPalAccountGateway.php

示例14: create

 public static function create($attribs)
 {
     Braintree_Util::verifyKeys(self::createSignature(), $attribs);
     return self::_doCreate('/payment_methods', array('payment_method' => $attribs));
 }
开发者ID:cantuket,项目名称:medical-co,代码行数:5,代码来源:PaymentMethod.php


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