@@ -168,6 +168,9 @@ discard block |
||
168 | 168 | } |
169 | 169 | } |
170 | 170 | |
171 | + /** |
|
172 | + * @param integer $code |
|
173 | + */ |
|
171 | 174 | public function send_status( $code ) { |
172 | 175 | status_header( $code ); |
173 | 176 | } |
@@ -320,6 +323,10 @@ discard block |
||
320 | 323 | class WPInv_API_Exception extends Exception { |
321 | 324 | protected $error_code; |
322 | 325 | |
326 | + /** |
|
327 | + * @param string $error_code |
|
328 | + * @param integer $http_status_code |
|
329 | + */ |
|
323 | 330 | public function __construct( $error_code, $error_message, $http_status_code ) { |
324 | 331 | $this->error_code = $error_code; |
325 | 332 | parent::__construct( $error_message, $http_status_code ); |
@@ -82,6 +82,9 @@ discard block |
||
82 | 82 | return $value; |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param string $key |
|
87 | + */ |
|
85 | 88 | public function set( $key, $value ) { |
86 | 89 | $ignore = array( 'items', 'cart_details', 'fees', '_ID' ); |
87 | 90 | |
@@ -918,6 +921,9 @@ discard block |
||
918 | 921 | return $removed; |
919 | 922 | } |
920 | 923 | |
924 | + /** |
|
925 | + * @param string $key |
|
926 | + */ |
|
921 | 927 | public function remove_fee_by( $key, $value, $global = false ) { |
922 | 928 | $allowed_fee_keys = apply_filters( 'wpinv_fee_keys', array( |
923 | 929 | 'index', 'label', 'amount', 'type', |
@@ -1374,6 +1380,9 @@ discard block |
||
1374 | 1380 | return apply_filters( 'wpinv_get_invoice_final_total', $final_total, $this, $currency ); |
1375 | 1381 | } |
1376 | 1382 | |
1383 | + /** |
|
1384 | + * @return boolean |
|
1385 | + */ |
|
1377 | 1386 | public function get_discounts( $array = false ) { |
1378 | 1387 | $discounts = $this->discounts; |
1379 | 1388 | if ( $array && $discounts ) { |
@@ -1382,6 +1391,9 @@ discard block |
||
1382 | 1391 | return apply_filters( 'wpinv_payment_discounts', $discounts, $this->ID, $this, $array ); |
1383 | 1392 | } |
1384 | 1393 | |
1394 | + /** |
|
1395 | + * @return string |
|
1396 | + */ |
|
1385 | 1397 | public function get_discount( $currency = false, $dash = false ) { |
1386 | 1398 | if ( !empty( $this->discounts ) ) { |
1387 | 1399 | global $ajax_cart_details; |
@@ -1478,6 +1490,9 @@ discard block |
||
1478 | 1490 | return apply_filters( 'wpinv_user_full_name', $this->full_name, $this->ID, $this ); |
1479 | 1491 | } |
1480 | 1492 | |
1493 | + /** |
|
1494 | + * @return string |
|
1495 | + */ |
|
1481 | 1496 | public function get_user_info() { |
1482 | 1497 | return apply_filters( 'wpinv_user_info', $this->user_info, $this->ID, $this ); |
1483 | 1498 | } |
@@ -1524,10 +1539,16 @@ discard block |
||
1524 | 1539 | return apply_filters( 'wpinv_currency_code', $this->currency, $this->ID, $this ); |
1525 | 1540 | } |
1526 | 1541 | |
1542 | + /** |
|
1543 | + * @return string |
|
1544 | + */ |
|
1527 | 1545 | public function get_created_date() { |
1528 | 1546 | return apply_filters( 'wpinv_created_date', $this->date, $this->ID, $this ); |
1529 | 1547 | } |
1530 | 1548 | |
1549 | + /** |
|
1550 | + * @return string |
|
1551 | + */ |
|
1531 | 1552 | public function get_due_date( $display = false ) { |
1532 | 1553 | $due_date = apply_filters( 'wpinv_due_date', $this->due_date, $this->ID, $this ); |
1533 | 1554 | |
@@ -2075,6 +2096,9 @@ discard block |
||
2075 | 2096 | return apply_filters( 'wpinv_invoice_get_subscription_name', $name, $this ); |
2076 | 2097 | } |
2077 | 2098 | |
2099 | + /** |
|
2100 | + * @return string |
|
2101 | + */ |
|
2078 | 2102 | public function get_expiration() { |
2079 | 2103 | $expiration = $this->get_meta( '_wpinv_subscr_expiration', true ); |
2080 | 2104 | return $expiration; |
@@ -2090,6 +2114,9 @@ discard block |
||
2090 | 2114 | return $cancelled_date; |
2091 | 2115 | } |
2092 | 2116 | |
2117 | + /** |
|
2118 | + * @return string |
|
2119 | + */ |
|
2093 | 2120 | public function get_trial_end_date( $formatted = true ) { |
2094 | 2121 | if ( !$this->is_free_trial() || !$this->is_paid() ) { |
2095 | 2122 | return NULL; |
@@ -2111,6 +2138,9 @@ discard block |
||
2111 | 2138 | return $trial_end_date; |
2112 | 2139 | } |
2113 | 2140 | |
2141 | + /** |
|
2142 | + * @return string |
|
2143 | + */ |
|
2114 | 2144 | public function get_subscription_created( $default = true ) { |
2115 | 2145 | $created = $this->get_meta( '_wpinv_subscr_created', true ); |
2116 | 2146 | |
@@ -2120,6 +2150,9 @@ discard block |
||
2120 | 2150 | return $created; |
2121 | 2151 | } |
2122 | 2152 | |
2153 | + /** |
|
2154 | + * @return string |
|
2155 | + */ |
|
2123 | 2156 | public function get_subscription_start( $formatted = true ) { |
2124 | 2157 | if ( !$this->is_paid() ) { |
2125 | 2158 | return '-'; |
@@ -164,8 +164,7 @@ discard block |
||
164 | 164 | * @since 1.0.0 |
165 | 165 | * |
166 | 166 | * @param string|array $key Session key. |
167 | - * @param integer $value Session variable. |
|
168 | - * @return string Session variable. |
|
167 | + * @return boolean Session variable. |
|
169 | 168 | */ |
170 | 169 | public function un_set( $key ) { |
171 | 170 | if ( empty( $key ) ) { |
@@ -201,8 +200,7 @@ discard block |
||
201 | 200 | * @since 1.0.0 |
202 | 201 | * |
203 | 202 | * @param string $key Session key. |
204 | - * @param integer $value Session variable. |
|
205 | - * @return string Session variable. |
|
203 | + * @return boolean Session variable. |
|
206 | 204 | */ |
207 | 205 | public function is_set( $key ) { |
208 | 206 | $key = sanitize_key( $key ); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @param string $card_num The credit card number |
102 | 102 | * @param string $exp_date CC expiration date |
103 | 103 | * |
104 | - * @return AuthorizeNetAIM_Response |
|
104 | + * @return AuthorizeNetARB_Response |
|
105 | 105 | */ |
106 | 106 | public function authorizeAndCapture($amount = false, $card_num = false, $exp_date = false) |
107 | 107 | { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @param string $trans_id Transaction id to charge |
123 | 123 | * @param string $amount Dollar amount to charge if lesser than auth |
124 | 124 | * |
125 | - * @return AuthorizeNetAIM_Response |
|
125 | + * @return AuthorizeNetARB_Response |
|
126 | 126 | */ |
127 | 127 | public function priorAuthCapture($trans_id = false, $amount = false) |
128 | 128 | { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * @param string $card_num The credit card number |
142 | 142 | * @param string $exp_date CC expiration date |
143 | 143 | * |
144 | - * @return AuthorizeNetAIM_Response |
|
144 | + * @return AuthorizeNetARB_Response |
|
145 | 145 | */ |
146 | 146 | public function authorizeOnly($amount = false, $card_num = false, $exp_date = false) |
147 | 147 | { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * |
161 | 161 | * @param string $trans_id Transaction id to void |
162 | 162 | * |
163 | - * @return AuthorizeNetAIM_Response |
|
163 | + * @return AuthorizeNetARB_Response |
|
164 | 164 | */ |
165 | 165 | public function void($trans_id = false) |
166 | 166 | { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * @param string $card_num The last 4 of credit card number |
180 | 180 | * @param string $exp_date CC expiration date |
181 | 181 | * |
182 | - * @return AuthorizeNetAIM_Response |
|
182 | + * @return AuthorizeNetARB_Response |
|
183 | 183 | */ |
184 | 184 | public function captureOnly($auth_code = false, $amount = false, $card_num = false, $exp_date = false) |
185 | 185 | { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * @param string $amount The dollar amount to credit |
201 | 201 | * @param string $card_num The last 4 of credit card number |
202 | 202 | * |
203 | - * @return AuthorizeNetAIM_Response |
|
203 | + * @return AuthorizeNetARB_Response |
|
204 | 204 | */ |
205 | 205 | public function credit($trans_id = false, $amount = false, $card_num = false) |
206 | 206 | { |
@@ -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 | { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | * @param int $customerProfileId |
195 | 195 | * @param int $customerPaymentProfileId |
196 | 196 | * |
197 | - * @return AuthorizeNetCIM_Response |
|
197 | + * @return AuthorizeNetARB_Response |
|
198 | 198 | */ |
199 | 199 | public function getCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId) |
200 | 200 | { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @param int $customerProfileId |
211 | 211 | * @param int $customerAddressId |
212 | 212 | * |
213 | - * @return AuthorizeNetCIM_Response |
|
213 | + * @return AuthorizeNetARB_Response |
|
214 | 214 | */ |
215 | 215 | public function getCustomerShippingAddress($customerProfileId, $customerAddressId) |
216 | 216 | { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * @param int $customerProfileId |
227 | 227 | * @param AuthorizeNetCustomer $customerProfile |
228 | 228 | * |
229 | - * @return AuthorizeNetCIM_Response |
|
229 | + * @return AuthorizeNetARB_Response |
|
230 | 230 | */ |
231 | 231 | public function updateCustomerProfile($customerProfileId, $customerProfile) |
232 | 232 | { |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * @param AuthorizeNetPaymentProfile $paymentProfile |
246 | 246 | * @param string $validationMode |
247 | 247 | * |
248 | - * @return AuthorizeNetCIM_Response |
|
248 | + * @return AuthorizeNetARB_Response |
|
249 | 249 | */ |
250 | 250 | public function updateCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $paymentProfile, $validationMode = "none") |
251 | 251 | { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * @param int $customerShippingAddressId |
266 | 266 | * @param AuthorizeNetAddress $shippingAddress |
267 | 267 | * |
268 | - * @return AuthorizeNetCIM_Response |
|
268 | + * @return AuthorizeNetARB_Response |
|
269 | 269 | */ |
270 | 270 | public function updateCustomerShippingAddress($customerProfileId, $customerShippingAddressId, $shippingAddress) |
271 | 271 | { |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | * @param int $splitTenderId |
285 | 285 | * @param string $splitTenderStatus |
286 | 286 | * |
287 | - * @return AuthorizeNetCIM_Response |
|
287 | + * @return AuthorizeNetARB_Response |
|
288 | 288 | */ |
289 | 289 | public function updateSplitTenderGroup($splitTenderId, $splitTenderStatus) |
290 | 290 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | * @param int $cardCode |
304 | 304 | * @param string $validationMode |
305 | 305 | * |
306 | - * @return AuthorizeNetCIM_Response |
|
306 | + * @return AuthorizeNetARB_Response |
|
307 | 307 | */ |
308 | 308 | public function validateCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $customerShippingAddressId, $cardCode, $validationMode = "testMode") |
309 | 309 | { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | * |
80 | 80 | * @param string $response |
81 | 81 | * |
82 | - * @return AuthorizeNetAIM_Response |
|
82 | + * @return AuthorizeNetCP_Response |
|
83 | 83 | */ |
84 | 84 | protected function _handleResponse($response) |
85 | 85 | { |
@@ -28,6 +28,7 @@ |
||
28 | 28 | /** |
29 | 29 | * Get the post url. We need this because until 5.3 you |
30 | 30 | * you could not access child constants in a parent class. |
31 | + * @return string|null |
|
31 | 32 | */ |
32 | 33 | abstract protected function _getPostUrl(); |
33 | 34 |
@@ -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) |
@@ -69,6 +69,7 @@ discard block |
||
69 | 69 | * remove XML response namespaces |
70 | 70 | * without this php will spit out warinings |
71 | 71 | * @see http://community.developer.authorize.net/t5/Integration-and-Testing/ARB-with-SimpleXML-PHP-Issue/m-p/7128#M5139 |
72 | + * @return string |
|
72 | 73 | */ |
73 | 74 | private function removeResponseXMLNS($input) |
74 | 75 | { |
@@ -150,6 +151,9 @@ discard block |
||
150 | 151 | $this->process(); |
151 | 152 | } |
152 | 153 | |
154 | + /** |
|
155 | + * @param SimpleXMLElement $xml |
|
156 | + */ |
|
153 | 157 | private function setParameters($xml, $array) |
154 | 158 | { |
155 | 159 | if (is_array($array)) |