Stripe Payments For WooCommerce by Checkout Plugins - Version 1.4.2

Version Description

  • TUESDAY, 29TH MARCH 2022 =
  • Improvement: Added webhook secret step in the onboarding wizard.
  • Improvement: Added translation support for card declined messages.
  • Fix: Failed payment automatically retries.
  • Fix: Failed payment order notes improvement.
Download this release

Release Info

Developer brainstormworg
Plugin Icon 128x128 Stripe Payments For WooCommerce by Checkout Plugins
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.2

admin/admin-controller.php CHANGED
@@ -198,6 +198,11 @@ class Admin_Controller {
198
  if ( isset( $_GET['cpsw_call'] ) && ! empty( $_GET['cpsw_call'] ) && 'failed' === $_GET['cpsw_call'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
199
  add_action( 'admin_notices', [ $this, 'connect_failed_notice' ] );
200
  }
 
 
 
 
 
201
  }
202
 
203
  /**
@@ -388,6 +393,18 @@ class Admin_Controller {
388
  echo wp_kses_post( '<div class="notice notice-error is-dismissible"><p>' . __( 'We were not able to connect your Stripe account. Please try again. ', 'checkout-plugins-stripe-woo' ) . '</p></div>' );
389
  }
390
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  /**
392
  * Insufficient permission notice.
393
  *
@@ -961,7 +978,7 @@ class Admin_Controller {
961
  'type' => 'cpsw_webhook_url',
962
  'class' => 'wc_cpsw_webhook_url',
963
  /* translators: %1$1s - %2$2s HTML markup */
964
- 'desc' => sprintf( __( 'Important: the webhook URL is called by Stripe when events occur in your account, like a source becomes chargeable. %1$1sWebhook Guide%2$2s', 'checkout-plugins-stripe-woo' ), '<a href="https://checkoutplugins.com/docs/stripe-card-payments/#webhook" target="_blank">', '</a>' ),
965
  'id' => 'cpsw_webhook_url',
966
  ],
967
  'live_webhook_secret' => [
198
  if ( isset( $_GET['cpsw_call'] ) && ! empty( $_GET['cpsw_call'] ) && 'failed' === $_GET['cpsw_call'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
199
  add_action( 'admin_notices', [ $this, 'connect_failed_notice' ] );
200
  }
201
+
202
+ // Add notice if missing webhook secret key.
203
+ if ( isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] && ! Helper::get_webhook_secret() ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
204
+ add_action( 'admin_notices', [ $this, 'webhooks_missing_notice' ] );
205
+ }
206
  }
207
 
208
  /**
393
  echo wp_kses_post( '<div class="notice notice-error is-dismissible"><p>' . __( 'We were not able to connect your Stripe account. Please try again. ', 'checkout-plugins-stripe-woo' ) . '</p></div>' );
394
  }
395
 
396
+ /**
397
+ * Webhooks missing notice.
398
+ *
399
+ * @since 1.4.2
400
+ *
401
+ * @return void
402
+ */
403
+ public function webhooks_missing_notice() {
404
+ /* translators: %1$s Webhook secret page link, %2$s Webhook guide page link */
405
+ echo wp_kses_post( '<div class="notice notice-error"><p>' . sprintf( __( 'Stripe requires using the %1$swebhook%2$s. %3$sWebhook Guide%4$s ', 'checkout-plugins-stripe-woo' ), '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' ) . '">', '</a>', '<a href="https://checkoutplugins.com/docs/stripe-card-payments/#webhook" target="_blank">', '</a>' ) . '</p></div>' );
406
+ }
407
+
408
  /**
409
  * Insufficient permission notice.
410
  *
978
  'type' => 'cpsw_webhook_url',
979
  'class' => 'wc_cpsw_webhook_url',
980
  /* translators: %1$1s - %2$2s HTML markup */
981
+ 'desc' => sprintf( __( 'Important: the webhook URL is called by Stripe when events occur in your account, like a source becomes chargeable. %1$1sWebhook Guide%2$2s or create webhook on %3$3sstripe dashboard%4$4s', 'checkout-plugins-stripe-woo' ), '<a href="https://checkoutplugins.com/docs/stripe-card-payments/#webhook" target="_blank">', '</a>', '<a href="https://dashboard.stripe.com/webhooks/create" target="_blank">', '</a>' ),
982
  'id' => 'cpsw_webhook_url',
983
  ],
984
  'live_webhook_secret' => [
assets/js/payment-request.js CHANGED
@@ -501,13 +501,21 @@
501
  function cpswAdjustButtonOnCheckoutPage() {
502
  if ( $( '.place-order #place_order' ).length > 0 ) {
503
  const wcCheckoutButton = $( '.place-order #place_order' );
504
- const cpswExpressCheckoutButton = $( '.cpsw-payment-request-custom-button-render' );
 
505
  if ( $( '.place-order #place_order' ).outerHeight() > 30 ) {
506
- $( '.cpsw-payment-request-custom-button-render' ).css( 'height', $( '.place-order #place_order' ).outerHeight() + 'px' );
 
 
 
 
 
 
 
 
507
  }
508
- $( '.cpsw-payment-request-custom-button-render' ).css( 'font-size', $( '.place-order #place_order' ).css( 'font-size' ) );
509
 
510
- cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcCheckoutButton );
511
  }
512
  }
513
 
@@ -530,6 +538,7 @@
530
  const cpswExpressCheckoutButton = $( '.cpsw-payment-request-custom-button-render' );
531
  const cpswExpressCheckoutWrapper = $( '#cpsw-payment-request-wrapper' );
532
  const makeWidth = style.button_length > 10 ? 'min-width' : 'width';
 
533
 
534
  if ( 'above' === style.button_position ) {
535
  cpswExpressCheckoutWrapper.css( 'width', '100%' );
@@ -552,17 +561,25 @@
552
  wcAddToCartButton.css( makeWidth, addToCartMinWidth + 'px' );
553
  } else {
554
  $( 'form.grouped_form button.single_add_to_cart_button' ).css( makeWidth, addToCartMinWidth + 'px' );
 
 
 
 
 
 
 
 
 
555
  }
556
 
557
- cpswExpressCheckoutWrapper.css( makeWidth, addToCartMinWidth + 'px' );
558
- cpswExpressCheckoutButton.css( makeWidth, addToCartMinWidth + 'px' );
559
 
560
  if ( 'below' === style.button_position ) {
561
  $( '.theme-twentytwentytwo .cpsw-payment-request-custom-button-render' ).css( makeWidth, wcAddToCartButton.outerWidth() + 'px' );
562
  $( '.theme-twentytwentytwo #cpsw-payment-request-separator' ).css( makeWidth, wcAddToCartButton.outerWidth() + 'px' );
563
  }
564
  }
565
-
566
  cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcAddToCartButton );
567
  }
568
  }
501
  function cpswAdjustButtonOnCheckoutPage() {
502
  if ( $( '.place-order #place_order' ).length > 0 ) {
503
  const wcCheckoutButton = $( '.place-order #place_order' );
504
+ const cpswExpressCheckoutButtonWrap = $( '.cpsw-payment-request-custom-button-render' );
505
+ const cpswExpressCheckoutButton = $( '#cpsw-payment-request-custom-button' );
506
  if ( $( '.place-order #place_order' ).outerHeight() > 30 ) {
507
+ cpswExpressCheckoutButtonWrap.css( 'height', $( '.place-order #place_order' ).outerHeight() + 'px' );
508
+ }
509
+ cpswExpressCheckoutButtonWrap.css( 'font-size', $( '.place-order #place_order' ).css( 'font-size' ) );
510
+
511
+ if ( $( '.cpsw-payment-request-button-wrapper' ).width() < style.checkout_button_width ) {
512
+ cpswExpressCheckoutButton.css( 'width', '100%' );
513
+ cpswExpressCheckoutButton.css( 'min-width', '100px' );
514
+ cpswExpressCheckoutButtonWrap.css( 'width', '100%' );
515
+ cpswExpressCheckoutButtonWrap.css( 'min-width', '100px' );
516
  }
 
517
 
518
+ cpswStyleExpressCheckoutButton( cpswExpressCheckoutButtonWrap, wcCheckoutButton );
519
  }
520
  }
521
 
538
  const cpswExpressCheckoutButton = $( '.cpsw-payment-request-custom-button-render' );
539
  const cpswExpressCheckoutWrapper = $( '#cpsw-payment-request-wrapper' );
540
  const makeWidth = style.button_length > 10 ? 'min-width' : 'width';
541
+ let addToCartMinWidthType = 'px';
542
 
543
  if ( 'above' === style.button_position ) {
544
  cpswExpressCheckoutWrapper.css( 'width', '100%' );
561
  wcAddToCartButton.css( makeWidth, addToCartMinWidth + 'px' );
562
  } else {
563
  $( 'form.grouped_form button.single_add_to_cart_button' ).css( makeWidth, addToCartMinWidth + 'px' );
564
+ const themeKadenceButton = $( '.theme-kadence button.single_add_to_cart_button' );
565
+
566
+ if ( themeKadenceButton.length > 0 ) {
567
+ addToCartMinWidth = 100;
568
+ addToCartMinWidthType = '%';
569
+ themeKadenceButton.css( makeWidth, addToCartMinWidth + addToCartMinWidthType );
570
+ themeKadenceButton.css( 'margin-top', '20px' );
571
+ $( '.cpsw-payment-request-button-wrapper' ).css( 'float', 'none' );
572
+ }
573
  }
574
 
575
+ cpswExpressCheckoutWrapper.css( makeWidth, addToCartMinWidth + addToCartMinWidthType );
576
+ cpswExpressCheckoutButton.css( makeWidth, addToCartMinWidth + addToCartMinWidthType );
577
 
578
  if ( 'below' === style.button_position ) {
579
  $( '.theme-twentytwentytwo .cpsw-payment-request-custom-button-render' ).css( makeWidth, wcAddToCartButton.outerWidth() + 'px' );
580
  $( '.theme-twentytwentytwo #cpsw-payment-request-separator' ).css( makeWidth, wcAddToCartButton.outerWidth() + 'px' );
581
  }
582
  }
 
583
  cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcAddToCartButton );
584
  }
585
  }
assets/js/stripe-elements.js CHANGED
@@ -329,8 +329,15 @@
329
  // Show error to your customer (e.g., insufficient funds)
330
  $( '.woocommerce-error' ).remove();
331
  wcCheckoutForm.unblock();
 
332
  logError( result.error );
333
- $( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + getStripeLocalizedMessage( result.error.code, result.error.message ) + '</div>' ).show();
 
 
 
 
 
 
334
  window.scrollTo( { top: 0, behavior: 'smooth' } );
335
  } else {
336
  // The payment has been processed!
329
  // Show error to your customer (e.g., insufficient funds)
330
  $( '.woocommerce-error' ).remove();
331
  wcCheckoutForm.unblock();
332
+ wcCheckoutForm.removeClass( 'processing' );
333
  logError( result.error );
334
+ let errorCode = result.error.code;
335
+
336
+ if ( 'card_declined' === result.error.code ) {
337
+ errorCode = result.error.decline_code;
338
+ }
339
+
340
+ $( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + getStripeLocalizedMessage( errorCode, result.error.message ) + '</div>' ).show();
341
  window.scrollTo( { top: 0, behavior: 'smooth' } );
342
  } else {
343
  // The payment has been processed!
checkout-plugins-stripe-woo.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Checkout Plugins - Stripe for WooCommerce
4
  * Plugin URI: https://www.checkoutplugins.com/
5
  * Description: Stripe for WooCommerce delivers a simple, secure way to accept credit card payments in your WooCommerce store. Reduce payment friction and boost conversions using this free plugin!
6
- * Version: 1.4.1
7
  * Author: Checkout Plugins
8
  * Author URI: https://checkoutplugins.com/
9
  * License: GPLv2 or later
@@ -20,6 +20,6 @@ define( 'CPSW_FILE', __FILE__ );
20
  define( 'CPSW_BASE', plugin_basename( CPSW_FILE ) );
21
  define( 'CPSW_DIR', plugin_dir_path( CPSW_FILE ) );
22
  define( 'CPSW_URL', plugins_url( '/', CPSW_FILE ) );
23
- define( 'CPSW_VERSION', '1.4.1' );
24
 
25
  require_once 'autoloader.php';
3
  * Plugin Name: Checkout Plugins - Stripe for WooCommerce
4
  * Plugin URI: https://www.checkoutplugins.com/
5
  * Description: Stripe for WooCommerce delivers a simple, secure way to accept credit card payments in your WooCommerce store. Reduce payment friction and boost conversions using this free plugin!
6
+ * Version: 1.4.2
7
  * Author: Checkout Plugins
8
  * Author URI: https://checkoutplugins.com/
9
  * License: GPLv2 or later
20
  define( 'CPSW_BASE', plugin_basename( CPSW_FILE ) );
21
  define( 'CPSW_DIR', plugin_dir_path( CPSW_FILE ) );
22
  define( 'CPSW_URL', plugins_url( '/', CPSW_FILE ) );
23
+ define( 'CPSW_VERSION', '1.4.2' );
24
 
25
  require_once 'autoloader.php';
gateway/abstract-payment-gateway.php CHANGED
@@ -1123,4 +1123,21 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
1123
 
1124
  return array_merge( $this->match_stripe_currency, [ $account_default_currency ] );
1125
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1126
  }
1123
 
1124
  return array_merge( $this->match_stripe_currency, [ $account_default_currency ] );
1125
  }
1126
+
1127
+ /**
1128
+ * Checks to see if request is invalid and that
1129
+ * they are worth retrying.
1130
+ *
1131
+ * @since 1.4.2
1132
+ * @param obj $error Stripe return error data.
1133
+ */
1134
+ public function is_retryable_error( $error ) {
1135
+ return (
1136
+ 'invalid_request_error' === $error->type ||
1137
+ 'idempotency_error' === $error->type ||
1138
+ 'rate_limit_error' === $error->type ||
1139
+ 'api_connection_error' === $error->type ||
1140
+ 'api_error' === $error->type
1141
+ );
1142
+ }
1143
  }
gateway/local-gateway.php CHANGED
@@ -330,18 +330,6 @@ class Local_Gateway extends Abstract_Payment_Gateway {
330
  return;
331
  }
332
 
333
- // Add notice if missing webhook secret key.
334
- if (
335
- 'no' !== get_option( 'cpsw_show_webhook_secret_notice' ) &&
336
- ! Helper::get_webhook_secret()
337
- ) {
338
- $notice_type = 'cpsw_sepa' === $this->id ? 'notice-error' : 'notice-warning';
339
- $dismissible = 'cpsw_sepa' === $this->id ? false : true;
340
- $requires = 'cpsw_sepa' === $this->id ? __( 'requires', 'checkout-plugins-stripe-woo' ) : __( 'recommends', 'checkout-plugins-stripe-woo' );
341
- /* translators: %1$s requires message, %2$s Webhook secret page link, %4$s Payment method, %5$s Webhook guide page link */
342
- $notice->add( 'webhook_secret', 'notice ' . $notice_type, sprintf( __( 'Stripe %1$s using the %2$swebhook%3$s for %4$s. %5$sWebhook Guide%6$s ', 'checkout-plugins-stripe-woo' ), $requires, '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' ) . '">', '</a>', $this->method_title, '<a href="https://checkoutplugins.com/docs/stripe-card-payments/#webhook" target="_blank">', '</a>' ), $dismissible );
343
- }
344
-
345
  // Add notice if currency not supported.
346
  if (
347
  method_exists( $this, 'get_supported_currency' ) &&
330
  return;
331
  }
