public static function Braintree_Http::put in Commerce Braintree 7
12 calls to Braintree_Http::put()
- Braintree_Address::update in braintree_php/
lib/ Braintree/ Address.php - updates the address record
- Braintree_Subscription::cancel in braintree_php/
lib/ Braintree/ Subscription.php - Braintree_Subscription::update in braintree_php/
lib/ Braintree/ Subscription.php - Braintree_SubscriptionSearchTest::testSearch_daysPastDue in braintree_php/
tests/ integration/ SubscriptionSearchTest.php - Braintree_SubscriptionTest::testRetryCharge_WithAmount in braintree_php/
tests/ integration/ SubscriptionTest.php
File
- braintree_php/
lib/ Braintree/ Http.php, line 46
Class
- Braintree_Http
- processes Http requests using curl
Code
public static function put($path, $params = null) {
$response = self::_doRequest('PUT', $path, self::_buildXml($params));
$responseCode = $response['status'];
if ($responseCode === 200 || $responseCode === 201 || $responseCode === 422) {
return Braintree_Xml::buildArrayFromXml($response['body']);
}
else {
Braintree_Util::throwStatusCodeException($responseCode);
}
}