@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @param string $card_num The credit card number |
| 103 | 103 | * @param string $exp_date CC expiration date |
| 104 | 104 | * |
| 105 | - * @return AuthorizeNetAIM_Response |
|
| 105 | + * @return AuthorizeNetARB_Response |
|
| 106 | 106 | */ |
| 107 | 107 | public function authorizeAndCapture($amount = false, $card_num = false, $exp_date = false) |
| 108 | 108 | { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @param string $trans_id Transaction id to charge |
| 124 | 124 | * @param string $amount Dollar amount to charge if lesser than auth |
| 125 | 125 | * |
| 126 | - * @return AuthorizeNetAIM_Response |
|
| 126 | + * @return AuthorizeNetARB_Response |
|
| 127 | 127 | */ |
| 128 | 128 | public function priorAuthCapture($trans_id = false, $amount = false) |
| 129 | 129 | { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * @param string $card_num The credit card number |
| 143 | 143 | * @param string $exp_date CC expiration date |
| 144 | 144 | * |
| 145 | - * @return AuthorizeNetAIM_Response |
|
| 145 | + * @return AuthorizeNetARB_Response |
|
| 146 | 146 | */ |
| 147 | 147 | public function authorizeOnly($amount = false, $card_num = false, $exp_date = false) |
| 148 | 148 | { |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @param string $trans_id Transaction id to void |
| 163 | 163 | * |
| 164 | - * @return AuthorizeNetAIM_Response |
|
| 164 | + * @return AuthorizeNetARB_Response |
|
| 165 | 165 | */ |
| 166 | 166 | public function void($trans_id = false) |
| 167 | 167 | { |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @param string $card_num The last 4 of credit card number |
| 181 | 181 | * @param string $exp_date CC expiration date |
| 182 | 182 | * |
| 183 | - * @return AuthorizeNetAIM_Response |
|
| 183 | + * @return AuthorizeNetARB_Response |
|
| 184 | 184 | */ |
| 185 | 185 | public function captureOnly($auth_code = false, $amount = false, $card_num = false, $exp_date = false) |
| 186 | 186 | { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @param string $amount The dollar amount to credit |
| 202 | 202 | * @param string $card_num The last 4 of credit card number |
| 203 | 203 | * |
| 204 | - * @return AuthorizeNetAIM_Response |
|
| 204 | + * @return AuthorizeNetARB_Response |
|
| 205 | 205 | */ |
| 206 | 206 | public function credit($trans_id = false, $amount = false, $card_num = false) |
| 207 | 207 | { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | /** |
| 94 | 94 | * Create an ARB subscription |
| 95 | 95 | * |
| 96 | - * @param AuthorizeNet_Subscription $subscription |
|
| 96 | + * @param AuthorizeNet_Subscription $subscriptionList |
|
| 97 | 97 | * |
| 98 | 98 | * @return AuthorizeNetARB_Response |
| 99 | 99 | */ |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | { |
| 155 | 155 | |
| 156 | 156 | /** |
| 157 | - * @return int |
|
| 157 | + * @return false|string |
|
| 158 | 158 | */ |
| 159 | 159 | public function getSubscriptionId() |
| 160 | 160 | { |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * |
| 85 | 85 | * @param string $response |
| 86 | 86 | * |
| 87 | - * @return AuthorizeNetAIM_Response |
|
| 87 | + * @return AuthorizeNetCP_Response |
|
| 88 | 88 | */ |
| 89 | 89 | protected function _handleResponse($response) |
| 90 | 90 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace net\authorize\util; |
| 3 | 3 | |
| 4 | 4 | use net\authorize\util\LogFactory; |
| 5 | -use net\authorize\util\Log; |
|
| 6 | 5 | |
| 7 | 6 | /** |
| 8 | 7 | * A class to send a request to the XML API. |
@@ -4,6 +4,10 @@ |
||
| 4 | 4 | class LogFactory |
| 5 | 5 | { |
| 6 | 6 | private static $logger = NULL; |
| 7 | + |
|
| 8 | + /** |
|
| 9 | + * @param string $classType |
|
| 10 | + */ |
|
| 7 | 11 | public static function getLog($classType){ |
| 8 | 12 | if(NULL == self::$logger){ |
| 9 | 13 | self::$logger = new Log(); |
@@ -30,6 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * Get the post url. We need this because until 5.3 you |
| 32 | 32 | * you could not access child constants in a parent class. |
| 33 | + * @return string|null |
|
| 33 | 34 | */ |
| 34 | 35 | abstract protected function _getPostUrl(); |
| 35 | 36 | |
@@ -110,6 +110,7 @@ |
||
| 110 | 110 | * Grabs the contents of a unique element. |
| 111 | 111 | * |
| 112 | 112 | * @param string |
| 113 | + * @param string $elementName |
|
| 113 | 114 | * @return string |
| 114 | 115 | */ |
| 115 | 116 | protected function _getElementContents($elementName) |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param AuthorizeNetCustomer $customerProfile |
| 52 | 52 | * @param string $validationMode |
| 53 | 53 | * |
| 54 | - * @return AuthorizeNetCIM_Response |
|
| 54 | + * @return AuthorizeNetARB_Response |
|
| 55 | 55 | */ |
| 56 | 56 | public function createCustomerProfile($customerProfile, $validationMode = "none") |
| 57 | 57 | { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * @param AuthorizeNetPaymentProfile $paymentProfile |
| 70 | 70 | * @param string $validationMode |
| 71 | 71 | * |
| 72 | - * @return AuthorizeNetCIM_Response |
|
| 72 | + * @return AuthorizeNetARB_Response |
|
| 73 | 73 | */ |
| 74 | 74 | public function createCustomerPaymentProfile($customerProfileId, $paymentProfile, $validationMode = "none") |
| 75 | 75 | { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * @param int $customerProfileId |
| 88 | 88 | * @param AuthorizeNetAddress $shippingAddress |
| 89 | 89 | * |
| 90 | - * @return AuthorizeNetCIM_Response |
|
| 90 | + * @return AuthorizeNetARB_Response |
|
| 91 | 91 | */ |
| 92 | 92 | public function createCustomerShippingAddress($customerProfileId, $shippingAddress) |
| 93 | 93 | { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @param AuthorizeNetTransaction $transaction |
| 106 | 106 | * @param string $extraOptionsString |
| 107 | 107 | * |
| 108 | - * @return AuthorizeNetCIM_Response |
|
| 108 | + * @return AuthorizeNetARB_Response |
|
| 109 | 109 | */ |
| 110 | 110 | public function createCustomerProfileTransaction($transactionType, $transaction, $extraOptionsString = "") |
| 111 | 111 | { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * |
| 123 | 123 | * @param int $customerProfileId |
| 124 | 124 | * |
| 125 | - * @return AuthorizeNetCIM_Response |
|
| 125 | + * @return AuthorizeNetARB_Response |
|
| 126 | 126 | */ |
| 127 | 127 | public function deleteCustomerProfile($customerProfileId) |
| 128 | 128 | { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * @param int $customerProfileId |
| 138 | 138 | * @param int $customerPaymentProfileId |
| 139 | 139 | * |
| 140 | - * @return AuthorizeNetCIM_Response |
|
| 140 | + * @return AuthorizeNetARB_Response |
|
| 141 | 141 | */ |
| 142 | 142 | public function deleteCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId) |
| 143 | 143 | { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * @param int $customerProfileId |
| 154 | 154 | * @param int $customerAddressId |
| 155 | 155 | * |
| 156 | - * @return AuthorizeNetCIM_Response |
|
| 156 | + * @return AuthorizeNetARB_Response |
|
| 157 | 157 | */ |
| 158 | 158 | public function deleteCustomerShippingAddress($customerProfileId, $customerAddressId) |
| 159 | 159 | { |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | /** |
| 167 | 167 | * Get all customer profile ids. |
| 168 | 168 | * |
| 169 | - * @return AuthorizeNetCIM_Response |
|
| 169 | + * @return AuthorizeNetARB_Response |
|
| 170 | 170 | */ |
| 171 | 171 | public function getCustomerProfileIds() |
| 172 | 172 | { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * |
| 180 | 180 | * @param int $customerProfileId |
| 181 | 181 | * |
| 182 | - * @return AuthorizeNetCIM_Response |
|
| 182 | + * @return AuthorizeNetARB_Response |
|
| 183 | 183 | */ |
| 184 | 184 | public function getCustomerProfile($customerProfileId) |
| 185 | 185 | { |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * @param int $customerPaymentProfileId |
| 196 | 196 | * @param boolean $unmaskExpirationDate |
| 197 | 197 | * |
| 198 | - * @return AuthorizeNetCIM_Response |
|
| 198 | + * @return AuthorizeNetARB_Response |
|
| 199 | 199 | */ |
| 200 | 200 | public function getCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $unmaskExpirationDate = false) |
| 201 | 201 | { |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * @param int $customerProfileId |
| 216 | 216 | * @param int $customerAddressId |
| 217 | 217 | * |
| 218 | - * @return AuthorizeNetCIM_Response |
|
| 218 | + * @return AuthorizeNetARB_Response |
|
| 219 | 219 | */ |
| 220 | 220 | public function getCustomerShippingAddress($customerProfileId, $customerAddressId) |
| 221 | 221 | { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | * @param int $customerProfileId |
| 232 | 232 | * @param AuthorizeNetCustomer $customerProfile |
| 233 | 233 | * |
| 234 | - * @return AuthorizeNetCIM_Response |
|
| 234 | + * @return AuthorizeNetARB_Response |
|
| 235 | 235 | */ |
| 236 | 236 | public function updateCustomerProfile($customerProfileId, $customerProfile) |
| 237 | 237 | { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | * @param AuthorizeNetPaymentProfile $paymentProfile |
| 251 | 251 | * @param string $validationMode |
| 252 | 252 | * |
| 253 | - * @return AuthorizeNetCIM_Response |
|
| 253 | + * @return AuthorizeNetARB_Response |
|
| 254 | 254 | */ |
| 255 | 255 | public function updateCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $paymentProfile, $validationMode = "none") |
| 256 | 256 | { |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | * @param int $customerShippingAddressId |
| 271 | 271 | * @param AuthorizeNetAddress $shippingAddress |
| 272 | 272 | * |
| 273 | - * @return AuthorizeNetCIM_Response |
|
| 273 | + * @return AuthorizeNetARB_Response |
|
| 274 | 274 | */ |
| 275 | 275 | public function updateCustomerShippingAddress($customerProfileId, $customerShippingAddressId, $shippingAddress) |
| 276 | 276 | { |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | * @param int $splitTenderId |
| 290 | 290 | * @param string $splitTenderStatus |
| 291 | 291 | * |
| 292 | - * @return AuthorizeNetCIM_Response |
|
| 292 | + * @return AuthorizeNetARB_Response |
|
| 293 | 293 | */ |
| 294 | 294 | public function updateSplitTenderGroup($splitTenderId, $splitTenderStatus) |
| 295 | 295 | { |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | * @param int $cardCode |
| 309 | 309 | * @param string $validationMode |
| 310 | 310 | * |
| 311 | - * @return AuthorizeNetCIM_Response |
|
| 311 | + * @return AuthorizeNetARB_Response |
|
| 312 | 312 | */ |
| 313 | 313 | public function validateCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $customerShippingAddressId, $cardCode, $validationMode = "testMode") |
| 314 | 314 | { |
@@ -325,9 +325,9 @@ discard block |
||
| 325 | 325 | * Get hosted profile page request token |
| 326 | 326 | * |
| 327 | 327 | * @param string $customerProfileId |
| 328 | - * @param mixed $settings |
|
| 328 | + * @param integer $settings |
|
| 329 | 329 | * |
| 330 | - * @return AuthorizeNetCIM_Response |
|
| 330 | + * @return AuthorizeNetARB_Response |
|
| 331 | 331 | */ |
| 332 | 332 | public function getHostedProfilePageRequest($customerProfileId, $settings=0) |
| 333 | 333 | { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * iteratively fetches the properties of the object (including from the base classes up the hierarchy), ... |
| 114 | 114 | * collects them in an array of ReflectionProperty and returns the array. |
| 115 | 115 | * |
| 116 | - * @param ReflectionObject $reflClass |
|
| 116 | + * @param \ReflectionObject $reflClass |
|
| 117 | 117 | * |
| 118 | 118 | * @return \ReflectionProperty[] |
| 119 | 119 | */ |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * Receives a ReflectionProperty and an object, and returns a masked object if the ReflectionProperty corresponds to a sensitive field, else returns false. |
| 139 | 139 | * |
| 140 | - * @param ReflectionProperty $prop |
|
| 140 | + * @param \ReflectionProperty $prop |
|
| 141 | 141 | * @param object $obj |
| 142 | 142 | * |
| 143 | 143 | * @return string|bool |
@@ -269,6 +269,9 @@ discard block |
||
| 269 | 269 | file_put_contents($this->logFile, $logString, $flags); |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | + /** |
|
| 273 | + * @param string $logMessage |
|
| 274 | + */ |
|
| 272 | 275 | public function debug($logMessage, $flags=FILE_APPEND) |
| 273 | 276 | { |
| 274 | 277 | if(ANET_LOG_DEBUG >= $this->logLevel){ |
@@ -294,6 +297,9 @@ discard block |
||
| 294 | 297 | } |
| 295 | 298 | } |
| 296 | 299 | |
| 300 | + /** |
|
| 301 | + * @param string $logLevelPrefix |
|
| 302 | + */ |
|
| 297 | 303 | private function logFormat($logLevelPrefix, $format, $objects, $flags){ |
| 298 | 304 | try { |
| 299 | 305 | foreach($objects as $i => $testObject){ |