public static function Braintree_Http::post in Commerce Braintree 7
16 calls to Braintree_Http::post()
- Braintree_AddOnTest::testAll_returnsAllAddOns in braintree_php/
tests/ integration/ AddOnsTest.php - Braintree_Address::_doCreate in braintree_php/
lib/ Braintree/ Address.php - sends the create request to the gateway @ignore
- Braintree_CreditCard::expired in braintree_php/
lib/ Braintree/ CreditCard.php - returns a ResourceCollection of expired credit cards
- Braintree_CreditCard::expiringBetween in braintree_php/
lib/ Braintree/ CreditCard.php - returns a ResourceCollection of credit cards expiring between start/end
- Braintree_CreditCard::fetchExpired in braintree_php/
lib/ Braintree/ CreditCard.php
File
- braintree_php/
lib/ Braintree/ Http.php, line 35
Class
- Braintree_Http
- processes Http requests using curl
Code
public static function post($path, $params = null) {
$response = self::_doRequest('POST', $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);
}
}