332
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  // Add notice if currency not supported.
334
  if (
335
  method_exists( $this, 'get_supported_currency' ) &&
gateway/stripe/card-payments.php CHANGED
@@ -43,6 +43,13 @@ class Card_Payments extends Abstract_Payment_Gateway {
43
  */
44
  public $payment_method_types = 'card';
45
 
 
 
 
 
 
 
 
46
  /**
47
  * Constructor
48
  *
43
  */
44
  public $payment_method_types = 'card';
45
 
46
+ /**
47
+ * Retry interval
48
+ *
49
+ * @var int
50
+ */
51
+ public $retry_interval = 1;
52
+
53
  /**
54
  * Constructor
55
  *
gateway/stripe/frontend-scripts.php CHANGED
@@ -171,10 +171,11 @@ class Frontend_Scripts {
171
  'js_nonce' => wp_create_nonce( 'cpsw_js_error_nonce' ),
172
  ],
173
  'style' => [
174
- 'theme' => Helper::get_setting( 'express_checkout_button_theme', 'cpsw_stripe' ),
175
- 'icon' => Helper::get_setting( 'express_checkout_button_icon', 'cpsw_stripe' ),
176
- 'button_position' => Helper::get_setting( 'express_checkout_product_page_position', 'cpsw_stripe' ),
177
- 'button_length' => strlen( $button_text ),
 
178
  ],
179
  'icons' => [
180
  'applepay_gray' => CPSW_URL . 'assets/icon/apple-pay-gray.svg',
171
  'js_nonce' => wp_create_nonce( 'cpsw_js_error_nonce' ),
172
  ],
173
  'style' => [
174
+ 'theme' => Helper::get_setting( 'express_checkout_button_theme', 'cpsw_stripe' ),
175
+ 'icon' => Helper::get_setting( 'express_checkout_button_icon', 'cpsw_stripe' ),
176
+ 'button_position' => Helper::get_setting( 'express_checkout_product_page_position', 'cpsw_stripe' ),
177
+ 'checkout_button_width' => absint( Helper::get_setting( 'express_checkout_button_width', 'cpsw_stripe' ) ),
178
+ 'button_length' => strlen( $button_text ),
179
  ],
180
  'icons' => [
181
  'applepay_gray' => CPSW_URL . 'assets/icon/apple-pay-gray.svg',
gateway/stripe/sepa.php CHANGED
@@ -43,6 +43,13 @@ class Sepa extends Local_Gateway {
43
  */
44
  public $payment_method_types = 'sepa_debit';
45
 
 
 
 
 
 
 
 
46
  /**
47
  * Constructor
48
  *
43
  */
44
  public $payment_method_types = 'sepa_debit';
45
 
46
+ /**
47
+ * Retry interval
48
+ *
49
+ * @var int
50
+ */
51
+ public $retry_interval = 1;
52
+
53
  /**
54
  * Constructor
55
  *
gateway/stripe/stripe-api.php CHANGED
@@ -68,46 +68,47 @@ class Stripe_Api {
68
 
69
  $error_message = false;
70
  $response = false;
71
- $error_type = '';
72
 
73
  try {
74
  $response = $this->stripe->{$api}->{$method}( ...$args );
75
  } catch ( \Stripe\Exception\CardException $e ) {
76
  Logger::error( $e->getError()->message, true );
77
  $error_message = $e->getError()->message;
78
- $error_type = $e->getError()->param;
79
  } catch ( \Stripe\Exception\RateLimitException $e ) {
80
  // Too many requests made to the API too quickly.
81
  Logger::error( $e->getError()->message, true );
 
82
  $error_message = $e->getError()->message;
83
- $error_type = $e->getError()->param;
84
  } catch ( \Stripe\Exception\InvalidRequestException $e ) {
85
  // Invalid parameters were supplied to Stripe's API.
86
  Logger::error( $e->getError()->message, true );
 
87
  $error_message = $e->getError()->message;
88
- $error_type = $e->getError()->param;
89
  } catch ( \Stripe\Exception\AuthenticationException $e ) {
90
  // Authentication with Stripe's API failed.
91
  // (maybe you changed API keys recently).
92
  Logger::error( $e->getError()->message, true );
 
93
  $error_message = $e->getError()->message;
94
- $error_type = $e->getError()->param;
95
  } catch ( \Stripe\Exception\ApiConnectionException $e ) {
96
  // Network communication with Stripe failed.
 
97
  $error_message = is_null( $e->getError() ) ? $e->getMessage() : $e->getError()->message;
98
  Logger::error( $error_message, true );
99
  $error_type = is_null( $e->getError() ) ? '' : $e->getError()->param;
100
  } catch ( \Stripe\Exception\ApiErrorException $e ) {
101
  Logger::error( $e->getError()->message, true );
 
102
  $error_message = $e->getError()->message;
103
- $error_type = $e->getError()->param;
104
  // Display a very generic error to the user, and maybe send.
105
  // yourself an email.
106
  } catch ( Exception $e ) {
107
  // Something else happened, completely unrelated to Stripe.
108
  Logger::error( $e->getError()->message, true );
 
109
  $error_message = $e->getError()->message;
110
- $error_type = $e->getError()->param;
111
  }
112
 
113
  if ( is_wp_error( $response ) ) {
@@ -124,7 +125,9 @@ class Stripe_Api {
124
  return [
125
  'success' => false,
126
  'message' => $error_message,
127
- 'type' => $error_type,
 
 
128
  ];
129
  }
130
  }
68
 
69
  $error_message = false;
70
  $response = false;
71
+ $get_error = false;
72
 
73
  try {
74
  $response = $this->stripe->{$api}->{$method}( ...$args );
75
  } catch ( \Stripe\Exception\CardException $e ) {
76
  Logger::error( $e->getError()->message, true );
77
  $error_message = $e->getError()->message;
78
+ $get_error = $e->getError();
79
  } catch ( \Stripe\Exception\RateLimitException $e ) {
80
  // Too many requests made to the API too quickly.
81
  Logger::error( $e->getError()->message, true );
82
+ $get_error = $e->getError();
83
  $error_message = $e->getError()->message;
 
84
  } catch ( \Stripe\Exception\InvalidRequestException $e ) {
85
  // Invalid parameters were supplied to Stripe's API.
86
  Logger::error( $e->getError()->message, true );
87
+ $get_error = $e->getError();
88
  $error_message = $e->getError()->message;
 
89
  } catch ( \Stripe\Exception\AuthenticationException $e ) {
90
  // Authentication with Stripe's API failed.
91
  // (maybe you changed API keys recently).
92
  Logger::error( $e->getError()->message, true );
93
+ $get_error = $e->getError();
94
  $error_message = $e->getError()->message;
 
95
  } catch ( \Stripe\Exception\ApiConnectionException $e ) {
96
  // Network communication with Stripe failed.
97
+ $get_error = $e->getError();
98
  $error_message = is_null( $e->getError() ) ? $e->getMessage() : $e->getError()->message;
99
  Logger::error( $error_message, true );
100
  $error_type = is_null( $e->getError() ) ? '' : $e->getError()->param;
101
  } catch ( \Stripe\Exception\ApiErrorException $e ) {
102
  Logger::error( $e->getError()->message, true );
103
+ $get_error = $e->getError();
104
  $error_message = $e->getError()->message;
 
105
  // Display a very generic error to the user, and maybe send.
106
  // yourself an email.
107
  } catch ( Exception $e ) {
108
  // Something else happened, completely unrelated to Stripe.
109
  Logger::error( $e->getError()->message, true );
110
+ $get_error = $e->getError();
111
  $error_message = $e->getError()->message;
 
112
  }
113
 
114
  if ( is_wp_error( $response ) ) {
125
  return [
126
  'success' => false,
127
  'message' => $error_message,
128
+ 'type' => isset( $get_error->param ) ? $get_error->param : '',
129
+ 'code' => isset( $get_error->code ) ? $get_error->code : '',
130
+ 'error' => $get_error,
131
  ];
132
  }
133
  }
inc/helper.php CHANGED
@@ -94,7 +94,7 @@ class Helper {
94
  'express_checkout_separator_cart' => __( 'OR', 'checkout-plugins-stripe-woo' ),
95
  'express_checkout_separator_checkout' => __( 'OR', 'checkout-plugins-stripe-woo' ),
96
  'express_checkout_checkout_page_position' => 'above-checkout',
97
- 'express_checkout_checkout_page_layout' => 'custom',
98
  ],
99
  'woocommerce_cpsw_alipay_settings' => [
100
  'enabled' => 'no',
@@ -248,7 +248,13 @@ class Helper {
248
  'incorrect_zip' => __( 'The postal code entered for the card is invalid. Please try again.', 'checkout-plugins-stripe-woo' ),
249
  'missing' => __( 'Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details.', 'checkout-plugins-stripe-woo' ),
250
  'email_invalid' => __( 'The email address is invalid. Check that the email address is properly formatted and only includes allowed characters.', 'checkout-plugins-stripe-woo' ),
 
251
  'card_declined' => __( 'The card has been declined. When a card is declined, the error returned also includes the decline_code attribute with the reason why the card was declined.', 'checkout-plugins-stripe-woo' ),
 
 
 
 
 
252
  'parameter_unknown' => __( 'The request contains one or more unexpected parameters. Remove these and try again.', 'checkout-plugins-stripe-woo' ),
253
  'incomplete_number' => __( 'Your card number is incomplete.', 'checkout-plugins-stripe-woo' ),
254
  'incomplete_expiry' => __( 'Your card\'s expiration date is incomplete.', 'checkout-plugins-stripe-woo' ),
94
  'express_checkout_separator_cart' => __( 'OR', 'checkout-plugins-stripe-woo' ),
95
  'express_checkout_separator_checkout' => __( 'OR', 'checkout-plugins-stripe-woo' ),
96
  'express_checkout_checkout_page_position' => 'above-checkout',
97
+ 'express_checkout_checkout_page_layout' => 'custom',
98
  ],
99
  'woocommerce_cpsw_alipay_settings' => [
100
  'enabled' => 'no',
248
  'incorrect_zip' => __( 'The postal code entered for the card is invalid. Please try again.', 'checkout-plugins-stripe-woo' ),
249
  'missing' => __( 'Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details.', 'checkout-plugins-stripe-woo' ),
250
  'email_invalid' => __( 'The email address is invalid. Check that the email address is properly formatted and only includes allowed characters.', 'checkout-plugins-stripe-woo' ),
251
+ // Card declined started here.
252
  'card_declined' => __( 'The card has been declined. When a card is declined, the error returned also includes the decline_code attribute with the reason why the card was declined.', 'checkout-plugins-stripe-woo' ),
253
+ 'insufficient_funds' => __( 'The card has insufficient funds to complete the purchase.', 'checkout-plugins-stripe-woo' ),
254
+ 'generic_decline' => __( 'The card has been declined. Please try again with another card.', 'checkout-plugins-stripe-woo' ),
255
+ 'lost_card' => __( 'The card has been declined (Lost card). Please try again with another card.', 'checkout-plugins-stripe-woo' ),
256
+ 'stolen_card' => __( 'The card has been declined (Stolen card). Please try again with another card.', 'checkout-plugins-stripe-woo' ),
257
+ // Card declined end here.
258
  'parameter_unknown' => __( 'The request contains one or more unexpected parameters. Remove these and try again.', 'checkout-plugins-stripe-woo' ),
259
  'incomplete_number' => __( 'Your card number is incomplete.', 'checkout-plugins-stripe-woo' ),
260
  'incomplete_expiry' => __( 'Your card\'s expiration date is incomplete.', 'checkout-plugins-stripe-woo' ),
inc/traits/subscriptions.php CHANGED
@@ -216,34 +216,27 @@ trait Subscriptions {
216
  $is_authentication_required = $this->is_authentication_required_for_payment( $response );
217
 
218
  // error not of the type 'authentication_required'.
219
- if ( ! empty( $response->error ) && ! $is_authentication_required ) {
220
- // We want to retry.
221
- if ( $this->is_retryable_error( $response->error ) ) {
222
  if ( $retry ) {
223
  // Don't do anymore retries after this.
224
  if ( 5 <= $this->retry_interval ) {
225
- return $this->process_subscription_payment( $amount, $renewal_order, false, $response->error );
226
  }
227
 
228
  sleep( $this->retry_interval );
229
 
230
  $this->retry_interval++;
231
 
232
- return $this->process_subscription_payment( $amount, $renewal_order, true, $response->error );
233
  } else {
234
  $localized_message = __( 'Sorry, we are unable to process your payment at this time. Please retry later.', 'checkout-plugins-stripe-woo' );
235
  $renewal_order->add_order_note( $localized_message );
236
- throw new Exception( print_r( $response, true ), $localized_message ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
237
  }
238
  }
239
 
240
- if ( 'card_error' === $response->error->type ) {
241
- $localized_message = $response->error->message;
242
- }
243
-
244
- $renewal_order->add_order_note( $localized_message );
245
-
246
- throw new Exception( print_r( $response, true ), $localized_message ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
247
  }
248
 
249
  // Either the charge was successfully captured, or it requires further authentication.
@@ -253,7 +246,7 @@ trait Subscriptions {
253
  $error_message = __( 'This transaction requires authentication.', 'checkout-plugins-stripe-woo' );
254
  $renewal_order->add_order_note( $error_message );
255
 
256
- $charge = end( $response->error->payment_intent->charges->data );
257
  $id = $charge->id;
258
  $order_id = $renewal_order->get_id();
259
 
@@ -267,6 +260,11 @@ trait Subscriptions {
267
  // The charge was successfully captured.
268
  do_action( 'cpsw_stripe_process_payment', $response, $renewal_order );
269
 
 
 
 
 
 
270
  if ( $response && 'cpsw_sepa' === $this->id ) {
271
  set_transient( 'cpsw_stripe_sepa_client_secret', $response->client_secret, 1 * MINUTE_IN_SECONDS );
272
  }
@@ -331,6 +329,13 @@ trait Subscriptions {
331
  'client_secret' => $intent->client_secret,
332
  ];
333
  update_post_meta( $order_id, '_cpsw_intent_secret', $intent_data );
 
 
 
 
 
 
 
334
  }
335
 
336
  return $intent;
@@ -362,8 +367,7 @@ trait Subscriptions {
362
  * @return boolean
363
  */
364
  public function is_authentication_required_for_payment( $response ) {
365
- return ( ! empty( $response->error ) && 'authentication_required' === $response->error->code )
366
- || ( ! empty( $response->last_payment_error ) && 'authentication_required' === $response->last_payment_error->code );
367
  }
368
 
369
  /**
216
  $is_authentication_required = $this->is_authentication_required_for_payment( $response );
217
 
218
  // error not of the type 'authentication_required'.
219
+ if ( isset( $response['error'] ) && ! $is_authentication_required ) {
220
+ if ( $this->is_retryable_error( $response['error'] ) ) {
221
+ // We want to retry.
222
  if ( $retry ) {
223
  // Don't do anymore retries after this.
224
  if ( 5 <= $this->retry_interval ) {
225
+ return $this->process_subscription_payment( $amount, $renewal_order, false, $response['error'] );
226
  }
227
 
228
  sleep( $this->retry_interval );
229
 
230
  $this->retry_interval++;
231
 
232
+ return $this->process_subscription_payment( $amount, $renewal_order, true, $response['error'] );
233
  } else {
234
  $localized_message = __( 'Sorry, we are unable to process your payment at this time. Please retry later.', 'checkout-plugins-stripe-woo' );
235
  $renewal_order->add_order_note( $localized_message );
 
236
  }
237
  }
238
 
239
+ $renewal_order->add_order_note( $response['message'] );
 
 
 
 
 
 
240
  }
241
 
242
  // Either the charge was successfully captured, or it requires further authentication.
246
  $error_message = __( 'This transaction requires authentication.', 'checkout-plugins-stripe-woo' );
247
  $renewal_order->add_order_note( $error_message );
248
 
249
+ $charge = end( $response['error']->payment_intent->charges->data );
250
  $id = $charge->id;
251
  $order_id = $renewal_order->get_id();
252
 
260
  // The charge was successfully captured.
261
  do_action( 'cpsw_stripe_process_payment', $response, $renewal_order );
262
 
263
+ if ( isset( $response['error'] ) ) {
264
+ $renewal_order->update_status( 'failed', $response['message'] );
265
+ return;
266
+ }
267
+
268
  if ( $response && 'cpsw_sepa' === $this->id ) {
269
  set_transient( 'cpsw_stripe_sepa_client_secret', $response->client_secret, 1 * MINUTE_IN_SECONDS );
270
  }
329
  'client_secret' => $intent->client_secret,
330
  ];
331
  update_post_meta( $order_id, '_cpsw_intent_secret', $intent_data );
332
+ } else {
333
+ $intent = [
334
+ 'message' => isset( $response['message'] ) ? $response['message'] : __( 'Payment processing failed. Please retry.', 'checkout-plugins-stripe-woo' ),
335
+ 'type' => $response['type'],
336
+ 'code' => $response['code'],
337
+ 'error' => $response['error'],
338
+ ];
339
  }
340
 
341
  return $intent;
367
  * @return boolean
368
  */
369
  public function is_authentication_required_for_payment( $response ) {
370
+ return ( ! empty( $response['code'] ) && 'authentication_required' === $response['code'] );
 
371
  }
372
 
373
  /**
languages/checkout-plugins-stripe-woo.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Checkout Plugins - Stripe for WooCommerce 1.4.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/checkout-plugins-stripe-woo\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-03-15T09:11:26+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: checkout-plugins-stripe-woo\n"
@@ -28,6 +28,7 @@ msgstr ""
28
 
29
  #. Author of the plugin
30
  #: wizard/build/app.js:1
 
31
  msgid "Checkout Plugins"
32
  msgstr ""
33
 
@@ -36,7 +37,7 @@ msgid "https://checkoutplugins.com/"
36
  msgstr ""
37
 
38
  #: admin/admin-controller.php:79
39
- #: admin/admin-controller.php:890
40
  msgid "Stripe API Settings"
41
  msgstr ""
42
 
@@ -45,9 +46,10 @@ msgid "Credit Cards"
45
  msgstr ""
46
 
47
  #: admin/admin-controller.php:81
48
- #: admin/admin-controller.php:1578
49
  #: inc/helper.php:87
50
  #: wizard/build/app.js:1
 
51
  msgid "Express Checkout"
52
  msgstr ""
53
 
@@ -67,7 +69,7 @@ msgid "Klarna"
67
  msgstr ""
68
 
69
  #: admin/admin-controller.php:85
70
- #: gateway/stripe/sepa.php:54
71
  msgid "SEPA"
72
  msgstr ""
73
 
@@ -86,37 +88,37 @@ msgstr ""
86
  msgid "Bancontact"
87
  msgstr ""
88
 
89
- #: admin/admin-controller.php:264
90
  msgid "Something went wrong! Please reload the page and try again."
91
  msgstr ""
92
 
93
- #: admin/admin-controller.php:265
94
- #: admin/admin-controller.php:759
95
  msgid "Connect to Stripe"
96
  msgstr ""
97
 
98
- #: admin/admin-controller.php:266
99
  msgid "Please enter all keys to connect to stripe."
100
  msgstr ""
101
 
102
- #: admin/admin-controller.php:267
103
  msgid "You must enter your API keys or connect the plugin before performing a connection test. Mode:"
104
  msgstr ""
105
 
106
- #: admin/admin-controller.php:268
107
  msgid "Keys Unavailable."
108
  msgstr ""
109
 
110
- #: admin/admin-controller.php:269
111
  msgid "Your Stripe account has been disconnected."
112
  msgstr ""
113
 
114
- #: admin/admin-controller.php:270
115
  msgid "You can connect other Stripe account now."
116
  msgstr ""
117
 
118
- #: admin/admin-controller.php:291
119
- #: admin/admin-controller.php:315
120
  #: gateway/stripe/frontend-scripts.php:144
121
  #: gateway/stripe/payment-request-api.php:152
122
  #: inc/helper.php:84
@@ -124,488 +126,498 @@ msgid "Pay now"
124
  msgstr ""
125
 
126
  #. translators: Html Markup
127
- #: admin/admin-controller.php:313
128
  msgid "No payment method detected. Either your browser is not supported or you do not have save cards. For more details read %1$1sdocument$2$2s."
129
  msgstr ""
130
 
131
- #: admin/admin-controller.php:314
132
  msgid "NOTE: Title and Tagline appears only on Checkout page."
133
  msgstr ""
134
 
135
  #. translators: %1$1s HTML Markup
136
- #: admin/admin-controller.php:334
137
  msgid "You Stripe Publishable and Secret Keys are not set correctly. You can connect to Stripe and correct them from <a href=\"%1$1s\">here.</a>"
138
  msgstr ""
139
 
140
- #: admin/admin-controller.php:344
141
- #: admin/admin-controller.php:895
142
  msgid "Stripe Connect"
143
  msgstr ""
144
 
145
- #: admin/admin-controller.php:347
146
- #: admin/admin-controller.php:548
147
- #: admin/admin-controller.php:1527
148
  msgid "Hide API keys"
149
  msgstr ""
150
 
151
- #: admin/admin-controller.php:349
152
- #: admin/admin-controller.php:545
153
- #: admin/admin-controller.php:1523
154
  #: wizard/build/app.js:1
 
155
  msgid "Manage API keys manually"
156
  msgstr ""
157
 
158
  #. translators: %1$1s: mode, %2$2s, %3$3s: HTML Markup
159
- #: admin/admin-controller.php:352
160
  msgid "Stripe Keys for %1$1s mode are not set correctly. Reconnect via %2$2s or %3$3s"
161
  msgstr ""
162
 
163
- #: admin/admin-controller.php:366
164
  msgid "No SSL was detected, Stripe live mode requires SSL."
165
  msgstr ""
166
 
167
- #: admin/admin-controller.php:377
168
  msgid "Your Stripe account has been connected to your WooCommerce store. You may now accept payments in live and test mode."
169
  msgstr ""
170
 
171
- #: admin/admin-controller.php:388
172
  msgid "We were not able to connect your Stripe account. Please try again. "
173
  msgstr ""
174
 
175
- #: admin/admin-controller.php:399
176
- #: admin/admin-controller.php:1079
177
- #: admin/admin-controller.php:1181
 
 
 
 
 
178
  msgid "Error: The current user doesn’t have sufficient permissions to perform this action. Please reload the page and try again."
179
  msgstr ""
180
 
181
- #: admin/admin-controller.php:435
182
- #: admin/admin-controller.php:520
183
  #: wizard/build/app.js:1
 
184
  msgid "Connect with Stripe"
185
  msgstr ""
186
 
187
- #: admin/admin-controller.php:436
188
- #: admin/admin-controller.php:760
189
- #: admin/admin-controller.php:921
190
  msgid "We make it easy to connect Stripe to your site. Click the Connect button to go through our connect flow."
191
  msgstr ""
192
 
193
  #. translators: %1$1s, %2$2s: HTML Markup
194
- #: admin/admin-controller.php:459
195
  msgid "Have questions about connecting with Stripe? Read %1$s document. %2$s"
196
  msgstr ""
197
 
198
- #: admin/admin-controller.php:467
199
  msgid "Although you can add your API keys manually, we recommend using Stripe Connect. Stripe Connect prevents issues that can arise when copying and pasting account details from Stripe into Checkout Plugins - Stripe for WooCommerce settings."
200
  msgstr ""
201
 
202
  #. translators: %1$1s %2$2s %3$3s: HTML Markup
203
- #: admin/admin-controller.php:514
204
  msgid "Your manually managed API keys are valid."
205
  msgstr ""
206
 
207
- #: admin/admin-controller.php:518
208
  msgid "It is highly recommended to Connect with Stripe for easier setup and improved security."
209
  msgstr ""
210
 
211
  #. translators: $1s Acoount name, $2s html markup, $3s account id, $4s html markup
212
- #: admin/admin-controller.php:528
213
  msgid "Account (%1$1s) %2$2s %3$3s %4$4s is connected."
214
  msgstr ""
215
 
216
- #: admin/admin-controller.php:538
217
  msgid "Disconnect &amp; connect other account?"
218
  msgstr ""
219
 
220
- #: admin/admin-controller.php:540
221
  msgid "Test Connection"
222
  msgstr ""
223
 
224
- #: admin/admin-controller.php:555
225
  msgid "Although you can add your API keys manually, we recommend using Stripe Connect: an easier and more secure way of connecting your Stripe account to your website. Stripe Connect prevents issues that can arise when copying and pasting account details from Stripe into your Checkout Plugins - Stripe for WooCommerce payment gateway settings. With Stripe Connect you'll be ready to go with just a few clicks."
226
  msgstr ""
227
 
228
- #: admin/admin-controller.php:718
229
  msgid "Clear all Stripe account keys"
230
  msgstr ""
231
 
232
- #: admin/admin-controller.php:751
233
- #: admin/admin-controller.php:755
234
  msgid "Re-Connect to Stripe"
235
  msgstr ""
236
 
237
- #: admin/admin-controller.php:753
238
- #: admin/admin-controller.php:757
239
  msgid "Your Stripe account has been connected. You can now accept Live and Test payments. You can Re-Connect if you want to recycle your API keys for security."
240
  msgstr ""
241
 
242
- #: admin/admin-controller.php:788
243
  msgid "Connect Manually"
244
  msgstr ""
245
 
246
- #: admin/admin-controller.php:816
 
247
  msgid "Stripe"
248
  msgstr ""
249
 
250
- #: admin/admin-controller.php:902
251
  msgid "Connection Status"
252
  msgstr ""
253
 
254
- #: admin/admin-controller.php:906
255
- #: admin/admin-controller.php:907
256
  msgid "This is your Stripe Connect ID and serves as a unique identifier."
257
  msgstr ""
258
 
259
- #: admin/admin-controller.php:911
260
  msgid "Stripe Account Keys"
261
  msgstr ""
262
 
263
- #: admin/admin-controller.php:914
264
  msgid "This will disable any connection to Stripe."
265
  msgstr ""
266
 
267
- #: admin/admin-controller.php:918
268
  msgid "Connect Stripe Account"
269
  msgstr ""
270
 
271
- #: admin/admin-controller.php:925
272
  msgid "Live Publishable Key"
273
  msgstr ""
274
 
275
- #: admin/admin-controller.php:927
276
- #: admin/admin-controller.php:985
277
  msgid "Your publishable key is used to initialize Stripe assets."
278
  msgstr ""
279
 
280
- #: admin/admin-controller.php:931
281
  msgid "Live Secret Key"
282
  msgstr ""
283
 
284
- #: admin/admin-controller.php:933
285
  msgid "Your secret key is used to authenticate Stripe requests."
286
  msgstr ""
287
 
288
- #: admin/admin-controller.php:937
289
  msgid "Test Publishable Key"
290
  msgstr ""
291
 
292
- #: admin/admin-controller.php:939
293
  msgid "Your test publishable key is used to initialize Stripe assets."
294
  msgstr ""
295
 
296
- #: admin/admin-controller.php:943
297
  msgid "Test Secret Key"
298
  msgstr ""
299
 
300
- #: admin/admin-controller.php:945
301
  msgid "Your test secret key is used to authenticate Stripe requests for testing purposes."
302
  msgstr ""
303
 
304
- #: admin/admin-controller.php:949
305
  msgid "Mode"
306
  msgstr ""
307
 
308
- #: admin/admin-controller.php:955
309
  msgid "No live transactions are processed in test mode. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing."
310
  msgstr ""
311
 
312
- #: admin/admin-controller.php:960
 
313
  msgid "Webhook URL"
314
  msgstr ""
315
 
316
  #. translators: %1$1s - %2$2s HTML markup
317
- #: admin/admin-controller.php:964
318
- msgid "Important: the webhook URL is called by Stripe when events occur in your account, like a source becomes chargeable. %1$1sWebhook Guide%2$2s"
319
  msgstr ""
320
 
321
- #: admin/admin-controller.php:968
322
  msgid "Live Webhook Secret"
323
  msgstr ""
324
 
325
  #. translators: %1$1s Webhook Status
326
- #: admin/admin-controller.php:971
327
- #: admin/admin-controller.php:978
328
  msgid "The webhook secret is used to authenticate webhooks sent from Stripe. It ensures nobody else can send you events pretending to be Stripe. %1$1s"
329
  msgstr ""
330
 
331
- #: admin/admin-controller.php:975
332
  msgid "Test Webhook Secret"
333
  msgstr ""
334
 
335
- #: admin/admin-controller.php:982
336
  msgid "Debug Log"
337
  msgstr ""
338
 
339
- #: admin/admin-controller.php:984
340
  msgid "Log debug messages"
341
  msgstr ""
342
 
343
- #: admin/admin-controller.php:1025
344
  msgid "Please try again."
345
  msgstr ""
346
 
347
- #: admin/admin-controller.php:1075
348
- #: admin/admin-controller.php:1177
349
  msgid "Error: Sorry, the nonce security check didn’t pass. Please reload the page and try again."
350
  msgstr ""
351
 
352
- #: admin/admin-controller.php:1088
353
- #: admin/admin-controller.php:1153
354
  msgid "Test Mode:"
355
  msgstr ""
356
 
357
- #: admin/admin-controller.php:1090
358
  msgid "Please enter secret key to test."
359
  msgstr ""
360
 
361
- #: admin/admin-controller.php:1095
362
- #: admin/admin-controller.php:1157
363
  msgid "Live Mode:"
364
  msgstr ""
365
 
366
- #: admin/admin-controller.php:1097
367
  msgid "Please enter secret key to live."
368
  msgstr ""
369
 
370
- #: admin/admin-controller.php:1101
371
  msgid "Error: Empty String provided for keys"
372
  msgstr ""
373
 
374
  #. translators: %1$1s mode
375
- #: admin/admin-controller.php:1113
376
  msgid "My first %1s customer (created for API docs)"
377
  msgstr ""
378
 
379
- #: admin/admin-controller.php:1118
380
  msgid "Connected to Stripe successfully"
381
  msgstr ""
382
 
383
- #: admin/admin-controller.php:1187
384
  msgid "Stripe keys are reset successfully."
385
  msgstr ""
386
 
387
- #: admin/admin-controller.php:1199
388
- #: inc/traits/subscriptions.php:346
389
  msgid "Invalid Nonce"
390
  msgstr ""
391
 
392
- #: admin/admin-controller.php:1330
393
  msgid "My First Test Customer (created for API docs)"
394
  msgstr ""
395
 
396
- #: admin/admin-controller.php:1379
397
  msgid "My First Live Customer (created for API docs)"
398
  msgstr ""
399
 
400
- #: admin/admin-controller.php:1571
401
  msgid "Express Checkout is a feature of Card Payments. Enable Card Payments to use Express Checkout"
402
  msgstr ""
403
 
404
  #. translators: HTML Markup
405
- #: admin/admin-controller.php:1581
406
  msgid "Accept payment using Apple Pay, Google Pay, Browser Payment Method.%1$1sExpress Checkout uses Payment Request API which is based on client's browser and saved cards.%1$1sPlease check %2$2sprerequisite%3$3s for Apple Pay, Google Pay and Browser Payment Method."
407
  msgstr ""
408
 
409
- #: admin/admin-controller.php:1585
410
  #: wizard/build/app.js:1
 
411
  msgid "Enable Express Checkout"
412
  msgstr ""
413
 
414
- #: admin/admin-controller.php:1591
415
  msgid "Show button on"
416
  msgstr ""
417
 
418
- #: admin/admin-controller.php:1595
419
  msgid "Choose page to display Express Checkout buttons."
420
  msgstr ""
421
 
422
- #: admin/admin-controller.php:1597
423
  msgid "Product"
424
  msgstr ""
425
 
426
- #: admin/admin-controller.php:1598
427
  msgid "Cart"
428
  msgstr ""
429
 
430
- #: admin/admin-controller.php:1599
431
  msgid "Checkout"
432
  msgstr ""
433
 
434
- #: admin/admin-controller.php:1604
435
  msgid "Button text"
436
  msgstr ""
437
 
438
- #: admin/admin-controller.php:1607
439
  msgid "Add label text for the Express Checkout button."
440
  msgstr ""
441
 
442
- #: admin/admin-controller.php:1612
443
  msgid "Button theme"
444
  msgstr ""
445
 
446
- #: admin/admin-controller.php:1615
447
  msgid "Select theme for Express Checkout button."
448
  msgstr ""
449
 
450
- #: admin/admin-controller.php:1618
451
  msgid "Dark"
452
  msgstr ""
453
 
454
- #: admin/admin-controller.php:1619
455
  msgid "Light"
456
  msgstr ""
457
 
458
- #: admin/admin-controller.php:1620
459
  msgid "Light Outline"
460
  msgstr ""
461
 
462
- #: admin/admin-controller.php:1625
463
  msgid "Button Preview"
464
  msgstr ""
465
 
466
- #: admin/admin-controller.php:1634
467
  msgid "Product page options"
468
  msgstr ""
469
 
470
- #: admin/admin-controller.php:1636
471
  msgid "Advanced customization options for product page."
472
  msgstr ""
473
 
474
- #: admin/admin-controller.php:1640
475
- #: admin/admin-controller.php:1716
476
  msgid "Button position"
477
  msgstr ""
478
 
479
- #: admin/admin-controller.php:1644
480
  msgid "Select the position of Express Checkout button. This option will work only for Product page."
481
  msgstr ""
482
 
483
- #: admin/admin-controller.php:1647
484
  msgid "Above Add to Cart"
485
  msgstr ""
486
 
487
- #: admin/admin-controller.php:1648
488
  msgid "Below Add to Cart"
489
  msgstr ""
490
 
491
- #: admin/admin-controller.php:1649
492
  msgid "Inline Button"
493
  msgstr ""
494
 
495
- #: admin/admin-controller.php:1654
496
- #: admin/admin-controller.php:1683
497
- #: admin/admin-controller.php:1770
498
  msgid "Separator text"
499
  msgstr ""
500
 
501
- #: admin/admin-controller.php:1657
502
  msgid "Add separator text for the Express Checkout button. This will help to distinguish between Express Checkout and other buttons."
503
  msgstr ""
504
 
505
- #: admin/admin-controller.php:1663
506
  msgid "Responsive behaviour"
507
  msgstr ""
508
 
509
  #. translators: HTML Markup
510
- #: admin/admin-controller.php:1665
511
  msgid "If checked the Express Checkout button will stick%1$1sat bottom of screen on responsive devices."
512
  msgstr ""
513
 
514
- #: admin/admin-controller.php:1676
515
  msgid "Cart page options"
516
  msgstr ""
517
 
518
- #: admin/admin-controller.php:1678
519
  msgid "Advanced customization options for Cart page."
520
  msgstr ""
521
 
522
- #: admin/admin-controller.php:1687
523
  msgid "Add separator text for Cart page. If empty will show default separator text."
524
  msgstr ""
525
 
526
- #: admin/admin-controller.php:1696
527
  msgid "Checkout page options"
528
  msgstr ""
529
 
530
- #: admin/admin-controller.php:1698
531
  msgid "Advanced customization options for Checkout page."
532
  msgstr ""
533
 
534
- #: admin/admin-controller.php:1703
535
  msgid "Layout"
536
  msgstr ""
537
 
538
- #: admin/admin-controller.php:1707
539
  msgid "Select the layout of Express Checkout button. This option will work only for Checkout page."
540
  msgstr ""
541
 
542
- #: admin/admin-controller.php:1710
543
  msgid "Custom"
544
  msgstr ""
545
 
546
- #: admin/admin-controller.php:1711
547
  msgid "Classic"
548
  msgstr ""
549
 
550
- #: admin/admin-controller.php:1720
551
  msgid "Select the position of Express Checkout button. This option will work only for Checkout page."
552
  msgstr ""
553
 
554
- #: admin/admin-controller.php:1723
555
  msgid "Above checkout form"
556
  msgstr ""
557
 
558
- #: admin/admin-controller.php:1724
559
  msgid "Above billing details"
560
  msgstr ""
561
 
562
- #: admin/admin-controller.php:1729
563
  #: gateway/local-gateway.php:125
564
- #: gateway/stripe/card-payments.php:111
565
  msgid "Title"
566
  msgstr ""
567
 
568
- #: admin/admin-controller.php:1733
569
  msgid "Add a title above Express Checkout button on Checkout page."
570
  msgstr ""
571
 
572
- #: admin/admin-controller.php:1738
573
  msgid "Tagline"
574
  msgstr ""
575
 
576
- #: admin/admin-controller.php:1742
577
  msgid "Add a tagline below the title on Checkout page."
578
  msgstr ""
579
 
580
- #: admin/admin-controller.php:1747
581
  msgid "Button width"
582
  msgstr ""
583
 
584
- #: admin/admin-controller.php:1751
585
  msgid "Select width for button (in px). Default width 100%"
586
  msgstr ""
587
 
588
- #: admin/admin-controller.php:1756
589
  msgid "Alignment"
590
  msgstr ""
591
 
592
- #: admin/admin-controller.php:1760
593
  msgid "This setting will align title, tagline and button based on selection on Checkout page."
594
  msgstr ""
595
 
596
- #: admin/admin-controller.php:1763
597
  msgid "Left"
598
  msgstr ""
599
 
600
- #: admin/admin-controller.php:1764
601
  msgid "Center"
602
  msgstr ""
603
 
604
- #: admin/admin-controller.php:1765
605
  msgid "Right"
606
  msgstr ""
607
 
608
- #: admin/admin-controller.php:1774
609
  msgid "Add separator text for Checkout page. If empty will show default separator text."
610
  msgstr ""
611
 
@@ -692,13 +704,13 @@ msgid " Status : Failed "
692
  msgstr ""
693
 
694
  #: gateway/abstract-payment-gateway.php:318
695
- #: gateway/stripe/sepa.php:499
696
  msgid "Payment will be completed once payment_intent.succeeded webhook received from Stripe."
697
  msgstr ""
698
 
699
  #. translators: transaction id, other info
700
  #: gateway/abstract-payment-gateway.php:321
701
- #: gateway/stripe/sepa.php:502
702
  msgid "Stripe charge awaiting payment: %1$s. %2$s"
703
  msgstr ""
704
 
@@ -709,6 +721,7 @@ msgid "Stripe charge complete (Charge ID: %s)"
709
  msgstr ""
710
 
711
  #: gateway/abstract-payment-gateway.php:336
 
712
  msgid "Payment processing failed. Please retry."
713
  msgstr ""
714
 
@@ -795,7 +808,7 @@ msgid "Title of the %s gateway."
795
  msgstr ""
796
 
797
  #: gateway/local-gateway.php:133
798
- #: gateway/stripe/card-payments.php:118
799
  msgid "Description"
800
  msgstr ""
801
 
@@ -864,57 +877,43 @@ msgstr ""
864
  msgid "Select none"
865
  msgstr ""
866
 
867
- #: gateway/local-gateway.php:340
868
- #: wizard/build/app.js:1
869
- msgid "requires"
870
- msgstr ""
871
-
872
- #: gateway/local-gateway.php:340
873
- msgid "recommends"
874
- msgstr ""
875
-
876
- #. translators: %1$s requires message, %2$s Webhook secret page link, %4$s Payment method, %5$s Webhook guide page link
877
- #: gateway/local-gateway.php:342
878
- msgid "Stripe %1$s using the %2$swebhook%3$s for %4$s. %5$sWebhook Guide%6$s "
879
- msgstr ""
880
-
881
  #. translators: %1$s Payment method, %2$s List of supported currencies
882
- #: gateway/local-gateway.php:352
883
  msgid "%1$s is enabled - it requires store currency to be set to %2$s."
884
  msgstr ""
885
 
886
  #. translators: %1$s Payment method, %2$s List of supported currencies
887
- #: gateway/local-gateway.php:363
888
  msgid "%1$s is enabled - your store currency %2$s does not match with your stripe account supported currency %3$s."
889
  msgstr ""
890
 
891
  #. translators: %s: supported currency.
892
- #: gateway/local-gateway.php:388
893
  msgid "This gateway will appear when store currency is <strong>%s</strong>."
894
  msgstr ""
895
 
896
  #. translators: HTML Entities.
897
- #: gateway/local-gateway.php:402
898
  msgid "%1$1sTest Mode Enabled :%2$2s You will be redirected to an authorization page hosted by Stripe."
899
  msgstr ""
900
 
901
  #. translators: %1$1s method title, %2$2s order id, %3$3s order total amount
902
- #: gateway/local-gateway.php:447
903
  msgid "Begin processing payment with %1$1s for order %2$2s for the amount of %3$3s"
904
  msgstr ""
905
 
906
- #: gateway/local-gateway.php:464
907
  msgid "Contact seller. "
908
  msgstr ""
909
 
910
- #: gateway/local-gateway.php:467
911
  msgid "Store currency doesn't match stripe currency. "
912
  msgstr ""
913
 
914
  #. translators: %s: payment fail message.
915
- #: gateway/local-gateway.php:586
916
- #: gateway/stripe/card-payments.php:365
917
- #: gateway/stripe/sepa.php:510
918
  msgid "Payment failed. %s"
919
  msgstr ""
920
 
@@ -940,201 +939,202 @@ msgstr ""
940
  msgid "Accept payment using Bancontact. %1$s %2$s"
941
  msgstr ""
942
 
943
- #: gateway/stripe/card-payments.php:54
944
  #: wizard/build/app.js:1
 
945
  msgid "Stripe Card Processing"
946
  msgstr ""
947
 
948
- #: gateway/stripe/card-payments.php:55
949
  msgid "Accepts payments via Credit/Debit Cards"
950
  msgstr ""
951
 
952
- #: gateway/stripe/card-payments.php:107
953
  msgid "Enable Stripe Gateway"
954
  msgstr ""
955
 
956
- #: gateway/stripe/card-payments.php:113
957
  msgid "Title of Card Element"
958
  msgstr ""
959
 
960
- #: gateway/stripe/card-payments.php:114
961
  msgid "Credit Card (Stripe)"
962
  msgstr ""
963
 
964
- #: gateway/stripe/card-payments.php:121
965
  msgid "Description on Card Elements for Live mode"
966
  msgstr ""
967
 
968
- #: gateway/stripe/card-payments.php:122
969
  msgid "Pay with your credit card via Stripe"
970
  msgstr ""
971
 
972
- #: gateway/stripe/card-payments.php:126
973
- #: gateway/stripe/sepa.php:235
974
  msgid "Statement Descriptor"
975
  msgstr ""
976
 
977
- #: gateway/stripe/card-payments.php:128
978
- #: gateway/stripe/sepa.php:237
979
  msgid "Statement descriptors are limited to 22 characters, cannot use the special characters >, <, \", \\, *, /, (, ), {, }, and must not consist solely of numbers. This will appear on your customer's statement in capital letters."
980
  msgstr ""
981
 
982
- #: gateway/stripe/card-payments.php:133
983
  #: gateway/stripe/klarna.php:139
984
  msgid "Charge Type"
985
  msgstr ""
986
 
987
- #: gateway/stripe/card-payments.php:135
988
  #: gateway/stripe/klarna.php:141
989
  msgid "Select how to charge Order"
990
  msgstr ""
991
 
992
- #: gateway/stripe/card-payments.php:138
993
  #: gateway/stripe/klarna.php:144
994
  msgid "Charge"
995
  msgstr ""
996
 
997
- #: gateway/stripe/card-payments.php:139
998
  #: gateway/stripe/klarna.php:145
999
  msgid "Authorize"
1000
  msgstr ""
1001
 
1002
- #: gateway/stripe/card-payments.php:144
1003
  msgid "Enable Payment via Saved Cards"
1004
  msgstr ""
1005
 
1006
- #: gateway/stripe/card-payments.php:145
1007
  msgid "Saved Cards"
1008
  msgstr ""
1009
 
1010
- #: gateway/stripe/card-payments.php:147
1011
  msgid "Save card details for future orders"
1012
  msgstr ""
1013
 
1014
- #: gateway/stripe/card-payments.php:152
1015
  msgid "Enable Inline Credit Card Form"
1016
  msgstr ""
1017
 
1018
- #: gateway/stripe/card-payments.php:153
1019
  msgid "Inline Credit Card Form"
1020
  msgstr ""
1021
 
1022
- #: gateway/stripe/card-payments.php:155
1023
  msgid "Use inline credit card for card payments"
1024
  msgstr ""
1025
 
1026
- #: gateway/stripe/card-payments.php:160
1027
  msgid "Allowed Cards"
1028
  msgstr ""
1029
 
1030
- #: gateway/stripe/card-payments.php:163
1031
  msgid "Accepts payments using selected cards. If empty all stripe cards are accepted."
1032
  msgstr ""
1033
 
1034
- #: gateway/stripe/card-payments.php:174
1035
  msgid "Select cards for accepts payments. If empty all stripe cards are accepted."
1036
  msgstr ""
1037
 
1038
- #: gateway/stripe/card-payments.php:178
1039
  msgid "Order Status"
1040
  msgstr ""
1041
 
1042
- #: gateway/stripe/card-payments.php:181
1043
  msgid "Default"
1044
  msgstr ""
1045
 
1046
- #: gateway/stripe/card-payments.php:182
1047
  msgid "Processing"
1048
  msgstr ""
1049
 
1050
- #: gateway/stripe/card-payments.php:183
1051
  msgid "On Hold"
1052
  msgstr ""
1053
 
1054
- #: gateway/stripe/card-payments.php:184
1055
  msgid "Completed"
1056
  msgstr ""
1057
 
1058
- #: gateway/stripe/card-payments.php:188
1059
  msgid "This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status."
1060
  msgstr ""
1061
 
1062
- #: gateway/stripe/card-payments.php:191
1063
  msgid "Order Button Label"
1064
  msgstr ""
1065
 
1066
- #: gateway/stripe/card-payments.php:193
1067
  msgid "Customize label for Order button"
1068
  msgstr ""
1069
 
1070
- #: gateway/stripe/card-payments.php:194
1071
  msgid "Pay via Stripe"
1072
  msgstr ""
1073
 
1074
  #. translators: %1$1s order id, %2$2s order total amount
1075
- #: gateway/stripe/card-payments.php:246
1076
  msgid "Begin processing payment with new payment method for order %1$1s for the amount of %2$2s"
1077
  msgstr ""
1078
 
1079
- #: gateway/stripe/card-payments.php:280
1080
- #: gateway/stripe/sepa.php:170
1081
  msgid "There was a problem adding the payment method."
1082
  msgstr ""
1083
 
1084
  #. translators: error msg
1085
- #: gateway/stripe/card-payments.php:282
1086
- #: gateway/stripe/card-payments.php:298
1087
- #: gateway/stripe/card-payments.php:315
1088
- #: gateway/stripe/sepa.php:172
1089
- #: gateway/stripe/sepa.php:187
1090
- #: gateway/stripe/sepa.php:204
1091
  msgid "Add payment method Error: %1$1s"
1092
  msgstr ""
1093
 
1094
- #: gateway/stripe/card-payments.php:295
1095
- #: gateway/stripe/sepa.php:184
1096
  msgid "Invalid stripe source"
1097
  msgstr ""
1098
 
1099
- #: gateway/stripe/card-payments.php:312
1100
- #: gateway/stripe/sepa.php:201
1101
  msgid "Unble to attach payment method to customer"
1102
  msgstr ""
1103
 
1104
- #: gateway/stripe/card-payments.php:321
1105
- #: gateway/stripe/sepa.php:210
1106
  msgid "New payment method added successfully"
1107
  msgstr ""
1108
 
1109
  #. translators: %1$1s order id, %2$2s token id
1110
- #: gateway/stripe/card-payments.php:352
1111
- #: gateway/stripe/sepa.php:482
1112
  msgid "Payment method tokenized for Order id - %1$1s with token id - %2$2s"
1113
  msgstr ""
1114
 
1115
  #. translators: %1$1s, %2$2s: HTML Markup
1116
- #: gateway/stripe/card-payments.php:482
1117
  msgid "Live Stripe.js integrations must use HTTPS. %1$1s For more information:%2$2s"
1118
  msgstr ""
1119
 
1120
- #: gateway/stripe/card-payments.php:512
1121
  msgid "Enter Card Details"
1122
  msgstr ""
1123
 
1124
- #: gateway/stripe/card-payments.php:515
1125
  msgid "Expiry Date"
1126
  msgstr ""
1127
 
1128
- #: gateway/stripe/card-payments.php:519
1129
  msgid "CVC"
1130
  msgstr ""
1131
 
1132
- #: gateway/stripe/card-payments.php:524
1133
  msgid "Save Card for Future Payments"
1134
  msgstr ""
1135
 
1136
  #. translators: %1$1s - %6$6s: HTML Markup
1137
- #: gateway/stripe/card-payments.php:530
1138
  msgid "%1$1s Test Mode Enabled:%2$2s Use demo card 4242424242424242 with any future date and CVV. Check more %3$3sdemo cards%4$4s"
1139
  msgstr ""
1140
 
@@ -1250,55 +1250,55 @@ msgstr ""
1250
  msgid "Unable to provide shipping options for Payment Requests."
1251
  msgstr ""
1252
 
1253
- #: gateway/stripe/sepa.php:90
1254
  msgid "SEPA IBAN"
1255
  msgstr ""
1256
 
1257
  #. translators: %1$s: Break, %2$s: HTML entities
1258
- #: gateway/stripe/sepa.php:126
1259
  msgid "Accept payment using SEPA. %1$s %2$s"
1260
  msgstr ""
1261
 
1262
- #: gateway/stripe/sepa.php:227
1263
  msgid "Enable Payment via Saved IBAN"
1264
  msgstr ""
1265
 
1266
- #: gateway/stripe/sepa.php:228
1267
  msgid "Saved IBAN"
1268
  msgstr ""
1269
 
1270
- #: gateway/stripe/sepa.php:230
1271
  msgid "Save IBAN details for future orders"
1272
  msgstr ""
1273
 
1274
- #: gateway/stripe/sepa.php:242
1275
  msgid "Company Name"
1276
  msgstr ""
1277
 
1278
- #: gateway/stripe/sepa.php:246
1279
  msgid "The name of your company that will appear in the SEPA mandate."
1280
  msgstr ""
1281
 
1282
- #: gateway/stripe/sepa.php:252
1283
  msgid "Mandate Information."
1284
  msgstr ""
1285
 
1286
  #. translators: %s: company name.
1287
- #: gateway/stripe/sepa.php:285
1288
  msgid "By providing your IBAN and confirming this payment, you are authorizing %s and Stripe, our payment service provider, to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited."
1289
  msgstr ""
1290
 
1291
- #: gateway/stripe/sepa.php:291
1292
  msgid "IBAN."
1293
  msgstr ""
1294
 
1295
  #. translators: %1$1s - %6$6s: HTML Markup
1296
- #: gateway/stripe/sepa.php:356
1297
  msgid "%1$1s Test Mode Enabled %2$2s : Use demo IBAN number DE89370400440532013000. %3$3s Check more %4$4sDemo IBAN Number%5$5s"
1298
  msgstr ""
1299
 
1300
  #. translators: %1$1s order id, %2$2s order total amount
1301
- #: gateway/stripe/sepa.php:432
1302
  msgid "Begin processing payment with SEPA for order %1$1s for the amount of %2$2s"
1303
  msgstr ""
1304
 
@@ -1555,71 +1555,87 @@ msgstr ""
1555
  msgid "The email address is invalid. Check that the email address is properly formatted and only includes allowed characters."
1556
  msgstr ""
1557
 
1558
- #: inc/helper.php:251
1559
  msgid "The card has been declined. When a card is declined, the error returned also includes the decline_code attribute with the reason why the card was declined."
1560
  msgstr ""
1561
 
1562
- #: inc/helper.php:252
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1563
  msgid "The request contains one or more unexpected parameters. Remove these and try again."
1564
  msgstr ""
1565
 
1566
- #: inc/helper.php:253
1567
  msgid "Your card number is incomplete."
1568
  msgstr ""
1569
 
1570
- #: inc/helper.php:254
1571
  msgid "Your card's expiration date is incomplete."
1572
  msgstr ""
1573
 
1574
- #: inc/helper.php:255
1575
  msgid "Your card's security code is incomplete."
1576
  msgstr ""
1577
 
1578
- #: inc/helper.php:256
1579
  msgid "Your card's zip code is incomplete."
1580
  msgstr ""
1581
 
1582
- #: inc/helper.php:257
1583
  msgid "There was an error processing your credit card."
1584
  msgstr ""
1585
 
1586
- #: inc/helper.php:258
1587
  msgid "Your card's expiration year is in the past."
1588
  msgstr ""
1589
 
1590
- #: inc/helper.php:259
1591
  msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
1592
  msgstr ""
1593
 
1594
- #: inc/helper.php:263
1595
  msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
1596
  msgstr ""
1597
 
1598
- #: inc/helper.php:267
1599
  msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
1600
  msgstr ""
1601
 
1602
- #: inc/helper.php:268
1603
  msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
1604
  msgstr ""
1605
 
1606
- #: inc/helper.php:272
1607
  msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
1608
  msgstr ""
1609
 
1610
- #: inc/helper.php:276
1611
  msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
1612
  msgstr ""
1613
 
1614
- #: inc/helper.php:280
1615
  msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
1616
  msgstr ""
1617
 
1618
- #: inc/helper.php:284
1619
  msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
1620
  msgstr ""
1621
 
1622
- #: inc/helper.php:288
1623
  msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
1624
  msgstr ""
1625
 
@@ -1640,221 +1656,333 @@ msgstr ""
1640
  msgid "Sorry, we are unable to process your payment at this time. Please retry later."
1641
  msgstr ""
1642
 
1643
- #: inc/traits/subscriptions.php:253
1644
  msgid "This transaction requires authentication."
1645
  msgstr ""
1646
 
1647
- #. translators: %s is the charge Id
1648
  #. translators: %s is the stripe charge Id
1649
- #: inc/traits/subscriptions.php:262
1650
- #: inc/traits/subscriptions.php:654
1651
  msgid "Stripe charge awaiting authentication by user: %s."
1652
  msgstr ""
1653
 
1654
- #: inc/traits/subscriptions.php:583
1655
  msgid "A \"Stripe Customer ID\" value is required."
1656
  msgstr ""
1657
 
1658
- #: inc/traits/subscriptions.php:586
1659
  msgid "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with \"cus_\"."
1660
  msgstr ""
1661
 
1662
- #: inc/traits/subscriptions.php:596
1663
  msgid "Invalid source ID. A valid source \"Stripe Source ID\" must begin with \"src_\", \"pm_\", or \"card_\"."
1664
  msgstr ""
1665
 
1666
- #: inc/traits/subscriptions.php:777
1667
  msgid "Invalid payment method. Please input a new card number."
1668
  msgstr ""
1669
 
1670
- #: wizard/onboarding.php:130
1671
  msgid "Stripe for WooCommerce - Onboarding"
1672
  msgstr ""
1673
 
1674
- #: wizard/onboarding.php:178
1675
  msgid "Thanks for installing Checkout Plugins - Stripe for WooCommerce!"
1676
  msgstr ""
1677
 
1678
- #: wizard/onboarding.php:179
1679
  msgid "Follow Onboarding process to connect your Stripe account"
1680
  msgstr ""
1681
 
1682
- #: wizard/onboarding.php:181
1683
  msgid "Configure Stripe"
1684
  msgstr ""
1685
 
1686
- #: wizard/onboarding.php:182
1687
  msgid "Skip Setup"
1688
  msgstr ""
1689
 
1690
  #: wizard/build/app.js:1
 
1691
  msgid "Let's Connect"
1692
  msgstr ""
1693
 
1694
  #: wizard/build/app.js:1
 
1695
  msgid "with Stripe"
1696
  msgstr ""
1697
 
1698
  #: wizard/build/app.js:1
 
1699
  msgid "recommends to connect with"
1700
  msgstr ""
1701
 
1702
  #: wizard/build/app.js:1
 
1703
  msgid "Stripe connect."
1704
  msgstr ""
1705
 
1706
  #: wizard/build/app.js:1
 
1707
  msgid "One click onboarding solution provided by"
1708
  msgstr ""
1709
 
1710
  #: wizard/build/app.js:1
 
1711
  msgid "Stripe."
1712
  msgstr ""
1713
 
1714
  #: wizard/build/app.js:1
 
1715
  msgid "Connecting…"
1716
  msgstr ""
1717
 
1718
  #: wizard/build/app.js:1
 
1719
  msgid "Leave onboarding process"
1720
  msgstr ""
1721
 
1722
  #: wizard/build/app.js:1
 
1723
  msgid "Congratulations!!"
1724
  msgstr ""
1725
 
1726
  #: wizard/build/app.js:1
 
1727
  msgid "You are connected to Stripe successfully."
1728
  msgstr ""
1729
 
1730
  #: wizard/build/app.js:1
 
1731
  msgid "Let's enable gateways"
1732
  msgstr ""
1733
 
1734
  #: wizard/build/app.js:1
 
1735
  msgid "Recommended"
1736
  msgstr ""
1737
 
1738
  #: wizard/build/app.js:1
 
1739
  msgid "Works with all currencies"
1740
  msgstr ""
1741
 
1742
  #: wizard/build/app.js:1
 
1743
  msgid "Works with "
1744
  msgstr ""
1745
 
1746
  #: wizard/build/app.js:1
 
 
1747
  msgid "Enabling…"
1748
  msgstr ""
1749
 
1750
  #: wizard/build/app.js:1
 
1751
  msgid "Enable Gateways"
1752
  msgstr ""
1753
 
1754
  #: wizard/build/app.js:1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1755
  msgid "Wooho!!"
1756
  msgstr ""
1757
 
1758
  #: wizard/build/app.js:1
 
1759
  msgid "You are almost done."
1760
  msgstr ""
1761
 
1762
  #: wizard/build/app.js:1
 
1763
  msgid "Since you have enabled"
1764
  msgstr ""
1765
 
1766
  #: wizard/build/app.js:1
 
1767
  msgid " We recommend you to enable"
1768
  msgstr ""
1769
 
1770
  #: wizard/build/app.js:1
 
1771
  msgid "feature"
1772
  msgstr ""
1773
 
1774
  #: wizard/build/app.js:1
 
1775
  msgid "Express Checkout generates more conversions!!"
1776
  msgstr ""
1777
 
1778
  #: wizard/build/app.js:1
 
1779
  msgid "Skip Express Checkout"
1780
  msgstr ""
1781
 
1782
  #: wizard/build/app.js:1
 
1783
  msgid "Failed!!"
1784
  msgstr ""
1785
 
1786
  #: wizard/build/app.js:1
 
1787
  msgid "Unfortunately Connection to Stripe failed."
1788
  msgstr ""
1789
 
1790
  #: wizard/build/app.js:1
 
1791
  msgid "Try Again"
1792
  msgstr ""
1793
 
1794
  #: wizard/build/app.js:1
 
1795
  msgid "Great!!"
1796
  msgstr ""
1797
 
1798
  #: wizard/build/app.js:1
 
1799
  msgid "Your store is all set to accept payment."
1800
  msgstr ""
1801
 
1802
  #: wizard/build/app.js:1
 
1803
  msgid "We provide lots of customization options to match your needs, don't forget to explore them."
1804
  msgstr ""
1805
 
1806
  #: wizard/build/app.js:1
 
1807
  msgid "Let's Customize…"
1808
  msgstr ""
1809
 
1810
  #: wizard/build/app.js:1
 
1811
  msgid "Let's Customize"
1812
  msgstr ""
1813
 
1814
  #: wizard/build/app.js:1
 
1815
  msgid "Missing"
1816
  msgstr ""
1817
 
1818
  #: wizard/build/app.js:1
 
1819
  msgid "Inactiave"
1820
  msgstr ""
1821
 
1822
  #: wizard/build/app.js:1
 
1823
  msgid "WooCoomerce"
1824
  msgstr ""
1825
 
1826
  #: wizard/build/app.js:1
 
1827
  msgid "Checkout Plugins - Stripe for WooCoomerce"
1828
  msgstr ""
1829
 
1830
  #: wizard/build/app.js:1
 
 
 
 
 
 
1831
  msgid "WooCommerce"
1832
  msgstr ""
1833
 
1834
  #: wizard/build/app.js:1
 
1835
  msgid "to be active on your store."
1836
  msgstr ""
1837
 
1838
  #: wizard/build/app.js:1
 
1839
  msgid "Installing…"
1840
  msgstr ""
1841
 
1842
  #: wizard/build/app.js:1
 
1843
  msgid "Activating…"
1844
  msgstr ""
1845
 
1846
  #: wizard/build/app.js:1
 
1847
  msgid "Install and continue"
1848
  msgstr ""
1849
 
1850
  #: wizard/build/app.js:1
 
1851
  msgid "Activate and continue"
1852
  msgstr ""
1853
 
1854
  #: wizard/build/app.js:1
 
1855
  msgid "Installing WooCommerce will take time. Please be patient."
1856
  msgstr ""
1857
 
1858
  #: wizard/build/app.js:1
 
1859
  msgid "WooCommerce installing failed. Please try again."
1860
  msgstr ""
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Checkout Plugins - Stripe for WooCommerce 1.4.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/checkout-plugins-stripe-woo\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-03-28T13:54:04+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: checkout-plugins-stripe-woo\n"
28
 
29
  #. Author of the plugin
30
  #: wizard/build/app.js:1
31
+ #: wizard/build/app.js:989
32
  msgid "Checkout Plugins"
33
  msgstr ""
34
 
37
  msgstr ""
38
 
39
  #: admin/admin-controller.php:79
40
+ #: admin/admin-controller.php:907
41
  msgid "Stripe API Settings"
42
  msgstr ""
43
 
46
  msgstr ""
47
 
48
  #: admin/admin-controller.php:81
49
+ #: admin/admin-controller.php:1595
50
  #: inc/helper.php:87
51
  #: wizard/build/app.js:1
52
+ #: wizard/build/app.js:895
53
  msgid "Express Checkout"
54
  msgstr ""
55
 
69
  msgstr ""
70
 
71
  #: admin/admin-controller.php:85
72
+ #: gateway/stripe/sepa.php:61
73
  msgid "SEPA"
74
  msgstr ""
75
 
88
  msgid "Bancontact"
89
  msgstr ""
90
 
91
+ #: admin/admin-controller.php:269
92
  msgid "Something went wrong! Please reload the page and try again."
93
  msgstr ""
94
 
95
+ #: admin/admin-controller.php:270
96
+ #: admin/admin-controller.php:776
97
  msgid "Connect to Stripe"
98
  msgstr ""
99
 
100
+ #: admin/admin-controller.php:271
101
  msgid "Please enter all keys to connect to stripe."
102
  msgstr ""
103
 
104
+ #: admin/admin-controller.php:272
105
  msgid "You must enter your API keys or connect the plugin before performing a connection test. Mode:"
106
  msgstr ""
107
 
108
+ #: admin/admin-controller.php:273
109
  msgid "Keys Unavailable."
110
  msgstr ""
111
 
112
+ #: admin/admin-controller.php:274
113
  msgid "Your Stripe account has been disconnected."
114
  msgstr ""
115
 
116
+ #: admin/admin-controller.php:275
117
  msgid "You can connect other Stripe account now."
118
  msgstr ""
119
 
120
+ #: admin/admin-controller.php:296
121
+ #: admin/admin-controller.php:320
122
  #: gateway/stripe/frontend-scripts.php:144
123
  #: gateway/stripe/payment-request-api.php:152
124
  #: inc/helper.php:84
126
  msgstr ""
127
 
128
  #. translators: Html Markup
129
+ #: admin/admin-controller.php:318
130
  msgid "No payment method detected. Either your browser is not supported or you do not have save cards. For more details read %1$1sdocument$2$2s."
131
  msgstr ""
132
 
133
+ #: admin/admin-controller.php:319
134
  msgid "NOTE: Title and Tagline appears only on Checkout page."
135
  msgstr ""
136
 
137
  #. translators: %1$1s HTML Markup
138
+ #: admin/admin-controller.php:339
139
  msgid "You Stripe Publishable and Secret Keys are not set correctly. You can connect to Stripe and correct them from <a href=\"%1$1s\">here.</a>"
140
  msgstr ""
141
 
142
+ #: admin/admin-controller.php:349
143
+ #: admin/admin-controller.php:912
144
  msgid "Stripe Connect"
145
  msgstr ""
146
 
147
+ #: admin/admin-controller.php:352
148
+ #: admin/admin-controller.php:565
149
+ #: admin/admin-controller.php:1544
150
  msgid "Hide API keys"
151
  msgstr ""
152
 
153
+ #: admin/admin-controller.php:354
154
+ #: admin/admin-controller.php:562
155
+ #: admin/admin-controller.php:1540
156
  #: wizard/build/app.js:1
157
+ #: wizard/build/app.js:951
158
  msgid "Manage API keys manually"
159
  msgstr ""
160
 
161
  #. translators: %1$1s: mode, %2$2s, %3$3s: HTML Markup
162
+ #: admin/admin-controller.php:357
163
  msgid "Stripe Keys for %1$1s mode are not set correctly. Reconnect via %2$2s or %3$3s"
164
  msgstr ""
165
 
166
+ #: admin/admin-controller.php:371
167
  msgid "No SSL was detected, Stripe live mode requires SSL."
168
  msgstr ""
169
 
170
+ #: admin/admin-controller.php:382
171
  msgid "Your Stripe account has been connected to your WooCommerce store. You may now accept payments in live and test mode."
172
  msgstr ""
173
 
174
+ #: admin/admin-controller.php:393
175
  msgid "We were not able to connect your Stripe account. Please try again. "
176
  msgstr ""
177
 
178
+ #. translators: %1$s Webhook secret page link, %2$s Webhook guide page link
179
+ #: admin/admin-controller.php:405
180
+ msgid "Stripe requires using the %1$swebhook%2$s. %3$sWebhook Guide%4$s "
181
+ msgstr ""
182
+
183
+ #: admin/admin-controller.php:416
184
+ #: admin/admin-controller.php:1096
185
+ #: admin/admin-controller.php:1198
186
  msgid "Error: The current user doesn’t have sufficient permissions to perform this action. Please reload the page and try again."
187
  msgstr ""
188
 
189
+ #: admin/admin-controller.php:452
190
+ #: admin/admin-controller.php:537
191
  #: wizard/build/app.js:1
192
+ #: wizard/build/app.js:1002
193
  msgid "Connect with Stripe"
194
  msgstr ""
195
 
196
+ #: admin/admin-controller.php:453
197
+ #: admin/admin-controller.php:777
198
+ #: admin/admin-controller.php:938
199
  msgid "We make it easy to connect Stripe to your site. Click the Connect button to go through our connect flow."
200
  msgstr ""
201
 
202
  #. translators: %1$1s, %2$2s: HTML Markup
203
+ #: admin/admin-controller.php:476
204
  msgid "Have questions about connecting with Stripe? Read %1$s document. %2$s"
205
  msgstr ""
206
 
207
+ #: admin/admin-controller.php:484
208
  msgid "Although you can add your API keys manually, we recommend using Stripe Connect. Stripe Connect prevents issues that can arise when copying and pasting account details from Stripe into Checkout Plugins - Stripe for WooCommerce settings."
209
  msgstr ""
210
 
211
  #. translators: %1$1s %2$2s %3$3s: HTML Markup
212
+ #: admin/admin-controller.php:531
213
  msgid "Your manually managed API keys are valid."
214
  msgstr ""
215
 
216
+ #: admin/admin-controller.php:535
217
  msgid "It is highly recommended to Connect with Stripe for easier setup and improved security."
218
  msgstr ""
219
 
220
  #. translators: $1s Acoount name, $2s html markup, $3s account id, $4s html markup
221
+ #: admin/admin-controller.php:545
222
  msgid "Account (%1$1s) %2$2s %3$3s %4$4s is connected."
223
  msgstr ""
224
 
225
+ #: admin/admin-controller.php:555
226
  msgid "Disconnect &amp; connect other account?"
227
  msgstr ""
228
 
229
+ #: admin/admin-controller.php:557
230
  msgid "Test Connection"
231
  msgstr ""
232
 
233
+ #: admin/admin-controller.php:572
234
  msgid "Although you can add your API keys manually, we recommend using Stripe Connect: an easier and more secure way of connecting your Stripe account to your website. Stripe Connect prevents issues that can arise when copying and pasting account details from Stripe into your Checkout Plugins - Stripe for WooCommerce payment gateway settings. With Stripe Connect you'll be ready to go with just a few clicks."
235
  msgstr ""
236
 
237
+ #: admin/admin-controller.php:735
238
  msgid "Clear all Stripe account keys"
239
  msgstr ""
240
 
241
+ #: admin/admin-controller.php:768
242
+ #: admin/admin-controller.php:772
243
  msgid "Re-Connect to Stripe"
244
  msgstr ""
245
 
246
+ #: admin/admin-controller.php:770
247
+ #: admin/admin-controller.php:774
248
  msgid "Your Stripe account has been connected. You can now accept Live and Test payments. You can Re-Connect if you want to recycle your API keys for security."
249
  msgstr ""
250
 
251
+ #: admin/admin-controller.php:805
252
  msgid "Connect Manually"
253
  msgstr ""
254
 
255
+ #: admin/admin-controller.php:833
256
+ #: wizard/build/app.js:1
257
  msgid "Stripe"
258
  msgstr ""
259
 
260
+ #: admin/admin-controller.php:919
261
  msgid "Connection Status"
262
  msgstr ""
263
 
264
+ #: admin/admin-controller.php:923
265
+ #: admin/admin-controller.php:924
266
  msgid "This is your Stripe Connect ID and serves as a unique identifier."
267
  msgstr ""
268
 
269
+ #: admin/admin-controller.php:928
270
  msgid "Stripe Account Keys"
271
  msgstr ""
272
 
273
+ #: admin/admin-controller.php:931
274
  msgid "This will disable any connection to Stripe."
275
  msgstr ""
276
 
277
+ #: admin/admin-controller.php:935
278
  msgid "Connect Stripe Account"
279
  msgstr ""
280
 
281
+ #: admin/admin-controller.php:942
282
  msgid "Live Publishable Key"
283
  msgstr ""
284
 
285
+ #: admin/admin-controller.php:944
286
+ #: admin/admin-controller.php:1002
287
  msgid "Your publishable key is used to initialize Stripe assets."
288
  msgstr ""
289
 
290
+ #: admin/admin-controller.php:948
291
  msgid "Live Secret Key"
292
  msgstr ""
293
 
294
+ #: admin/admin-controller.php:950
295
  msgid "Your secret key is used to authenticate Stripe requests."
296
  msgstr ""
297
 
298
+ #: admin/admin-controller.php:954
299
  msgid "Test Publishable Key"
300
  msgstr ""
301
 
302
+ #: admin/admin-controller.php:956
303
  msgid "Your test publishable key is used to initialize Stripe assets."
304
  msgstr ""
305
 
306
+ #: admin/admin-controller.php:960
307
  msgid "Test Secret Key"
308
  msgstr ""
309
 
310
+ #: admin/admin-controller.php:962
311
  msgid "Your test secret key is used to authenticate Stripe requests for testing purposes."
312
  msgstr ""
313
 
314
+ #: admin/admin-controller.php:966
315
  msgid "Mode"
316
  msgstr ""
317
 
318
+ #: admin/admin-controller.php:972
319
  msgid "No live transactions are processed in test mode. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing."
320
  msgstr ""
321
 
322
+ #: admin/admin-controller.php:977
323
+ #: wizard/build/app.js:1
324
  msgid "Webhook URL"
325
  msgstr ""
326
 
327
  #. translators: %1$1s - %2$2s HTML markup
328
+ #: admin/admin-controller.php:981
329
+ msgid "Important: the webhook URL is called by Stripe when events occur in your account, like a source becomes chargeable. %1$1sWebhook Guide%2$2s or create webhook on %3$3sstripe dashboard%4$4s"
330
  msgstr ""
331
 
332
+ #: admin/admin-controller.php:985
333
  msgid "Live Webhook Secret"
334
  msgstr ""
335
 
336
  #. translators: %1$1s Webhook Status
337
+ #: admin/admin-controller.php:988
338
+ #: admin/admin-controller.php:995
339
  msgid "The webhook secret is used to authenticate webhooks sent from Stripe. It ensures nobody else can send you events pretending to be Stripe. %1$1s"
340
  msgstr ""
341
 
342
+ #: admin/admin-controller.php:992
343
  msgid "Test Webhook Secret"
344
  msgstr ""
345
 
346
+ #: admin/admin-controller.php:999
347
  msgid "Debug Log"
348
  msgstr ""
349
 
350
+ #: admin/admin-controller.php:1001
351
  msgid "Log debug messages"
352
  msgstr ""
353
 
354
+ #: admin/admin-controller.php:1042
355
  msgid "Please try again."
356
  msgstr ""
357
 
358
+ #: admin/admin-controller.php:1092
359
+ #: admin/admin-controller.php:1194
360
  msgid "Error: Sorry, the nonce security check didn’t pass. Please reload the page and try again."
361
  msgstr ""
362
 
363
+ #: admin/admin-controller.php:1105
364
+ #: admin/admin-controller.php:1170
365
  msgid "Test Mode:"
366
  msgstr ""
367
 
368
+ #: admin/admin-controller.php:1107
369
  msgid "Please enter secret key to test."
370
  msgstr ""
371
 
372
+ #: admin/admin-controller.php:1112
373
+ #: admin/admin-controller.php:1174
374
  msgid "Live Mode:"
375
  msgstr ""
376
 
377
+ #: admin/admin-controller.php:1114
378
  msgid "Please enter secret key to live."
379
  msgstr ""
380
 
381
+ #: admin/admin-controller.php:1118
382
  msgid "Error: Empty String provided for keys"
383
  msgstr ""
384
 
385
  #. translators: %1$1s mode
386
+ #: admin/admin-controller.php:1130
387
  msgid "My first %1s customer (created for API docs)"
388
  msgstr ""
389
 
390
+ #: admin/admin-controller.php:1135
391
  msgid "Connected to Stripe successfully"
392
  msgstr ""
393
 
394
+ #: admin/admin-controller.php:1204
395
  msgid "Stripe keys are reset successfully."
396
  msgstr ""
397
 
398
+ #: admin/admin-controller.php:1216
399
+ #: inc/traits/subscriptions.php:351
400
  msgid "Invalid Nonce"
401
  msgstr ""
402
 
403
+ #: admin/admin-controller.php:1347
404
  msgid "My First Test Customer (created for API docs)"
405
  msgstr ""
406
 
407
+ #: admin/admin-controller.php:1396
408
  msgid "My First Live Customer (created for API docs)"
409
  msgstr ""
410
 
411
+ #: admin/admin-controller.php:1588
412
  msgid "Express Checkout is a feature of Card Payments. Enable Card Payments to use Express Checkout"
413
  msgstr ""
414
 
415
  #. translators: HTML Markup
416
+ #: admin/admin-controller.php:1598
417
  msgid "Accept payment using Apple Pay, Google Pay, Browser Payment Method.%1$1sExpress Checkout uses Payment Request API which is based on client's browser and saved cards.%1$1sPlease check %2$2sprerequisite%3$3s for Apple Pay, Google Pay and Browser Payment Method."
418
  msgstr ""
419
 
420
+ #: admin/admin-controller.php:1602
421
  #: wizard/build/app.js:1
422
+ #: wizard/build/app.js:911
423
  msgid "Enable Express Checkout"
424
  msgstr ""
425
 
426
+ #: admin/admin-controller.php:1608
427
  msgid "Show button on"
428
  msgstr ""
429
 
430
+ #: admin/admin-controller.php:1612
431
  msgid "Choose page to display Express Checkout buttons."
432
  msgstr ""
433
 
434
+ #: admin/admin-controller.php:1614
435
  msgid "Product"
436
  msgstr ""
437
 
438
+ #: admin/admin-controller.php:1615
439
  msgid "Cart"
440
  msgstr ""
441
 
442
+ #: admin/admin-controller.php:1616
443
  msgid "Checkout"
444
  msgstr ""
445
 
446
+ #: admin/admin-controller.php:1621
447
  msgid "Button text"
448
  msgstr ""
449
 
450
+ #: admin/admin-controller.php:1624
451
  msgid "Add label text for the Express Checkout button."
452
  msgstr ""
453
 
454
+ #: admin/admin-controller.php:1629
455
  msgid "Button theme"
456
  msgstr ""
457
 
458
+ #: admin/admin-controller.php:1632
459
  msgid "Select theme for Express Checkout button."
460
  msgstr ""
461
 
462
+ #: admin/admin-controller.php:1635
463
  msgid "Dark"
464
  msgstr ""
465
 
466
+ #: admin/admin-controller.php:1636
467
  msgid "Light"
468
  msgstr ""
469
 
470
+ #: admin/admin-controller.php:1637
471
  msgid "Light Outline"
472
  msgstr ""
473
 
474
+ #: admin/admin-controller.php:1642
475
  msgid "Button Preview"
476
  msgstr ""
477
 
478
+ #: admin/admin-controller.php:1651
479
  msgid "Product page options"
480
  msgstr ""
481
 
482
+ #: admin/admin-controller.php:1653
483
  msgid "Advanced customization options for product page."
484
  msgstr ""
485
 
486
+ #: admin/admin-controller.php:1657
487
+ #: admin/admin-controller.php:1733
488
  msgid "Button position"
489
  msgstr ""
490
 
491
+ #: admin/admin-controller.php:1661
492
  msgid "Select the position of Express Checkout button. This option will work only for Product page."
493
  msgstr ""
494
 
495
+ #: admin/admin-controller.php:1664
496
  msgid "Above Add to Cart"
497
  msgstr ""
498
 
499
+ #: admin/admin-controller.php:1665
500
  msgid "Below Add to Cart"
501
  msgstr ""
502
 
503
+ #: admin/admin-controller.php:1666
504
  msgid "Inline Button"
505
  msgstr ""
506
 
507
+ #: admin/admin-controller.php:1671
508
+ #: admin/admin-controller.php:1700
509
+ #: admin/admin-controller.php:1787
510
  msgid "Separator text"
511
  msgstr ""
512
 
513
+ #: admin/admin-controller.php:1674
514
  msgid "Add separator text for the Express Checkout button. This will help to distinguish between Express Checkout and other buttons."
515
  msgstr ""
516
 
517
+ #: admin/admin-controller.php:1680
518
  msgid "Responsive behaviour"
519
  msgstr ""
520
 
521
  #. translators: HTML Markup
522
+ #: admin/admin-controller.php:1682
523
  msgid "If checked the Express Checkout button will stick%1$1sat bottom of screen on responsive devices."
524
  msgstr ""
525
 
526
+ #: admin/admin-controller.php:1693
527
  msgid "Cart page options"
528
  msgstr ""
529
 
530
+ #: admin/admin-controller.php:1695
531
  msgid "Advanced customization options for Cart page."
532
  msgstr ""
533
 
534
+ #: admin/admin-controller.php:1704
535
  msgid "Add separator text for Cart page. If empty will show default separator text."
536
  msgstr ""
537
 
538
+ #: admin/admin-controller.php:1713
539
  msgid "Checkout page options"
540
  msgstr ""
541
 
542
+ #: admin/admin-controller.php:1715
543
  msgid "Advanced customization options for Checkout page."
544
  msgstr ""
545
 
546
+ #: admin/admin-controller.php:1720
547
  msgid "Layout"
548
  msgstr ""
549
 
550
+ #: admin/admin-controller.php:1724
551
  msgid "Select the layout of Express Checkout button. This option will work only for Checkout page."
552
  msgstr ""
553
 
554
+ #: admin/admin-controller.php:1727
555
  msgid "Custom"
556
  msgstr ""
557
 
558
+ #: admin/admin-controller.php:1728
559
  msgid "Classic"
560
  msgstr ""
561
 
562
+ #: admin/admin-controller.php:1737
563
  msgid "Select the position of Express Checkout button. This option will work only for Checkout page."
564
  msgstr ""
565
 
566
+ #: admin/admin-controller.php:1740
567
  msgid "Above checkout form"
568
  msgstr ""
569
 
570
+ #: admin/admin-controller.php:1741
571
  msgid "Above billing details"
572
  msgstr ""
573
 
574
+ #: admin/admin-controller.php:1746
575
  #: gateway/local-gateway.php:125
576
+ #: gateway/stripe/card-payments.php:118
577
  msgid "Title"
578
  msgstr ""
579
 
580
+ #: admin/admin-controller.php:1750
581
  msgid "Add a title above Express Checkout button on Checkout page."
582
  msgstr ""
583
 
584
+ #: admin/admin-controller.php:1755
585
  msgid "Tagline"
586
  msgstr ""
587
 
588
+ #: admin/admin-controller.php:1759
589
  msgid "Add a tagline below the title on Checkout page."
590
  msgstr ""
591
 
592
+ #: admin/admin-controller.php:1764
593
  msgid "Button width"
594
  msgstr ""
595
 
596
+ #: admin/admin-controller.php:1768
597
  msgid "Select width for button (in px). Default width 100%"
598
  msgstr ""
599
 
600
+ #: admin/admin-controller.php:1773
601
  msgid "Alignment"
602
  msgstr ""
603
 
604
+ #: admin/admin-controller.php:1777
605
  msgid "This setting will align title, tagline and button based on selection on Checkout page."
606
  msgstr ""
607
 
608
+ #: admin/admin-controller.php:1780
609
  msgid "Left"
610
  msgstr ""
611
 
612
+ #: admin/admin-controller.php:1781
613
  msgid "Center"
614
  msgstr ""
615
 
616
+ #: admin/admin-controller.php:1782
617
  msgid "Right"
618
  msgstr ""
619
 
620
+ #: admin/admin-controller.php:1791
621
  msgid "Add separator text for Checkout page. If empty will show default separator text."
622
  msgstr ""
623
 
704
  msgstr ""
705
 
706
  #: gateway/abstract-payment-gateway.php:318
707
+ #: gateway/stripe/sepa.php:506
708
  msgid "Payment will be completed once payment_intent.succeeded webhook received from Stripe."
709
  msgstr ""
710
 
711
  #. translators: transaction id, other info
712
  #: gateway/abstract-payment-gateway.php:321
713
+ #: gateway/stripe/sepa.php:509
714
  msgid "Stripe charge awaiting payment: %1$s. %2$s"
715
  msgstr ""
716
 
721
  msgstr ""
722
 
723
  #: gateway/abstract-payment-gateway.php:336
724
+ #: inc/traits/subscriptions.php:334
725
  msgid "Payment processing failed. Please retry."
726
  msgstr ""
727
 
808
  msgstr ""
809
 
810
  #: gateway/local-gateway.php:133
811
+ #: gateway/stripe/card-payments.php:125
812
  msgid "Description"
813
  msgstr ""
814
 
877
  msgid "Select none"
878
  msgstr ""
879
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
  #. translators: %1$s Payment method, %2$s List of supported currencies
881
+ #: gateway/local-gateway.php:340
882
  msgid "%1$s is enabled - it requires store currency to be set to %2$s."
883
  msgstr ""
884
 
885
  #. translators: %1$s Payment method, %2$s List of supported currencies
886
+ #: gateway/local-gateway.php:351
887
  msgid "%1$s is enabled - your store currency %2$s does not match with your stripe account supported currency %3$s."
888
  msgstr ""
889
 
890
  #. translators: %s: supported currency.
891
+ #: gateway/local-gateway.php:376
892
  msgid "This gateway will appear when store currency is <strong>%s</strong>."
893
  msgstr ""
894
 
895
  #. translators: HTML Entities.
896
+ #: gateway/local-gateway.php:390
897
  msgid "%1$1sTest Mode Enabled :%2$2s You will be redirected to an authorization page hosted by Stripe."
898
  msgstr ""
899
 
900
  #. translators: %1$1s method title, %2$2s order id, %3$3s order total amount
901
+ #: gateway/local-gateway.php:435
902
  msgid "Begin processing payment with %1$1s for order %2$2s for the amount of %3$3s"
903
  msgstr ""
904
 
905
+ #: gateway/local-gateway.php:452
906
  msgid "Contact seller. "
907
  msgstr ""
908
 
909
+ #: gateway/local-gateway.php:455
910
  msgid "Store currency doesn't match stripe currency. "
911
  msgstr ""
912
 
913
  #. translators: %s: payment fail message.
914
+ #: gateway/local-gateway.php:574
915
+ #: gateway/stripe/card-payments.php:372
916
+ #: gateway/stripe/sepa.php:517
917
  msgid "Payment failed. %s"
918
  msgstr ""
919
 
939
  msgid "Accept payment using Bancontact. %1$s %2$s"
940
  msgstr ""
941
 
942
+ #: gateway/stripe/card-payments.php:61
943
  #: wizard/build/app.js:1
944
+ #: wizard/build/app.js:895
945
  msgid "Stripe Card Processing"
946
  msgstr ""
947
 
948
+ #: gateway/stripe/card-payments.php:62
949
  msgid "Accepts payments via Credit/Debit Cards"
950
  msgstr ""
951
 
952
+ #: gateway/stripe/card-payments.php:114
953
  msgid "Enable Stripe Gateway"
954
  msgstr ""
955
 
956
+ #: gateway/stripe/card-payments.php:120
957
  msgid "Title of Card Element"
958
  msgstr ""
959
 
960
+ #: gateway/stripe/card-payments.php:121
961
  msgid "Credit Card (Stripe)"
962
  msgstr ""
963
 
964
+ #: gateway/stripe/card-payments.php:128
965
  msgid "Description on Card Elements for Live mode"
966
  msgstr ""
967
 
968
+ #: gateway/stripe/card-payments.php:129
969
  msgid "Pay with your credit card via Stripe"
970
  msgstr ""
971
 
972
+ #: gateway/stripe/card-payments.php:133
973
+ #: gateway/stripe/sepa.php:242
974
  msgid "Statement Descriptor"
975
  msgstr ""
976
 
977
+ #: gateway/stripe/card-payments.php:135
978
+ #: gateway/stripe/sepa.php:244
979
  msgid "Statement descriptors are limited to 22 characters, cannot use the special characters >, <, \", \\, *, /, (, ), {, }, and must not consist solely of numbers. This will appear on your customer's statement in capital letters."
980
  msgstr ""
981
 
982
+ #: gateway/stripe/card-payments.php:140
983
  #: gateway/stripe/klarna.php:139
984
  msgid "Charge Type"
985
  msgstr ""
986
 
987
+ #: gateway/stripe/card-payments.php:142
988
  #: gateway/stripe/klarna.php:141
989
  msgid "Select how to charge Order"
990
  msgstr ""
991
 
992
+ #: gateway/stripe/card-payments.php:145
993
  #: gateway/stripe/klarna.php:144
994
  msgid "Charge"
995
  msgstr ""
996
 
997
+ #: gateway/stripe/card-payments.php:146
998
  #: gateway/stripe/klarna.php:145
999
  msgid "Authorize"
1000
  msgstr ""
1001
 
1002
+ #: gateway/stripe/card-payments.php:151
1003
  msgid "Enable Payment via Saved Cards"
1004
  msgstr ""
1005
 
1006
+ #: gateway/stripe/card-payments.php:152
1007
  msgid "Saved Cards"
1008
  msgstr ""
1009
 
1010
+ #: gateway/stripe/card-payments.php:154
1011
  msgid "Save card details for future orders"
1012
  msgstr ""
1013
 
1014
+ #: gateway/stripe/card-payments.php:159
1015
  msgid "Enable Inline Credit Card Form"
1016
  msgstr ""
1017
 
1018
+ #: gateway/stripe/card-payments.php:160
1019
  msgid "Inline Credit Card Form"
1020
  msgstr ""
1021
 
1022
+ #: gateway/stripe/card-payments.php:162
1023
  msgid "Use inline credit card for card payments"
1024
  msgstr ""
1025
 
1026
+ #: gateway/stripe/card-payments.php:167
1027
  msgid "Allowed Cards"
1028
  msgstr ""
1029
 
1030
+ #: gateway/stripe/card-payments.php:170
1031
  msgid "Accepts payments using selected cards. If empty all stripe cards are accepted."
1032
  msgstr ""
1033
 
1034
+ #: gateway/stripe/card-payments.php:181
1035
  msgid "Select cards for accepts payments. If empty all stripe cards are accepted."
1036
  msgstr ""
1037
 
1038
+ #: gateway/stripe/card-payments.php:185
1039
  msgid "Order Status"
1040
  msgstr ""
1041
 
1042
+ #: gateway/stripe/card-payments.php:188
1043
  msgid "Default"
1044
  msgstr ""
1045
 
1046
+ #: gateway/stripe/card-payments.php:189
1047
  msgid "Processing"
1048
  msgstr ""
1049
 
1050
+ #: gateway/stripe/card-payments.php:190
1051
  msgid "On Hold"
1052
  msgstr ""
1053
 
1054
+ #: gateway/stripe/card-payments.php:191
1055
  msgid "Completed"
1056
  msgstr ""
1057
 
1058
+ #: gateway/stripe/card-payments.php:195
1059
  msgid "This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status."
1060
  msgstr ""
1061
 
1062
+ #: gateway/stripe/card-payments.php:198
1063
  msgid "Order Button Label"
1064
  msgstr ""
1065
 
1066
+ #: gateway/stripe/card-payments.php:200
1067
  msgid "Customize label for Order button"
1068
  msgstr ""
1069
 
1070
+ #: gateway/stripe/card-payments.php:201
1071
  msgid "Pay via Stripe"
1072
  msgstr ""
1073
 
1074
  #. translators: %1$1s order id, %2$2s order total amount
1075
+ #: gateway/stripe/card-payments.php:253
1076
  msgid "Begin processing payment with new payment method for order %1$1s for the amount of %2$2s"
1077
  msgstr ""
1078
 
1079
+ #: gateway/stripe/card-payments.php:287
1080
+ #: gateway/stripe/sepa.php:177
1081
  msgid "There was a problem adding the payment method."
1082
  msgstr ""
1083
 
1084
  #. translators: error msg
1085
+ #: gateway/stripe/card-payments.php:289
1086
+ #: gateway/stripe/card-payments.php:305
1087
+ #: gateway/stripe/card-payments.php:322
1088
+ #: gateway/stripe/sepa.php:179
1089
+ #: gateway/stripe/sepa.php:194
1090
+ #: gateway/stripe/sepa.php:211
1091
  msgid "Add payment method Error: %1$1s"
1092
  msgstr ""
1093
 
1094
+ #: gateway/stripe/card-payments.php:302
1095
+ #: gateway/stripe/sepa.php:191
1096
  msgid "Invalid stripe source"
1097
  msgstr ""
1098
 
1099
+ #: gateway/stripe/card-payments.php:319
1100
+ #: gateway/stripe/sepa.php:208
1101
  msgid "Unble to attach payment method to customer"
1102
  msgstr ""
1103
 
1104
+ #: gateway/stripe/card-payments.php:328
1105
+ #: gateway/stripe/sepa.php:217
1106
  msgid "New payment method added successfully"
1107
  msgstr ""
1108
 
1109
  #. translators: %1$1s order id, %2$2s token id
1110
+ #: gateway/stripe/card-payments.php:359
1111
+ #: gateway/stripe/sepa.php:489
1112
  msgid "Payment method tokenized for Order id - %1$1s with token id - %2$2s"
1113
  msgstr ""
1114
 
1115
  #. translators: %1$1s, %2$2s: HTML Markup
1116
+ #: gateway/stripe/card-payments.php:489
1117
  msgid "Live Stripe.js integrations must use HTTPS. %1$1s For more information:%2$2s"
1118
  msgstr ""
1119
 
1120
+ #: gateway/stripe/card-payments.php:519
1121
  msgid "Enter Card Details"
1122
  msgstr ""
1123
 
1124
+ #: gateway/stripe/card-payments.php:522
1125
  msgid "Expiry Date"
1126
  msgstr ""
1127
 
1128
+ #: gateway/stripe/card-payments.php:526
1129
  msgid "CVC"
1130
  msgstr ""
1131
 
1132
+ #: gateway/stripe/card-payments.php:531
1133
  msgid "Save Card for Future Payments"
1134
  msgstr ""
1135
 
1136
  #. translators: %1$1s - %6$6s: HTML Markup
1137
+ #: gateway/stripe/card-payments.php:537
1138
  msgid "%1$1s Test Mode Enabled:%2$2s Use demo card 4242424242424242 with any future date and CVV. Check more %3$3sdemo cards%4$4s"
1139
  msgstr ""
1140
 
1250
  msgid "Unable to provide shipping options for Payment Requests."
1251
  msgstr ""
1252
 
1253
+ #: gateway/stripe/sepa.php:97
1254
  msgid "SEPA IBAN"
1255
  msgstr ""
1256
 
1257
  #. translators: %1$s: Break, %2$s: HTML entities
1258
+ #: gateway/stripe/sepa.php:133
1259
  msgid "Accept payment using SEPA. %1$s %2$s"
1260
  msgstr ""
1261
 
1262
+ #: gateway/stripe/sepa.php:234
1263
  msgid "Enable Payment via Saved IBAN"
1264
  msgstr ""
1265
 
1266
+ #: gateway/stripe/sepa.php:235
1267
  msgid "Saved IBAN"
1268
  msgstr ""
1269
 
1270
+ #: gateway/stripe/sepa.php:237
1271
  msgid "Save IBAN details for future orders"
1272
  msgstr ""
1273
 
1274
+ #: gateway/stripe/sepa.php:249
1275
  msgid "Company Name"
1276
  msgstr ""
1277
 
1278
+ #: gateway/stripe/sepa.php:253
1279
  msgid "The name of your company that will appear in the SEPA mandate."
1280
  msgstr ""
1281
 
1282
+ #: gateway/stripe/sepa.php:259
1283
  msgid "Mandate Information."
1284
  msgstr ""
1285
 
1286
  #. translators: %s: company name.
1287
+ #: gateway/stripe/sepa.php:292
1288
  msgid "By providing your IBAN and confirming this payment, you are authorizing %s and Stripe, our payment service provider, to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited."
1289
  msgstr ""
1290
 
1291
+ #: gateway/stripe/sepa.php:298
1292
  msgid "IBAN."
1293
  msgstr ""
1294
 
1295
  #. translators: %1$1s - %6$6s: HTML Markup
1296
+ #: gateway/stripe/sepa.php:363
1297
  msgid "%1$1s Test Mode Enabled %2$2s : Use demo IBAN number DE89370400440532013000. %3$3s Check more %4$4sDemo IBAN Number%5$5s"
1298
  msgstr ""
1299
 
1300
  #. translators: %1$1s order id, %2$2s order total amount
1301
+ #: gateway/stripe/sepa.php:439
1302
  msgid "Begin processing payment with SEPA for order %1$1s for the amount of %2$2s"
1303
  msgstr ""
1304
 
1555
  msgid "The email address is invalid. Check that the email address is properly formatted and only includes allowed characters."
1556
  msgstr ""
1557
 
1558
+ #: inc/helper.php:252
1559
  msgid "The card has been declined. When a card is declined, the error returned also includes the decline_code attribute with the reason why the card was declined."
1560
  msgstr ""
1561
 
1562
+ #: inc/helper.php:253
1563
+ msgid "The card has insufficient funds to complete the purchase."
1564
+ msgstr ""
1565
+
1566
+ #: inc/helper.php:254
1567
+ msgid "The card has been declined. Please try again with another card."
1568
+ msgstr ""
1569
+
1570
+ #: inc/helper.php:255
1571
+ msgid "The card has been declined (Lost card). Please try again with another card."
1572
+ msgstr ""
1573
+
1574
+ #: inc/helper.php:256
1575
+ msgid "The card has been declined (Stolen card). Please try again with another card."
1576
+ msgstr ""
1577
+
1578
+ #: inc/helper.php:258
1579
  msgid "The request contains one or more unexpected parameters. Remove these and try again."
1580
  msgstr ""
1581
 
1582
+ #: inc/helper.php:259
1583
  msgid "Your card number is incomplete."
1584
  msgstr ""
1585
 
1586
+ #: inc/helper.php:260
1587
  msgid "Your card's expiration date is incomplete."
1588
  msgstr ""
1589
 
1590
+ #: inc/helper.php:261
1591
  msgid "Your card's security code is incomplete."
1592
  msgstr ""
1593
 
1594
+ #: inc/helper.php:262
1595
  msgid "Your card's zip code is incomplete."
1596
  msgstr ""
1597
 
1598
+ #: inc/helper.php:263
1599
  msgid "There was an error processing your credit card."
1600
  msgstr ""
1601
 
1602
+ #: inc/helper.php:264
1603
  msgid "Your card's expiration year is in the past."
1604
  msgstr ""
1605
 
1606
+ #: inc/helper.php:265
1607
  msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
1608
  msgstr ""
1609
 
1610
+ #: inc/helper.php:269
1611
  msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
1612
  msgstr ""
1613
 
1614
+ #: inc/helper.php:273
1615
  msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
1616
  msgstr ""
1617
 
1618
+ #: inc/helper.php:274
1619
  msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
1620
  msgstr ""
1621
 
1622
+ #: inc/helper.php:278
1623
  msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
1624
  msgstr ""
1625
 
1626
+ #: inc/helper.php:282
1627
  msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
1628
  msgstr ""
1629
 
1630
+ #: inc/helper.php:286
1631
  msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
1632
  msgstr ""
1633
 
1634
+ #: inc/helper.php:290
1635
  msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
1636
  msgstr ""
1637
 
1638
+ #: inc/helper.php:294
1639
  msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
1640
  msgstr ""
1641
 
1656
  msgid "Sorry, we are unable to process your payment at this time. Please retry later."
1657
  msgstr ""
1658
 
1659
+ #: inc/traits/subscriptions.php:246
1660
  msgid "This transaction requires authentication."
1661
  msgstr ""
1662
 
 
1663
  #. translators: %s is the stripe charge Id
1664
+ #: inc/traits/subscriptions.php:255
1665
+ #: inc/traits/subscriptions.php:658
1666
  msgid "Stripe charge awaiting authentication by user: %s."
1667
  msgstr ""
1668
 
1669
+ #: inc/traits/subscriptions.php:587
1670
  msgid "A \"Stripe Customer ID\" value is required."
1671
  msgstr ""
1672
 
1673
+ #: inc/traits/subscriptions.php:590
1674
  msgid "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with \"cus_\"."
1675
  msgstr ""
1676
 
1677
+ #: inc/traits/subscriptions.php:600
1678
  msgid "Invalid source ID. A valid source \"Stripe Source ID\" must begin with \"src_\", \"pm_\", or \"card_\"."
1679
  msgstr ""
1680
 
1681
+ #: inc/traits/subscriptions.php:781
1682
  msgid "Invalid payment method. Please input a new card number."
1683
  msgstr ""
1684
 
1685
+ #: wizard/onboarding.php:131
1686
  msgid "Stripe for WooCommerce - Onboarding"
1687
  msgstr ""
1688
 
1689
+ #: wizard/onboarding.php:179
1690
  msgid "Thanks for installing Checkout Plugins - Stripe for WooCommerce!"
1691
  msgstr ""
1692
 
1693
+ #: wizard/onboarding.php:180
1694
  msgid "Follow Onboarding process to connect your Stripe account"
1695
  msgstr ""
1696
 
1697
+ #: wizard/onboarding.php:182
1698
  msgid "Configure Stripe"
1699
  msgstr ""
1700
 
1701
+ #: wizard/onboarding.php:183
1702
  msgid "Skip Setup"
1703
  msgstr ""
1704
 
1705
  #: wizard/build/app.js:1
1706
+ #: wizard/build/app.js:985
1707
  msgid "Let's Connect"
1708
  msgstr ""
1709
 
1710
  #: wizard/build/app.js:1
1711
+ #: wizard/build/app.js:986
1712
  msgid "with Stripe"
1713
  msgstr ""
1714
 
1715
  #: wizard/build/app.js:1
1716
+ #: wizard/build/app.js:989
1717
  msgid "recommends to connect with"
1718
  msgstr ""
1719
 
1720
  #: wizard/build/app.js:1
1721
+ #: wizard/build/app.js:989
1722
  msgid "Stripe connect."
1723
  msgstr ""
1724
 
1725
  #: wizard/build/app.js:1
1726
+ #: wizard/build/app.js:990
1727
  msgid "One click onboarding solution provided by"
1728
  msgstr ""
1729
 
1730
  #: wizard/build/app.js:1
1731
+ #: wizard/build/app.js:990
1732
  msgid "Stripe."
1733
  msgstr ""
1734
 
1735
  #: wizard/build/app.js:1
1736
+ #: wizard/build/app.js:997
1737
  msgid "Connecting…"
1738
  msgstr ""
1739
 
1740
  #: wizard/build/app.js:1
1741
+ #: wizard/build/app.js:1008
1742
  msgid "Leave onboarding process"
1743
  msgstr ""
1744
 
1745
  #: wizard/build/app.js:1
1746
+ #: wizard/build/app.js:1075
1747
  msgid "Congratulations!!"
1748
  msgstr ""
1749
 
1750
  #: wizard/build/app.js:1
1751
+ #: wizard/build/app.js:1075
1752
  msgid "You are connected to Stripe successfully."
1753
  msgstr ""
1754
 
1755
  #: wizard/build/app.js:1
1756
+ #: wizard/build/app.js:1076
1757
  msgid "Let's enable gateways"
1758
  msgstr ""
1759
 
1760
  #: wizard/build/app.js:1
1761
+ #: wizard/build/app.js:1091
1762
  msgid "Recommended"
1763
  msgstr ""
1764
 
1765
  #: wizard/build/app.js:1
1766
+ #: wizard/build/app.js:1096
1767
  msgid "Works with all currencies"
1768
  msgstr ""
1769
 
1770
  #: wizard/build/app.js:1
1771
+ #: wizard/build/app.js:1096
1772
  msgid "Works with "
1773
  msgstr ""
1774
 
1775
  #: wizard/build/app.js:1
1776
+ #: wizard/build/app.js:906
1777
+ #: wizard/build/app.js:1134
1778
  msgid "Enabling…"
1779
  msgstr ""
1780
 
1781
  #: wizard/build/app.js:1
1782
+ #: wizard/build/app.js:1139
1783
  msgid "Enable Gateways"
1784
  msgstr ""
1785
 
1786
  #: wizard/build/app.js:1
1787
+ msgid "This is important!!"
1788
+ msgstr ""
1789
+
1790
+ #: wizard/build/app.js:1
1791
+ msgid "Enable Webhooks"
1792
+ msgstr ""
1793
+
1794
+ #: wizard/build/app.js:1
1795
+ msgid "The webhook URL is called by"
1796
+ msgstr ""
1797
+
1798
+ #: wizard/build/app.js:1
1799
+ msgid " when events occur in your account, like a source becomes chargeable."
1800
+ msgstr ""
1801
+
1802
+ #: wizard/build/app.js:1
1803
+ msgid "Webhook Guide"
1804
+ msgstr ""
1805
+
1806
+ #: wizard/build/app.js:1
1807
+ msgid "or create webhook secret on"
1808
+ msgstr ""
1809
+
1810
+ #: wizard/build/app.js:1
1811
+ msgid "Stripe Dashboard"
1812
+ msgstr ""
1813
+
1814
+ #: wizard/build/app.js:1
1815
+ msgid "This is the list of the supported webhook events: "
1816
+ msgstr ""
1817
+
1818
+ #: wizard/build/app.js:1
1819
+ msgid "Select Mode"
1820
+ msgstr ""
1821
+
1822
+ #: wizard/build/app.js:1
1823
+ msgid "Webhook Secret"
1824
+ msgstr ""
1825
+
1826
+ #: wizard/build/app.js:1
1827
+ msgid "Enter key here"
1828
+ msgstr ""
1829
+
1830
+ #: wizard/build/app.js:1
1831
+ msgid "The webhook secret is used to authenticate webhooks sent from Stripe. It ensures nobody else can send you events pretending to be Stripe"
1832
+ msgstr ""
1833
+
1834
+ #: wizard/build/app.js:1
1835
+ msgid "Saving…"
1836
+ msgstr ""
1837
+
1838
+ #: wizard/build/app.js:1
1839
+ msgid "Webhook Secret field is Required."
1840
+ msgstr ""
1841
+
1842
+ #: wizard/build/app.js:1
1843
+ msgid "Save & Continue"
1844
+ msgstr ""
1845
+
1846
+ #: wizard/build/app.js:1
1847
+ msgid "Skip"
1848
+ msgstr ""
1849
+
1850
+ #: wizard/build/app.js:1
1851
+ #: wizard/build/app.js:891
1852
  msgid "Wooho!!"
1853
  msgstr ""
1854
 
1855
  #: wizard/build/app.js:1
1856
+ #: wizard/build/app.js:892
1857
  msgid "You are almost done."
1858
  msgstr ""
1859
 
1860
  #: wizard/build/app.js:1
1861
+ #: wizard/build/app.js:895
1862
  msgid "Since you have enabled"
1863
  msgstr ""
1864
 
1865
  #: wizard/build/app.js:1
1866
+ #: wizard/build/app.js:895
1867
  msgid " We recommend you to enable"
1868
  msgstr ""
1869
 
1870
  #: wizard/build/app.js:1
1871
+ #: wizard/build/app.js:895
1872
  msgid "feature"
1873
  msgstr ""
1874
 
1875
  #: wizard/build/app.js:1
1876
+ #: wizard/build/app.js:896
1877
  msgid "Express Checkout generates more conversions!!"
1878
  msgstr ""
1879
 
1880
  #: wizard/build/app.js:1
1881
+ #: wizard/build/app.js:918
1882
  msgid "Skip Express Checkout"
1883
  msgstr ""
1884
 
1885
  #: wizard/build/app.js:1
1886
+ #: wizard/build/app.js:937
1887
  msgid "Failed!!"
1888
  msgstr ""
1889
 
1890
  #: wizard/build/app.js:1
1891
+ #: wizard/build/app.js:940
1892
  msgid "Unfortunately Connection to Stripe failed."
1893
  msgstr ""
1894
 
1895
  #: wizard/build/app.js:1
1896
+ #: wizard/build/app.js:945
1897
  msgid "Try Again"
1898
  msgstr ""
1899
 
1900
  #: wizard/build/app.js:1
1901
+ #: wizard/build/app.js:1170
1902
  msgid "Great!!"
1903
  msgstr ""
1904
 
1905
  #: wizard/build/app.js:1
1906
+ #: wizard/build/app.js:1173
1907
  msgid "Your store is all set to accept payment."
1908
  msgstr ""
1909
 
1910
  #: wizard/build/app.js:1
1911
+ #: wizard/build/app.js:1174
1912
  msgid "We provide lots of customization options to match your needs, don't forget to explore them."
1913
  msgstr ""
1914
 
1915
  #: wizard/build/app.js:1
1916
+ #: wizard/build/app.js:1180
1917
  msgid "Let's Customize…"
1918
  msgstr ""
1919
 
1920
  #: wizard/build/app.js:1
1921
+ #: wizard/build/app.js:1185
1922
  msgid "Let's Customize"
1923
  msgstr ""
1924
 
1925
  #: wizard/build/app.js:1
1926
+ #: wizard/build/app.js:1260
1927
  msgid "Missing"
1928
  msgstr ""
1929
 
1930
  #: wizard/build/app.js:1
1931
+ #: wizard/build/app.js:1260
1932
  msgid "Inactiave"
1933
  msgstr ""
1934
 
1935
  #: wizard/build/app.js:1
1936
+ #: wizard/build/app.js:1261
1937
  msgid "WooCoomerce"
1938
  msgstr ""
1939
 
1940
  #: wizard/build/app.js:1
1941
+ #: wizard/build/app.js:1264
1942
  msgid "Checkout Plugins - Stripe for WooCoomerce"
1943
  msgstr ""
1944
 
1945
  #: wizard/build/app.js:1
1946
+ #: wizard/build/app.js:1264
1947
+ msgid "requires"
1948
+ msgstr ""
1949
+
1950
+ #: wizard/build/app.js:1
1951
+ #: wizard/build/app.js:1264
1952
  msgid "WooCommerce"
1953
  msgstr ""
1954
 
1955
  #: wizard/build/app.js:1
1956
+ #: wizard/build/app.js:1264
1957
  msgid "to be active on your store."
1958
  msgstr ""
1959
 
1960
  #: wizard/build/app.js:1
1961
+ #: wizard/build/app.js:1272
1962
  msgid "Installing…"
1963
  msgstr ""
1964
 
1965
  #: wizard/build/app.js:1
1966
+ #: wizard/build/app.js:1279
1967
  msgid "Activating…"
1968
  msgstr ""
1969
 
1970
  #: wizard/build/app.js:1
1971
+ #: wizard/build/app.js:1286
1972
  msgid "Install and continue"
1973
  msgstr ""
1974
 
1975
  #: wizard/build/app.js:1
1976
+ #: wizard/build/app.js:1286
1977
  msgid "Activate and continue"
1978
  msgstr ""
1979
 
1980
  #: wizard/build/app.js:1
1981
+ #: wizard/build/app.js:1297
1982
  msgid "Installing WooCommerce will take time. Please be patient."
1983
  msgstr ""
1984
 
1985
  #: wizard/build/app.js:1
1986
+ #: wizard/build/app.js:1307
1987
  msgid "WooCommerce installing failed. Please try again."
1988
  msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: brainstormforce
3
  Tags: stripe, credit card
4
  Requires at least: 5.4
5
  Tested up to: 5.9
6
- Stable tag: 1.4.1
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -108,7 +108,13 @@ We understand the need for a quality product backed by dedicated support that ca
108
 
109
  == Changelog ==
110
 
111
- = 1.4.1 - TUESDAY, 15 MARCH 2022 =
 
 
 
 
 
 
112
  * New: Express checkout class layout support.
113
  * Improvement: Added localization for Stripe error messages.
114
  * Improvement: Added compatibility with popular themes.
3
  Tags: stripe, credit card
4
  Requires at least: 5.4
5
  Tested up to: 5.9
6
+ Stable tag: 1.4.2
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
108
 
109
  == Changelog ==
110
 
111
+ = 1.4.2 - TUESDAY, 29TH MARCH 2022 =
112
+ * Improvement: Added webhook secret step in the onboarding wizard.
113
+ * Improvement: Added translation support for card declined messages.
114
+ * Fix: Failed payment automatically retries.
115
+ * Fix: Failed payment order notes improvement.
116
+
117
+ = 1.4.1 - TUESDAY, 15TH MARCH 2022 =
118
  * New: Express checkout class layout support.
119
  * Improvement: Added localization for Stripe error messages.
120
  * Improvement: Added compatibility with popular themes.
wizard/build/app.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '0802e5033de80a3525a847d98d66b145');
1
+ <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => 'd6fec05cb9f53b98348d85fce5db895b');
wizard/build/app.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- ! tailwindcss v3.0.19 | MIT License | https://tailwindcss.com
3
  *//*
4
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
5
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -437,16 +437,23 @@ Ensure the default browser behavior of the `hidden` attribute.
437
  pointer-events: none;
438
  }.fixed {
439
  position: fixed;
 
 
440
  }.relative {
441
  position: relative;
 
 
 
 
 
442
  }.left-0 {
443
  left: 0px;
444
  }.top-0 {
445
  top: 0px;
446
- }.right-0 {
447
- right: 0px;
448
  }.z-10 {
449
  z-index: 10;
 
 
450
  }.mx-auto {
451
  margin-left: auto;
452
  margin-right: auto;
@@ -476,6 +483,10 @@ Ensure the default browser behavior of the `hidden` attribute.
476
  margin-top: 1rem;
477
  }.mb-4 {
478
  margin-bottom: 1rem;
 
 
 
 
479
  }.mt-6 {
480
  margin-top: 1.5rem;
481
  }.block {
@@ -488,6 +499,10 @@ Ensure the default browser behavior of the `hidden` attribute.
488
  display: flex;
489
  }.inline-flex {
490
  display: inline-flex;
 
 
 
 
491
  }.h-16 {
492
  height: 4rem;
493
  }.h-5 {
@@ -498,6 +513,8 @@ Ensure the default browser behavior of the `hidden` attribute.
498
  height: 3rem;
499
  }.h-6 {
500
  height: 1.5rem;
 
 
501
  }.w-10\/12 {
502
  width: 83.333333%;
503
  }.w-auto {
@@ -549,10 +566,32 @@ Ensure the default browser behavior of the `hidden` attribute.
549
  cursor: wait;
550
  }.cursor-pointer {
551
  cursor: pointer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
552
  }.items-center {
553
  align-items: center;
554
  }.justify-center {
555
  justify-content: center;
 
 
556
  }.divide-y > :not([hidden]) ~ :not([hidden]) {
557
  --tw-divide-y-reverse: 0;
558
  border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
@@ -560,6 +599,8 @@ Ensure the default browser behavior of the `hidden` attribute.
560
  }.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
561
  --tw-divide-opacity: 1;
562
  border-color: rgb(229 231 235 / var(--tw-divide-opacity));
 
 
563
  }.overflow-hidden {
564
  overflow: hidden;
565
  }.overflow-x-hidden {
@@ -574,6 +615,8 @@ Ensure the default browser behavior of the `hidden` attribute.
574
  border-radius: 0.375rem;
575
  }.rounded-full {
576
  border-radius: 9999px;
 
 
577
  }.border {
578
  border-width: 1px;
579
  }.border-2 {
@@ -618,8 +661,22 @@ Ensure the default browser behavior of the `hidden` attribute.
618
  }.py-1 {
619
  padding-top: 0.25rem;
620
  padding-bottom: 0.25rem;
 
 
 
 
 
 
621
  }.pt-6 {
622
  padding-top: 1.5rem;
 
 
 
 
 
 
 
 
623
  }.text-left {
624
  text-align: left;
625
  }.text-center {
@@ -636,12 +693,19 @@ Ensure the default browser behavior of the `hidden` attribute.
636
  }.text-xs {
637
  font-size: 0.75rem;
638
  line-height: 1rem;
 
 
 
639
  }.font-extrabold {
640
  font-weight: 800;
641
  }.font-bold {
642
  font-weight: 700;
643
  }.font-medium {
644
  font-weight: 500;
 
 
 
 
645
  }.tracking-tight {
646
  letter-spacing: -0.025em;
647
  }.text-white {
@@ -675,6 +739,10 @@ Ensure the default browser behavior of the `hidden` attribute.
675
  opacity: 0.25;
676
  }.opacity-75 {
677
  opacity: 0.75;
 
 
 
 
678
  }.shadow {
679
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
680
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
@@ -683,6 +751,15 @@ Ensure the default browser behavior of the `hidden` attribute.
683
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
684
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
685
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
 
 
 
 
 
 
 
 
 
686
  }.filter {
687
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
688
  }.transition-colors {
@@ -701,8 +778,12 @@ Ensure the default browser behavior of the `hidden` attribute.
701
  transition-delay: 150ms;
702
  }.duration-200 {
703
  transition-duration: 200ms;
 
 
704
  }.ease-in-out {
705
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
 
 
706
  }.hover\:bg-cart-700:hover {
707
  --tw-bg-opacity: 1;
708
  background-color: rgb(122 71 183 / var(--tw-bg-opacity));
@@ -721,6 +802,22 @@ Ensure the default browser behavior of the `hidden` attribute.
721
  --tw-ring-color: rgb(103 58 158 / var(--tw-ring-opacity));
722
  }.focus\:ring-offset-2:focus {
723
  --tw-ring-offset-width: 2px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  }@media (min-width: 640px) {
725
 
726
  .sm\:mx-auto {
@@ -752,6 +849,10 @@ Ensure the default browser behavior of the `hidden` attribute.
752
  margin-top: 1.5rem;
753
  }
754
 
 
 
 
 
755
  .sm\:inline-block {
756
  display: inline-block;
757
  }
@@ -790,6 +891,16 @@ Ensure the default browser behavior of the `hidden` attribute.
790
  font-size: 1.125rem;
791
  line-height: 1.75rem;
792
  }
 
 
 
 
 
 
 
 
 
 
793
  }@media (min-width: 768px) {
794
 
795
  .md\:mt-16 {
@@ -808,6 +919,22 @@ Ensure the default browser behavior of the `hidden` attribute.
808
  margin-top: 2rem;
809
  }
810
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
811
  .md\:gap-4 {
812
  gap: 1rem;
813
  }
@@ -855,6 +982,10 @@ Ensure the default browser behavior of the `hidden` attribute.
855
  margin-top: 2.5rem;
856
  }
857
 
 
 
 
 
858
  .lg\:inline-block {
859
  display: inline-block;
860
  }
@@ -863,6 +994,14 @@ Ensure the default browser behavior of the `hidden` attribute.
863
  width: 100%;
864
  }
865
 
 
 
 
 
 
 
 
 
866
  .lg\:justify-center {
867
  justify-content: center;
868
  }
1
  /*
2
+ ! tailwindcss v3.0.12 | MIT License | https://tailwindcss.com
3
  *//*
4
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
5
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
437
  pointer-events: none;
438
  }.fixed {
439
  position: fixed;
440
+ }.absolute {
441
+ position: absolute;
442
  }.relative {
443
  position: relative;
444
+ }.inset-y-0 {
445
+ top: 0px;
446
+ bottom: 0px;
447
+ }.right-0 {
448
+ right: 0px;
449
  }.left-0 {
450
  left: 0px;
451
  }.top-0 {
452
  top: 0px;
 
 
453
  }.z-10 {
454
  z-index: 10;
455
+ }.z-40 {
456
+ z-index: 40;
457
  }.mx-auto {
458
  margin-left: auto;
459
  margin-right: auto;
483
  margin-top: 1rem;
484
  }.mb-4 {
485
  margin-bottom: 1rem;
486
+ }.mt-2 {
487
+ margin-top: 0.5rem;
488
+ }.mb-5 {
489
+ margin-bottom: 1.25rem;
490
  }.mt-6 {
491
  margin-top: 1.5rem;
492
  }.block {
499
  display: flex;
500
  }.inline-flex {
501
  display: inline-flex;
502
+ }.grid {
503
+ display: grid;
504
+ }.hidden {
505
+ display: none;
506
  }.h-16 {
507
  height: 4rem;
508
  }.h-5 {
513
  height: 3rem;
514
  }.h-6 {
515
  height: 1.5rem;
516
+ }.max-h-60 {
517
+ max-height: 15rem;
518
  }.w-10\/12 {
519
  width: 83.333333%;
520
  }.w-auto {
566
  cursor: wait;
567
  }.cursor-pointer {
568
  cursor: pointer;
569
+ }.cursor-default {
570
+ cursor: default;
571
+ }.select-none {
572
+ -webkit-user-select: none;
573
+ -moz-user-select: none;
574
+ -ms-user-select: none;
575
+ user-select: none;
576
+ }.select-text {
577
+ -webkit-user-select: text;
578
+ -moz-user-select: text;
579
+ -ms-user-select: text;
580
+ user-select: text;
581
+ }.list-disc {
582
+ list-style-type: disc;
583
+ }.appearance-none {
584
+ -webkit-appearance: none;
585
+ -moz-appearance: none;
586
+ appearance: none;
587
+ }.grid-cols-1 {
588
+ grid-template-columns: repeat(1, minmax(0, 1fr));
589
  }.items-center {
590
  align-items: center;
591
  }.justify-center {
592
  justify-content: center;
593
+ }.gap-1 {
594
+ gap: 0.25rem;
595
  }.divide-y > :not([hidden]) ~ :not([hidden]) {
596
  --tw-divide-y-reverse: 0;
597
  border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
599
  }.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
600
  --tw-divide-opacity: 1;
601
  border-color: rgb(229 231 235 / var(--tw-divide-opacity));
602
+ }.overflow-auto {
603
+ overflow: auto;
604
  }.overflow-hidden {
605
  overflow: hidden;
606
  }.overflow-x-hidden {
615
  border-radius: 0.375rem;
616
  }.rounded-full {
617
  border-radius: 9999px;
618
+ }.rounded {
619
+ border-radius: 0.25rem;
620
  }.border {
621
  border-width: 1px;
622
  }.border-2 {
661
  }.py-1 {
662
  padding-top: 0.25rem;
663
  padding-bottom: 0.25rem;
664
+ }.py-2 {
665
+ padding-top: 0.5rem;
666
+ padding-bottom: 0.5rem;
667
+ }.px-3 {
668
+ padding-left: 0.75rem;
669
+ padding-right: 0.75rem;
670
  }.pt-6 {
671
  padding-top: 1.5rem;
672
+ }.pl-4 {
673
+ padding-left: 1rem;
674
+ }.pl-3 {
675
+ padding-left: 0.75rem;
676
+ }.pr-10 {
677
+ padding-right: 2.5rem;
678
+ }.pr-2 {
679
+ padding-right: 0.5rem;
680
  }.text-left {
681
  text-align: left;
682
  }.text-center {
693
  }.text-xs {
694
  font-size: 0.75rem;
695
  line-height: 1rem;
696
+ }.text-2xl {
697
+ font-size: 1.5rem;
698
+ line-height: 2rem;
699
  }.font-extrabold {
700
  font-weight: 800;
701
  }.font-bold {
702
  font-weight: 700;
703
  }.font-medium {
704
  font-weight: 500;
705
+ }.font-normal {
706
+ font-weight: 400;
707
+ }.leading-tight {
708
+ line-height: 1.25;
709
  }.tracking-tight {
710
  letter-spacing: -0.025em;
711
  }.text-white {
739
  opacity: 0.25;
740
  }.opacity-75 {
741
  opacity: 0.75;
742
+ }.opacity-100 {
743
+ opacity: 1;
744
+ }.opacity-0 {
745
+ opacity: 0;
746
  }.shadow {
747
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
748
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
751
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
752
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
753
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
754
+ }.ring-1 {
755
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
756
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
757
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
758
+ }.ring-black {
759
+ --tw-ring-opacity: 1;
760
+ --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));
761
+ }.ring-opacity-5 {
762
+ --tw-ring-opacity: 0.05;
763
  }.filter {
764
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
765
  }.transition-colors {
778
  transition-delay: 150ms;
779
  }.duration-200 {
780
  transition-duration: 200ms;
781
+ }.duration-100 {
782
+ transition-duration: 100ms;
783
  }.ease-in-out {
784
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
785
+ }.ease-in {
786
+ transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
787
  }.hover\:bg-cart-700:hover {
788
  --tw-bg-opacity: 1;
789
  background-color: rgb(122 71 183 / var(--tw-bg-opacity));
802
  --tw-ring-color: rgb(103 58 158 / var(--tw-ring-opacity));
803
  }.focus\:ring-offset-2:focus {
804
  --tw-ring-offset-width: 2px;
805
+ }.focus-visible\:border-indigo-500:focus-visible {
806
+ --tw-border-opacity: 1;
807
+ border-color: rgb(99 102 241 / var(--tw-border-opacity));
808
+ }.focus-visible\:ring-2:focus-visible {
809
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
810
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
811
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
812
+ }.focus-visible\:ring-white:focus-visible {
813
+ --tw-ring-opacity: 1;
814
+ --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity));
815
+ }.focus-visible\:ring-opacity-75:focus-visible {
816
+ --tw-ring-opacity: 0.75;
817
+ }.focus-visible\:ring-offset-2:focus-visible {
818
+ --tw-ring-offset-width: 2px;
819
+ }.focus-visible\:ring-offset-orange-300:focus-visible {
820
+ --tw-ring-offset-color: #fdba74;
821
  }@media (min-width: 640px) {
822
 
823
  .sm\:mx-auto {
849
  margin-top: 1.5rem;
850
  }
851
 
852
+ .sm\:mt-2 {
853
+ margin-top: 0.5rem;
854
+ }
855
+
856
  .sm\:inline-block {
857
  display: inline-block;
858
  }
891
  font-size: 1.125rem;
892
  line-height: 1.75rem;
893
  }
894
+
895
+ .sm\:text-xl {
896
+ font-size: 1.25rem;
897
+ line-height: 1.75rem;
898
+ }
899
+
900
+ .sm\:text-sm {
901
+ font-size: 0.875rem;
902
+ line-height: 1.25rem;
903
+ }
904
  }@media (min-width: 768px) {
905
 
906
  .md\:mt-16 {
919
  margin-top: 2rem;
920
  }
921
 
922
+ .md\:mt-2 {
923
+ margin-top: 0.5rem;
924
+ }
925
+
926
+ .md\:mt-3 {
927
+ margin-top: 0.75rem;
928
+ }
929
+
930
+ .md\:w-6\/12 {
931
+ width: 50%;
932
+ }
933
+
934
+ .md\:grid-cols-2 {
935
+ grid-template-columns: repeat(2, minmax(0, 1fr));
936
+ }
937
+
938
  .md\:gap-4 {
939
  gap: 1rem;
940
  }
982
  margin-top: 2.5rem;
983
  }
984
 
985
+ .lg\:mt-3 {
986
+ margin-top: 0.75rem;
987
+ }
988
+
989
  .lg\:inline-block {
990
  display: inline-block;
991
  }
994
  width: 100%;
995
  }
996
 
997
+ .lg\:w-6\/12 {
998
+ width: 50%;
999
+ }
1000
+
1001
+ .lg\:grid-cols-2 {
1002
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1003
+ }
1004
+
1005
  .lg\:justify-center {
1006
  justify-content: center;
1007
  }
wizard/build/app.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,n=window.React,r=e.n(n),a=window.ReactDOM,o=e.n(a);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}var s,c=s||(s={});c.Pop="POP",c.Push="PUSH",c.Replace="REPLACE";function i(e){e.preventDefault(),e.returnValue=""}function u(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function m(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function d(e,t){if(!e)throw new Error(t)}const p=(0,n.createContext)(null),f=(0,n.createContext)(null),g=(0,n.createContext)({outlet:null,matches:[]});function x(e){let{basename:t="/",children:r=null,location:a,navigationType:o=s.Pop,navigator:l,static:c=!1}=e;h()&&d(!1);let i=y(t),u=(0,n.useMemo)((()=>({basename:i,navigator:l,static:c})),[i,l,c]);"string"==typeof a&&(a=m(a));let{pathname:g="/",search:x="",hash:b="",state:v=null,key:w="default"}=a,E=(0,n.useMemo)((()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}(g,i);return null==e?null:{pathname:e,search:x,hash:b,state:v,key:w}}),[i,g,x,b,v,w]);return null==E?null:(0,n.createElement)(p.Provider,{value:u},(0,n.createElement)(f.Provider,{children:r,value:{location:E,navigationType:o}}))}function h(){return null!=(0,n.useContext)(f)}function b(){return h()||d(!1),(0,n.useContext)(f).location}function v(){h()||d(!1);let{basename:e,navigator:t}=(0,n.useContext)(p),{matches:r}=(0,n.useContext)(g),{pathname:a}=b(),o=JSON.stringify(r.map((e=>e.pathnameBase))),l=(0,n.useRef)(!1);return(0,n.useEffect)((()=>{l.current=!0})),(0,n.useCallback)((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"==typeof n)return void t.go(n);let s=function(e,t,n){let r,a="string"==typeof e?m(e):e,o=""===e||""===a.pathname?"/":a.pathname;if(null==o)r=n;else{let e=t.length-1;if(o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}r=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?m(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:E(r),hash:_(a)}}(a,r);return o&&"/"!==o&&o.endsWith("/")&&!l.pathname.endsWith("/")&&(l.pathname+="/"),l}(n,JSON.parse(o),a);"/"!==e&&(s.pathname=w([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state)}),[e,t,o,a])}const w=e=>e.join("/").replace(/\/\/+/g,"/"),y=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),E=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",_=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var k,N,C,S=window.wp.i18n,j=function(){return(0,t.createElement)("svg",{className:"animate-spin ml-2 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,t.createElement)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.createElement)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))},P=function(){const[e,r]=(0,n.useState)(!1),a=v();return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-16 lg:mt-20 lg:px-8 xl:mt-28"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block xl"}," ",(0,S.__)("Let's Connect","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,S.__)("with Stripe","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,t.createElement)("span",{className:"block text-gray-700 inline font-bold"},(0,S.__)("Checkout Plugins","checkout-plugins-stripe-woo"))," ",(0,S.__)("recommends to connect with","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,S.__)("Stripe connect.","checkout-plugins-stripe-woo"))),(0,t.createElement)("span",null,(0,S.__)("One click onboarding solution provided by","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,S.__)("Stripe.","checkout-plugins-stripe-woo")))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,S.__)("Connecting…","checkout-plugins-stripe-woo"),(0,t.createElement)(j,null)):(0,t.createElement)("button",{onClick:function(){r(!0),""===onboarding_vars.woocommerce_installed||""===onboarding_vars.woocommerce_activated?a(onboarding_vars.navigator_base+"&cpsw_call=setup-woocommerce"):window.location.replace(onboarding_vars.authorization_url)},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,S.__)("Connect with Stripe","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0 sm:ml-3"},(0,t.createElement)("a",{href:onboarding_vars.settings_url,className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,S.__)("Leave onboarding process","checkout-plugins-stripe-woo"))))))};function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function A(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function M(e,t){if(e in t){for(var n=t[e],r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,a):n}var l=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(l,M),l}function W(e){var t=e.props,n=e.slot,r=e.defaultTag,a=e.features,o=e.visible,l=void 0===o||o,s=e.name;if(l)return D(t,n,r,s);var c=null!=a?a:k.None;if(c&k.Static){var i=t.static,u=void 0!==i&&i,m=A(t,["static"]);if(u)return D(m,n,r,s)}if(c&k.RenderStrategy){var d,p=t.unmount,f=void 0===p||p,g=A(t,["unmount"]);return M(f?N.Unmount:N.Hidden,((d={})[N.Unmount]=function(){return null},d[N.Hidden]=function(){return D(O({},g,{hidden:!0,style:{display:"none"}}),n,r,s)},d))}return D(t,n,r,s)}function D(e,t,r,a){var o;void 0===t&&(t={});var l=H(e,["unmount","static"]),s=l.as,c=void 0===s?r:s,i=l.children,u=l.refName,m=void 0===u?"ref":u,d=A(l,["as","children","refName"]),p=void 0!==e.ref?((o={})[m]=e.ref,o):{},f="function"==typeof i?i(t):i;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),c===n.Fragment&&Object.keys(d).length>0){if(!(0,n.isValidElement)(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+a+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,n.cloneElement)(f,Object.assign({},function(e,t,n){for(var r,a=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(a,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},l=L(["onClick"]);!(r=l()).done;)o();return a}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(H(d,["ref"])),f.props),p))}return(0,n.createElement)(c,Object.assign({},H(d,["ref"]),c!==n.Fragment&&p),f)}function H(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),a=L(t);!(n=a()).done;){var o=n.value;o in r&&delete r[o]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(k||(k={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(N||(N={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(C||(C={}));var R="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,U={serverHandoffComplete:!1},F=0;function I(){return++F}function z(){var e=function(){var e=(0,n.useState)(U.serverHandoffComplete),t=e[0],r=e[1];return(0,n.useEffect)((function(){!0!==t&&r(!0)}),[t]),(0,n.useEffect)((function(){!1===U.serverHandoffComplete&&(U.serverHandoffComplete=!0)}),[]),t}(),t=(0,n.useState)(e?I:null),r=t[0],a=t[1];return R((function(){null===r&&a(I())}),[r]),null!=r?""+r:void 0}var B=(0,n.createContext)(null);function Y(){var e=(0,n.useContext)(B);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Y),t}return e}function G(e){var t;if(e.type)return e.type;var n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function V(e,t){var r=(0,n.useState)((function(){return G(e)})),a=r[0],o=r[1];return R((function(){o(G(e))}),[e.type,e.as]),R((function(){a||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&o("button")}),[a,t]),a}var q=(0,n.createContext)(null);function J(){var e=(0,n.useContext)(q);if(null===e){var t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,J),t}return e}var $=(0,n.createContext)(null);$.displayName="GroupContext";var K=n.Fragment;function Q(e){var t=e.checked,r=e.onChange,a=A(e,["checked","onChange"]),o="headlessui-switch-"+z(),l=(0,n.useContext)($),s=(0,n.useRef)(null),c=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=(0,n.useRef)(t);return(0,n.useEffect)((function(){a.current=t}),[t]),(0,n.useCallback)((function(e){for(var t,n=L(a.current);!(t=n()).done;){var r=t.value;null!=r&&("function"==typeof r?r(e):r.current=e)}}),[a])}(s,null===l?null:l.setSwitch),i=(0,n.useCallback)((function(){return r(!t)}),[r,t]),u=(0,n.useCallback)((function(e){if(function(e){for(var t,n,r=e.parentElement,a=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(a=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;for(var t=e.previousElementSibling;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(a))&&o}(e.currentTarget))return e.preventDefault();e.preventDefault(),i()}),[i]),m=(0,n.useCallback)((function(e){e.key!==C.Tab&&e.preventDefault(),e.key===C.Space&&i()}),[i]),d=(0,n.useCallback)((function(e){return e.preventDefault()}),[]),p=(0,n.useMemo)((function(){return{checked:t}}),[t]);return W({props:O({},a,{id:o,ref:c,role:"switch",type:V(e,s),tabIndex:0,"aria-checked":t,"aria-labelledby":null==l?void 0:l.labelledby,"aria-describedby":null==l?void 0:l.describedby,onClick:u,onKeyUp:m,onKeyPress:d}),slot:p,defaultTag:"button",name:"Switch"})}Q.Group=function(e){var t=(0,n.useState)(null),a=t[0],o=t[1],l=function(){var e=(0,n.useState)([]),t=e[0],a=e[1];return[t.length>0?t.join(" "):void 0,(0,n.useMemo)((function(){return function(e){var t=(0,n.useCallback)((function(e){return a((function(t){return[].concat(t,[e])})),function(){return a((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),o=(0,n.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return r().createElement(q.Provider,{value:o},e.children)}}),[a])]}(),s=l[0],c=l[1],i=function(){var e=(0,n.useState)([]),t=e[0],a=e[1];return[t.length>0?t.join(" "):void 0,(0,n.useMemo)((function(){return function(e){var t=(0,n.useCallback)((function(e){return a((function(t){return[].concat(t,[e])})),function(){return a((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),o=(0,n.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return r().createElement(B.Provider,{value:o},e.children)}}),[a])]}(),u=i[0],m=i[1],d=(0,n.useMemo)((function(){return{switch:a,setSwitch:o,labelledby:s,describedby:u}}),[a,o,s,u]);return r().createElement(m,{name:"Switch.Description"},r().createElement(c,{name:"Switch.Label",props:{onClick:function(){a&&(a.click(),a.focus({preventScroll:!0}))}}},r().createElement($.Provider,{value:d},W({props:e,defaultTag:K,name:"Switch.Group"}))))},Q.Label=function(e){var t=e.passive,n=void 0!==t&&t,r=A(e,["passive"]),a=J(),o="headlessui-label-"+z();R((function(){return a.register(o)}),[o,a.register]);var l=O({},a.props,{id:o}),s=O({},r,l);return n&&delete s.onClick,W({props:s,slot:a.slot||{},defaultTag:"label",name:a.name||"Label"})},Q.Description=function(e){var t=Y(),n="headlessui-description-"+z();R((function(){return t.register(n)}),[n,t.register]);var r=e,a=O({},t.props,{id:n});return W({props:O({},r,a),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})};var X=window.wp.apiFetch,Z=e.n(X);function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var te=function(){const[e,r]=(0,n.useState)(!1),[a,o]=(0,n.useState)(onboarding_vars.available_gateways),l=v();return(0,t.createElement)("main",{className:"mt-4 mb-4 mx-auto w-auto max-w-7xl px-4 sm:mt-6 sm:px-6 md:mt-8 lg:mt-10 lg:px-8 xl:mt-16"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,t.createElement)("span",{className:"text-gray-700 inline font-bold"},(0,S.__)("Congratulations!!","checkout-plugins-stripe-woo")," "),(0,S.__)("You are connected to Stripe successfully.","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block"},(0,S.__)("Let's enable gateways","checkout-plugins-stripe-woo"))),(0,t.createElement)("ul",{role:"list",className:"divide-y divide-gray-200 bg-white overflow-hidden sm:rounded-md mt-10 max-w-screen-md mx-auto"},a.map((e=>(0,t.createElement)("li",{key:e.id},(0,t.createElement)("span",{href:"#",className:"block hover:bg-gray-50"},(0,t.createElement)("div",{className:"flex items-center px-4 py-4 sm:px-6"},(0,t.createElement)("div",{className:"min-w-0 flex-1 flex items-center"},(0,t.createElement)("div",{className:"flex-shrink-0"},(0,t.createElement)("img",{className:"h-12 w-32 max-w-80",src:e.icon,alt:e.name})),(0,t.createElement)("div",{className:"min-w-0 flex-1 px-4 md:gap-4"},(0,t.createElement)("div",null,(0,t.createElement)("p",{className:"text-sm font-medium text-cart-500 flex truncate"},e.name," ",e.recommended?(0,t.createElement)("span",{className:"ml-2 px-2 py-1 text-green-800 text-xs font-medium bg-green-100 rounded-full"},(0,S.__)("Recommended","checkout-plugins-stripe-woo")):""),(0,t.createElement)("p",{className:"text-sm font-medium text-gray-400 flex"},(0,t.createElement)("span",{className:"text-left text-sm"},"all"===e.currencies?(0,S.__)("Works with all currencies","checkout-plugins-stripe-woo"):(0,S.__)("Works with ","checkout-plugins-stripe-woo")+e.currencies))))),(0,t.createElement)("div",null,(0,t.createElement)(Q,{checked:e.enabled,value:e.enabled,name:e.id,onChange:()=>{e.enabled=!e.enabled,o([...a])},className:ee(e.enabled?"bg-cart-500 ":"bg-gray-200","relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cart-500")},(0,t.createElement)("span",{className:"sr-only"},e.id),(0,t.createElement)("span",{"aria-hidden":"true",className:ee(e.enabled?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200")}))))))))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,S.__)("Enabling…","checkout-plugins-stripe-woo"),(0,t.createElement)(j,null)):(0,t.createElement)("button",{onClick:function(e){e.preventDefault(),r(!0);const t=new window.FormData,n={};a.forEach((function(e){n[e.id]=document.getElementsByName(e.id)[0].value}));const o=JSON.stringify(n);t.append("formdata",o),t.append("action","cpsw_onboarding_enable_gateway"),t.append("security",onboarding_vars.cpsw_onboarding_enable_gateway),Z()({url:onboarding_vars.ajax_url,method:"POST",body:t}).then((e=>{e.success&&(!0===e.data.activated_gateways.cpsw_stripe?l(onboarding_vars.navigator_base+"&cpsw_call=express-checkout"):l(onboarding_vars.navigator_base+"&cpsw_call=thank-you"))}))},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,S.__)("Enable Gateways","checkout-plugins-stripe-woo"))))))},ne=function(){const[e,r]=(0,n.useState)(!1),a=v();return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-16 lg:mt-20 lg:px-8 xl:mt-28"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block xl"},(0,S.__)("Wooho!!","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,S.__)("You are almost done.","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"}," ",(0,S.__)("Since you have enabled","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,S.__)("Stripe Card Processing","checkout-plugins-stripe-woo"),","),(0,S.__)(" We recommend you to enable","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,S.__)("Express Checkout","checkout-plugins-stripe-woo"))," ",(0,S.__)("feature","checkout-plugins-stripe-woo"),"."),(0,t.createElement)("span",null,(0,S.__)("Express Checkout generates more conversions!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"block mx-auto mt-1 mb-1"},(0,t.createElement)("img",{className:"inline mx-4 py-5 h-24",src:onboarding_vars.assets_url+"images/apple-pay.svg",alt:"Express Checkout"}),(0,t.createElement)("img",{className:"inline mx-4 py-5 h-24",src:onboarding_vars.assets_url+"images/gpay.svg",alt:"Express Checkout"})),(0,t.createElement)("div",{className:"sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,S.__)("Enabling…","checkout-plugins-stripe-woo"),(0,t.createElement)(j,null)):(0,t.createElement)("button",{onClick:function(){r(!0);const e=new window.FormData;e.append("action","cpsw_onboarding_enable_express_checkout"),e.append("security",onboarding_vars.cpsw_onboarding_enable_express_checkout),Z()({url:onboarding_vars.ajax_url,method:"POST",body:e}).then((e=>{e.success&&a(onboarding_vars.navigator_base+"&cpsw_call=thank-you")}))},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,S.__)("Enable Express Checkout","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0 sm:ml-3"},(0,t.createElement)("a",{href:onboarding_vars.base_url+"&cpsw_call=thank-you",className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,S.__)("Skip Express Checkout","checkout-plugins-stripe-woo"))))))},re=function(){return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-14 lg:mt-16 lg:px-8 xl:mt-18"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block text-red-600 xl:inline"},(0,S.__)("Failed!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,S.__)("Unfortunately Connection to Stripe failed.","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},(0,t.createElement)("a",{href:onboarding_vars.authorization_url,className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10"},(0,S.__)("Try Again","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0 sm:ml-3"},(0,t.createElement)("a",{href:onboarding_vars.manual_connect_url,className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,S.__)("Manage API keys manually","checkout-plugins-stripe-woo"))))))},ae=function(){const[e,r]=(0,n.useState)(!1);return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-14 lg:mt-16 lg:px-8 xl:mt-18"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,S.__)("Great!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,S.__)("Your store is all set to accept payment.","checkout-plugins-stripe-woo")),(0,t.createElement)("span",null,(0,S.__)("We provide lots of customization options to match your needs, don't forget to explore them.","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,S.__)("Let's Customize…","checkout-plugins-stripe-woo"),(0,t.createElement)(j,null)):(0,t.createElement)("button",{onClick:function(){r(!0),window.location.replace(onboarding_vars.gateways_url)},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,S.__)("Let's Customize","checkout-plugins-stripe-woo"))))))},oe=function(){""!==onboarding_vars.woocommerce_installed&&""!==onboarding_vars.woocommerce_activated&&window.location.replace(onboarding_vars.navigator_base);const[e,r]=(0,n.useState)(""),[a,o]=(0,n.useState)(!1),[l,s]=(0,n.useState)(!1);return(0,t.createElement)("main",{className:"mt-10 mx-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-16 lg:mt-20 lg:px-8 xl:mt-28"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block xl"},""===onboarding_vars.woocommerce_installed?(0,S.__)("Missing","checkout-plugins-stripe-woo"):(0,S.__)("Inactiave","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,S.__)("WooCoomerce","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-6 text-base justify-center text-gray-500 sm:mt-5 sm:text-lg sm:w-full sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,S.__)("Checkout Plugins - Stripe for WooCoomerce","checkout-plugins-stripe-woo"))," ",(0,S.__)("requires","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,S.__)("WooCommerce","checkout-plugins-stripe-woo"))," ",(0,S.__)("to be active on your store.","checkout-plugins-stripe-woo")),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:flex justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},"installing"===e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,S.__)("Installing…","checkout-plugins-stripe-woo"),(0,t.createElement)(j,null)):"activating"===e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,S.__)("Activating…","checkout-plugins-stripe-woo"),(0,t.createElement)(j,null)):(0,t.createElement)("button",{onClick:function(){if(""===onboarding_vars.woocommerce_installed)r("installing"),setTimeout((()=>{o(!0)}),1e4),wp.updates.queue.push({action:"install-plugin",data:{slug:"woocommerce"}}),wp.updates.queueChecker();else{r("activating");const e=new window.FormData;e.append("action","cpsw_onboarding_install_woocommerce"),e.append("security",onboarding_vars.cpsw_onboarding_install_woocommerce),Z()({url:onboarding_vars.ajax_url,method:"POST",body:e}).then((e=>{e.success?window.location.replace(onboarding_vars.onboarding_base):s(!0)}))}},className:"install-dependency w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},""===onboarding_vars.woocommerce_installed?(0,S.__)("Install and continue","checkout-plugins-stripe-woo"):(0,S.__)("Activate and continue","checkout-plugins-stripe-woo"))))),a?(0,t.createElement)("div",{className:"bg-cart-50 p-4 fixed left-0 top-0 right-0 transition ease-in-out delay-150"},(0,t.createElement)("div",{className:"block"},(0,t.createElement)("div",{className:"text-center justify-center"},(0,t.createElement)("p",{className:"text-sm mx-auto w-full text-cart-500 text-center"},(0,S.__)("Installing WooCommerce will take time. Please be patient.","checkout-plugins-stripe-woo"))))):"",l?(0,t.createElement)("div",{className:"bg-cart-50 p-4 fixed left-0 top-0 right-0 transition ease-in-out delay-150"},(0,t.createElement)("div",{className:"block"},(0,t.createElement)("div",{className:"text-center justify-center"},(0,t.createElement)("p",{className:"text-sm mx-auto w-full text-cart-500 text-center"},(0,S.__)("WooCommerce installing failed. Please try again.","checkout-plugins-stripe-woo"))))):"")},le=function(){return(0,t.createElement)("div",null,(0,t.createElement)("div",{className:"relative pt-6 px-4 sm:px-6 lg:px-8"},(0,t.createElement)("nav",{className:"relative flex items-center justify-center sm:h-10","aria-label":"Logo"},(0,t.createElement)("div",{className:"flex items-center justify-center flex-grow"},(0,t.createElement)("div",{className:"flex items-center w-auto"},(0,t.createElement)("img",{className:"h-16 w-full",src:onboarding_vars.assets_url+"images/cpsw-logo.svg",alt:"Checkout Plugins - Stripe for WooCommerce"}))))))};o().render((0,t.createElement)((function(e){let{basename:t,children:r,window:a}=e,o=(0,n.useRef)();null==o.current&&(o.current=function(e){function t(){var e=c.location,t=d.state||{};return[t.idx,{pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"}]}function n(e){return"string"==typeof e?e:function(e){var t=e.pathname;t=void 0===t?"/":t;var n=e.search;return n=void 0===n?"":n,e=void 0===(e=e.hash)?"":e,n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),e&&"#"!==e&&(t+="#"===e.charAt(0)?e:"#"+e),t}(e)}function r(e,t){return void 0===t&&(t=null),l({pathname:x.pathname,hash:"",search:""},"string"==typeof e?m(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){f=e,e=t(),g=e[0],x=e[1],h.call({action:f,location:x})}function o(e){d.go(e)}void 0===e&&(e={});var c=void 0===(e=e.window)?document.defaultView:e,d=c.history,p=null;c.addEventListener("popstate",(function(){if(p)b.call(p),p=null;else{var e=s.Pop,n=t(),r=n[0];if(n=n[1],b.length){if(null!=r){var l=g-r;l&&(p={action:e,location:n,retry:function(){o(-1*l)}},o(l))}}else a(e)}}));var f=s.Pop,g=(e=t())[0],x=e[1],h=u(),b=u();return null==g&&(g=0,d.replaceState(l({},d.state,{idx:g}),"")),{get action(){return f},get location(){return x},createHref:n,push:function e(t,o){var l=s.Push,i=r(t,o);if(!b.length||(b.call({action:l,location:i,retry:function(){e(t,o)}}),0)){var u=[{usr:i.state,key:i.key,idx:g+1},n(i)];i=u[0],u=u[1];try{d.pushState(i,"",u)}catch(e){c.location.assign(u)}a(l)}},replace:function e(t,o){var l=s.Replace,c=r(t,o);b.length&&(b.call({action:l,location:c,retry:function(){e(t,o)}}),1)||(c=[{usr:c.state,key:c.key,idx:g},n(c)],d.replaceState(c[0],"",c[1]),a(l))},go:o,back:function(){o(-1)},forward:function(){o(1)},listen:function(e){return h.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&c.addEventListener("beforeunload",i),function(){t(),b.length||c.removeEventListener("beforeunload",i)}}}}({window:a}));let c=o.current,[d,p]=(0,n.useState)({action:c.action,location:c.location});return(0,n.useLayoutEffect)((()=>c.listen(p)),[c]),(0,n.createElement)(x,{basename:t,children:r,location:d.location,navigationType:d.action,navigator:c})}),null,(0,t.createElement)((function(){const e=new URLSearchParams(b().search).get("cpsw_call");let n=(0,t.createElement)("p",null);switch(e){case"success":n=(0,t.createElement)(te,null);break;case"failed":n=(0,t.createElement)(re,null);break;case"express-checkout":n=(0,t.createElement)(ne,null);break;case"thank-you":n=(0,t.createElement)(ae,null);break;case"setup-woocommerce":n=(0,t.createElement)(oe,null);break;default:n=(0,t.createElement)(P,null)}return(0,t.createElement)("div",{className:"relative bg-white overflow-hidden w-10/12 mx-auto my-0 rounded-xl mt-12"},(0,t.createElement)("div",{className:"max-w-7xl mx-auto overflow-x-hidden"},(0,t.createElement)("div",{className:"relative z-10 bg-white lg:w-full"},(0,t.createElement)(le,null),n)))}),null)),document.getElementById("cpsw-onboarding-content"))}();
1
+ !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,n=window.React,r=e.n(n),a=window.ReactDOM,o=e.n(a);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var l,s=l||(l={});s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE";function c(e){e.preventDefault(),e.returnValue=""}function u(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function m(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function d(e,t){if(!e)throw new Error(t)}const p=(0,n.createContext)(null),f=(0,n.createContext)(null),b=(0,n.createContext)({outlet:null,matches:[]});function v(e){let{basename:t="/",children:r=null,location:a,navigationType:o=l.Pop,navigator:i,static:s=!1}=e;x()&&d(!1);let c=y(t),u=(0,n.useMemo)((()=>({basename:c,navigator:i,static:s})),[c,i,s]);"string"==typeof a&&(a=m(a));let{pathname:b="/",search:v="",hash:g="",state:h=null,key:w="default"}=a,E=(0,n.useMemo)((()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}(b,c);return null==e?null:{pathname:e,search:v,hash:g,state:h,key:w}}),[c,b,v,g,h,w]);return null==E?null:(0,n.createElement)(p.Provider,{value:u},(0,n.createElement)(f.Provider,{children:r,value:{location:E,navigationType:o}}))}function x(){return null!=(0,n.useContext)(f)}function g(){return x()||d(!1),(0,n.useContext)(f).location}function h(){x()||d(!1);let{basename:e,navigator:t}=(0,n.useContext)(p),{matches:r}=(0,n.useContext)(b),{pathname:a}=g(),o=JSON.stringify(r.map((e=>e.pathnameBase))),i=(0,n.useRef)(!1);return(0,n.useEffect)((()=>{i.current=!0})),(0,n.useCallback)((function(n,r){if(void 0===r&&(r={}),!i.current)return;if("number"==typeof n)return void t.go(n);let l=function(e,t,n){let r,a="string"==typeof e?m(e):e,o=""===e||""===a.pathname?"/":a.pathname;if(null==o)r=n;else{let e=t.length-1;if(o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}r=e>=0?t[e]:"/"}let i=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?m(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:E(r),hash:k(a)}}(a,r);return o&&"/"!==o&&o.endsWith("/")&&!i.pathname.endsWith("/")&&(i.pathname+="/"),i}(n,JSON.parse(o),a);"/"!==e&&(l.pathname=w([e,l.pathname])),(r.replace?t.replace:t.push)(l,r.state)}),[e,t,o,a])}const w=e=>e.join("/").replace(/\/\/+/g,"/"),y=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),E=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",k=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var _,N,S,C=window.wp.i18n,O=function(){return(0,t.createElement)("svg",{className:"animate-spin ml-2 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,t.createElement)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.createElement)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))},R=function(){const[e,r]=(0,n.useState)(!1),a=h();return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-16 lg:mt-20 lg:px-8 xl:mt-28"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block xl"}," ",(0,C.__)("Let's Connect","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,C.__)("with Stripe","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,t.createElement)("span",{className:"block text-gray-700 inline font-bold"},(0,C.__)("Checkout Plugins","checkout-plugins-stripe-woo"))," ",(0,C.__)("recommends to connect with","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("Stripe connect.","checkout-plugins-stripe-woo"))),(0,t.createElement)("span",null,(0,C.__)("One click onboarding solution provided by","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("Stripe.","checkout-plugins-stripe-woo")))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Connecting…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):(0,t.createElement)("button",{onClick:function(){r(!0),""===onboarding_vars.woocommerce_installed||""===onboarding_vars.woocommerce_activated?a(onboarding_vars.navigator_base+"&cpsw_call=setup-woocommerce"):window.location.replace(onboarding_vars.authorization_url)},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,C.__)("Connect with Stripe","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0 sm:ml-3"},(0,t.createElement)("a",{href:onboarding_vars.settings_url,className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,C.__)("Leave onboarding process","checkout-plugins-stripe-woo"))))))};function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function j(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function D(e,t){if(e in t){for(var n=t[e],r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,a):n}var i=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(i,D),i}function A(e){var t=e.props,n=e.slot,r=e.defaultTag,a=e.features,o=e.visible,i=void 0===o||o,l=e.name;if(i)return F(t,n,r,l);var s=null!=a?a:_.None;if(s&_.Static){var c=t.static,u=void 0!==c&&c,m=j(t,["static"]);if(u)return F(m,n,r,l)}if(s&_.RenderStrategy){var d,p=t.unmount,f=void 0===p||p,b=j(t,["unmount"]);return D(f?N.Unmount:N.Hidden,((d={})[N.Unmount]=function(){return null},d[N.Hidden]=function(){return F(L({},b,{hidden:!0,style:{display:"none"}}),n,r,l)},d))}return F(t,n,r,l)}function F(e,t,r,a){var o;void 0===t&&(t={});var i=M(e,["unmount","static"]),l=i.as,s=void 0===l?r:l,c=i.children,u=i.refName,m=void 0===u?"ref":u,d=j(i,["as","children","refName"]),p=void 0!==e.ref?((o={})[m]=e.ref,o):{},f="function"==typeof c?c(t):c;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),s===n.Fragment&&Object.keys(d).length>0){if(!(0,n.isValidElement)(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+a+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,n.cloneElement)(f,Object.assign({},function(e,t,n){for(var r,a=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(a,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},i=P(["onClick"]);!(r=i()).done;)o();return a}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(M(d,["ref"])),f.props),p))}return(0,n.createElement)(s,Object.assign({},M(d,["ref"]),s!==n.Fragment&&p),f)}function I(e){var t;return Object.assign((0,n.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function M(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),a=P(t);!(n=a()).done;){var o=n.value;o in r&&delete r[o]}return r}function H(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=(0,n.useRef)(t);return(0,n.useEffect)((function(){a.current=t}),[t]),(0,n.useCallback)((function(e){for(var t,n=P(a.current);!(t=n()).done;){var r=t.value;null!=r&&("function"==typeof r?r(e):r.current=e)}}),[a])}function U(e){for(var t,n,r=e.parentElement,a=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(a=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;for(var t=e.previousElementSibling;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(a))&&o}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(_||(_={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(N||(N={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(S||(S={}));var W="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,V={serverHandoffComplete:!1};function G(){var e=(0,n.useState)(V.serverHandoffComplete),t=e[0],r=e[1];return(0,n.useEffect)((function(){!0!==t&&r(!0)}),[t]),(0,n.useEffect)((function(){!1===V.serverHandoffComplete&&(V.serverHandoffComplete=!0)}),[]),t}var B=0;function z(){return++B}function Q(){var e=G(),t=(0,n.useState)(e?z:null),r=t[0],a=t[1];return W((function(){null===r&&a(z())}),[r]),null!=r?""+r:void 0}var q=(0,n.createContext)(null);function Y(){var e=(0,n.useContext)(q);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Y),t}return e}function K(e){var t;if(e.type)return e.type;var n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function J(e,t){var r=(0,n.useState)((function(){return K(e)})),a=r[0],o=r[1];return W((function(){o(K(e))}),[e.type,e.as]),W((function(){a||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&o("button")}),[a,t]),a}var $=(0,n.createContext)(null);function X(){var e=(0,n.useContext)($);if(null===e){var t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,X),t}return e}var Z=(0,n.createContext)(null);Z.displayName="GroupContext";var ee=n.Fragment;function te(e){var t=e.checked,r=e.onChange,a=j(e,["checked","onChange"]),o="headlessui-switch-"+Q(),i=(0,n.useContext)(Z),l=(0,n.useRef)(null),s=H(l,null===i?null:i.setSwitch),c=(0,n.useCallback)((function(){return r(!t)}),[r,t]),u=(0,n.useCallback)((function(e){if(U(e.currentTarget))return e.preventDefault();e.preventDefault(),c()}),[c]),m=(0,n.useCallback)((function(e){e.key!==S.Tab&&e.preventDefault(),e.key===S.Space&&c()}),[c]),d=(0,n.useCallback)((function(e){return e.preventDefault()}),[]),p=(0,n.useMemo)((function(){return{checked:t}}),[t]);return A({props:L({},a,{id:o,ref:s,role:"switch",type:J(e,l),tabIndex:0,"aria-checked":t,"aria-labelledby":null==i?void 0:i.labelledby,"aria-describedby":null==i?void 0:i.describedby,onClick:u,onKeyUp:m,onKeyPress:d}),slot:p,defaultTag:"button",name:"Switch"})}te.Group=function(e){var t=(0,n.useState)(null),a=t[0],o=t[1],i=function(){var e=(0,n.useState)([]),t=e[0],a=e[1];return[t.length>0?t.join(" "):void 0,(0,n.useMemo)((function(){return function(e){var t=(0,n.useCallback)((function(e){return a((function(t){return[].concat(t,[e])})),function(){return a((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),o=(0,n.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return r().createElement($.Provider,{value:o},e.children)}}),[a])]}(),l=i[0],s=i[1],c=function(){var e=(0,n.useState)([]),t=e[0],a=e[1];return[t.length>0?t.join(" "):void 0,(0,n.useMemo)((function(){return function(e){var t=(0,n.useCallback)((function(e){return a((function(t){return[].concat(t,[e])})),function(){return a((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),o=(0,n.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return r().createElement(q.Provider,{value:o},e.children)}}),[a])]}(),u=c[0],m=c[1],d=(0,n.useMemo)((function(){return{switch:a,setSwitch:o,labelledby:l,describedby:u}}),[a,o,l,u]);return r().createElement(m,{name:"Switch.Description"},r().createElement(s,{name:"Switch.Label",props:{onClick:function(){a&&(a.click(),a.focus({preventScroll:!0}))}}},r().createElement(Z.Provider,{value:d},A({props:e,defaultTag:ee,name:"Switch.Group"}))))},te.Label=function(e){var t=e.passive,n=void 0!==t&&t,r=j(e,["passive"]),a=X(),o="headlessui-label-"+Q();W((function(){return a.register(o)}),[o,a.register]);var i=L({},a.props,{id:o}),l=L({},r,i);return n&&delete l.onClick,A({props:l,slot:a.slot||{},defaultTag:"label",name:a.name||"Label"})},te.Description=function(e){var t=Y(),n="headlessui-description-"+Q();W((function(){return t.register(n)}),[n,t.register]);var r=e,a=L({},t.props,{id:n});return A({props:L({},r,a),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})};var ne=window.wp.apiFetch,re=e.n(ne);function ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var oe,ie,le,se,ce=function(){const[e,r]=(0,n.useState)(!1),[a,o]=(0,n.useState)(onboarding_vars.available_gateways),i=h();return(0,t.createElement)("main",{className:"mt-4 mb-4 mx-auto w-auto max-w-7xl px-4 sm:mt-6 sm:px-6 md:mt-8 lg:mt-10 lg:px-8 xl:mt-16"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,t.createElement)("span",{className:"text-gray-700 inline font-bold"},(0,C.__)("Congratulations!!","checkout-plugins-stripe-woo")," "),(0,C.__)("You are connected to Stripe successfully.","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block"},(0,C.__)("Let's enable gateways","checkout-plugins-stripe-woo"))),(0,t.createElement)("ul",{role:"list",className:"divide-y divide-gray-200 bg-white overflow-hidden sm:rounded-md mt-10 max-w-screen-md mx-auto"},a.map((e=>(0,t.createElement)("li",{key:e.id},(0,t.createElement)("span",{href:"#",className:"block hover:bg-gray-50"},(0,t.createElement)("div",{className:"flex items-center px-4 py-4 sm:px-6"},(0,t.createElement)("div",{className:"min-w-0 flex-1 flex items-center"},(0,t.createElement)("div",{className:"flex-shrink-0"},(0,t.createElement)("img",{className:"h-12 w-32 max-w-80",src:e.icon,alt:e.name})),(0,t.createElement)("div",{className:"min-w-0 flex-1 px-4 md:gap-4"},(0,t.createElement)("div",null,(0,t.createElement)("p",{className:"text-sm font-medium text-cart-500 flex truncate"},e.name," ",e.recommended?(0,t.createElement)("span",{className:"ml-2 px-2 py-1 text-green-800 text-xs font-medium bg-green-100 rounded-full"},(0,C.__)("Recommended","checkout-plugins-stripe-woo")):""),(0,t.createElement)("p",{className:"text-sm font-medium text-gray-400 flex"},(0,t.createElement)("span",{className:"text-left text-sm"},"all"===e.currencies?(0,C.__)("Works with all currencies","checkout-plugins-stripe-woo"):(0,C.__)("Works with ","checkout-plugins-stripe-woo")+e.currencies))))),(0,t.createElement)("div",null,(0,t.createElement)(te,{checked:e.enabled,value:e.enabled,name:e.id,onChange:()=>{e.enabled=!e.enabled,o([...a])},className:ae(e.enabled?"bg-cart-500 ":"bg-gray-200","relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cart-500")},(0,t.createElement)("span",{className:"sr-only"},e.id),(0,t.createElement)("span",{"aria-hidden":"true",className:ae(e.enabled?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200")}))))))))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Enabling…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):(0,t.createElement)("button",{onClick:function(e){e.preventDefault(),r(!0);const t=new window.FormData,n={};a.forEach((function(e){n[e.id]=document.getElementsByName(e.id)[0].value}));const o=JSON.stringify(n);t.append("formdata",o),t.append("action","cpsw_onboarding_enable_gateway"),t.append("security",onboarding_vars.cpsw_onboarding_enable_gateway),re()({url:onboarding_vars.ajax_url,method:"POST",body:t}).then((e=>{e.success&&(!0===e.data.activated_gateways.cpsw_stripe?i(onboarding_vars.navigator_base+"&cpsw_call=express-checkout"):i(onboarding_vars.navigator_base+"&cpsw_call=webhooks"))}))},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,C.__)("Enable Gateways","checkout-plugins-stripe-woo"))))))},ue=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(oe||(oe={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(ie||(ie={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(le||(le={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(se||(se={}));var me,de,pe,fe,be,ve=(0,n.createContext)(null);function xe(){return(0,n.useContext)(ve)}function ge(e){var t=e.value,n=e.children;return r().createElement(ve.Provider,{value:t},n)}function he(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=P(e.splice(0));!(t=n()).done;){(0,t.value)()}}};return t}function we(){var e=(0,n.useState)(he)[0];return(0,n.useEffect)((function(){return function(){return e.dispose()}}),[e]),e}function ye(e,t){var r=(0,n.useState)(e),a=r[0],o=r[1],i=(0,n.useRef)(e);return W((function(){i.current=e}),[e]),W((function(){return o(i.current)}),[i,o].concat(t)),a}ve.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(me||(me={})),function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(de||(de={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(fe||(fe={})),function(e){e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption"}(be||(be={}));var Ee=((pe={})[be.CloseListbox]=function(e){return e.disabled||e.listboxState===fe.Closed?e:L({},e,{activeOptionIndex:null,listboxState:fe.Closed})},pe[be.OpenListbox]=function(e){return e.disabled||e.listboxState===fe.Open?e:L({},e,{listboxState:fe.Open})},pe[be.SetDisabled]=function(e,t){return e.disabled===t.disabled?e:L({},e,{disabled:t.disabled})},pe[be.SetOrientation]=function(e,t){return e.orientation===t.orientation?e:L({},e,{orientation:t.orientation})},pe[be.GoToOption]=function(e,t){if(e.disabled)return e;if(e.listboxState===fe.Closed)return e;var n=function(e,t){var n=t.resolveItems();if(n.length<=0)return null;var r=t.resolveActiveIndex(),a=null!=r?r:-1,o=function(){switch(e.focus){case de.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case de.Previous:var r=n.slice().reverse().findIndex((function(e,n,r){return!(-1!==a&&r.length-n-1>=a||t.resolveDisabled(e))}));return-1===r?r:n.length-1-r;case de.Next:return n.findIndex((function(e,n){return!(n<=a||t.resolveDisabled(e))}));case de.Last:var o=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===o?o:n.length-1-o;case de.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case de.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===o?r:o}(t,{resolveItems:function(){return e.options},resolveActiveIndex:function(){return e.activeOptionIndex},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.current.disabled}});return""===e.searchQuery&&e.activeOptionIndex===n?e:L({},e,{searchQuery:"",activeOptionIndex:n})},pe[be.Search]=function(e,t){if(e.disabled)return e;if(e.listboxState===fe.Closed)return e;var n=e.searchQuery+t.value.toLowerCase(),r=e.options.findIndex((function(e){var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))}));return-1===r||r===e.activeOptionIndex?L({},e,{searchQuery:n}):L({},e,{searchQuery:n,activeOptionIndex:r})},pe[be.ClearSearch]=function(e){return e.disabled||e.listboxState===fe.Closed||""===e.searchQuery?e:L({},e,{searchQuery:""})},pe[be.RegisterOption]=function(e,t){return L({},e,{options:[].concat(e.options,[{id:t.id,dataRef:t.dataRef}])})},pe[be.UnregisterOption]=function(e,t){var n=e.options.slice(),r=null!==e.activeOptionIndex?n[e.activeOptionIndex]:null,a=n.findIndex((function(e){return e.id===t.id}));return-1!==a&&n.splice(a,1),L({},e,{options:n,activeOptionIndex:a===e.activeOptionIndex||null===r?null:n.indexOf(r)})},pe),ke=(0,n.createContext)(null);function _e(e){var t=(0,n.useContext)(ke);if(null===t){var r=new Error("<"+e+" /> is missing a parent <"+Ce.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(r,_e),r}return t}function Ne(e,t){return D(t.type,Ee,e,t)}ke.displayName="ListboxContext";var Se=n.Fragment;function Ce(e){var t,a,o,i,l,s=e.value,c=e.onChange,u=e.disabled,m=void 0!==u&&u,d=e.horizontal,p=void 0!==d&&d,f=j(e,["value","onChange","disabled","horizontal"]),b=p?"horizontal":"vertical",v=(0,n.useReducer)(Ne,{listboxState:fe.Closed,propsRef:{current:{value:s,onChange:c}},labelRef:(0,n.createRef)(),buttonRef:(0,n.createRef)(),optionsRef:(0,n.createRef)(),disabled:m,orientation:b,options:[],searchQuery:"",activeOptionIndex:null}),x=v[0],g=x.listboxState,h=x.propsRef,w=x.optionsRef,y=x.buttonRef,E=v[1];W((function(){h.current.value=s}),[s,h]),W((function(){h.current.onChange=c}),[c,h]),W((function(){return E({type:be.SetDisabled,disabled:m})}),[m]),W((function(){return E({type:be.SetOrientation,orientation:b})}),[b]),a="mousedown",o=function(e){var t,n,r,a=e.target;g===fe.Open&&((null==(t=y.current)?void 0:t.contains(a))||(null==(n=w.current)?void 0:n.contains(a))||(E({type:be.CloseListbox}),function(e,t){var n;return void 0===t&&(t=se.Strict),e!==document.body&&D(t,((n={})[se.Strict]=function(){return e.matches(ue)},n[se.Loose]=function(){for(var t=e;null!==t;){if(t.matches(ue))return!0;t=t.parentElement}return!1},n))}(a,se.Loose)||(e.preventDefault(),null==(r=y.current)||r.focus())))},(l=(0,n.useRef)(o)).current=o,(0,n.useEffect)((function(){function e(e){l.current.call(window,e)}return window.addEventListener(a,e,i),function(){return window.removeEventListener(a,e,i)}}),[a,i]);var k=(0,n.useMemo)((function(){return{open:g===fe.Open,disabled:m}}),[g,m]);return r().createElement(ke.Provider,{value:v},r().createElement(ge,{value:D(g,(t={},t[fe.Open]=me.Open,t[fe.Closed]=me.Closed,t))},A({props:f,slot:k,defaultTag:Se,name:"Listbox"})))}var Oe,Re=I((function e(t,r){var a,o=_e([Ce.name,e.name].join(".")),i=o[0],l=o[1],s=H(i.buttonRef,r),c="headlessui-listbox-button-"+Q(),u=we(),m=(0,n.useCallback)((function(e){switch(e.key){case S.Space:case S.Enter:case S.ArrowDown:e.preventDefault(),l({type:be.OpenListbox}),u.nextFrame((function(){i.propsRef.current.value||l({type:be.GoToOption,focus:de.First})}));break;case S.ArrowUp:e.preventDefault(),l({type:be.OpenListbox}),u.nextFrame((function(){i.propsRef.current.value||l({type:be.GoToOption,focus:de.Last})}))}}),[l,i,u]),d=(0,n.useCallback)((function(e){e.key===S.Space&&e.preventDefault()}),[]),p=(0,n.useCallback)((function(e){if(U(e.currentTarget))return e.preventDefault();i.listboxState===fe.Open?(l({type:be.CloseListbox}),u.nextFrame((function(){var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),l({type:be.OpenListbox}))}),[l,u,i]),f=ye((function(){if(i.labelRef.current)return[i.labelRef.current.id,c].join(" ")}),[i.labelRef.current,c]),b=(0,n.useMemo)((function(){return{open:i.listboxState===fe.Open,disabled:i.disabled}}),[i]);return A({props:L({},t,{ref:s,id:c,type:J(t,i.buttonRef),"aria-haspopup":!0,"aria-controls":null==(a=i.optionsRef.current)?void 0:a.id,"aria-expanded":i.disabled?void 0:i.listboxState===fe.Open,"aria-labelledby":f,disabled:i.disabled,onKeyDown:m,onKeyUp:d,onClick:p}),slot:b,defaultTag:"button",name:"Listbox.Button"})})),Le=_.RenderStrategy|_.Static,je=I((function e(t,r){var a,o=_e([Ce.name,e.name].join(".")),i=o[0],l=o[1],s=H(i.optionsRef,r),c="headlessui-listbox-options-"+Q(),u=we(),m=we(),d=xe(),p=null!==d?d===me.Open:i.listboxState===fe.Open;W((function(){var e=i.optionsRef.current;e&&i.listboxState===fe.Open&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[i.listboxState,i.optionsRef]);var f=(0,n.useCallback)((function(e){switch(m.dispose(),e.key){case S.Space:if(""!==i.searchQuery)return e.preventDefault(),e.stopPropagation(),l({type:be.Search,value:e.key});case S.Enter:if(e.preventDefault(),e.stopPropagation(),l({type:be.CloseListbox}),null!==i.activeOptionIndex){var t=i.options[i.activeOptionIndex].dataRef;i.propsRef.current.onChange(t.current.value)}he().nextFrame((function(){var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case D(i.orientation,{vertical:S.ArrowDown,horizontal:S.ArrowRight}):return e.preventDefault(),e.stopPropagation(),l({type:be.GoToOption,focus:de.Next});case D(i.orientation,{vertical:S.ArrowUp,horizontal:S.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),l({type:be.GoToOption,focus:de.Previous});case S.Home:case S.PageUp:return e.preventDefault(),e.stopPropagation(),l({type:be.GoToOption,focus:de.First});case S.End:case S.PageDown:return e.preventDefault(),e.stopPropagation(),l({type:be.GoToOption,focus:de.Last});case S.Escape:return e.preventDefault(),e.stopPropagation(),l({type:be.CloseListbox}),u.nextFrame((function(){var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case S.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(l({type:be.Search,value:e.key}),m.setTimeout((function(){return l({type:be.ClearSearch})}),350))}}),[u,l,m,i]),b=ye((function(){var e,t,n;return null!=(e=null==(t=i.labelRef.current)?void 0:t.id)?e:null==(n=i.buttonRef.current)?void 0:n.id}),[i.labelRef.current,i.buttonRef.current]),v=(0,n.useMemo)((function(){return{open:i.listboxState===fe.Open}}),[i]);return A({props:L({},t,{"aria-activedescendant":null===i.activeOptionIndex||null==(a=i.options[i.activeOptionIndex])?void 0:a.id,"aria-labelledby":b,"aria-orientation":i.orientation,id:c,onKeyDown:f,role:"listbox",tabIndex:0,ref:s}),slot:v,defaultTag:"ul",features:Le,visible:p,name:"Listbox.Options"})}));function Te(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function Pe(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function De(e,t,n,r,a,o){var i=he(),l=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return Pe.apply(void 0,[e].concat(a)),Te.apply(void 0,[e].concat(t,n)),i.nextFrame((function(){Pe.apply(void 0,[e].concat(n)),Te.apply(void 0,[e].concat(r)),i.add(function(e,t){var n=he();if(!e)return n.dispose;var r=getComputedStyle(e),a=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),o=a[0],i=a[1];return 0!==o?n.setTimeout((function(){t(Oe.Finished)}),o+i):t(Oe.Finished),n.add((function(){return t(Oe.Cancelled)})),n.dispose}(e,(function(n){return Pe.apply(void 0,[e].concat(r,t)),Te.apply(void 0,[e].concat(a)),l(n)})))})),i.add((function(){return Pe.apply(void 0,[e].concat(t,n,r,a))})),i.add((function(){return l(Oe.Cancelled)})),i.dispose}function Ae(e){return void 0===e&&(e=""),(0,n.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}Ce.Button=Re,Ce.Label=function e(t){var r=_e([Ce.name,e.name].join("."))[0],a="headlessui-listbox-label-"+Q(),o=(0,n.useCallback)((function(){var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),[r.buttonRef]),i=(0,n.useMemo)((function(){return{open:r.listboxState===fe.Open,disabled:r.disabled}}),[r]);return A({props:L({},t,{ref:r.labelRef,id:a,onClick:o}),slot:i,defaultTag:"label",name:"Listbox.Label"})},Ce.Options=je,Ce.Option=function e(t){var r=t.disabled,a=void 0!==r&&r,o=t.value,i=j(t,["disabled","value"]),l=_e([Ce.name,e.name].join(".")),s=l[0],c=l[1],u="headlessui-listbox-option-"+Q(),m=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===u,d=s.propsRef.current.value===o,p=(0,n.useRef)({disabled:a,value:o});W((function(){p.current.disabled=a}),[p,a]),W((function(){p.current.value=o}),[p,o]),W((function(){var e,t;p.current.textValue=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase()}),[p,u]);var f=(0,n.useCallback)((function(){return s.propsRef.current.onChange(o)}),[s.propsRef,o]);W((function(){return c({type:be.RegisterOption,id:u,dataRef:p}),function(){return c({type:be.UnregisterOption,id:u})}}),[p,u]),W((function(){var e;s.listboxState===fe.Open&&d&&(c({type:be.GoToOption,focus:de.Specific,id:u}),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),[s.listboxState]),W((function(){if(s.listboxState===fe.Open&&m){var e=he();return e.nextFrame((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})})),e.dispose}}),[u,m,s.listboxState]);var b=(0,n.useCallback)((function(e){if(a)return e.preventDefault();f(),c({type:be.CloseListbox}),he().nextFrame((function(){var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),[c,s.buttonRef,a,f]),v=(0,n.useCallback)((function(){if(a)return c({type:be.GoToOption,focus:de.Nothing});c({type:be.GoToOption,focus:de.Specific,id:u})}),[a,u,c]),x=(0,n.useCallback)((function(){a||m||c({type:be.GoToOption,focus:de.Specific,id:u})}),[a,m,u,c]),g=(0,n.useCallback)((function(){a||m&&c({type:be.GoToOption,focus:de.Nothing})}),[a,m,c]),h=(0,n.useMemo)((function(){return{active:m,selected:d,disabled:a}}),[m,d,a]);return A({props:L({},i,{id:u,role:"option",tabIndex:!0===a?void 0:-1,"aria-disabled":!0===a||void 0,"aria-selected":!0===d||void 0,disabled:void 0,onClick:b,onFocus:v,onPointerMove:x,onMouseMove:x,onPointerLeave:g,onMouseLeave:g}),slot:h,defaultTag:"li",name:"Listbox.Option"})},function(e){e.Finished="finished",e.Cancelled="cancelled"}(Oe||(Oe={}));var Fe,Ie=(0,n.createContext)(null);Ie.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(Fe||(Fe={}));var Me=(0,n.createContext)(null);function He(e){return"children"in e?He(e.children):e.current.filter((function(e){return e.state===Fe.Visible})).length>0}function Ue(e){var t=(0,n.useRef)(e),r=(0,n.useRef)([]),a=function(){var e=(0,n.useRef)(!1);return(0,n.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}();(0,n.useEffect)((function(){t.current=e}),[e]);var o=(0,n.useCallback)((function(e,n){var o;void 0===n&&(n=N.Hidden);var i=r.current.findIndex((function(t){return t.id===e}));-1!==i&&(D(n,((o={})[N.Unmount]=function(){r.current.splice(i,1)},o[N.Hidden]=function(){r.current[i].state=Fe.Hidden},o)),!He(r)&&a.current&&(null==t.current||t.current()))}),[t,a,r]),i=(0,n.useCallback)((function(e){var t=r.current.find((function(t){return t.id===e}));return t?t.state!==Fe.Visible&&(t.state=Fe.Visible):r.current.push({id:e,state:Fe.Visible}),function(){return o(e,N.Unmount)}}),[r,o]);return(0,n.useMemo)((function(){return{children:r,register:i,unregister:o}}),[i,o,r])}function We(){}Me.displayName="NestingContext";var Ve=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ge(e){for(var t,n={},r=P(Ve);!(t=r()).done;){var a,o=t.value;n[o]=null!=(a=e[o])?a:We}return n}var Be=_.RenderStrategy;function ze(e){var t,a=e.beforeEnter,o=e.afterEnter,i=e.beforeLeave,l=e.afterLeave,s=e.enter,c=e.enterFrom,u=e.enterTo,m=e.entered,d=e.leave,p=e.leaveFrom,f=e.leaveTo,b=j(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),v=(0,n.useRef)(null),x=(0,n.useState)(Fe.Visible),g=x[0],h=x[1],w=b.unmount?N.Unmount:N.Hidden,y=function(){var e=(0,n.useContext)(Ie);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),E=y.show,k=y.appear,_=y.initial,S=function(){var e=(0,n.useContext)(Me);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),C=S.register,O=S.unregister,R=Q(),T=(0,n.useRef)(!1),P=Ue((function(){T.current||(h(Fe.Hidden),O(R),z.current.afterLeave())}));W((function(){if(R)return C(R)}),[C,R]),W((function(){var e;w===N.Hidden&&R&&(E&&g!==Fe.Visible?h(Fe.Visible):D(g,((e={})[Fe.Hidden]=function(){return O(R)},e[Fe.Visible]=function(){return C(R)},e)))}),[g,R,C,O,E,w]);var F=Ae(s),I=Ae(c),M=Ae(u),H=Ae(m),U=Ae(d),V=Ae(p),B=Ae(f),z=function(e){var t=(0,n.useRef)(Ge(e));return(0,n.useEffect)((function(){t.current=Ge(e)}),[e]),t}({beforeEnter:a,afterEnter:o,beforeLeave:i,afterLeave:l}),q=G();(0,n.useEffect)((function(){if(q&&g===Fe.Visible&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,g,q]);var Y=_&&!k;W((function(){var e=v.current;if(e&&!Y)return T.current=!0,E&&z.current.beforeEnter(),E||z.current.beforeLeave(),E?De(e,F,I,M,H,(function(e){T.current=!1,e===Oe.Finished&&z.current.afterEnter()})):De(e,U,V,B,H,(function(e){T.current=!1,e===Oe.Finished&&(He(P)||(h(Fe.Hidden),O(R),z.current.afterLeave()))}))}),[z,R,T,O,P,v,Y,E,F,I,M,U,V,B]);var K={ref:v},J=b;return r().createElement(Me.Provider,{value:P},r().createElement(ge,{value:D(g,(t={},t[Fe.Visible]=me.Open,t[Fe.Hidden]=me.Closed,t))},A({props:L({},J,K),defaultTag:"div",features:Be,visible:g===Fe.Visible,name:"Transition.Child"})))}function Qe(e){var t,a=e.show,o=e.appear,i=void 0!==o&&o,l=e.unmount,s=j(e,["show","appear","unmount"]),c=xe();if(void 0===a&&null!==c&&(a=D(c,((t={})[me.Open]=!0,t[me.Closed]=!1,t))),![!0,!1].includes(a))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var u=(0,n.useState)(a?Fe.Visible:Fe.Hidden),m=u[0],d=u[1],p=Ue((function(){d(Fe.Hidden)})),f=function(){var e=(0,n.useRef)(!0);return(0,n.useEffect)((function(){e.current=!1}),[]),e.current}(),b=(0,n.useMemo)((function(){return{show:a,appear:i||!f,initial:f}}),[a,i,f]);(0,n.useEffect)((function(){a?d(Fe.Visible):He(p)||d(Fe.Hidden)}),[a,p]);var v={unmount:l};return r().createElement(Me.Provider,{value:p},r().createElement(Ie.Provider,{value:b},A({props:L({},v,{as:n.Fragment,children:r().createElement(ze,Object.assign({},v,s))}),defaultTag:n.Fragment,features:Be,visible:m===Fe.Visible,name:"Transition"})))}Qe.Child=function(e){var t=null!==(0,n.useContext)(Ie),a=null!==xe();return!t&&a?r().createElement(Qe,Object.assign({},e)):r().createElement(ze,Object.assign({},e))},Qe.Root=Qe;var qe=function(){const[e,r]=(0,n.useState)(!1),[a,o]=(0,n.useState)(onboarding_vars.get_webhook_secret),i=[{id:"test",name:(0,C.__)("Test","cart-plugin")},{id:"live",name:(0,C.__)("Live","cart-plugin")}],l=Object.keys(i).find((e=>i[e].id===onboarding_vars.get_payment_mode)),[s,c]=(0,n.useState)(i[l]),u=h();return(0,t.createElement)("main",{className:"mt-4 mb-4 mx-auto w-auto max-w-7xl px-4 sm:mt-6 sm:px-6 md:mt-8 lg:mt-10 lg:px-8 xl:mt-16"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,C.__)("This is important!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("h3",{className:"text-2xl tracking-tight mt-5 font-bold text-gray-700"},(0,t.createElement)("span",{className:"block xl:inline"},(0,C.__)("Enable Webhooks","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-2 text-sm mb-5 text-gray-500 sm:mt-2 sm:text-xl sm:mx-auto md:mt-2 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block xl:inline font-bold select-none text-gray-700"},(0,C.__)("Webhook URL","checkout-plugins-stripe-woo"),": ")," ",(0,t.createElement)("span",{className:"block xl:inline font-bold select-text"},onboarding_vars.webhook_url)),(0,t.createElement)("div",{className:"block mx-auto mt-2 mb-5 w-full md:w-6/12 lg:w-6/12"},(0,t.createElement)("p",{className:"mt-2 text-sm text-gray-400 sm:mt-2 sm:text-sm sm:mx-auto md:mt-2 md:text-md lg:mx-0"},(0,t.createElement)("span",{className:"block"}," ",(0,C.__)("The webhook URL is called by","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("Stripe","checkout-plugins-stripe-woo"),","),(0,C.__)(" when events occur in your account, like a source becomes chargeable.","checkout-plugins-stripe-woo")," ",(0,t.createElement)("a",{href:"https://checkoutplugins.com/docs/stripe-card-payments/#webhook",target:"_blank",rel:"noreferrer"},(0,t.createElement)("span",{className:"block xl:inline font-bold text-cart-500"},(0,C.__)("Webhook Guide","checkout-plugins-stripe-woo")))," ",(0,C.__)("or create webhook secret on","checkout-plugins-stripe-woo")," ",(0,t.createElement)("a",{href:"https://dashboard.stripe.com/webhooks/create",target:"_blank",rel:"noreferrer"},(0,t.createElement)("span",{className:"block text-cart-500 xl:inline font-bold"},(0,C.__)("Stripe Dashboard","checkout-plugins-stripe-woo"))),".")),(0,t.createElement)("p",{className:"text-left mt-3 text-sm text-gray-400 sm:mt-5 sm:text-sm sm:mx-auto md:mt-5 md:text-md lg:mx-0"},(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"}," ",(0,C.__)("This is the list of the supported webhook events: ","checkout-plugins-stripe-woo")," ")),(0,t.createElement)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-1 text-left"},(0,t.createElement)("div",null,(0,t.createElement)("ul",{className:"list-disc mt-3 pl-4 text-sm text-gray-400"},(0,t.createElement)("li",null,"charge.captured"),(0,t.createElement)("li",null,"charge.refunded"),(0,t.createElement)("li",null,"charge.dispute.created"),(0,t.createElement)("li",null,"charge.dispute.closed"),(0,t.createElement)("li",null,"payment_intent.succeeded"))),(0,t.createElement)("div",null,(0,t.createElement)("ul",{className:"list-disc md:mt-3 lg:mt-3 pl-4 text-sm text-gray-400"},(0,t.createElement)("li",null,"payment_intent.amount_capturable_updated"),(0,t.createElement)("li",null,"payment_intent.payment_failed"),(0,t.createElement)("li",null,"review.opened"),(0,t.createElement)("li",null,"review.closed"))))),(0,t.createElement)("div",{className:"block mx-auto mt-5 mb-5 w-full md:w-6/12 lg:w-6/12"},(0,t.createElement)("span",{className:"block text-gray-700 font-bold text-left"},(0,C.__)("Select Mode","checkout-plugins-stripe-woo")),(0,t.createElement)(Ce,{value:s,onChange:c},(0,t.createElement)("div",{className:"relative mt-1"},(0,t.createElement)(Ce.Button,{className:"relative w-full py-2 pl-3 pr-10 h-12 text-left bg-white rounded appearance-none border shadow cursor-default focus:outline-none focus-visible:ring-2 focus-visible:ring-opacity-75 focus-visible:ring-white focus-visible:ring-offset-orange-300 focus-visible:ring-offset-2 focus-visible:border-indigo-500 sm:text-sm"},(0,t.createElement)("span",{className:"block truncate"},s.name),(0,t.createElement)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},(0,t.createElement)("span",{className:"dashicons dashicons-arrow-down-alt2"}))),(0,t.createElement)(Qe,{as:n.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0"},(0,t.createElement)(Ce.Options,{className:"absolute w-full py-1 mt-1 z-40 text-left overflow-auto text-base bg-white rounded border shadow max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"},i.map(((e,r)=>(0,t.createElement)(Ce.Option,{key:r,className:e=>{let{active:t}=e;return(t?" text-gray-500 bg-wpcolor":"text-gray-900")+"\n\t\t\t\t\t\t\t\tcursor-default select-none relative py-1 pl-4"},value:e},(r=>{let{active:a}=r;return(0,t.createElement)(n.Fragment,null,(0,t.createElement)("span",{className:(s?"font-medium":"font-normal")+" block"},e.name),s?(0,t.createElement)("span",{className:(a?"text-wpcolor":"text-wpcolor20")+"\n\t\t\t\t\t\t\t\t\t\tabsolute inset-y-0 left-0 flex items-center pl-3"}):null)})))))))),(0,t.createElement)("input",{type:"hidden",name:"cpsw_mode",id:"cpsw_mode",value:s.id})),(0,t.createElement)("div",{className:"w-full md:w-6/12 lg:w-6/12 block mx-auto mt-5 mb-5"},(0,t.createElement)("span",{className:"block text-gray-700 font-bold text-left"},s.name," ",(0,C.__)("Webhook Secret","checkout-plugins-stripe-woo")),(0,t.createElement)("p",{className:"mt-2 text-sm text-gray-400 sm:mt-2 sm:text-sm sm:mx-auto md:mt-2 md:text-md lg:mx-0"},(0,t.createElement)("input",{type:"text",value:a,onChange:function(e){o(e.target.value)},name:"webhook_secret",id:"cpsw_webhook_secret",placeholder:(0,C.__)("Enter key here","checkout-plugins-stripe-woo"),className:"w-full shadow appearance-none border rounded h-12 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"}),(0,t.createElement)("span",{className:"block mt-3"}," ",(0,C.__)("The webhook secret is used to authenticate webhooks sent from Stripe. It ensures nobody else can send you events pretending to be Stripe","checkout-plugins-stripe-woo"),"."))),(0,t.createElement)("div",{className:"sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Saving…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):(0,t.createElement)("button",{onClick:function(){const e=new window.FormData;e.append("action","cpsw_onboarding_enable_webhooks");const t=document.getElementById("cpsw_webhook_secret").value,n=document.getElementById("cpsw_mode").value;if(""===t)return window.alert((0,C.__)("Webhook Secret field is Required.","checkout-plugins-stripe-woo")),!1;r(!0),e.append("webhook_secret",t),e.append("cpsw_mode",n),e.append("security",onboarding_vars.cpsw_onboarding_enable_webhooks),re()({url:onboarding_vars.ajax_url,method:"POST",body:e}).then((e=>{e.success&&u(onboarding_vars.navigator_base+"&cpsw_call=thank-you")}))},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,C.__)("Save & Continue","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0"},(0,t.createElement)("a",{href:onboarding_vars.base_url+"&cpsw_call=thank-you",className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,C.__)("Skip","checkout-plugins-stripe-woo"))))))},Ye=function(){const[e,r]=(0,n.useState)(!1),a=h();return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-16 lg:mt-20 lg:px-8 xl:mt-28"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block xl"},(0,C.__)("Wooho!!","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,C.__)("You are almost done.","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"}," ",(0,C.__)("Since you have enabled","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("Stripe Card Processing","checkout-plugins-stripe-woo"),","),(0,C.__)(" We recommend you to enable","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("Express Checkout","checkout-plugins-stripe-woo"))," ",(0,C.__)("feature","checkout-plugins-stripe-woo"),"."),(0,t.createElement)("span",null,(0,C.__)("Express Checkout generates more conversions!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"block mx-auto mt-1 mb-1"},(0,t.createElement)("img",{className:"inline mx-4 py-5 h-24",src:onboarding_vars.assets_url+"images/apple-pay.svg",alt:"Express Checkout"}),(0,t.createElement)("img",{className:"inline mx-4 py-5 h-24",src:onboarding_vars.assets_url+"images/gpay.svg",alt:"Express Checkout"})),(0,t.createElement)("div",{className:"sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Enabling…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):(0,t.createElement)("button",{onClick:function(){r(!0);const e=new window.FormData;e.append("action","cpsw_onboarding_enable_express_checkout"),e.append("security",onboarding_vars.cpsw_onboarding_enable_express_checkout),re()({url:onboarding_vars.ajax_url,method:"POST",body:e}).then((e=>{e.success&&a(onboarding_vars.navigator_base+"&cpsw_call=webhooks")}))},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,C.__)("Enable Express Checkout","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0 sm:ml-3"},(0,t.createElement)("a",{href:onboarding_vars.base_url+"&cpsw_call=webhooks",className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,C.__)("Skip Express Checkout","checkout-plugins-stripe-woo"))))))},Ke=function(){return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-14 lg:mt-16 lg:px-8 xl:mt-18"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block text-red-600 xl:inline"},(0,C.__)("Failed!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,C.__)("Unfortunately Connection to Stripe failed.","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},(0,t.createElement)("a",{href:onboarding_vars.authorization_url,className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10"},(0,C.__)("Try Again","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-3 sm:mt-0 sm:ml-3"},(0,t.createElement)("a",{href:onboarding_vars.manual_connect_url,className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10"},(0,C.__)("Manage API keys manually","checkout-plugins-stripe-woo"))))))},Je=function(){const[e,r]=(0,n.useState)(!1);return(0,t.createElement)("main",{className:"mt-10 mx-auto w-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-14 lg:mt-16 lg:px-8 xl:mt-18"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,C.__)("Great!!","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-3 text-base text-gray-500 sm:mt-5 sm:text-lg sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block"},(0,C.__)("Your store is all set to accept payment.","checkout-plugins-stripe-woo")),(0,t.createElement)("span",null,(0,C.__)("We provide lots of customization options to match your needs, don't forget to explore them.","checkout-plugins-stripe-woo"))),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Let's Customize…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):(0,t.createElement)("button",{onClick:function(){r(!0),window.location.replace(onboarding_vars.gateways_url)},className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},(0,C.__)("Let's Customize","checkout-plugins-stripe-woo"))))))},$e=function(){""!==onboarding_vars.woocommerce_installed&&""!==onboarding_vars.woocommerce_activated&&window.location.replace(onboarding_vars.navigator_base);const[e,r]=(0,n.useState)(""),[a,o]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1);return(0,t.createElement)("main",{className:"mt-10 mx-auto max-w-7xl px-4 sm:mt-12 sm:px-6 md:mt-16 lg:mt-20 lg:px-8 xl:mt-28"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h1",{className:"text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"},(0,t.createElement)("span",{className:"block xl"},""===onboarding_vars.woocommerce_installed?(0,C.__)("Missing","checkout-plugins-stripe-woo"):(0,C.__)("Inactiave","checkout-plugins-stripe-woo")),(0,t.createElement)("span",{className:"block text-cart-500 xl:inline"},(0,C.__)("WooCoomerce","checkout-plugins-stripe-woo"))),(0,t.createElement)("p",{className:"mt-6 text-base justify-center text-gray-500 sm:mt-5 sm:text-lg sm:w-full sm:mx-auto md:mt-5 md:text-xl lg:mx-0"},(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("Checkout Plugins - Stripe for WooCoomerce","checkout-plugins-stripe-woo"))," ",(0,C.__)("requires","checkout-plugins-stripe-woo")," ",(0,t.createElement)("span",{className:"block text-gray-700 xl:inline font-bold"},(0,C.__)("WooCommerce","checkout-plugins-stripe-woo"))," ",(0,C.__)("to be active on your store.","checkout-plugins-stripe-woo")),(0,t.createElement)("div",{className:"mt-5 sm:mt-8 sm:flex justify-center"},(0,t.createElement)("div",{className:"rounded-md shadow"},"installing"===e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Installing…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):"activating"===e?(0,t.createElement)("button",{className:"disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait"},(0,C.__)("Activating…","checkout-plugins-stripe-woo"),(0,t.createElement)(O,null)):(0,t.createElement)("button",{onClick:function(){if(""===onboarding_vars.woocommerce_installed)r("installing"),setTimeout((()=>{o(!0)}),1e4),wp.updates.queue.push({action:"install-plugin",data:{slug:"woocommerce"}}),wp.updates.queueChecker();else{r("activating");const e=new window.FormData;e.append("action","cpsw_onboarding_install_woocommerce"),e.append("security",onboarding_vars.cpsw_onboarding_install_woocommerce),re()({url:onboarding_vars.ajax_url,method:"POST",body:e}).then((e=>{e.success?window.location.replace(onboarding_vars.onboarding_base):l(!0)}))}},className:"install-dependency w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer"},""===onboarding_vars.woocommerce_installed?(0,C.__)("Install and continue","checkout-plugins-stripe-woo"):(0,C.__)("Activate and continue","checkout-plugins-stripe-woo"))))),a?(0,t.createElement)("div",{className:"bg-cart-50 p-4 fixed left-0 top-0 right-0 transition ease-in-out delay-150"},(0,t.createElement)("div",{className:"block"},(0,t.createElement)("div",{className:"text-center justify-center"},(0,t.createElement)("p",{className:"text-sm mx-auto w-full text-cart-500 text-center"},(0,C.__)("Installing WooCommerce will take time. Please be patient.","checkout-plugins-stripe-woo"))))):"",i?(0,t.createElement)("div",{className:"bg-cart-50 p-4 fixed left-0 top-0 right-0 transition ease-in-out delay-150"},(0,t.createElement)("div",{className:"block"},(0,t.createElement)("div",{className:"text-center justify-center"},(0,t.createElement)("p",{className:"text-sm mx-auto w-full text-cart-500 text-center"},(0,C.__)("WooCommerce installing failed. Please try again.","checkout-plugins-stripe-woo"))))):"")},Xe=function(){return(0,t.createElement)("div",null,(0,t.createElement)("div",{className:"relative pt-6 px-4 sm:px-6 lg:px-8"},(0,t.createElement)("nav",{className:"relative flex items-center justify-center sm:h-10","aria-label":"Logo"},(0,t.createElement)("div",{className:"flex items-center justify-center flex-grow"},(0,t.createElement)("div",{className:"flex items-center w-auto"},(0,t.createElement)("img",{className:"h-16 w-full",src:onboarding_vars.assets_url+"images/cpsw-logo.svg",alt:"Checkout Plugins - Stripe for WooCommerce"}))))))};o().render((0,t.createElement)((function(e){let{basename:t,children:r,window:a}=e,o=(0,n.useRef)();null==o.current&&(o.current=function(e){function t(){var e=s.location,t=d.state||{};return[t.idx,{pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"}]}function n(e){return"string"==typeof e?e:function(e){var t=e.pathname;t=void 0===t?"/":t;var n=e.search;return n=void 0===n?"":n,e=void 0===(e=e.hash)?"":e,n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),e&&"#"!==e&&(t+="#"===e.charAt(0)?e:"#"+e),t}(e)}function r(e,t){return void 0===t&&(t=null),i({pathname:v.pathname,hash:"",search:""},"string"==typeof e?m(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){f=e,e=t(),b=e[0],v=e[1],x.call({action:f,location:v})}function o(e){d.go(e)}void 0===e&&(e={});var s=void 0===(e=e.window)?document.defaultView:e,d=s.history,p=null;s.addEventListener("popstate",(function(){if(p)g.call(p),p=null;else{var e=l.Pop,n=t(),r=n[0];if(n=n[1],g.length){if(null!=r){var i=b-r;i&&(p={action:e,location:n,retry:function(){o(-1*i)}},o(i))}}else a(e)}}));var f=l.Pop,b=(e=t())[0],v=e[1],x=u(),g=u();return null==b&&(b=0,d.replaceState(i({},d.state,{idx:b}),"")),{get action(){return f},get location(){return v},createHref:n,push:function e(t,o){var i=l.Push,c=r(t,o);if(!g.length||(g.call({action:i,location:c,retry:function(){e(t,o)}}),0)){var u=[{usr:c.state,key:c.key,idx:b+1},n(c)];c=u[0],u=u[1];try{d.pushState(c,"",u)}catch(e){s.location.assign(u)}a(i)}},replace:function e(t,o){var i=l.Replace,s=r(t,o);g.length&&(g.call({action:i,location:s,retry:function(){e(t,o)}}),1)||(s=[{usr:s.state,key:s.key,idx:b},n(s)],d.replaceState(s[0],"",s[1]),a(i))},go:o,back:function(){o(-1)},forward:function(){o(1)},listen:function(e){return x.push(e)},block:function(e){var t=g.push(e);return 1===g.length&&s.addEventListener("beforeunload",c),function(){t(),g.length||s.removeEventListener("beforeunload",c)}}}}({window:a}));let s=o.current,[d,p]=(0,n.useState)({action:s.action,location:s.location});return(0,n.useLayoutEffect)((()=>s.listen(p)),[s]),(0,n.createElement)(v,{basename:t,children:r,location:d.location,navigationType:d.action,navigator:s})}),null,(0,t.createElement)((function(){const e=new URLSearchParams(g().search).get("cpsw_call");let n=(0,t.createElement)("p",null);switch(e){case"success":n=(0,t.createElement)(ce,null);break;case"failed":n=(0,t.createElement)(Ke,null);break;case"webhooks":n=(0,t.createElement)(qe,null);break;case"express-checkout":n=(0,t.createElement)(Ye,null);break;case"thank-you":n=(0,t.createElement)(Je,null);break;case"setup-woocommerce":n=(0,t.createElement)($e,null);break;default:n=(0,t.createElement)(R,null)}return(0,t.createElement)("div",{className:"relative bg-white overflow-hidden w-10/12 mx-auto my-0 rounded-xl mt-12"},(0,t.createElement)("div",{className:"max-w-7xl mx-auto overflow-x-hidden"},(0,t.createElement)("div",{className:"relative z-10 bg-white lg:w-full"},(0,t.createElement)(Xe,null),n)))}),null)),document.getElementById("cpsw-onboarding-content"))}();
wizard/onboarding.php CHANGED
@@ -47,6 +47,7 @@ class Onboarding {
47
  add_action( 'wp_ajax_cpsw_onboarding_install_woocommerce', [ $this, 'cpsw_onboarding_install_woocommerce' ] );
48
  add_action( 'wp_ajax_cpsw_onboarding_enable_gateway', [ $this, 'cpsw_onboarding_enable_gateway' ] );
49
  add_action( 'wp_ajax_cpsw_onboarding_enable_express_checkout', [ $this, 'cpsw_onboarding_enable_express_checkout' ] );
 
50
  add_action( 'admin_init', [ $this, 'hide_notices' ] );
51
  add_action( 'admin_bar_menu', [ $this, 'admin_bar_icon' ], 999 );
52
  }
@@ -228,12 +229,16 @@ class Onboarding {
228
  'available_gateways' => $available_gateways,
229
  'woocommerce_setup_url' => admin_url( 'plugin-install.php?s=woocommerce&tab=search' ),
230
  'cpsw_onboarding_enable_gateway' => wp_create_nonce( 'cpsw_onboarding_enable_gateway' ),
 
231
  'cpsw_onboarding_enable_express_checkout' => wp_create_nonce( 'cpsw_onboarding_enable_express_checkout' ),
232
  'cpsw_onboarding_install_woocommerce' => wp_create_nonce( 'cpsw_onboarding_install_woocommerce' ),
233
  'woocommerce_installed' => $this->is_woocommerce_installed(),
234
  'woocommerce_activated' => class_exists( 'woocommerce' ),
235
  'navigator_base' => '/wp-admin/index.php?page=cpsw-onboarding',
236
  'onboarding_base' => admin_url( 'index.php?page=cpsw-onboarding' ),
 
 
 
237
  ];
238
  }
239
 
@@ -342,6 +347,27 @@ class Onboarding {
342
  wp_send_json_success( [ 'activated_gateways' => $response ] );
343
  }
344
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  /**
346
  * Handles Express Checkout enabling call from onboarding wizard
347
  *
47
  add_action( 'wp_ajax_cpsw_onboarding_install_woocommerce', [ $this, 'cpsw_onboarding_install_woocommerce' ] );
48
  add_action( 'wp_ajax_cpsw_onboarding_enable_gateway', [ $this, 'cpsw_onboarding_enable_gateway' ] );
49
  add_action( 'wp_ajax_cpsw_onboarding_enable_express_checkout', [ $this, 'cpsw_onboarding_enable_express_checkout' ] );
50
+ add_action( 'wp_ajax_cpsw_onboarding_enable_webhooks', [ $this, 'cpsw_onboarding_enable_webhooks' ] );
51
  add_action( 'admin_init', [ $this, 'hide_notices' ] );
52
  add_action( 'admin_bar_menu', [ $this, 'admin_bar_icon' ], 999 );
53
  }
229
  'available_gateways' => $available_gateways,
230
  'woocommerce_setup_url' => admin_url( 'plugin-install.php?s=woocommerce&tab=search' ),
231
  'cpsw_onboarding_enable_gateway' => wp_create_nonce( 'cpsw_onboarding_enable_gateway' ),
232
+ 'cpsw_onboarding_enable_webhooks' => wp_create_nonce( 'cpsw_onboarding_enable_webhooks' ),
233
  'cpsw_onboarding_enable_express_checkout' => wp_create_nonce( 'cpsw_onboarding_enable_express_checkout' ),
234
  'cpsw_onboarding_install_woocommerce' => wp_create_nonce( 'cpsw_onboarding_install_woocommerce' ),
235
  'woocommerce_installed' => $this->is_woocommerce_installed(),
236
  'woocommerce_activated' => class_exists( 'woocommerce' ),
237
  'navigator_base' => '/wp-admin/index.php?page=cpsw-onboarding',
238
  'onboarding_base' => admin_url( 'index.php?page=cpsw-onboarding' ),
239
+ 'get_payment_mode' => Helper::get_payment_mode(),
240
+ 'get_webhook_secret' => Helper::get_webhook_secret(),
241
+ 'webhook_url' => esc_url( get_home_url() . '/wp-json/cpsw/v1/webhook' ),
242
  ];
243
  }
244
 
347
  wp_send_json_success( [ 'activated_gateways' => $response ] );
348
  }
349
 
350
+ /**
351
+ * Handles webhooks enabling call from onboarding wizard
352
+ *
353
+ * @return void
354
+ * @since 1.4.2
355
+ */
356
+ public function cpsw_onboarding_enable_webhooks() {
357
+ check_ajax_referer( 'cpsw_onboarding_enable_webhooks', 'security' );
358
+ $webhook_secret = sanitize_text_field( wp_unslash( $_POST['webhook_secret'] ) );
359
+ $cpsw_mode = sanitize_text_field( wp_unslash( $_POST['cpsw_mode'] ) );
360
+ update_option( 'cpsw_mode', $cpsw_mode );
361
+
362
+ if ( 'live' === $cpsw_mode ) {
363
+ update_option( 'cpsw_live_webhook_secret', $webhook_secret );
364
+ } else {
365
+ update_option( 'cpsw_test_webhook_secret', $webhook_secret );
366
+ }
367
+
368
+ wp_send_json_success( [ 'webhook_secret' => true ] );
369
+ }
370
+
371
  /**
372
  * Handles Express Checkout enabling call from onboarding wizard
373
  *
wizard/src/Settings.js CHANGED
@@ -3,6 +3,7 @@ import { useLocation } from 'react-router-dom';
3
 
4
  import HomePage from '@Admin/pages/HomePage';
5
  import Success from '@Admin/pages/Success';
 
6
  import ExpressCheckout from '@Admin/pages/ExpressCheckout';
7
  import Failed from '@Admin/pages/Failed';
8
  import ThankYou from '@Admin/pages/ThankYou';
@@ -21,6 +22,9 @@ function Settings() {
21
  case 'failed':
22
  routePage = <Failed />;
23
  break;
 
 
 
24
  case 'express-checkout':
25
  routePage = <ExpressCheckout />;
26
  break;
3
 
4
  import HomePage from '@Admin/pages/HomePage';
5
  import Success from '@Admin/pages/Success';
6
+ import Webhooks from '@Admin/pages/Webhooks';
7
  import ExpressCheckout from '@Admin/pages/ExpressCheckout';
8
  import Failed from '@Admin/pages/Failed';
9
  import ThankYou from '@Admin/pages/ThankYou';
22
  case 'failed':
23
  routePage = <Failed />;
24
  break;
25
+ case 'webhooks':
26
+ routePage = <Webhooks />;
27
+ break;
28
  case 'express-checkout':
29
  routePage = <ExpressCheckout />;
30
  break;
wizard/src/pages/ExpressCheckout.js CHANGED
@@ -28,7 +28,7 @@ function ExpressCheckout() {
28
  } ).then( ( res ) => {
29
  if ( res.success ) {
30
  navigate(
31
- onboarding_vars.navigator_base + `&cpsw_call=thank-you`,
32
  );
33
  }
34
  } );
@@ -64,7 +64,7 @@ function ExpressCheckout() {
64
  </div>
65
 
66
  <div className="mt-3 sm:mt-0 sm:ml-3">
67
- <a href={ onboarding_vars.base_url + `&cpsw_call=thank-you` } className="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10">
68
  { __( 'Skip Express Checkout', 'checkout-plugins-stripe-woo' ) }
69
  </a>
70
  </div>
28
  } ).then( ( res ) => {
29
  if ( res.success ) {
30
  navigate(
31
+ onboarding_vars.navigator_base + `&cpsw_call=webhooks`,
32
  );
33
  }
34
  } );
64
  </div>
65
 
66
  <div className="mt-3 sm:mt-0 sm:ml-3">
67
+ <a href={ onboarding_vars.base_url + `&cpsw_call=webhooks` } className="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10">
68
  { __( 'Skip Express Checkout', 'checkout-plugins-stripe-woo' ) }
69
  </a>
70
  </div>
wizard/src/pages/Success.js CHANGED
@@ -44,7 +44,7 @@ function Success() {
44
  if ( true === res.data.activated_gateways.cpsw_stripe ) {
45
  navigate( onboarding_vars.navigator_base + `&cpsw_call=express-checkout` );
46
  } else {
47
- navigate( onboarding_vars.navigator_base + `&cpsw_call=thank-you` );
48
  }
49
  }
50
  } );
44
  if ( true === res.data.activated_gateways.cpsw_stripe ) {
45
  navigate( onboarding_vars.navigator_base + `&cpsw_call=express-checkout` );
46
  } else {
47
+ navigate( onboarding_vars.navigator_base + `&cpsw_call=webhooks` );
48
  }
49
  }
50
  } );
wizard/src/pages/Webhooks.js ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { Fragment, useState } from 'react';
2
+ import apiFetch from '@wordpress/api-fetch';
3
+ import { __ } from '@wordpress/i18n';
4
+ import Spinner from '@Admin/components/Spinner';
5
+ import { Listbox, Transition } from '@headlessui/react';
6
+ import { useNavigate } from 'react-router-dom';
7
+
8
+ function Webhooks() {
9
+ const [ clicked, setClicked ] = useState( false );
10
+ const [ webhooks, setWebhooks ] = useState( onboarding_vars.get_webhook_secret );
11
+ const modeOptions = [
12
+ { id: 'test', name: __( 'Test', 'cart-plugin' ) },
13
+ { id: 'live', name: __( 'Live', 'cart-plugin' ) },
14
+ ];
15
+ const dbValue = Object.keys( modeOptions ).find(
16
+ ( key ) =>
17
+ modeOptions[ key ].id === onboarding_vars.get_payment_mode,
18
+ );
19
+ const [ selected, setSelected ] = useState( modeOptions[ dbValue ] );
20
+
21
+ const navigate = useNavigate();
22
+
23
+ function handleChange( event ) {
24
+ setWebhooks( event.target.value );
25
+ }
26
+
27
+ function enableWebhooks() {
28
+ const formData = new window.FormData();
29
+
30
+ formData.append(
31
+ 'action',
32
+ 'cpsw_onboarding_enable_webhooks',
33
+ );
34
+ const webhookKey = document.getElementById( 'cpsw_webhook_secret' ).value;
35
+ const cpswMode = document.getElementById( 'cpsw_mode' ).value;
36
+
37
+ if ( '' === webhookKey ) {
38
+ window.alert( __( 'Webhook Secret field is Required.', 'checkout-plugins-stripe-woo' ) );
39
+ return false;
40
+ }
41
+
42
+ setClicked( true );
43
+ formData.append( 'webhook_secret', webhookKey );
44
+ formData.append( 'cpsw_mode', cpswMode );
45
+ formData.append(
46
+ 'security',
47
+ onboarding_vars.cpsw_onboarding_enable_webhooks,
48
+ );
49
+
50
+ apiFetch( {
51
+ url: onboarding_vars.ajax_url,
52
+ method: 'POST',
53
+ body: formData,
54
+ } ).then( ( res ) => {
55
+ if ( res.success ) {
56
+ navigate(
57
+ onboarding_vars.navigator_base + `&cpsw_call=thank-you`,
58
+ );
59
+ }
60
+ } );
61
+ }
62
+
63
+ return (
64
+ <main className="mt-4 mb-4 mx-auto w-auto max-w-7xl px-4 sm:mt-6 sm:px-6 md:mt-8 lg:mt-10 lg:px-8 xl:mt-16">
65
+ <div className="text-center">
66
+ <h1 className="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
67
+ <span className="block text-cart-500 xl:inline">{ __( 'This is important!!', 'checkout-plugins-stripe-woo' ) }</span>
68
+ </h1>
69
+ <h3 className="text-2xl tracking-tight mt-5 font-bold text-gray-700">
70
+ <span className="block xl:inline">{ __( 'Enable Webhooks', 'checkout-plugins-stripe-woo' ) }</span>
71
+ </h3>
72
+ <p className="mt-2 text-sm mb-5 text-gray-500 sm:mt-2 sm:text-xl sm:mx-auto md:mt-2 md:text-xl lg:mx-0">
73
+ <span className="block xl:inline font-bold select-none text-gray-700">{ __( 'Webhook URL', 'checkout-plugins-stripe-woo' ) }: </span> <span className="block xl:inline font-bold select-text">{ onboarding_vars.webhook_url }</span>
74
+ </p>
75
+ <div className="block mx-auto mt-2 mb-5 w-full md:w-6/12 lg:w-6/12">
76
+ <p className="mt-2 text-sm text-gray-400 sm:mt-2 sm:text-sm sm:mx-auto md:mt-2 md:text-md lg:mx-0">
77
+ <span className="block"> { __( 'The webhook URL is called by', 'checkout-plugins-stripe-woo' ) } <span className="block text-gray-700 xl:inline font-bold">{ __( 'Stripe', 'checkout-plugins-stripe-woo' ) },</span>{ __( ' when events occur in your account, like a source becomes chargeable.', 'checkout-plugins-stripe-woo' ) } <a href="https://checkoutplugins.com/docs/stripe-card-payments/#webhook" target="_blank" rel="noreferrer"><span className="block xl:inline font-bold text-cart-500">{ __( 'Webhook Guide', 'checkout-plugins-stripe-woo' ) }</span></a> { __( 'or create webhook secret on', 'checkout-plugins-stripe-woo' ) } <a href="https://dashboard.stripe.com/webhooks/create" target="_blank" rel="noreferrer"><span className="block text-cart-500 xl:inline font-bold">{ __( 'Stripe Dashboard', 'checkout-plugins-stripe-woo' ) }</span></a>.</span>
78
+ </p>
79
+
80
+ <p className="text-left mt-3 text-sm text-gray-400 sm:mt-5 sm:text-sm sm:mx-auto md:mt-5 md:text-md lg:mx-0">
81
+ <span className="block text-gray-700 xl:inline font-bold"> { __( 'This is the list of the supported webhook events: ', 'checkout-plugins-stripe-woo' ) } </span>
82
+ </p>
83
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-1 text-left">
84
+ <div><ul className="list-disc mt-3 pl-4 text-sm text-gray-400"><li>charge.captured</li><li>charge.refunded</li><li>charge.dispute.created</li><li>charge.dispute.closed</li><li>payment_intent.succeeded</li></ul></div>
85
+ <div><ul className="list-disc md:mt-3 lg:mt-3 pl-4 text-sm text-gray-400"><li>payment_intent.amount_capturable_updated</li><li>payment_intent.payment_failed</li><li>review.opened</li><li>review.closed</li></ul></div>
86
+ </div>
87
+ </div>
88
+ <div className="block mx-auto mt-5 mb-5 w-full md:w-6/12 lg:w-6/12">
89
+ <span className="block text-gray-700 font-bold text-left">{ __( 'Select Mode', 'checkout-plugins-stripe-woo' ) }</span>
90
+ <Listbox value={ selected } onChange={ setSelected }>
91
+ <div className="relative mt-1">
92
+ <Listbox.Button className="relative w-full py-2 pl-3 pr-10 h-12 text-left bg-white rounded appearance-none border shadow cursor-default focus:outline-none focus-visible:ring-2 focus-visible:ring-opacity-75 focus-visible:ring-white focus-visible:ring-offset-orange-300 focus-visible:ring-offset-2 focus-visible:border-indigo-500 sm:text-sm">
93
+ <span className="block truncate">
94
+ { selected.name }
95
+ </span>
96
+ <span className="absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none">
97
+ <span className="dashicons dashicons-arrow-down-alt2"></span>
98
+ </span>
99
+ </Listbox.Button>
100
+ <Transition
101
+ as={ Fragment }
102
+ leave="transition ease-in duration-100"
103
+ leaveFrom="opacity-100"
104
+ leaveTo="opacity-0"
105
+ >
106
+ <Listbox.Options className="absolute w-full py-1 mt-1 z-40 text-left overflow-auto text-base bg-white rounded border shadow max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
107
+ { modeOptions.map( ( options, id ) => (
108
+ <Listbox.Option
109
+ key={ id }
110
+ className={ ( { active } ) =>
111
+ `${
112
+ active
113
+ ? ' text-gray-500 bg-wpcolor'
114
+ : 'text-gray-900'
115
+ }
116
+ cursor-default select-none relative py-1 pl-4`
117
+ }
118
+ value={ options }
119
+ >
120
+ { ( { active } ) => (
121
+ <>
122
+ <span
123
+ className={ `${
124
+ selected
125
+ ? 'font-medium'
126
+ : 'font-normal'
127
+ } block` }
128
+ >
129
+ { options.name }
130
+ </span>
131
+ { selected ? (
132
+ <span
133
+ className={ `${
134
+ active
135
+ ? 'text-wpcolor'
136
+ : 'text-wpcolor20'
137
+ }
138
+ absolute inset-y-0 left-0 flex items-center pl-3` }
139
+ ></span>
140
+ ) : null }
141
+ </>
142
+ ) }
143
+ </Listbox.Option>
144
+ ) ) }
145
+ </Listbox.Options>
146
+ </Transition>
147
+ </div>
148
+ </Listbox>
149
+ <input
150
+ type="hidden"
151
+ name="cpsw_mode"
152
+ id="cpsw_mode"
153
+ value={ selected.id }
154
+ />
155
+ </div>
156
+ <div className="w-full md:w-6/12 lg:w-6/12 block mx-auto mt-5 mb-5">
157
+ <span className="block text-gray-700 font-bold text-left">{ selected.name } { __( 'Webhook Secret', 'checkout-plugins-stripe-woo' ) }</span>
158
+ <p className="mt-2 text-sm text-gray-400 sm:mt-2 sm:text-sm sm:mx-auto md:mt-2 md:text-md lg:mx-0">
159
+ <input type="text" value={ webhooks } onChange={ handleChange } name="webhook_secret" id="cpsw_webhook_secret" placeholder={ __( 'Enter key here', 'checkout-plugins-stripe-woo' ) } className="w-full shadow appearance-none border rounded h-12 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
160
+ <span className="block mt-3"> { __( 'The webhook secret is used to authenticate webhooks sent from Stripe. It ensures nobody else can send you events pretending to be Stripe', 'checkout-plugins-stripe-woo' ) }.</span>
161
+ </p>
162
+ </div>
163
+ <div className="sm:inline-block lg:inline-block sm:justify-center lg:justify-center">
164
+ <div className="rounded-md shadow">
165
+ { clicked ? (
166
+ <button className="disabled w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-wait">
167
+ { __( 'Saving…', 'checkout-plugins-stripe-woo' ) }
168
+ <Spinner />
169
+ </button>
170
+ ) : (
171
+ <button onClick={ enableWebhooks } className="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-cart-500 hover:bg-cart-700 md:py-4 md:text-lg md:px-10 cursor-pointer">
172
+ { __( 'Save & Continue', 'checkout-plugins-stripe-woo' ) }
173
+ </button> )
174
+ }
175
+ </div>
176
+
177
+ <div className="mt-3 sm:mt-0">
178
+ <a href={ onboarding_vars.base_url + `&cpsw_call=thank-you` } className="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-slate-300 md:py-4 md:text-lg md:px-10">
179
+ { __( 'Skip', 'checkout-plugins-stripe-woo' ) }
180
+ </a>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ </main>
185
+ );
186
+ }
187
+
188
+ export default Webhooks;