PluginProbe
Pay with Vipps and MobilePay for WooCommerce / 6.1.1
Pay with Vipps and MobilePay for WooCommerce v6.1.1
6.2.3 6.2.2 6.2.1 6.2.0 6.1.10 6.1.9 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1.0 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 5.4.3 5.4.2 5.4.1 5.4.0 All 185 releases
woo-vipps / recurring / includes / wc-vipps-recurring-exceptions.php

wc-vipps-recurring-exceptions.php in Pay with Vipps and MobilePay for WooCommerce 6.1.1, at recurring/includes/wc-vipps-recurring-exceptions.php

56 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || exit;
4
5 class WC_Vipps_Recurring_Exception extends Exception {
6
7 /** sanitized/localized error message */
8 protected string $localized_message;
9
10 public $response_code;
11 public $is_idempotent_error = false;
12
13 /**
14 * Setup exception
15 *
16 * @param string $error_message Full response
17 * @param string $localized_message user-friendly translated error message
18 *
19 * @since 4.0.2
20 */
21 public function __construct( $error_message = '', $localized_message = '' ) {
22 $this->localized_message = $localized_message;
23 parent::__construct( $error_message );
24 }
25
26 /**
27 * Returns the localized message.
28 *
29 * @return string
30 * @since 4.0.2
31 */
32 public function getLocalizedMessage(): string {
33 return $this->localized_message;
34 }
35 }
36
37 // Temporary errors like 500-class errors
38 class WC_Vipps_Recurring_Temporary_Exception extends WC_Vipps_Recurring_Exception {
39 //
40 }
41
42 // Misconfigurations
43 class WC_Vipps_Recurring_Config_Exception extends WC_Vipps_Recurring_Exception {
44 //
45 }
46
47 // Missing required value
48 class WC_Vipps_Recurring_Missing_Value_Exception extends WC_Vipps_Recurring_Exception {
49 //
50 }
51
52 // Invalid value value
53 class WC_Vipps_Recurring_Invalid_Value_Exception extends WC_Vipps_Recurring_Exception {
54 //
55 }
56