PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 3.14.0
GiveWP – Donation Plugin and Fundraising Platform v3.14.0
4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / src / PaymentGateways / PayPalCommerce / PayPalCheckoutSdk / ProcessorResponseError.php
give / src / PaymentGateways / PayPalCommerce / PayPalCheckoutSdk Last commit date
Requests 2 years ago AccessToken.php 3 years ago AuthorizationInjector.php 2 years ago PayPalHttpClient.php 2 years ago ProcessorResponseError.php 2 years ago
ProcessorResponseError.php
395 lines
1 <?php
2
3 namespace Give\PaymentGateways\PayPalCommerce\PayPalCheckoutSdk;
4
5 /**
6 * Class ErrorCodes
7 *
8 * Source of errors
9 * - https://developer.paypal.com/docs/api/orders/v2/#definition-processor_response
10 *
11 * @since 3.2.0
12 */
13 class ProcessorResponseError
14 {
15 /**
16 * This function decode the error code from PayPal.
17 * @since 3.2.0
18 * @param \stdClass $processorResponse
19 */
20 public static function getError(\stdClass $processorResponse): string
21 {
22 $errors = [];
23 $self = new self();
24
25 $avsCode = $processorResponse->avs_code ?? '';
26 $cvvCode = $processorResponse->cvv_code ?? '';
27 $responseCode = $processorResponse->response_code ?? '';
28 $paymentAdviceCode = $processorResponse->payment_advice_code ?? '';
29
30 $errorCode = [
31 'avsCode' => $self->avsCode(),
32 'cvvCode' => $self->cvvCode(),
33 'responseCode' => $self->responseCode(),
34 'paymentAdviceCode' => $self->paymentAdviceCode(),
35 ];
36
37 if (
38 property_exists($processorResponse, 'avs_code')
39 && array_key_exists($avsCode, $errorCode['avsCode'])
40 ) {
41 $errors[] = $errorCode['avsCode'][$avsCode];
42 }
43
44 if (
45 property_exists($processorResponse, 'cvv_code')
46 && array_key_exists($cvvCode, $errorCode['cvvCode'])
47 ) {
48 $errors[] = $errorCode['cvvCode'][$avsCode];
49 }
50
51 if (
52 property_exists($processorResponse, 'response_code')
53 && array_key_exists($responseCode, $errorCode['responseCode'])
54 ) {
55 $errors[] = $errorCode['responseCode'][$responseCode];
56 }
57
58 if (
59 property_exists($processorResponse, 'payment_advice_code')
60 && array_key_exists($paymentAdviceCode, $errorCode['paymentAdviceCode'])
61 ) {
62 $errors[] = $errorCode['paymentAdviceCode'][$paymentAdviceCode];
63 }
64
65 return implode(' ', $errors);
66 }
67
68 /**
69 * @since 3.2.0
70 */
71 private function avsCode(): array
72 {
73 return [
74 '0' => esc_html__('For Maestro, all address information matches.', 'give'),
75 '1' => esc_html__('For Maestro, none of the address information matches.', 'give'),
76 '2' => esc_html__('For Maestro, part of the address information matches.', 'give'),
77 '3' => esc_html__(
78 'For Maestro, the merchant did not provide AVS information. It was not processed.',
79 'give'
80 ),
81 '4' => esc_html__(
82 'For Maestro, the address was not checked or the acquirer had no response. The service is not available.',
83 'give'
84 ),
85 'A' => esc_html__(
86 'For Visa, Mastercard, or Discover transactions, the address matches but the zip code does not match. For American Express transactions, the card holder address is correct.',
87 'give'
88 ),
89 'B' => esc_html__(
90 'For Visa, Mastercard, or Discover transactions, the address matches. International A.',
91 'give'
92 ),
93 'C' => esc_html__(
94 'For Visa, Mastercard, or Discover transactions, no values match. International N.',
95 'give'
96 ),
97 'D' => esc_html__(
98 'For Visa, Mastercard, or Discover transactions, the address and postal code match. International X.',
99 'give'
100 ),
101 'E' => esc_html__(
102 'For Visa, Mastercard, or Discover transactions, not allowed for Internet or phone transactions. For American Express card holder, the name is incorrect but the address and postal code match.',
103 'give'
104 ),
105 'F' => esc_html__(
106 'For Visa, Mastercard, or Discover transactions, the address and postal code match. UK-specific X. For American Express card holder, the name is incorrect but the address matches.',
107 'give'
108 ),
109 'G' => esc_html__(
110 'For Visa, Mastercard, or Discover transactions, global is unavailable. Nothing matches.',
111 'give'
112 ),
113 'I' => esc_html__(
114 'For Visa, Mastercard, or Discover transactions, international is unavailable. Not applicable.',
115 'give'
116 ),
117 'M' => esc_html__(
118 'For Visa, Mastercard, or Discover transactions, the address and postal code match. For American Express card holder, the name, address, and postal code match.',
119 'give'
120 ),
121 'N' => esc_html__(
122 'For Visa, Mastercard, or Discover transactions, nothing matches. For American Express card holder, the address and postal code are both incorrect.',
123 'give'
124 ),
125 'P' => esc_html__(
126 'For Visa, Mastercard, or Discover transactions, postal international Z. Postal code only.',
127 'give'
128 ),
129 'R' => esc_html__(
130 'For Visa, Mastercard, or Discover transactions, re-try the request. For American Express, the system is unavailable.',
131 'give'
132 ),
133 'S' => esc_html__(
134 'For Visa, Mastercard, Discover, or American Express, the service is not supported.',
135 'give'
136 ),
137 'U' => esc_html__(
138 'For Visa, Mastercard, or Discover transactions, the service is unavailable. For American Express, information is not available. For Maestro, the address is not checked or the acquirer had no response. The service is not available.',
139 'give'
140 ),
141 'W' => esc_html__(
142 'For Visa, Mastercard, or Discover transactions, whole ZIP code. For American Express, the card holder name, address, and postal code are all incorrect.',
143 'give'
144 ),
145 'X' => esc_html__(
146 'For Visa, Mastercard, or Discover transactions, exact match of the address and the nine-digit ZIP code. For American Express, the card holder name, address, and postal code are all incorrect.',
147 'give'
148 ),
149 'Y' => esc_html__(
150 'For Visa, Mastercard, or Discover transactions, the address and five-digit ZIP code match. For American Express, the card holder address and postal code are both correct.',
151 'give'
152 ),
153 'Z' => esc_html__(
154 'For Visa, Mastercard, or Discover transactions, the five - digit ZIP code matches but no address . for American Express, only the card holder postal code is correct.',
155 'give'
156 ),
157 'Null' => esc_html__('For Maestro, no AVS response was obtained .', 'give')
158 ];
159 }
160
161 private function cvvCode(): array
162 {
163 return [
164 '0' => esc_html__('For Maestro, the CVV2 matched.', 'give'),
165 '1' => esc_html__('For Maestro, the CVV2 did not match.', 'give'),
166 '2' => esc_html__('For Maestro, the merchant has not implemented CVV2 code handling.', 'give'),
167 '3' => esc_html__('For Maestro, the merchant has indicated that CVV2 is not present on card.', 'give'),
168 '4' => esc_html__('For Maestro, the service is not available.', 'give'),
169 'E' => esc_html__(
170 'For Visa, Mastercard, Discover, or American Express, error - unrecognized or unknown response.',
171 'give'
172 ),
173 'I' => esc_html__('For Visa, Mastercard, Discover, or American Express, invalid or null.', 'give'),
174 'M' => esc_html__('For Visa, Mastercard, Discover, or American Express, the CVV2/CSC matches.', 'give'),
175 'N' => esc_html__(
176 'For Visa, Mastercard, Discover, or American Express, the CVV2/CSC does not match.',
177 'give'
178 ),
179 'P' => esc_html__('For Visa, Mastercard, Discover, or American Express, it was not processed.', 'give'),
180 'S' => esc_html__(
181 'For Visa, Mastercard, Discover, or American Express, the service is not supported.',
182 'give'
183 ),
184 'U' => esc_html__(
185 'For Visa, Mastercard, Discover, or American Express, unknown - the issuer is not certified.',
186 'give'
187 ),
188 'X' => esc_html__(
189 'For Visa, Mastercard, Discover, or American Express, no response. For Maestro, the service is not available.',
190 'give'
191 ),
192 ];
193 }
194
195 /**
196 * @since 3.2.0
197 */
198 private function responseCode(): array
199 {
200 return [
201 '100' => esc_html__('PARTIAL_AUTHORIZATION.', 'give'),
202 '130' => esc_html__('INVALID_DATA_FORMAT.', 'give'),
203 '1310' => esc_html__('INVALID_AMOUNT.', 'give'),
204 '1312' => esc_html__('INVALID_TRANSACTION_CARD_ISSUER_ACQUIRER.', 'give'),
205 '1317' => esc_html__('INVALID_CAPTURE_DATE.', 'give'),
206 '1320' => esc_html__('INVALID_CURRENCY_CODE.', 'give'),
207 '1330' => esc_html__('INVALID_ACCOUNT.', 'give'),
208 '1335' => esc_html__('INVALID_ACCOUNT_RECURRING.', 'give'),
209 '1340' => esc_html__('INVALID_TERMINAL.', 'give'),
210 '1350' => esc_html__('INVALID_MERCHANT.', 'give'),
211 '1352' => esc_html__('RESTRICTED_OR_INACTIVE_ACCOUNT.', 'give'),
212 '1360' => esc_html__('BAD_PROCESSING_CODE.', 'give'),
213 '1370' => esc_html__('INVALID_MCC.', 'give'),
214 '1380' => esc_html__('INVALID_EXPIRATION.', 'give'),
215 '1382' => esc_html__('INVALID_CARD_VERIFICATION_VALUE.', 'give'),
216 '1384' => esc_html__('INVALID_LIFE_CYCLE_OF_TRANSACTION.', 'give'),
217 '1390' => esc_html__('INVALID_ORDER.', 'give'),
218 '1393' => esc_html__('TRANSACTION_CANNOT_BE_COMPLETED.', 'give'),
219 '5100' => esc_html__('GENERIC_DECLINE.', 'give'),
220 '5110' => esc_html__('CVV2_FAILURE.', 'give'),
221 '5120' => esc_html__('INSUFFICIENT_FUNDS.', 'give'),
222 '5130' => esc_html__('INVALID_PIN.', 'give'),
223 '5135' => esc_html__('DECLINED_PIN_TRY_EXCEEDED.', 'give'),
224 '5140' => esc_html__('CARD_CLOSED.', 'give'),
225 '5150' => esc_html__(
226 'PICKUP_CARD_SPECIAL_CONDITIONS. try using another card. Do not retry the same card.',
227 'give'
228 ),
229 '5160' => esc_html__('UNAUTHORIZED_USER.', 'give'),
230 '5170' => esc_html__('AVS_FAILURE.', 'give'),
231 '5180' => esc_html__(
232 'INVALID_OR_RESTRICTED_CARD. try using another card. Do not retry the same card.',
233 'give'
234 ),
235 '5190' => esc_html__('SOFT_AVS.', 'give'),
236 '5200' => esc_html__('DUPLICATE_TRANSACTION.', 'give'),
237 '5210' => esc_html__('INVALID_TRANSACTION.', 'give'),
238 '5400' => esc_html__('EXPIRED_CARD.', 'give'),
239 '5500' => esc_html__('INCORRECT_PIN_REENTER.', 'give'),
240 '5650' => esc_html__('DECLINED_SCA_REQUIRED.', 'give'),
241 '5700' => esc_html__('TRANSACTION_NOT_PERMITTED. Outside of scope of accepted business.', 'give'),
242 '5710' => esc_html__('TX_ATTEMPTS_EXCEED_LIMIT.', 'give'),
243 '5800' => esc_html__('REVERSAL_REJECTED.', 'give'),
244 '5900' => esc_html__('INVALID_ISSUE.', 'give'),
245 '5910' => esc_html__('ISSUER_NOT_AVAILABLE_NOT_RETRIABLE.', 'give'),
246 '5920' => esc_html__('ISSUER_NOT_AVAILABLE_RETRIABLE.', 'give'),
247 '5930' => esc_html__('CARD_NOT_ACTIVATED.', 'give'),
248 '5950' => esc_html__(
249 'DECLINED_DUE_TO_UPDATED_ACCOUNT. External decline as an updated card has been issued.',
250 'give'
251 ),
252 '6300' => esc_html__('ACCOUNT_NOT_ON_FILE.', 'give'),
253 '7600' => esc_html__('APPROVED_NON_CAPTURE.', 'give'),
254 '7700' => esc_html__('ERROR_3DS.', 'give'),
255 '7710' => esc_html__('AUTHENTICATION_FAILED.', 'give'),
256 '7800' => esc_html__('BIN_ERROR.', 'give'),
257 '7900' => esc_html__('PIN_ERROR.', 'give'),
258 '8000' => esc_html__('PROCESSOR_SYSTEM_ERROR.', 'give'),
259 '8010' => esc_html__('HOST_KEY_ERROR.', 'give'),
260 '8020' => esc_html__('CONFIGURATION_ERROR.', 'give'),
261 '8030' => esc_html__('UNSUPPORTED_OPERATION.', 'give'),
262 '8100' => esc_html__('FATAL_COMMUNICATION_ERROR.', 'give'),
263 '8110' => esc_html__('RETRIABLE_COMMUNICATION_ERROR.', 'give'),
264 '8220' => esc_html__('SYSTEM_UNAVAILABLE.', 'give'),
265 '9100' => esc_html__('DECLINED_PLEASE_RETRY. Retry.', 'give'),
266 '9500' => esc_html__('SUSPECTED_FRAUD. try using another card. Do not retry the same card.', 'give'),
267 '9510' => esc_html__('SECURITY_VIOLATION.', 'give'),
268 '9520' => esc_html__('LOST_OR_STOLEN. try using another card. Do not retry the same card.', 'give'),
269 '9530' => esc_html__(
270 'HOLD_CALL_CENTER. The merchant must call the number on the back of the card. POS scenario.',
271 'give'
272 ),
273 '9540' => esc_html__('REFUSED_CARD.', 'give'),
274 '9600' => esc_html__('UNRECOGNIZED_RESPONSE_CODE.', 'give'),
275 '0000' => esc_html__('APPROVED.', 'give'),
276 '00N7' => esc_html__('CVV2_FAILURE_POSSIBLE_RETRY_WITH_CVV.', 'give'),
277 '0100' => esc_html__('REFERRAL.', 'give'),
278 '0390' => esc_html__('ACCOUNT_NOT_FOUND.', 'give'),
279 '0500' => esc_html__('DO_NOT_HONOR.', 'give'),
280 '0580' => esc_html__('UNAUTHORIZED_TRANSACTION.', 'give'),
281 '0800' => esc_html__('BAD_RESPONSE_REVERSAL_REQUIRED.', 'give'),
282 '0880' => esc_html__('CRYPTOGRAPHIC_FAILURE.', 'give'),
283 '0890' => esc_html__('UNACCEPTABLE_PIN.', 'give'),
284 '0960' => esc_html__('SYSTEM_MALFUNCTION.', 'give'),
285 '0R00' => esc_html__('CANCELLED_PAYMENT.', 'give'),
286 '10BR' => esc_html__('ISSUER_REJECTED.', 'give'),
287 'PCNR' => esc_html__('CONTINGENCIES_NOT_RESOLVED.', 'give'),
288 'PCVV' => esc_html__('CVV_FAILURE.', 'give'),
289 'PP06' => esc_html__('ACCOUNT_CLOSED. A previously open account is now closed.', 'give'),
290 'PPRN' => esc_html__('REATTEMPT_NOT_PERMITTED.', 'give'),
291 'PPAD' => esc_html__('BILLING_ADDRESS.', 'give'),
292 'PPAB' => esc_html__('ACCOUNT_BLOCKED_BY_ISSUER.', 'give'),
293 'PPAE' => esc_html__('AMEX_DISABLED.', 'give'),
294 'PPAG' => esc_html__('ADULT_GAMING_UNSUPPORTED.', 'give'),
295 'PPAI' => esc_html__('AMOUNT_INCOMPATIBLE.', 'give'),
296 'PPAR' => esc_html__('AUTH_RESULT.', 'give'),
297 'PPAU' => esc_html__('MCC_CODE.', 'give'),
298 'PPAV' => esc_html__('ARC_AVS.', 'give'),
299 'PPAX' => esc_html__('AMOUNT_EXCEEDED.', 'give'),
300 'PPBG' => esc_html__('BAD_GAMING.', 'give'),
301 'PPC2' => esc_html__('ARC_CVV.', 'give'),
302 'PPCE' => esc_html__('CE_REGISTRATION_INCOMPLETE.', 'give'),
303 'PPCO' => esc_html__('COUNTRY.', 'give'),
304 'PPCR' => esc_html__('CREDIT_ERROR.', 'give'),
305 'PPCT' => esc_html__('CARD_TYPE_UNSUPPORTED.', 'give'),
306 'PPCU' => esc_html__('CURRENCY_USED_INVALID.', 'give'),
307 'PPD3' => esc_html__('SECURE_ERROR_3DS.', 'give'),
308 'PPDC' => esc_html__('DCC_UNSUPPORTED.', 'give'),
309 'PPDI' => esc_html__('DINERS_REJECT.', 'give'),
310 'PPDV' => esc_html__('AUTH_MESSAGE.', 'give'),
311 'PPDT' => esc_html__('DECLINE_THRESHOLD_BREACH.', 'give'),
312 'PPEF' => esc_html__('EXPIRED_FUNDING_INSTRUMENT.', 'give'),
313 'PPEL' => esc_html__('EXCEEDS_FREQUENCY_LIMIT.', 'give'),
314 'PPER' => esc_html__('INTERNAL_SYSTEM_ERROR.', 'give'),
315 'PPEX' => esc_html__('EXPIRY_DATE.', 'give'),
316 'PPFE' => esc_html__('FUNDING_SOURCE_ALREADY_EXISTS.', 'give'),
317 'PPFI' => esc_html__('INVALID_FUNDING_INSTRUMENT.', 'give'),
318 'PPFR' => esc_html__('RESTRICTED_FUNDING_INSTRUMENT.', 'give'),
319 'PPFV' => esc_html__('FIELD_VALIDATION_FAILED.', 'give'),
320 'PPGR' => esc_html__('GAMING_REFUND_ERROR.', 'give'),
321 'PPH1' => esc_html__('H1_ERROR.', 'give'),
322 'PPIF' => esc_html__('IDEMPOTENCY_FAILURE.', 'give'),
323 'PPII' => esc_html__('INVALID_INPUT_FAILURE.', 'give'),
324 'PPIM' => esc_html__('ID_MISMATCH.', 'give'),
325 'PPIT' => esc_html__('INVALID_TRACE_ID.', 'give'),
326 'PPLR' => esc_html__('LATE_REVERSAL.', 'give'),
327 'PPLS' => esc_html__('LARGE_STATUS_CODE.', 'give'),
328 'PPMB' => esc_html__('MISSING_BUSINESS_RULE_OR_DATA.', 'give'),
329 'PPMC' => esc_html__('BLOCKED_Mastercard.', 'give'),
330 'PPMD' => esc_html__('PPMD.', 'give'),
331 'PPNC' => esc_html__('NOT_SUPPORTED_NRC.', 'give'),
332 'PPNL' => esc_html__('EXCEEDS_NETWORK_FREQUENCY_LIMIT.', 'give'),
333 'PPNM' => esc_html__('NO_MID_FOUND.', 'give'),
334 'PPNT' => esc_html__('NETWORK_ERROR.', 'give'),
335 'PPPH' => esc_html__('NO_PHONE_FOR_DCC_TRANSACTION.', 'give'),
336 'PPPI' => esc_html__('INVALID_PRODUCT.', 'give'),
337 'PPPM' => esc_html__('INVALID_PAYMENT_METHOD.', 'give'),
338 'PPQC' => esc_html__('QUASI_CASH_UNSUPPORTED.', 'give'),
339 'PPRE' => esc_html__('UNSUPPORT_REFUND_ON_PENDING_BC.', 'give'),
340 'PPRF' => esc_html__('INVALID_PARENT_TRANSACTION_STATUS.', 'give'),
341 'PPRR' => esc_html__('MERCHANT_NOT_REGISTERED.', 'give'),
342 'PPS0' => esc_html__('BANKAUTH_ROW_MISMATCH.', 'give'),
343 'PPS1' => esc_html__('BANKAUTH_ROW_SETTLED.', 'give'),
344 'PPS2' => esc_html__('BANKAUTH_ROW_VOIDED.', 'give'),
345 'PPS3' => esc_html__('BANKAUTH_EXPIRED.', 'give'),
346 'PPS4' => esc_html__('CURRENCY_MISMATCH.', 'give'),
347 'PPS5' => esc_html__('CREDITCARD_MISMATCH.', 'give'),
348 'PPS6' => esc_html__('AMOUNT_MISMATCH.', 'give'),
349 'PPSC' => esc_html__('ARC_SCORE.', 'give'),
350 'PPSD' => esc_html__('STATUS_DESCRIPTION.', 'give'),
351 'PPSE' => esc_html__('AMEX_DENIED.', 'give'),
352 'PPTE' => esc_html__('VERIFICATION_TOKEN_EXPIRED.', 'give'),
353 'PPTF' => esc_html__('INVALID_TRACE_REFERENCE.', 'give'),
354 'PPTI' => esc_html__('INVALID_TRANSACTION_ID.', 'give'),
355 'PPTR' => esc_html__('VERIFICATION_TOKEN_REVOKED.', 'give'),
356 'PPTT' => esc_html__('TRANSACTION_TYPE_UNSUPPORTED.', 'give'),
357 'PPTV' => esc_html__('INVALID_VERIFICATION_TOKEN.', 'give'),
358 'PPUA' => esc_html__('USER_NOT_AUTHORIZED.', 'give'),
359 'PPUC' => esc_html__('CURRENCY_CODE_UNSUPPORTED.', 'give'),
360 'PPUE' => esc_html__('UNSUPPORT_ENTITY.', 'give'),
361 'PPUI' => esc_html__('UNSUPPORT_INSTALLMENT.', 'give'),
362 'PPUP' => esc_html__('UNSUPPORT_POS_FLAG.', 'give'),
363 'PPUR' => esc_html__('UNSUPPORTED_REVERSAL.', 'give'),
364 'PPVC' => esc_html__('VALIDATE_CURRENCY.', 'give'),
365 'PPVE' => esc_html__('VALIDATION_ERROR.', 'give'),
366 'PPVT' => esc_html__('VIRTUAL_TERMINAL_UNSUPPORTE.D', 'give')
367 ];
368 }
369
370 /**
371 * @since 3.2.0
372 */
373 private function paymentAdviceCode(): array
374 {
375 return [
376 '21' => esc_html__(
377 'For Mastercard, the card holder has been unsuccessful at canceling recurring payment through merchant. Stop recurring payment requests. For Visa, all recurring payments were canceled for the card number requested. Stop recurring payment requests.',
378 'give'
379 ),
380 '01' => esc_html__(
381 'For Mastercard, expired card account upgrade or portfolio sale conversion. Obtain new account information before next billing cycle.',
382 'give'
383 ),
384 '02' => esc_html__(
385 'For Mastercard, over credit limit or insufficient funds. Retry the transaction 72 hours later. For Visa, the card holder wants to stop only one specific payment in the recurring payment relationship. The merchant must NOT resubmit the same transaction. The merchant can continue the billing process in the subsequent billing period.',
386 'give'
387 ),
388 '03' => esc_html__(
389 'For Mastercard, account closed as fraudulent. Obtain another type of payment from customer due to account being closed or fraud. Possible reason: Account closed as fraudulent. For Visa, the card holder wants to stop all recurring payment transactions for a specific merchant. Stop recurring payment requests.',
390 'give'
391 )
392 ];
393 }
394 }
395