Version Description
- TUESDAY, 1ST FEBRUARY 2022 =
- New: Supports Klarna payment method.
- New: Supports Przelewy24 (P24) payment method.
- New: Supports Bancontact payment method.
- New: Added onboarding wizard.
- New: Display stripe fees on edit order page.
- Improvement: Added localization support.
- Improvement: Customizable Express Checkout buttons.
Download this release
Release Info
Developer | brainstormworg |
Plugin | Stripe Payments For WooCommerce by Checkout Plugins |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.3.0
- admin/admin-controller.php +238 -134
- admin/assets/css/express-checkout.css +0 -38
- admin/assets/js/admin.js +4 -6
- admin/assets/js/express-checkout.js +115 -91
- assets/css/express-checkout.css +365 -0
- assets/css/stripe-elements.css +50 -21
- assets/icon/apple-pay-gray.svg +22 -0
- assets/icon/apple-pay-light.svg +1 -0
- assets/icon/bancontact.svg +80 -0
- assets/icon/credit-card.svg +170 -0
- assets/icon/express-checkout.svg +1 -0
- assets/icon/gpay_gray.svg +1 -0
- assets/icon/gpay_light.svg +1 -0
- assets/icon/klarna.svg +25 -0
- assets/icon/p24.svg +63 -0
- assets/icon/payment-request-icon.svg +1 -0
- assets/js/payment-request.js +190 -33
- assets/js/stripe-elements.js +160 -31
- autoloader.php +109 -15
- checkout-plugins-stripe-woo.php +2 -2
- gateway/abstract-payment-gateway.php +254 -24
- gateway/local-gateway.php +271 -4
- gateway/stripe/alipay.php +24 -178
- gateway/stripe/bancontact.php +180 -0
- gateway/stripe/card-payments.php +165 -132
- gateway/stripe/frontend-scripts.php +42 -28
- gateway/stripe/ideal.php +18 -143
- gateway/stripe/klarna.php +221 -0
- gateway/stripe/p24.php +160 -0
- gateway/stripe/payment-request-api.php +109 -95
- gateway/stripe/stripe-api.php +12 -0
- gateway/stripe/webhook.php +59 -113
- inc/helper.php +3 -5
- inc/notice.php +8 -5
- inc/traits/subscriptions.php +7 -82
- languages/checkout-plugins-stripe-woo.pot +1471 -0
- postcss.config.js +6 -0
- readme.txt +11 -2
- tailwind.config.js +25 -0
- wizard/build/app.asset.php +1 -0
- wizard/build/app.css +1032 -0
- wizard/build/app.js +3304 -0
- wizard/images/apple-pay.svg +28 -0
- wizard/images/cpsw-logo-light.svg +28 -0
- wizard/images/cpsw-logo.svg +29 -0
- wizard/images/gpay.svg +3 -0
- wizard/js/helper.js +34 -0
- wizard/onboarding.php +447 -0
- wizard/src/App.js +14 -0
- wizard/src/App.scss +3 -0
- wizard/src/Settings.js +50 -0
- wizard/src/components/Logo.js +19 -0
- wizard/src/components/Spinner.js +12 -0
- wizard/src/pages/ExpressCheckout.js +77 -0
- wizard/src/pages/Failed.js +32 -0
- wizard/src/pages/HomePage.js +50 -0
- wizard/src/pages/Success.js +132 -0
- wizard/src/pages/ThankYou.js +44 -0
- wizard/src/pages/WooCommerce.js +102 -0
admin/admin-controller.php
CHANGED
@@ -73,14 +73,19 @@ class Admin_Controller {
|
|
73 |
$this->settings[ $key ] = get_option( $key );
|
74 |
}
|
75 |
|
76 |
-
$this->navigation =
|
77 |
-
'
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
/**
|
@@ -135,9 +140,7 @@ class Admin_Controller {
|
|
135 |
$express_checkout = [];
|
136 |
$radio_checkbox = [
|
137 |
'express_checkout_enabled' => 'no',
|
138 |
-
'express_checkout_product_options' => 'no',
|
139 |
'express_checkout_product_sticky_footer' => 'no',
|
140 |
-
'express_checkout_product_checkout_page' => 'no',
|
141 |
];
|
142 |
foreach ( $_POST as $key => $value ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
143 |
if ( 0 === strpos( $key, 'cpsw_express_checkout' ) ) {
|
@@ -202,7 +205,17 @@ class Admin_Controller {
|
|
202 |
*/
|
203 |
public function enqueue_scripts() {
|
204 |
$version = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : CPSW_VERSION;
|
205 |
-
$allow_scripts_methods =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
if ( isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] && isset( $_GET['tab'] ) && ( 'cpsw_api_settings' === $_GET['tab'] || isset( $_GET['section'] ) && ( in_array( sanitize_text_field( $_GET['section'] ), $allow_scripts_methods, true ) ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
208 |
|
@@ -215,29 +228,32 @@ class Admin_Controller {
|
|
215 |
wp_localize_script(
|
216 |
'cpsw-admin-js',
|
217 |
'cpsw_ajax_object',
|
218 |
-
|
219 |
-
'
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
236 |
);
|
237 |
}
|
238 |
|
239 |
if ( isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] && isset( $_GET['tab'] ) && 'checkout' === $_GET['tab'] && isset( $_GET['section'] ) && 'cpsw_express_checkout' === $_GET['section'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
240 |
-
wp_register_style( 'cpsw-express-checkout-style',
|
241 |
wp_enqueue_style( 'cpsw-express-checkout-style' );
|
242 |
|
243 |
wp_register_script( 'cpsw-stripe-external', 'https://js.stripe.com/v3/', [], $version, true );
|
@@ -246,23 +262,35 @@ class Admin_Controller {
|
|
246 |
wp_register_script( 'cpsw-express-checkout-js', plugins_url( 'assets/js/express-checkout.js', __FILE__ ), [ 'jquery', 'cpsw-stripe-external' ], $version, true );
|
247 |
wp_enqueue_script( 'cpsw-express-checkout-js' );
|
248 |
|
249 |
-
$public_key
|
|
|
250 |
|
251 |
wp_localize_script(
|
252 |
'cpsw-express-checkout-js',
|
253 |
'cpsw_express_checkout',
|
254 |
-
|
255 |
-
'
|
256 |
-
|
257 |
-
'
|
258 |
-
'
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
);
|
267 |
}
|
268 |
}
|
@@ -334,7 +362,6 @@ class Admin_Controller {
|
|
334 |
* @param array $options settings array of the stripe.
|
335 |
*/
|
336 |
public function update_options( $options ) {
|
337 |
-
|
338 |
if ( ! is_array( $options ) ) {
|
339 |
return false;
|
340 |
}
|
@@ -363,6 +390,12 @@ class Admin_Controller {
|
|
363 |
$sec_var = '';
|
364 |
$manual_link = true;
|
365 |
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
?>
|
367 |
<tr valign="top">
|
368 |
<th scope="row">
|
@@ -384,13 +417,20 @@ class Admin_Controller {
|
|
384 |
if ( isset( $_GET['connect'] ) && 'manually' === $_GET['connect'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
385 |
?>
|
386 |
<div class="notice inline notice-warning cpsw_inline_notice" style="margin: 15px 0 -10px">
|
387 |
-
<p><?php esc_html_e( '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 Stripe
|
388 |
</div>
|
389 |
<?php } ?>
|
390 |
</fieldset>
|
391 |
</td>
|
392 |
</tr>
|
393 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
}
|
395 |
|
396 |
/**
|
@@ -404,6 +444,13 @@ class Admin_Controller {
|
|
404 |
}
|
405 |
|
406 |
$option_value = Helper::get_setting( 'cpsw_account_id' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
?>
|
408 |
<tr valign="top">
|
409 |
<th scope="row">
|
@@ -456,7 +503,7 @@ class Admin_Controller {
|
|
456 |
</p>
|
457 |
<p>
|
458 |
<div class="notice inline notice-warning cpsw_inline_notice">
|
459 |
-
<p><?php esc_html_e( '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 Stripe
|
460 |
</div>
|
461 |
</p>
|
462 |
</div>
|
@@ -464,6 +511,13 @@ class Admin_Controller {
|
|
464 |
</td>
|
465 |
</tr>
|
466 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
}
|
468 |
|
469 |
|
@@ -476,7 +530,6 @@ class Admin_Controller {
|
|
476 |
$data = WC_Admin_Settings::get_field_description( $value );
|
477 |
$description = $data['description'];
|
478 |
$tooltip_html = $data['tooltip_html'];
|
479 |
-
|
480 |
$option_value = (array) WC_Admin_Settings::get_option( $value['id'] );
|
481 |
|
482 |
if ( $tooltip_html && 'checkbox' === $value['type'] ) {
|
@@ -509,6 +562,12 @@ class Admin_Controller {
|
|
509 |
* @return void
|
510 |
*/
|
511 |
public function express_checkout_preview( $value ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
?>
|
513 |
<tr valign="top">
|
514 |
<th scope="row">
|
@@ -518,6 +577,22 @@ class Admin_Controller {
|
|
518 |
<fieldset>
|
519 |
<div class="cpsw_express_checkout_preview_wrapper">
|
520 |
<div class="cpsw_express_checkout_preview"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
</div>
|
522 |
</fieldset>
|
523 |
<?php if ( ! empty( $value['desc'] ) ) { ?>
|
@@ -530,6 +605,12 @@ class Admin_Controller {
|
|
530 |
</td>
|
531 |
</tr>
|
532 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
}
|
534 |
|
535 |
/**
|
@@ -617,6 +698,16 @@ class Admin_Controller {
|
|
617 |
$sec_var = '';
|
618 |
$manual_link = true;
|
619 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
?>
|
621 |
<tr valign="top">
|
622 |
<th scope="row">
|
@@ -637,6 +728,16 @@ class Admin_Controller {
|
|
637 |
</td>
|
638 |
</tr>
|
639 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
}
|
641 |
|
642 |
/**
|
@@ -670,26 +771,35 @@ class Admin_Controller {
|
|
670 |
/**
|
671 |
* Generates Stripe Autorization URL for onboarding process
|
672 |
*
|
673 |
-
* @
|
|
|
|
|
674 |
*/
|
675 |
-
public function get_stripe_connect_url() {
|
|
|
|
|
|
|
|
|
676 |
$client_id = 'ca_KOXfLe7jv1m4L0iC4KNEMc5fT8AXWWuL';
|
677 |
|
678 |
return OAuth::authorizeUrl(
|
679 |
-
|
680 |
-
'
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
|
|
|
|
|
|
693 |
);
|
694 |
}
|
695 |
|
@@ -824,6 +934,8 @@ class Admin_Controller {
|
|
824 |
return;
|
825 |
}
|
826 |
|
|
|
|
|
827 |
// Check if user is being returned from Stripe Connect.
|
828 |
if ( isset( $_GET['error'] ) ) {
|
829 |
$error = json_decode( base64_decode( wc_clean( $_GET['error'] ) ) ); //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
|
@@ -839,11 +951,11 @@ class Admin_Controller {
|
|
839 |
$this->settings['cpsw_test_con_status'] = 'failed';
|
840 |
|
841 |
$this->update_options( $this->settings );
|
842 |
-
|
843 |
-
wp_safe_redirect(
|
844 |
} elseif ( isset( $_GET['response'] ) ) {
|
845 |
$response = json_decode( base64_decode( $_GET['response'] ) ); //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
|
846 |
-
if ( ! empty( $response->live->stripe_publishable_key )
|
847 |
$this->settings['cpsw_pub_key'] = $response->live->stripe_publishable_key;
|
848 |
$this->settings['cpsw_secret_key'] = $response->live->access_token;
|
849 |
$this->settings['cpsw_test_pub_key'] = $response->test->stripe_publishable_key;
|
@@ -852,7 +964,8 @@ class Admin_Controller {
|
|
852 |
$this->settings['cpsw_mode'] = 'test';
|
853 |
$this->settings['cpsw_con_status'] = 'success';
|
854 |
$this->settings['cpsw_test_con_status'] = 'success';
|
855 |
-
|
|
|
856 |
} else {
|
857 |
$this->settings['cpsw_pub_key'] = '';
|
858 |
$this->settings['cpsw_secret_key'] = '';
|
@@ -861,12 +974,13 @@ class Admin_Controller {
|
|
861 |
$this->settings['cpsw_account_id'] = '';
|
862 |
$this->settings['cpsw_con_status'] = 'failed';
|
863 |
$this->settings['cpsw_test_con_status'] = 'failed';
|
864 |
-
|
865 |
-
|
866 |
}
|
867 |
|
868 |
$this->settings['cpsw_auto_connect'] = 'yes';
|
869 |
$this->update_options( $this->settings );
|
|
|
870 |
}
|
871 |
}
|
872 |
|
@@ -967,7 +1081,7 @@ class Admin_Controller {
|
|
967 |
}
|
968 |
}
|
969 |
update_option( 'cpsw_auto_connect', 'no' );
|
970 |
-
return wp_send_json_success( [ 'data' => $results ] );
|
971 |
}
|
972 |
|
973 |
/**
|
@@ -1015,7 +1129,6 @@ class Admin_Controller {
|
|
1015 |
* @param string $account_id Account ID of a stripe user.
|
1016 |
*/
|
1017 |
public function get_account_info( $account_id = '' ) {
|
1018 |
-
|
1019 |
if ( empty( $account_id ) ) {
|
1020 |
return false;
|
1021 |
}
|
@@ -1045,16 +1158,19 @@ class Admin_Controller {
|
|
1045 |
unset( $array['debug_log'] );
|
1046 |
unset( $array['test_conn_button'] );
|
1047 |
|
1048 |
-
$webhook_options =
|
1049 |
-
'
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
|
|
|
|
|
|
1058 |
|
1059 |
array_map( 'delete_option', $webhook_options );
|
1060 |
}
|
@@ -1372,17 +1488,11 @@ class Admin_Controller {
|
|
1372 |
'value' => $values['express_checkout_location'],
|
1373 |
],
|
1374 |
'button_type' => [
|
1375 |
-
'title' => __( 'Button
|
1376 |
-
'type' => '
|
1377 |
-
'id' => '
|
1378 |
-
'desc' => __( '
|
1379 |
-
'value' => $values['
|
1380 |
-
'options' => [
|
1381 |
-
'default' => __( 'Default', 'checkout-plugins-stripe-woo' ),
|
1382 |
-
'book' => __( 'Book', 'checkout-plugins-stripe-woo' ),
|
1383 |
-
'buy' => __( 'Buy', 'checkout-plugins-stripe-woo' ),
|
1384 |
-
'donate' => __( 'Donate', 'checkout-plugins-stripe-woo' ),
|
1385 |
-
],
|
1386 |
'desc_tip' => true,
|
1387 |
],
|
1388 |
'button_theme' => [
|
@@ -1398,22 +1508,6 @@ class Admin_Controller {
|
|
1398 |
],
|
1399 |
'desc_tip' => true,
|
1400 |
],
|
1401 |
-
'button_height' => [
|
1402 |
-
'title' => __( 'Button height', 'checkout-plugins-stripe-woo' ),
|
1403 |
-
'type' => 'number',
|
1404 |
-
'id' => 'cpsw_express_checkout_button_height',
|
1405 |
-
'desc' => __( 'Select height for Express Checkout button (in px). Button height can be between 35px to 60px. Default height 40px.', 'checkout-plugins-stripe-woo' ),
|
1406 |
-
'value' => $values['express_checkout_button_height'],
|
1407 |
-
'desc_tip' => true,
|
1408 |
-
],
|
1409 |
-
'separator_text' => [
|
1410 |
-
'title' => __( 'Separator text', 'checkout-plugins-stripe-woo' ),
|
1411 |
-
'type' => 'text',
|
1412 |
-
'id' => 'cpsw_express_checkout_separator',
|
1413 |
-
'desc' => __( 'Add separator text for the Express Checkout button. This will help to distinguish between Express Checkout and other buttons.', 'checkout-plugins-stripe-woo' ),
|
1414 |
-
'value' => $values['express_checkout_separator'],
|
1415 |
-
'desc_tip' => true,
|
1416 |
-
],
|
1417 |
'preview' => [
|
1418 |
'title' => __( 'Button Preview', 'checkout-plugins-stripe-woo' ),
|
1419 |
'type' => 'cpsw_express_checkout_preview',
|
@@ -1429,12 +1523,6 @@ class Admin_Controller {
|
|
1429 |
'desc' => __( 'Advanced customization options for product page.', 'checkout-plugins-stripe-woo' ),
|
1430 |
'id' => 'cpsw_express_checkout_product_page',
|
1431 |
],
|
1432 |
-
'product_page_options' => [
|
1433 |
-
'title' => __( 'Advanced options', 'checkout-plugins-stripe-woo' ),
|
1434 |
-
'type' => 'checkbox',
|
1435 |
-
'id' => 'cpsw_express_checkout_product_options',
|
1436 |
-
'value' => $values['express_checkout_product_options'],
|
1437 |
-
],
|
1438 |
'product_button_position' => [
|
1439 |
'title' => __( 'Button position', 'checkout-plugins-stripe-woo' ),
|
1440 |
'type' => 'select',
|
@@ -1443,18 +1531,19 @@ class Admin_Controller {
|
|
1443 |
'desc' => __( 'Select the position of Express Checkout button. This option will work only for Product page.', 'checkout-plugins-stripe-woo' ),
|
1444 |
'value' => $values['express_checkout_product_page_position'],
|
1445 |
'options' => [
|
1446 |
-
'above'
|
1447 |
-
'below'
|
|
|
1448 |
],
|
1449 |
'desc_tip' => true,
|
1450 |
],
|
1451 |
-
'
|
1452 |
-
'title' => __( '
|
1453 |
-
'type' => '
|
|
|
|
|
|
|
1454 |
'class' => 'cpsw_product_options',
|
1455 |
-
'id' => 'cpsw_express_checkout_product_button_width',
|
1456 |
-
'desc' => __( 'Select width for button (in px). Minimum width should be 150px, Default width 100%', 'checkout-plugins-stripe-woo' ),
|
1457 |
-
'value' => $values['express_checkout_product_button_width'],
|
1458 |
'desc_tip' => true,
|
1459 |
],
|
1460 |
'sticky_footer' => [
|
@@ -1470,17 +1559,32 @@ class Admin_Controller {
|
|
1470 |
'type' => 'sectionend',
|
1471 |
'id' => 'cpsw_express_checkout',
|
1472 |
],
|
1473 |
-
'
|
1474 |
-
'name'
|
1475 |
-
'type'
|
1476 |
-
'desc'
|
1477 |
-
'id'
|
|
|
1478 |
],
|
1479 |
-
'
|
1480 |
-
'title'
|
1481 |
-
'type'
|
1482 |
-
'
|
1483 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1484 |
],
|
1485 |
'checkout_button_position' => [
|
1486 |
'title' => __( 'Button position', 'checkout-plugins-stripe-woo' ),
|
@@ -1518,7 +1622,7 @@ class Admin_Controller {
|
|
1518 |
'type' => 'number',
|
1519 |
'class' => 'cpsw_checkout_options',
|
1520 |
'id' => 'cpsw_express_checkout_button_width',
|
1521 |
-
'desc' => __( 'Select width for button (in px).
|
1522 |
'value' => $values['express_checkout_button_width'],
|
1523 |
'desc_tip' => true,
|
1524 |
],
|
@@ -1553,6 +1657,6 @@ class Admin_Controller {
|
|
1553 |
}
|
1554 |
}
|
1555 |
|
1556 |
-
return $settings;
|
1557 |
}
|
1558 |
}
|
73 |
$this->settings[ $key ] = get_option( $key );
|
74 |
}
|
75 |
|
76 |
+
$this->navigation = apply_filters(
|
77 |
+
'cpsw_settings_navigation',
|
78 |
+
[
|
79 |
+
'cpsw_api_settings' => __( 'Stripe API Settings', 'checkout-plugins-stripe-woo' ),
|
80 |
+
'cpsw_stripe' => __( 'Credit Cards', 'checkout-plugins-stripe-woo' ),
|
81 |
+
'cpsw_express_checkout' => __( 'Express Checkout', 'checkout-plugins-stripe-woo' ),
|
82 |
+
'cpsw_alipay' => __( 'Alipay', 'checkout-plugins-stripe-woo' ),
|
83 |
+
'cpsw_ideal' => __( 'iDEAL', 'checkout-plugins-stripe-woo' ),
|
84 |
+
'cpsw_klarna' => __( 'Klarna', 'checkout-plugins-stripe-woo' ),
|
85 |
+
'cpsw_p24' => __( 'Przelewy24', 'checkout-plugins-stripe-woo' ),
|
86 |
+
'cpsw_bancontact' => __( 'Bancontact', 'checkout-plugins-stripe-woo' ),
|
87 |
+
]
|
88 |
+
);
|
89 |
}
|
90 |
|
91 |
/**
|
140 |
$express_checkout = [];
|
141 |
$radio_checkbox = [
|
142 |
'express_checkout_enabled' => 'no',
|
|
|
143 |
'express_checkout_product_sticky_footer' => 'no',
|
|
|
144 |
];
|
145 |
foreach ( $_POST as $key => $value ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
146 |
if ( 0 === strpos( $key, 'cpsw_express_checkout' ) ) {
|
205 |
*/
|
206 |
public function enqueue_scripts() {
|
207 |
$version = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : CPSW_VERSION;
|
208 |
+
$allow_scripts_methods = apply_filters(
|
209 |
+
'cpsw_allow_admin_scripts_methods',
|
210 |
+
[
|
211 |
+
'cpsw_stripe',
|
212 |
+
'cpsw_alipay',
|
213 |
+
'cpsw_ideal',
|
214 |
+
'cpsw_klarna',
|
215 |
+
'cpsw_bancontact',
|
216 |
+
'cpsw_p24',
|
217 |
+
]
|
218 |
+
);
|
219 |
|
220 |
if ( isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] && isset( $_GET['tab'] ) && ( 'cpsw_api_settings' === $_GET['tab'] || isset( $_GET['section'] ) && ( in_array( sanitize_text_field( $_GET['section'] ), $allow_scripts_methods, true ) ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
221 |
|
228 |
wp_localize_script(
|
229 |
'cpsw-admin-js',
|
230 |
'cpsw_ajax_object',
|
231 |
+
apply_filters(
|
232 |
+
'cpsw_admin_localize_script_args',
|
233 |
+
[
|
234 |
+
'site_url' => get_site_url() . '/wp-admin/admin.php?page=wc-settings',
|
235 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
236 |
+
'cpsw_mode' => Helper::get_payment_mode(),
|
237 |
+
'admin_nonce' => wp_create_nonce( 'cpsw_admin_nonce' ),
|
238 |
+
'dashboard_url' => admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' ),
|
239 |
+
'generic_error' => __( 'Something went wrong! Please reload the page and try again.', 'checkout-plugins-stripe-woo' ),
|
240 |
+
'test_btn_label' => __( 'Connect to Stripe', 'checkout-plugins-stripe-woo' ),
|
241 |
+
'stripe_key_notice' => __( 'Please enter all keys to connect to stripe.', 'checkout-plugins-stripe-woo' ),
|
242 |
+
'stripe_key_error' => __( 'You must enter your API keys or connect the plugin before performing a connection test. Mode:', 'checkout-plugins-stripe-woo' ),
|
243 |
+
'stripe_key_unavailable' => __( 'Keys Unavailable.', 'checkout-plugins-stripe-woo' ),
|
244 |
+
'stripe_disconnect' => __( 'Your Stripe account has been disconnected.', 'checkout-plugins-stripe-woo' ),
|
245 |
+
'stripe_connect_other_acc' => __( 'You can connect other Stripe account now.', 'checkout-plugins-stripe-woo' ),
|
246 |
+
'is_connected' => $this->is_stripe_connected(),
|
247 |
+
'is_manually_connected' => isset( $_GET['connect'] ) ? sanitize_text_field( $_GET['connect'] ) : '', //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
248 |
+
'cpsw_admin_settings_tab' => isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '', //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
249 |
+
'cpsw_admin_current_page' => isset( $_GET['section'] ) ? sanitize_text_field( $_GET['section'] ) : '', //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
250 |
+
]
|
251 |
+
)
|
252 |
);
|
253 |
}
|
254 |
|
255 |
if ( isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] && isset( $_GET['tab'] ) && 'checkout' === $_GET['tab'] && isset( $_GET['section'] ) && 'cpsw_express_checkout' === $_GET['section'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
256 |
+
wp_register_style( 'cpsw-express-checkout-style', CPSW_URL . 'assets/css/express-checkout.css', [], $version, 'all' );
|
257 |
wp_enqueue_style( 'cpsw-express-checkout-style' );
|
258 |
|
259 |
wp_register_script( 'cpsw-stripe-external', 'https://js.stripe.com/v3/', [], $version, true );
|
262 |
wp_register_script( 'cpsw-express-checkout-js', plugins_url( 'assets/js/express-checkout.js', __FILE__ ), [ 'jquery', 'cpsw-stripe-external' ], $version, true );
|
263 |
wp_enqueue_script( 'cpsw-express-checkout-js' );
|
264 |
|
265 |
+
$public_key = ( 'live' === Helper::get_payment_mode() ) ? Helper::get_setting( 'cpsw_pub_key' ) : Helper::get_setting( 'cpsw_test_pub_key' );
|
266 |
+
$button_text = empty( Helper::get_setting( 'express_checkout_button_text', 'cpsw_stripe' ) ) ? __( 'Pay now', 'checkout-plugins-stripe-woo' ) : Helper::get_setting( 'express_checkout_button_text', 'cpsw_stripe' );
|
267 |
|
268 |
wp_localize_script(
|
269 |
'cpsw-express-checkout-js',
|
270 |
'cpsw_express_checkout',
|
271 |
+
apply_filters(
|
272 |
+
'cpsw_express_checkout_localize_args',
|
273 |
+
[
|
274 |
+
'public_key' => $public_key,
|
275 |
+
'style' => [
|
276 |
+
'text' => $button_text,
|
277 |
+
'theme' => Helper::get_setting( 'express_checkout_button_theme', 'cpsw_stripe' ),
|
278 |
+
],
|
279 |
+
'icons' => [
|
280 |
+
'applepay_gray' => CPSW_URL . 'assets/icon/apple-pay-gray.svg',
|
281 |
+
'applepay_light' => CPSW_URL . 'assets/icon/apple-pay-light.svg',
|
282 |
+
'gpay_light' => CPSW_URL . 'assets/icon/gpay_light.svg',
|
283 |
+
'gpay_gray' => CPSW_URL . 'assets/icon/gpay_gray.svg',
|
284 |
+
'payment_request' => CPSW_URL . 'assets/icon/payment-request-icon.svg',
|
285 |
+
],
|
286 |
+
'messages' => [
|
287 |
+
/* translators: Html Markup*/
|
288 |
+
'no_method' => sprintf( __( '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.', 'checkout-plugins-stripe-woo' ), '<a href="https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-testing" target="_blank">', '</a>' ),
|
289 |
+
'checkout_note' => __( 'NOTE: Title and Tagline appears only on Checkout page.', 'checkout-plugins-stripe-woo' ),
|
290 |
+
'default_text' => __( 'Pay now', 'checkout-plugins-stripe-woo' ),
|
291 |
+
],
|
292 |
+
]
|
293 |
+
)
|
294 |
);
|
295 |
}
|
296 |
}
|
362 |
* @param array $options settings array of the stripe.
|
363 |
*/
|
364 |
public function update_options( $options ) {
|
|
|
365 |
if ( ! is_array( $options ) ) {
|
366 |
return false;
|
367 |
}
|
390 |
$sec_var = '';
|
391 |
$manual_link = true;
|
392 |
|
393 |
+
/**
|
394 |
+
* Action before conection with stripe.
|
395 |
+
*
|
396 |
+
* @since 1.3.0
|
397 |
+
*/
|
398 |
+
do_action( 'cpsw_before_connection_with_stripe' );
|
399 |
?>
|
400 |
<tr valign="top">
|
401 |
<th scope="row">
|
417 |
if ( isset( $_GET['connect'] ) && 'manually' === $_GET['connect'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
418 |
?>
|
419 |
<div class="notice inline notice-warning cpsw_inline_notice" style="margin: 15px 0 -10px">
|
420 |
+
<p><?php esc_html_e( '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.', 'checkout-plugins-stripe-woo' ); ?></p>
|
421 |
</div>
|
422 |
<?php } ?>
|
423 |
</fieldset>
|
424 |
</td>
|
425 |
</tr>
|
426 |
<?php
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Action after conection with stripe.
|
430 |
+
*
|
431 |
+
* @since 1.3.0
|
432 |
+
*/
|
433 |
+
do_action( 'cpsw_after_connection_with_stripe' );
|
434 |
}
|
435 |
|
436 |
/**
|
444 |
}
|
445 |
|
446 |
$option_value = Helper::get_setting( 'cpsw_account_id' );
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Action before conected with stripe.
|
450 |
+
*
|
451 |
+
* @since 1.3.0
|
452 |
+
*/
|
453 |
+
do_action( 'cpsw_before_connected_with_stripe' );
|
454 |
?>
|
455 |
<tr valign="top">
|
456 |
<th scope="row">
|
503 |
</p>
|
504 |
<p>
|
505 |
<div class="notice inline notice-warning cpsw_inline_notice">
|
506 |
+
<p><?php esc_html_e( '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.', 'checkout-plugins-stripe-woo' ); ?></p>
|
507 |
</div>
|
508 |
</p>
|
509 |
</div>
|
511 |
</td>
|
512 |
</tr>
|
513 |
<?php
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Action after conected with stripe.
|
517 |
+
*
|
518 |
+
* @since 1.3.0
|
519 |
+
*/
|
520 |
+
do_action( 'cpsw_after_connected_with_stripe' );
|
521 |
}
|
522 |
|
523 |
|
530 |
$data = WC_Admin_Settings::get_field_description( $value );
|
531 |
$description = $data['description'];
|
532 |
$tooltip_html = $data['tooltip_html'];
|
|
|
533 |
$option_value = (array) WC_Admin_Settings::get_option( $value['id'] );
|
534 |
|
535 |
if ( $tooltip_html && 'checkbox' === $value['type'] ) {
|
562 |
* @return void
|
563 |
*/
|
564 |
public function express_checkout_preview( $value ) {
|
565 |
+
/**
|
566 |
+
* Action before express checkout preview.
|
567 |
+
*
|
568 |
+
* @since 1.3.0
|
569 |
+
*/
|
570 |
+
do_action( 'cpsw_before_express_checkout_preview' );
|
571 |
?>
|
572 |
<tr valign="top">
|
573 |
<th scope="row">
|
577 |
<fieldset>
|
578 |
<div class="cpsw_express_checkout_preview_wrapper">
|
579 |
<div class="cpsw_express_checkout_preview"></div>
|
580 |
+
<div id="cpsw-payment-request-custom-button" class="cpsw-payment-request-custom-button-admin">
|
581 |
+
<button lang="auto" class="cpsw-payment-request-custom-button-render cpsw_express_checkout_button cpsw-express-checkout-button large" role="button" type="submit" style="height: 40px;">
|
582 |
+
<div class="cpsw-express-checkout-button-inner" tabindex="-1">
|
583 |
+
<div class="cpsw-express-checkout-button-shines">
|
584 |
+
<div class="cpsw-express-checkout-button-shine cpsw-express-checkout-button-shine--scroll"></div>
|
585 |
+
<div class="cpsw-express-checkout-button-shine cpsw-express-checkout-button-shine--hover"></div>
|
586 |
+
</div>
|
587 |
+
<div class="cpsw-express-checkout-button-content">
|
588 |
+
<span class="cpsw-express-checkout-button-label"></span>
|
589 |
+
<img src="" class="cpsw-express-checkout-button-icon">
|
590 |
+
</div>
|
591 |
+
<div class="cpsw-express-checkout-button-overlay"></div>
|
592 |
+
<div class="cpsw-express-checkout-button-border"></div>
|
593 |
+
</div>
|
594 |
+
</button>
|
595 |
+
</div>
|
596 |
</div>
|
597 |
</fieldset>
|
598 |
<?php if ( ! empty( $value['desc'] ) ) { ?>
|
605 |
</td>
|
606 |
</tr>
|
607 |
<?php
|
608 |
+
/**
|
609 |
+
* Action after express checkout preview.
|
610 |
+
*
|
611 |
+
* @since 1.3.0
|
612 |
+
*/
|
613 |
+
do_action( 'cpsw_after_express_checkout_preview' );
|
614 |
}
|
615 |
|
616 |
/**
|
698 |
$sec_var = '';
|
699 |
$manual_link = true;
|
700 |
}
|
701 |
+
|
702 |
+
/**
|
703 |
+
* Action before stripe conect button with stripe.
|
704 |
+
*
|
705 |
+
* @since 1.3.0
|
706 |
+
*
|
707 |
+
* @param array $value Connect button values.
|
708 |
+
* @param array $data Field description data.
|
709 |
+
*/
|
710 |
+
do_action( 'cpsw_before_stripe_connect_button', $value, $data );
|
711 |
?>
|
712 |
<tr valign="top">
|
713 |
<th scope="row">
|
728 |
</td>
|
729 |
</tr>
|
730 |
<?php
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Action after stripe conect button with stripe.
|
734 |
+
*
|
735 |
+
* @since 1.3.0
|
736 |
+
*
|
737 |
+
* @param array $value Connect button values.
|
738 |
+
* @param array $data Field description data.
|
739 |
+
*/
|
740 |
+
do_action( 'cpsw_after_stripe_connect_button', $value, $data );
|
741 |
}
|
742 |
|
743 |
/**
|
771 |
/**
|
772 |
* Generates Stripe Autorization URL for onboarding process
|
773 |
*
|
774 |
+
* @param boolean $redirect_url destination url to redirect after stripe connect.
|
775 |
+
* @return string
|
776 |
+
* @since 1.3.0
|
777 |
*/
|
778 |
+
public function get_stripe_connect_url( $redirect_url = false ) {
|
779 |
+
if ( ! $redirect_url ) {
|
780 |
+
$redirect_url = admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' );
|
781 |
+
}
|
782 |
+
|
783 |
$client_id = 'ca_KOXfLe7jv1m4L0iC4KNEMc5fT8AXWWuL';
|
784 |
|
785 |
return OAuth::authorizeUrl(
|
786 |
+
apply_filters(
|
787 |
+
'cpsw_stripe_connect_url_data',
|
788 |
+
[
|
789 |
+
'response_type' => 'code',
|
790 |
+
'client_id' => $client_id,
|
791 |
+
'stripe_landing' => 'login',
|
792 |
+
'always_prompt' => 'true',
|
793 |
+
'scope' => 'read_write',
|
794 |
+
'state' => base64_encode( //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
|
795 |
+
wp_json_encode(
|
796 |
+
[
|
797 |
+
'redirect' => add_query_arg( 'cpsw_connect_nonce', wp_create_nonce( 'stripe-connect' ), admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' ) ),
|
798 |
+
]
|
799 |
+
)
|
800 |
+
),
|
801 |
+
]
|
802 |
+
)
|
803 |
);
|
804 |
}
|
805 |
|
934 |
return;
|
935 |
}
|
936 |
|
937 |
+
$redirect_url = apply_filters( 'cpsw_stripe_connect_redirect_url', admin_url( '/admin.php?page=wc-settings&tab=cpsw_api_settings' ) );
|
938 |
+
|
939 |
// Check if user is being returned from Stripe Connect.
|
940 |
if ( isset( $_GET['error'] ) ) {
|
941 |
$error = json_decode( base64_decode( wc_clean( $_GET['error'] ) ) ); //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
|
951 |
$this->settings['cpsw_test_con_status'] = 'failed';
|
952 |
|
953 |
$this->update_options( $this->settings );
|
954 |
+
$redirect_url = add_query_arg( 'cpsw_call', 'failed', $redirect_url );
|
955 |
+
wp_safe_redirect( $redirect_url );
|
956 |
} elseif ( isset( $_GET['response'] ) ) {
|
957 |
$response = json_decode( base64_decode( $_GET['response'] ) ); //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
|
958 |
+
if ( ! empty( $response->live->stripe_publishable_key ) && ! empty( $response->test->stripe_publishable_key ) ) {
|
959 |
$this->settings['cpsw_pub_key'] = $response->live->stripe_publishable_key;
|
960 |
$this->settings['cpsw_secret_key'] = $response->live->access_token;
|
961 |
$this->settings['cpsw_test_pub_key'] = $response->test->stripe_publishable_key;
|
964 |
$this->settings['cpsw_mode'] = 'test';
|
965 |
$this->settings['cpsw_con_status'] = 'success';
|
966 |
$this->settings['cpsw_test_con_status'] = 'success';
|
967 |
+
$redirect_url = add_query_arg( 'cpsw_call', 'success', $redirect_url );
|
968 |
+
wp_safe_redirect( $redirect_url );
|
969 |
} else {
|
970 |
$this->settings['cpsw_pub_key'] = '';
|
971 |
$this->settings['cpsw_secret_key'] = '';
|
974 |
$this->settings['cpsw_account_id'] = '';
|
975 |
$this->settings['cpsw_con_status'] = 'failed';
|
976 |
$this->settings['cpsw_test_con_status'] = 'failed';
|
977 |
+
$redirect_url = add_query_arg( 'cpsw_call', 'failed', $redirect_url );
|
978 |
+
wp_safe_redirect( $redirect_url );
|
979 |
}
|
980 |
|
981 |
$this->settings['cpsw_auto_connect'] = 'yes';
|
982 |
$this->update_options( $this->settings );
|
983 |
+
do_action( 'cpsw_after_connect_with_stripe', $this->settings['cpsw_con_status'] );
|
984 |
}
|
985 |
}
|
986 |
|
1081 |
}
|
1082 |
}
|
1083 |
update_option( 'cpsw_auto_connect', 'no' );
|
1084 |
+
return wp_send_json_success( [ 'data' => apply_filters( 'cpsw_connection_test_results', $results ) ] );
|
1085 |
}
|
1086 |
|
1087 |
/**
|
1129 |
* @param string $account_id Account ID of a stripe user.
|
1130 |
*/
|
1131 |
public function get_account_info( $account_id = '' ) {
|
|
|
1132 |
if ( empty( $account_id ) ) {
|
1133 |
return false;
|
1134 |
}
|
1158 |
unset( $array['debug_log'] );
|
1159 |
unset( $array['test_conn_button'] );
|
1160 |
|
1161 |
+
$webhook_options = apply_filters(
|
1162 |
+
'cpsw_webhook_options',
|
1163 |
+
[
|
1164 |
+
'cpsw_live_webhook_began_at',
|
1165 |
+
'cpsw_live_webhook_last_success_at',
|
1166 |
+
'cpsw_live_webhook_last_failure_at',
|
1167 |
+
'cpsw_live_webhook_last_error',
|
1168 |
+
'cpsw_test_webhook_began_at',
|
1169 |
+
'cpsw_test_webhook_last_success_at',
|
1170 |
+
'cpsw_test_webhook_last_failure_at',
|
1171 |
+
'cpsw_test_webhook_last_error',
|
1172 |
+
]
|
1173 |
+
);
|
1174 |
|
1175 |
array_map( 'delete_option', $webhook_options );
|
1176 |
}
|
1488 |
'value' => $values['express_checkout_location'],
|
1489 |
],
|
1490 |
'button_type' => [
|
1491 |
+
'title' => __( 'Button text', 'checkout-plugins-stripe-woo' ),
|
1492 |
+
'type' => 'text',
|
1493 |
+
'id' => 'cpsw_express_checkout_button_text',
|
1494 |
+
'desc' => __( 'Add label text for the Express Checkout button.', 'checkout-plugins-stripe-woo' ),
|
1495 |
+
'value' => $values['express_checkout_button_text'],
|
|
|
|
|
|
|
|
|
|
|
|
|
1496 |
'desc_tip' => true,
|
1497 |
],
|
1498 |
'button_theme' => [
|
1508 |
],
|
1509 |
'desc_tip' => true,
|
1510 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1511 |
'preview' => [
|
1512 |
'title' => __( 'Button Preview', 'checkout-plugins-stripe-woo' ),
|
1513 |
'type' => 'cpsw_express_checkout_preview',
|
1523 |
'desc' => __( 'Advanced customization options for product page.', 'checkout-plugins-stripe-woo' ),
|
1524 |
'id' => 'cpsw_express_checkout_product_page',
|
1525 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
1526 |
'product_button_position' => [
|
1527 |
'title' => __( 'Button position', 'checkout-plugins-stripe-woo' ),
|
1528 |
'type' => 'select',
|
1531 |
'desc' => __( 'Select the position of Express Checkout button. This option will work only for Product page.', 'checkout-plugins-stripe-woo' ),
|
1532 |
'value' => $values['express_checkout_product_page_position'],
|
1533 |
'options' => [
|
1534 |
+
'above' => __( 'Above Add to Cart', 'checkout-plugins-stripe-woo' ),
|
1535 |
+
'below' => __( 'Below Add to Cart', 'checkout-plugins-stripe-woo' ),
|
1536 |
+
'inline' => __( 'Inline Button', 'checkout-plugins-stripe-woo' ),
|
1537 |
],
|
1538 |
'desc_tip' => true,
|
1539 |
],
|
1540 |
+
'separator_text' => [
|
1541 |
+
'title' => __( 'Separator text', 'checkout-plugins-stripe-woo' ),
|
1542 |
+
'type' => 'text',
|
1543 |
+
'id' => 'cpsw_express_checkout_separator_product',
|
1544 |
+
'desc' => __( 'Add separator text for the Express Checkout button. This will help to distinguish between Express Checkout and other buttons.', 'checkout-plugins-stripe-woo' ),
|
1545 |
+
'value' => $values['express_checkout_separator_product'],
|
1546 |
'class' => 'cpsw_product_options',
|
|
|
|
|
|
|
1547 |
'desc_tip' => true,
|
1548 |
],
|
1549 |
'sticky_footer' => [
|
1559 |
'type' => 'sectionend',
|
1560 |
'id' => 'cpsw_express_checkout',
|
1561 |
],
|
1562 |
+
'cart_page_section_title' => [
|
1563 |
+
'name' => __( 'Cart page options', 'checkout-plugins-stripe-woo' ),
|
1564 |
+
'type' => 'title',
|
1565 |
+
'desc' => __( 'Advanced customization options for Cart page.', 'checkout-plugins-stripe-woo' ),
|
1566 |
+
'id' => 'cpsw_express_checkout_cart_page',
|
1567 |
+
'class' => 'cpsw_cart_options',
|
1568 |
],
|
1569 |
+
'cart_separator_text' => [
|
1570 |
+
'title' => __( 'Separator text', 'checkout-plugins-stripe-woo' ),
|
1571 |
+
'type' => 'text',
|
1572 |
+
'class' => 'cpsw_cart_options',
|
1573 |
+
'id' => 'cpsw_express_checkout_separator_cart',
|
1574 |
+
'desc' => __( 'Add separator text for Cart page. If empty will show default separator text.', 'checkout-plugins-stripe-woo' ),
|
1575 |
+
'value' => $values['express_checkout_separator_cart'],
|
1576 |
+
'desc_tip' => true,
|
1577 |
+
],
|
1578 |
+
'cart_page_section_end' => [
|
1579 |
+
'type' => 'sectionend',
|
1580 |
+
'id' => 'cpsw_express_checkout',
|
1581 |
+
],
|
1582 |
+
'checkout_page_section_title' => [
|
1583 |
+
'name' => __( 'Checkout page options', 'checkout-plugins-stripe-woo' ),
|
1584 |
+
'type' => 'title',
|
1585 |
+
'desc' => __( 'Advanced customization options for Checkout page.', 'checkout-plugins-stripe-woo' ),
|
1586 |
+
'id' => 'cpsw_express_checkout_checkout_page',
|
1587 |
+
'class' => 'cpsw_checkout_options',
|
1588 |
],
|
1589 |
'checkout_button_position' => [
|
1590 |
'title' => __( 'Button position', 'checkout-plugins-stripe-woo' ),
|
1622 |
'type' => 'number',
|
1623 |
'class' => 'cpsw_checkout_options',
|
1624 |
'id' => 'cpsw_express_checkout_button_width',
|
1625 |
+
'desc' => __( 'Select width for button (in px). Default width 100%', 'checkout-plugins-stripe-woo' ),
|
1626 |
'value' => $values['express_checkout_button_width'],
|
1627 |
'desc_tip' => true,
|
1628 |
],
|
1657 |
}
|
1658 |
}
|
1659 |
|
1660 |
+
return apply_filters( 'cpsw_express_checkout_settings', $settings );
|
1661 |
}
|
1662 |
}
|
admin/assets/css/express-checkout.css
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
.cpsw_express_checkout_preview_wrapper {
|
2 |
-
max-width: 380px;
|
3 |
-
width: 100%;
|
4 |
-
}
|
5 |
-
|
6 |
-
.cpsw_floating_preview {
|
7 |
-
width: 400px;
|
8 |
-
}
|
9 |
-
|
10 |
-
.cpsw_express_checkout_preview {
|
11 |
-
max-width: 100%;
|
12 |
-
}
|
13 |
-
|
14 |
-
.cpsw_preview_title {
|
15 |
-
font-weight: 600;
|
16 |
-
margin-bottom: 0.5em;
|
17 |
-
margin-top: 0;
|
18 |
-
}
|
19 |
-
|
20 |
-
.cpsw_preview_tagline {
|
21 |
-
margin-bottom: 1em;
|
22 |
-
}
|
23 |
-
|
24 |
-
.cpsw_preview_notice {
|
25 |
-
font-style: italic;
|
26 |
-
font-size: 12px;
|
27 |
-
clear: both;
|
28 |
-
margin-top: 1em;
|
29 |
-
display: none;
|
30 |
-
}
|
31 |
-
|
32 |
-
.cpsw_button_preview_label {
|
33 |
-
font-weight: 600;
|
34 |
-
margin-bottom: 1em;
|
35 |
-
font-size: 15px;
|
36 |
-
display: none;
|
37 |
-
}
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/assets/js/admin.js
CHANGED
@@ -236,13 +236,11 @@
|
|
236 |
$this.closest( 'tr' ).hide();
|
237 |
hidden.push( $this.attr( 'id' ) );
|
238 |
}
|
|
|
|
|
239 |
} else {
|
240 |
-
|
241 |
-
|
242 |
-
} else {
|
243 |
-
$this.closest( 'tr' ).hide();
|
244 |
-
hidden.push( $this.attr( 'id' ) );
|
245 |
-
}
|
246 |
}
|
247 |
} else {
|
248 |
$this.closest( 'tr' ).hide();
|
236 |
$this.closest( 'tr' ).hide();
|
237 |
hidden.push( $this.attr( 'id' ) );
|
238 |
}
|
239 |
+
} else if ( $key.val() === v ) {
|
240 |
+
$this.closest( 'tr' ).show();
|
241 |
} else {
|
242 |
+
$this.closest( 'tr' ).hide();
|
243 |
+
hidden.push( $this.attr( 'id' ) );
|
|
|
|
|
|
|
|
|
244 |
}
|
245 |
} else {
|
246 |
$this.closest( 'tr' ).hide();
|
admin/assets/js/express-checkout.js
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
( function( $ ) {
|
3 |
const pubKey = cpsw_express_checkout.public_key;
|
4 |
let style = cpsw_express_checkout.style;
|
5 |
-
|
|
|
6 |
const stripe = Stripe( pubKey );
|
7 |
|
8 |
function generateExpressCheckoutDemo() {
|
@@ -19,46 +20,68 @@
|
|
19 |
};
|
20 |
|
21 |
const paymentRequest = stripe.paymentRequest( data );
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
const prButton = elements.create( 'paymentRequestButton', {
|
26 |
-
paymentRequest,
|
27 |
-
style: {
|
28 |
-
paymentRequestButton: {
|
29 |
-
type: style.type,
|
30 |
-
theme: style.theme,
|
31 |
-
height: style.height + 'px',
|
32 |
-
},
|
33 |
-
},
|
34 |
-
} );
|
35 |
|
36 |
paymentRequest.canMakePayment().then( function( result ) {
|
37 |
if ( ! result ) {
|
38 |
return;
|
39 |
}
|
40 |
|
|
|
|
|
41 |
prButton.on( 'click', function( e ) {
|
42 |
e.preventDefault();
|
43 |
} );
|
44 |
|
45 |
if ( $( '.cpsw_express_checkout_preview_wrapper .cpsw_express_checkout_preview' ).length > 0 ) {
|
|
|
46 |
$( '.cpsw_button_preview_label' ).css( { display: 'block' } );
|
47 |
$( '.cpsw_preview_notice' ).css( { display: 'block' } );
|
48 |
$( '.cpsw_express_checkout_preview_wrapper .cpsw_express_checkout_preview' ).fadeIn();
|
49 |
-
prButton.mount( '.cpsw_express_checkout_preview_wrapper .cpsw_express_checkout_preview' );
|
50 |
$( '.cpsw_preview_title' ).html( $( '#cpsw_express_checkout_title' ).val() );
|
51 |
$( '.cpsw_preview_tagline' ).html( $( '#cpsw_express_checkout_tagline' ).val() );
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
} );
|
@@ -66,98 +89,104 @@
|
|
66 |
}
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
function addCheckoutPreviewElement() {
|
70 |
removeCheckoutPreviewElement();
|
71 |
$( '.cpsw_express_checkout_preview_wrapper' ).prepend( '<h3 class="cpsw_preview_title"></h3><p class="cpsw_preview_tagline"></p>' );
|
72 |
-
$( '.cpsw_express_checkout_preview_wrapper' ).after( '<p class="cpsw_preview_notice">
|
73 |
-
|
74 |
-
const buttonWidth = $( '#cpsw_express_checkout_button_width' ).val() + 'px';
|
75 |
-
$( '.cpsw_express_checkout_preview' ).width( buttonWidth );
|
76 |
|
77 |
$( '.cpsw_express_checkout_preview_wrapper' ).css( { textAlign: $( '#cpsw_express_checkout_button_alignment' ).val() } );
|
78 |
if ( $( '#cpsw_express_checkout_button_alignment' ).val() === 'center' ) {
|
79 |
-
$( '.
|
80 |
} else {
|
81 |
-
$( '.
|
82 |
}
|
83 |
}
|
84 |
|
85 |
function removeCheckoutPreviewElement() {
|
86 |
$( '.cpsw_preview_title, .cpsw_preview_tagline, .cpsw_preview_notice' ).remove();
|
87 |
-
$( '.
|
88 |
}
|
89 |
|
90 |
-
function toggleOptions(
|
91 |
-
|
92 |
-
|
93 |
-
if ( 'product'
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$(
|
|
|
|
|
99 |
$( this ).parents( 'tr' ).hide();
|
100 |
-
if ( 'checkout' === page ) {
|
101 |
-
removeCheckoutPreviewElement();
|
102 |
-
}
|
103 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
} else {
|
105 |
-
$(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
$( this ).parents( 'tr' ).show();
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
112 |
} );
|
|
|
|
|
113 |
}
|
114 |
}
|
115 |
|
116 |
$( document ).ready( function() {
|
117 |
$( '.cpsw_express_checkout_location' ).selectWoo();
|
118 |
generateExpressCheckoutDemo( style );
|
|
|
119 |
|
120 |
-
$( '#
|
121 |
-
style = {
|
122 |
-
type: $( '#cpsw_express_checkout_button_type' ).val(),
|
123 |
-
theme: $( '#cpsw_express_checkout_button_theme' ).val(),
|
124 |
-
height: $( '#cpsw_express_checkout_button_height' ).val(),
|
125 |
-
|
126 |
-
};
|
127 |
-
$( '.cpsw_express_checkout_preview_wrapper .cpsw_express_checkout_preview' ).hide();
|
128 |
-
generateExpressCheckoutDemo( style );
|
129 |
-
} );
|
130 |
-
|
131 |
-
$( '#cpsw_express_checkout_button_height' ).change( function() {
|
132 |
-
if ( $( this ).val() > 60 ) {
|
133 |
-
$( this ).val( 60 );
|
134 |
-
}
|
135 |
-
|
136 |
-
if ( $( this ).val() < 35 ) {
|
137 |
-
$( this ).val( 35 );
|
138 |
-
}
|
139 |
-
|
140 |
style = {
|
141 |
-
|
142 |
theme: $( '#cpsw_express_checkout_button_theme' ).val(),
|
143 |
-
height: $( '#cpsw_express_checkout_button_height' ).val(),
|
144 |
-
|
145 |
};
|
146 |
-
$( '.cpsw_express_checkout_preview_wrapper .
|
147 |
generateExpressCheckoutDemo( style );
|
148 |
} );
|
149 |
|
150 |
-
|
151 |
-
toggleOptions( 'product' );
|
152 |
-
|
153 |
-
$( '#cpsw_express_checkout_product_checkout_page' ).change( function() {
|
154 |
toggleOptions();
|
155 |
} );
|
156 |
|
157 |
-
$( '#cpsw_express_checkout_product_options' ).change( function() {
|
158 |
-
toggleOptions( 'product' );
|
159 |
-
} );
|
160 |
-
|
161 |
if ( $( document ).width() > 1200 ) {
|
162 |
const buttonPreview = $( '.cpsw_express_checkout_preview_wrapper' ).parents( 'fieldset' );
|
163 |
buttonPreview.parents( 'tr' ).hide();
|
@@ -203,26 +232,21 @@
|
|
203 |
$( '.cpsw_preview_tagline' ).html( $( this ).val() );
|
204 |
} );
|
205 |
|
206 |
-
$( '#cpsw_express_checkout_button_width
|
207 |
let buttonWidth = $( this ).val();
|
208 |
-
if ( buttonWidth < 150 && buttonWidth !== '' ) {
|
209 |
-
$( this ).val( 150 );
|
210 |
-
buttonWidth = 150;
|
211 |
-
alert( 'Express Checkout button width should not be less than 150px' );
|
212 |
-
}
|
213 |
|
214 |
if ( '' === buttonWidth ) {
|
215 |
buttonWidth = '100%';
|
216 |
}
|
217 |
-
$( '.
|
218 |
} );
|
219 |
|
220 |
$( '#cpsw_express_checkout_button_alignment' ).change( function() {
|
221 |
$( '.cpsw_express_checkout_preview_wrapper' ).css( { textAlign: $( this ).val() } );
|
222 |
if ( $( this ).val() === 'center' ) {
|
223 |
-
$( '.
|
224 |
} else {
|
225 |
-
$( '.
|
226 |
}
|
227 |
} );
|
228 |
} );
|
2 |
( function( $ ) {
|
3 |
const pubKey = cpsw_express_checkout.public_key;
|
4 |
let style = cpsw_express_checkout.style;
|
5 |
+
const messages = cpsw_express_checkout.messages;
|
6 |
+
const icons = cpsw_express_checkout.icons;
|
7 |
const stripe = Stripe( pubKey );
|
8 |
|
9 |
function generateExpressCheckoutDemo() {
|
20 |
};
|
21 |
|
22 |
const paymentRequest = stripe.paymentRequest( data );
|
23 |
+
let iconUrl = '';
|
24 |
+
let buttonClass = '';
|
25 |
+
let requestType = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
paymentRequest.canMakePayment().then( function( result ) {
|
28 |
if ( ! result ) {
|
29 |
return;
|
30 |
}
|
31 |
|
32 |
+
const prButton = $( '.cpsw-payment-request-custom-button-render' );
|
33 |
+
|
34 |
prButton.on( 'click', function( e ) {
|
35 |
e.preventDefault();
|
36 |
} );
|
37 |
|
38 |
if ( $( '.cpsw_express_checkout_preview_wrapper .cpsw_express_checkout_preview' ).length > 0 ) {
|
39 |
+
$( '.cpsw-payment-request-custom-button-admin' ).show();
|
40 |
$( '.cpsw_button_preview_label' ).css( { display: 'block' } );
|
41 |
$( '.cpsw_preview_notice' ).css( { display: 'block' } );
|
42 |
$( '.cpsw_express_checkout_preview_wrapper .cpsw_express_checkout_preview' ).fadeIn();
|
|
|
43 |
$( '.cpsw_preview_title' ).html( $( '#cpsw_express_checkout_title' ).val() );
|
44 |
$( '.cpsw_preview_tagline' ).html( $( '#cpsw_express_checkout_tagline' ).val() );
|
45 |
+
|
46 |
+
const buttonWidth = $( '#cpsw_express_checkout_button_width' ).val() ? $( '#cpsw_express_checkout_button_width' ).val() + 'px' : '100%';
|
47 |
+
$( '.cpsw-payment-request-custom-button-render' ).css( 'min-width', buttonWidth );
|
48 |
+
|
49 |
+
$( '.cpsw_express_checkout_preview_wrapper' ).css( { textAlign: $( '#cpsw_express_checkout_button_alignment' ).val() } );
|
50 |
+
if ( $( '#cpsw_express_checkout_button_alignment' ).val() === 'center' ) {
|
51 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { margin: '0 auto', float: 'none' } );
|
52 |
+
} else {
|
53 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { marginBottom: '1em', float: $( '#cpsw_express_checkout_button_alignment' ).val() } );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( result.applePay ) {
|
57 |
+
requestType = 'apple_pay';
|
58 |
+
buttonClass = 'cpsw-express-checkout-applepay-button';
|
59 |
+
} else if ( result.googlePay ) {
|
60 |
+
requestType = 'google_pay';
|
61 |
+
buttonClass = 'cpsw-express-checkout-googlepay-button';
|
62 |
+
} else {
|
63 |
+
requestType = 'payment_request_api';
|
64 |
+
buttonClass = 'cpsw-express-checkout-payment-button';
|
65 |
+
}
|
66 |
+
|
67 |
+
removeAllButtonThemes();
|
68 |
+
$( '.cpsw-payment-request-custom-button-render' ).addClass( 'cpsw-express-' + requestType );
|
69 |
+
|
70 |
+
$( '.cpsw-payment-request-custom-button-render' ).addClass( buttonClass + '--' + style.theme );
|
71 |
+
$( '.cpsw-payment-request-custom-button-render .cpsw-express-checkout-button-label' ).html( style.text );
|
72 |
+
$( '.cpsw-express-checkout-button-icon' ).hide();
|
73 |
+
|
74 |
+
if ( 'cpsw-express-checkout-googlepay-button' === buttonClass ) {
|
75 |
+
iconUrl = 'dark' === style.theme ? icons.gpay_light : icons.gpay_gray;
|
76 |
+
} else if ( 'cpsw-express-checkout-applepay-button' === buttonClass ) {
|
77 |
+
iconUrl = 'dark' === style.theme ? icons.applepay_light : icons.applepay_gray;
|
78 |
+
} else {
|
79 |
+
iconUrl = icons.payment_request;
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( '' !== iconUrl ) {
|
83 |
+
$( '.cpsw-express-checkout-button-icon' ).show();
|
84 |
+
$( '.cpsw-express-checkout-button-icon' ).attr( 'src', iconUrl );
|
85 |
}
|
86 |
}
|
87 |
} );
|
89 |
}
|
90 |
}
|
91 |
|
92 |
+
function removeAllButtonThemes() {
|
93 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-payment-button--dark' );
|
94 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-payment-button--light' );
|
95 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-payment-button--light-outline' );
|
96 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-googlepay-button--dark' );
|
97 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-googlepay-button--light' );
|
98 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-googlepay-button--light-outline' );
|
99 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-applepay-button--dark' );
|
100 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-applepay-button--light' );
|
101 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw-express-checkout-applepay-button--light-outline' );
|
102 |
+
}
|
103 |
+
|
104 |
function addCheckoutPreviewElement() {
|
105 |
removeCheckoutPreviewElement();
|
106 |
$( '.cpsw_express_checkout_preview_wrapper' ).prepend( '<h3 class="cpsw_preview_title"></h3><p class="cpsw_preview_tagline"></p>' );
|
107 |
+
$( '.cpsw_express_checkout_preview_wrapper' ).after( '<p class="cpsw_preview_notice">' + messages.checkout_note + '</p>' );
|
|
|
|
|
|
|
108 |
|
109 |
$( '.cpsw_express_checkout_preview_wrapper' ).css( { textAlign: $( '#cpsw_express_checkout_button_alignment' ).val() } );
|
110 |
if ( $( '#cpsw_express_checkout_button_alignment' ).val() === 'center' ) {
|
111 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { margin: '0 auto', float: 'none' } );
|
112 |
} else {
|
113 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { marginBottom: '1em', float: $( '#cpsw_express_checkout_button_alignment' ).val() } );
|
114 |
}
|
115 |
}
|
116 |
|
117 |
function removeCheckoutPreviewElement() {
|
118 |
$( '.cpsw_preview_title, .cpsw_preview_tagline, .cpsw_preview_notice' ).remove();
|
119 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { margin: '0 auto', float: 'none', width: '100%' } );
|
120 |
}
|
121 |
|
122 |
+
function toggleOptions() {
|
123 |
+
const pages = $( '#cpsw_express_checkout_location option:selected' ).toArray().map( ( item ) => item.value );
|
124 |
+
|
125 |
+
if ( jQuery.inArray( 'product', pages ) !== -1 ) {
|
126 |
+
$( '.cpsw_product_options' ).each( function() {
|
127 |
+
$( this ).parents( 'tr' ).show();
|
128 |
+
} );
|
129 |
+
$( '#cpsw_express_checkout_product_page-description' ).show();
|
130 |
+
$( '#cpsw_express_checkout_product_page-description' ).prev( 'h2' ).show();
|
131 |
+
} else {
|
132 |
+
$( '.cpsw_product_options' ).each( function() {
|
133 |
$( this ).parents( 'tr' ).hide();
|
|
|
|
|
|
|
134 |
} );
|
135 |
+
$( '#cpsw_express_checkout_product_page-description' ).hide();
|
136 |
+
$( '#cpsw_express_checkout_product_page-description' ).prev( 'h2' ).hide();
|
137 |
+
}
|
138 |
+
|
139 |
+
if ( jQuery.inArray( 'cart', pages ) !== -1 ) {
|
140 |
+
$( '.cpsw_cart_options' ).each( function() {
|
141 |
+
$( this ).parents( 'tr' ).show();
|
142 |
+
} );
|
143 |
+
$( '#cpsw_express_checkout_cart_page-description' ).show();
|
144 |
+
$( '#cpsw_express_checkout_cart_page-description' ).prev( 'h2' ).show();
|
145 |
} else {
|
146 |
+
$( '.cpsw_cart_options' ).each( function() {
|
147 |
+
$( this ).parents( 'tr' ).hide();
|
148 |
+
} );
|
149 |
+
$( '#cpsw_express_checkout_cart_page-description' ).hide();
|
150 |
+
$( '#cpsw_express_checkout_cart_page-description' ).prev( 'h2' ).hide();
|
151 |
+
}
|
152 |
+
|
153 |
+
if ( jQuery.inArray( 'checkout', pages ) !== -1 ) {
|
154 |
+
$( '.cpsw_checkout_options' ).each( function() {
|
155 |
$( this ).parents( 'tr' ).show();
|
156 |
+
addCheckoutPreviewElement();
|
157 |
+
$( '#cpsw_express_checkout_title' ).trigger( 'keyup' );
|
158 |
+
$( '#cpsw_express_checkout_tagline' ).trigger( 'keyup' );
|
159 |
+
} );
|
160 |
+
$( '#cpsw_express_checkout_checkout_page-description' ).show();
|
161 |
+
$( '#cpsw_express_checkout_checkout_page-description' ).prev( 'h2' ).show();
|
162 |
+
} else {
|
163 |
+
$( '.cpsw_checkout_options' ).each( function() {
|
164 |
+
$( this ).parents( 'tr' ).hide();
|
165 |
+
removeCheckoutPreviewElement();
|
166 |
} );
|
167 |
+
$( '#cpsw_express_checkout_checkout_page-description' ).hide();
|
168 |
+
$( '#cpsw_express_checkout_checkout_page-description' ).prev( 'h2' ).hide();
|
169 |
}
|
170 |
}
|
171 |
|
172 |
$( document ).ready( function() {
|
173 |
$( '.cpsw_express_checkout_location' ).selectWoo();
|
174 |
generateExpressCheckoutDemo( style );
|
175 |
+
toggleOptions();
|
176 |
|
177 |
+
$( '#cpsw_express_checkout_button_text, #cpsw_express_checkout_button_theme' ).change( function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
style = {
|
179 |
+
text: '' === $( '#cpsw_express_checkout_button_text' ).val() ? messages.default_text : $( '#cpsw_express_checkout_button_text' ).val(),
|
180 |
theme: $( '#cpsw_express_checkout_button_theme' ).val(),
|
|
|
|
|
181 |
};
|
182 |
+
$( '.cpsw_express_checkout_preview_wrapper .cpsw-payment-request-custom-button-admin' ).hide();
|
183 |
generateExpressCheckoutDemo( style );
|
184 |
} );
|
185 |
|
186 |
+
$( '#cpsw_express_checkout_location' ).change( function() {
|
|
|
|
|
|
|
187 |
toggleOptions();
|
188 |
} );
|
189 |
|
|
|
|
|
|
|
|
|
190 |
if ( $( document ).width() > 1200 ) {
|
191 |
const buttonPreview = $( '.cpsw_express_checkout_preview_wrapper' ).parents( 'fieldset' );
|
192 |
buttonPreview.parents( 'tr' ).hide();
|
232 |
$( '.cpsw_preview_tagline' ).html( $( this ).val() );
|
233 |
} );
|
234 |
|
235 |
+
$( '#cpsw_express_checkout_button_width' ).change( function() {
|
236 |
let buttonWidth = $( this ).val();
|
|
|
|
|
|
|
|
|
|
|
237 |
|
238 |
if ( '' === buttonWidth ) {
|
239 |
buttonWidth = '100%';
|
240 |
}
|
241 |
+
$( '.cpsw-payment-request-custom-button-render' ).width( buttonWidth );
|
242 |
} );
|
243 |
|
244 |
$( '#cpsw_express_checkout_button_alignment' ).change( function() {
|
245 |
$( '.cpsw_express_checkout_preview_wrapper' ).css( { textAlign: $( this ).val() } );
|
246 |
if ( $( this ).val() === 'center' ) {
|
247 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { margin: '0 auto', float: 'none' } );
|
248 |
} else {
|
249 |
+
$( '.cpsw-payment-request-custom-button-admin' ).css( { marginBottom: '1em', float: $( this ).val() } );
|
250 |
}
|
251 |
} );
|
252 |
} );
|
assets/css/express-checkout.css
ADDED
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cpsw_express_checkout_preview_wrapper {
|
2 |
+
max-width: 380px;
|
3 |
+
width: 100%;
|
4 |
+
}
|
5 |
+
|
6 |
+
.cpsw_floating_preview {
|
7 |
+
width: 400px;
|
8 |
+
}
|
9 |
+
|
10 |
+
.cpsw_express_checkout_preview {
|
11 |
+
max-width: 100%;
|
12 |
+
}
|
13 |
+
|
14 |
+
.cpsw_preview_title {
|
15 |
+
font-weight: 600;
|
16 |
+
margin-bottom: 0.5em;
|
17 |
+
margin-top: 0;
|
18 |
+
}
|
19 |
+
|
20 |
+
.cpsw_preview_tagline {
|
21 |
+
margin-bottom: 1em;
|
22 |
+
}
|
23 |
+
|
24 |
+
.cpsw_preview_notice {
|
25 |
+
font-style: italic;
|
26 |
+
font-size: 12px;
|
27 |
+
clear: both;
|
28 |
+
margin-top: 1em;
|
29 |
+
display: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
.cpsw_button_preview_label {
|
33 |
+
font-weight: 600;
|
34 |
+
margin-bottom: 1em;
|
35 |
+
font-size: 15px;
|
36 |
+
display: none;
|
37 |
+
}
|
38 |
+
|
39 |
+
/* Custom express checkout button style */
|
40 |
+
.cpsw-payment-request-custom-button-render {
|
41 |
+
overflow: hidden !important;
|
42 |
+
}
|
43 |
+
|
44 |
+
#cpsw-payment-request-custom-button {
|
45 |
+
max-width: 100%;
|
46 |
+
}
|
47 |
+
|
48 |
+
#cpsw-payment-request-custom-button > * {
|
49 |
+
height: 100%;
|
50 |
+
top: 0;
|
51 |
+
left: 0;
|
52 |
+
width: auto;
|
53 |
+
z-index: 1;
|
54 |
+
}
|
55 |
+
|
56 |
+
.cpsw-payment-request-custom-button-render::after,
|
57 |
+
.cpsw-payment-request-custom-button-render::before {
|
58 |
+
display: none;
|
59 |
+
}
|
60 |
+
|
61 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-applepay-button--dark {
|
62 |
+
background-color: #000 !important;
|
63 |
+
}
|
64 |
+
|
65 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-applepay-button--light {
|
66 |
+
background-color: #fff !important;
|
67 |
+
}
|
68 |
+
|
69 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button {
|
70 |
+
position: relative;
|
71 |
+
min-height: 32px;
|
72 |
+
max-height: 64px;
|
73 |
+
border: 0;
|
74 |
+
cursor: pointer;
|
75 |
+
}
|
76 |
+
|
77 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button-logo {
|
78 |
+
position: absolute;
|
79 |
+
top: 0;
|
80 |
+
right: 0;
|
81 |
+
bottom: 0;
|
82 |
+
left: 0;
|
83 |
+
padding: 27.5vh 7.375vw;
|
84 |
+
background-origin: content-box;
|
85 |
+
background-position: 50%;
|
86 |
+
background-repeat: no-repeat;
|
87 |
+
background-size: contain;
|
88 |
+
}
|
89 |
+
|
90 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--dark {
|
91 |
+
background-color: #000 !important;
|
92 |
+
}
|
93 |
+
|
94 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--dark:focus,
|
95 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--dark:hover {
|
96 |
+
background-color: #3c4043;
|
97 |
+
}
|
98 |
+
|
99 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--dark:active {
|
100 |
+
background-color: #5f6368;
|
101 |
+
}
|
102 |
+
|
103 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light,
|
104 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light-outline {
|
105 |
+
background-color: #fff !important;
|
106 |
+
}
|
107 |
+
|
108 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light:focus,
|
109 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light:hover,
|
110 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light-outline:focus,
|
111 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light-outline:hover {
|
112 |
+
background-color: #f8f8f8;
|
113 |
+
}
|
114 |
+
|
115 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light:active,
|
116 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light-outline:active {
|
117 |
+
background-color: #fff;
|
118 |
+
}
|
119 |
+
|
120 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button {
|
121 |
+
position: relative;
|
122 |
+
border: none;
|
123 |
+
outline: none;
|
124 |
+
cursor: pointer;
|
125 |
+
user-select: none;
|
126 |
+
white-space: nowrap;
|
127 |
+
}
|
128 |
+
|
129 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--dark,
|
130 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--dark:hover {
|
131 |
+
background: #32325d !important;
|
132 |
+
color: #fff !important;
|
133 |
+
}
|
134 |
+
|
135 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light,
|
136 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light-outline,
|
137 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light:hover,
|
138 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light-outline:hover {
|
139 |
+
background: #fff !important;
|
140 |
+
color: #39325c !important;
|
141 |
+
border: solid 1px #ebebeb !important;
|
142 |
+
}
|
143 |
+
|
144 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-inner {
|
145 |
+
width: 100%;
|
146 |
+
outline: none;
|
147 |
+
}
|
148 |
+
|
149 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-content {
|
150 |
+
width: 100%;
|
151 |
+
box-sizing: border-box;
|
152 |
+
padding: 0 10px;
|
153 |
+
display: flex;
|
154 |
+
align-items: center;
|
155 |
+
justify-content: center;
|
156 |
+
}
|
157 |
+
|
158 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button.compact .PaymentRequestcpsw-express-checkout-buttonButton-content {
|
159 |
+
padding: 0 2px;
|
160 |
+
}
|
161 |
+
|
162 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-border {
|
163 |
+
position: absolute;
|
164 |
+
z-index: 20;
|
165 |
+
left: 0;
|
166 |
+
top: 0;
|
167 |
+
right: 0;
|
168 |
+
bottom: 0;
|
169 |
+
will-change: opacity;
|
170 |
+
}
|
171 |
+
|
172 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-shines {
|
173 |
+
position: absolute;
|
174 |
+
left: 0;
|
175 |
+
top: 0;
|
176 |
+
width: 100%;
|
177 |
+
height: 100%;
|
178 |
+
z-index: -1;
|
179 |
+
overflow: hidden;
|
180 |
+
will-change: opacity;
|
181 |
+
}
|
182 |
+
|
183 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-shine {
|
184 |
+
position: absolute;
|
185 |
+
z-index: 1;
|
186 |
+
left: 0;
|
187 |
+
top: 0;
|
188 |
+
height: 100%;
|
189 |
+
width: 250%;
|
190 |
+
transform: translateX(-100%);
|
191 |
+
will-change: transform, opacity;
|
192 |
+
transition: opacity 0.8s;
|
193 |
+
}
|
194 |
+
|
195 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--dark .cpsw-express-checkout-button-shine {
|
196 |
+
background: linear-gradient(110deg, rgba(121, 78, 151, 0) 10%, rgba(121, 78, 151, 0.91) 45%, rgba(121, 78, 151, 1) 50%, rgba(121, 78, 151, 0.91) 55%, rgba(121, 78, 151, 0) 90%);
|
197 |
+
}
|
198 |
+
|
199 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light .cpsw-express-checkout-button-shine,
|
200 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light-outline .cpsw-express-checkout-button-shine {
|
201 |
+
background: linear-gradient(110deg, rgba(225, 218, 245, 0) 10%, rgba(225, 218, 245, 0.91) 45%, rgba(225, 218, 245, 1) 50%, rgba(225, 218, 245, 0.91) 55%, rgba(225, 218, 245, 0) 90%);
|
202 |
+
}
|
203 |
+
|
204 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-shine--scroll {
|
205 |
+
opacity: 0.6;
|
206 |
+
animation: cpsw_shine 5s infinite;
|
207 |
+
}
|
208 |
+
|
209 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-shine--hover,
|
210 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button:hover .cpsw-express-checkout-button-shine--scroll {
|
211 |
+
opacity: 0;
|
212 |
+
}
|
213 |
+
|
214 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button:hover .cpsw-express-checkout-button-shine--hover {
|
215 |
+
transition-duration: 0.3s;
|
216 |
+
opacity: 0.8;
|
217 |
+
transform: translateX(-15%);
|
218 |
+
}
|
219 |
+
|
220 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-overlay {
|
221 |
+
position: absolute;
|
222 |
+
left: 0;
|
223 |
+
top: 0;
|
224 |
+
width: 100%;
|
225 |
+
height: 100%;
|
226 |
+
z-index: 30;
|
227 |
+
opacity: 0;
|
228 |
+
transition: opacity 0.3s;
|
229 |
+
will-change: opacity;
|
230 |
+
}
|
231 |
+
|
232 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--dark .cpsw-express-checkout-button-overlay {
|
233 |
+
background: rgba(0, 0, 40, 0.3);
|
234 |
+
}
|
235 |
+
|
236 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light .cpsw-express-checkout-button-overlay,
|
237 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light-outline .cpsw-express-checkout-button-overlay {
|
238 |
+
background: rgba(151, 136, 197, 0.2);
|
239 |
+
}
|
240 |
+
|
241 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button.is-active .cpsw-express-checkout-button-overlay,
|
242 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button:active .cpsw-express-checkout-button-overlay {
|
243 |
+
opacity: 1;
|
244 |
+
}
|
245 |
+
|
246 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button-label {
|
247 |
+
position: relative;
|
248 |
+
z-index: 10;
|
249 |
+
transition-property: font-size, color, opacity;
|
250 |
+
transition-duration: 0.25s;
|
251 |
+
will-change: opacity;
|
252 |
+
}
|
253 |
+
|
254 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--dark,
|
255 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--dark,
|
256 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-applepay-button--dark {
|
257 |
+
color: #fff !important;
|
258 |
+
}
|
259 |
+
|
260 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light,
|
261 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light,
|
262 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-applepay-button--light,
|
263 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-payment-button--light-outline,
|
264 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-googlepay-button--light-outline,
|
265 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-applepay-button--light-outline {
|
266 |
+
color: #39325c !important;
|
267 |
+
border: solid 1px #ebebeb !important;
|
268 |
+
}
|
269 |
+
|
270 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button.baseline-offset .cpsw-express-checkout-button-label {
|
271 |
+
margin-top: -2px;
|
272 |
+
}
|
273 |
+
|
274 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button.compact .cpsw-express-checkout-button-label {
|
275 |
+
overflow: hidden;
|
276 |
+
text-overflow: ellipsis;
|
277 |
+
}
|
278 |
+
|
279 |
+
#cpsw-payment-request-custom-button .cpsw-express-checkout-button.large .cpsw-express-checkout-button-label {
|
280 |
+
margin-top: -2px;
|
281 |
+
}
|
282 |
+
|
283 |
+
.cpsw-express-checkout-button-icon {
|
284 |
+
flex-shrink: 0;
|
285 |
+
z-index: 10;
|
286 |
+
will-change: opacity;
|
287 |
+
margin: 0 -1px -1px 7px;
|
288 |
+
width: 40px;
|
289 |
+
vertical-align: middle;
|
290 |
+
}
|
291 |
+
|
292 |
+
.cpsw-payment-request-custom-button-admin .cpsw-express-checkout-button-icon {
|
293 |
+
position: relative;
|
294 |
+
width: 40px;
|
295 |
+
}
|
296 |
+
|
297 |
+
#cpsw-payment-request-wrapper .cpsw-express-apple_pay .cpsw-express-checkout-button-icon,
|
298 |
+
#cpsw-payment-request-wrapper .cpsw-express-google_pay .cpsw-express-checkout-button-icon {
|
299 |
+
margin: 0 -1px -3px 7px;
|
300 |
+
}
|
301 |
+
|
302 |
+
#cpsw-payment-request-wrapper.cart .cpsw-express-google_pay .cpsw-express-checkout-button-icon {
|
303 |
+
margin: 0 -1px -5px 7px;
|
304 |
+
}
|
305 |
+
|
306 |
+
.cpsw-payment-request-custom-button-admin .cpsw-payment-request-custom-button-render,
|
307 |
+
#cpsw-payment-request-wrapper.cart,
|
308 |
+
#cpsw-payment-request-wrapper.cart .cpsw-payment-request-custom-button-render,
|
309 |
+
#cpsw-payment-request-wrapper.checkout {
|
310 |
+
width: 100%;
|
311 |
+
}
|
312 |
+
|
313 |
+
#cpsw-payment-request-wrapper.cpsw-product.below,
|
314 |
+
#cpsw-payment-request-wrapper.cpsw-product.above {
|
315 |
+
float: left;
|
316 |
+
overflow: visible;
|
317 |
+
}
|
318 |
+
|
319 |
+
#cpsw-payment-request-wrapper.cpsw-product.inline {
|
320 |
+
overflow: visible;
|
321 |
+
}
|
322 |
+
|
323 |
+
#cpsw-payment-request-wrapper.checkout.center #cpsw-payment-request-custom-button {
|
324 |
+
text-align: center;
|
325 |
+
}
|
326 |
+
|
327 |
+
#cpsw-payment-request-wrapper.cpsw-product.above::after,
|
328 |
+
#cpsw-payment-request-wrapper.cpsw-product.above .cpsw-payment-request-button-wrapper::after {
|
329 |
+
content: "";
|
330 |
+
display: table;
|
331 |
+
clear: both;
|
332 |
+
}
|
333 |
+
|
334 |
+
#cpsw-payment-request-wrapper .cpsw-payment-request-custom-button-render {
|
335 |
+
margin-top: 0;
|
336 |
+
margin-bottom: 0;
|
337 |
+
}
|
338 |
+
|
339 |
+
@keyframes cpsw_shine {
|
340 |
+
|
341 |
+
0% {
|
342 |
+
transform: translateX(-100%);
|
343 |
+
}
|
344 |
+
|
345 |
+
100% {
|
346 |
+
transform: translateX(50%);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
@media only screen and (max-width: 600px) {
|
351 |
+
|
352 |
+
#cpsw-payment-request-wrapper.cpsw-product.sticky .cpsw-payment-request-custom-button-render,
|
353 |
+
#cpsw-payment-request-wrapper.cpsw-product.sticky .cpsw-payment-request-button-wrapper {
|
354 |
+
width: 100% !important;
|
355 |
+
}
|
356 |
+
|
357 |
+
#cpsw-payment-request-wrapper.cpsw-product.sticky #cpsw-payment-request-separator {
|
358 |
+
display: none !important;
|
359 |
+
}
|
360 |
+
|
361 |
+
#cpsw-payment-request-wrapper.sticky .cpsw-payment-request-custom-button-render {
|
362 |
+
margin-top: 0 !important;
|
363 |
+
margin-bottom: 0 !important;
|
364 |
+
}
|
365 |
+
}
|
assets/css/stripe-elements.css
CHANGED
@@ -8,9 +8,38 @@
|
|
8 |
color: #f00;
|
9 |
}
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
.cpsw-save-cards {
|
12 |
-
margin-top:
|
13 |
-
padding:
|
14 |
display: block;
|
15 |
}
|
16 |
|
@@ -20,6 +49,7 @@
|
|
20 |
|
21 |
.cpsw-stripe-elements-form {
|
22 |
display: none;
|
|
|
23 |
}
|
24 |
|
25 |
.cpsw-stripe-info {
|
@@ -35,14 +65,9 @@
|
|
35 |
cursor: not-allowed;
|
36 |
}
|
37 |
|
38 |
-
.cpsw_stripe_ideal_form .cpsw_stripe_ideal_select
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
#cpsw-payment-request-button {
|
43 |
-
max-width: 100%;
|
44 |
-
border-radius: 3px;
|
45 |
-
box-shadow: 0 1px 2px rgb(0 0 0 / 50%);
|
46 |
}
|
47 |
|
48 |
#cpsw-payment-request-wrapper {
|
@@ -66,7 +91,7 @@
|
|
66 |
text-align: right;
|
67 |
}
|
68 |
|
69 |
-
#cpsw-payment-request-wrapper.checkout.right #cpsw-payment-request-button {
|
70 |
float: right;
|
71 |
}
|
72 |
|
@@ -85,7 +110,7 @@
|
|
85 |
display: none;
|
86 |
}
|
87 |
|
88 |
-
#cpsw-payment-request-separator.product {
|
89 |
padding: 0.5em 0;
|
90 |
}
|
91 |
|
@@ -94,7 +119,7 @@
|
|
94 |
margin-bottom: 0.5em;
|
95 |
}
|
96 |
|
97 |
-
#cpsw-payment-request-wrapper.checkout #cpsw-payment-request-button {
|
98 |
margin-top: 5px;
|
99 |
}
|
100 |
|
@@ -102,28 +127,32 @@
|
|
102 |
margin-bottom: 1em;
|
103 |
}
|
104 |
|
105 |
-
#cpsw-payment-request-wrapper.product.above .cpsw-payment-request-button-wrapper {
|
106 |
display: block;
|
107 |
padding-top: 1.5em;
|
108 |
}
|
109 |
|
110 |
-
#cpsw-payment-request-wrapper.product
|
|
|
|
|
|
|
|
|
111 |
#cpsw-payment-request-wrapper.cart #cpsw-payment-request-title {
|
112 |
display: none;
|
113 |
}
|
114 |
|
115 |
-
#cpsw-payment-request-wrapper.product #cpsw-payment-request-tagline,
|
116 |
#cpsw-payment-request-wrapper.cart #cpsw-payment-request-tagline {
|
117 |
display: none;
|
118 |
}
|
119 |
|
120 |
@media only screen and (max-width: 600px) {
|
121 |
|
122 |
-
#cpsw-payment-request-wrapper.product.above.sticky .cpsw-payment-request-button-wrapper {
|
123 |
padding-top: 0;
|
124 |
}
|
125 |
|
126 |
-
#cpsw-payment-request-wrapper.product.sticky {
|
127 |
position: fixed;
|
128 |
bottom: 0;
|
129 |
left: 0;
|
@@ -136,15 +165,15 @@
|
|
136 |
background-color: #88888880;
|
137 |
}
|
138 |
|
139 |
-
#cpsw-payment-request-wrapper.product.sticky #cpsw-payment-request-separator {
|
140 |
display: none;
|
141 |
}
|
142 |
|
143 |
-
#cpsw-payment-request-wrapper.product #cpsw-payment-request-title {
|
144 |
display: none;
|
145 |
}
|
146 |
|
147 |
-
#cpsw-payment-request-wrapper.product #cpsw-payment-request-tagline {
|
148 |
display: none;
|
149 |
}
|
150 |
}
|
8 |
color: #f00;
|
9 |
}
|
10 |
|
11 |
+
.cpsw_stripe_icons {
|
12 |
+
display: inline-block;
|
13 |
+
}
|
14 |
+
|
15 |
+
.cpsw_stripe_test_description,
|
16 |
+
.cpsw-test-description {
|
17 |
+
font-size: 0.9em;
|
18 |
+
clear: both;
|
19 |
+
}
|
20 |
+
|
21 |
+
.cpsw-expiry-wrapper {
|
22 |
+
width: 49%;
|
23 |
+
display: inline-block;
|
24 |
+
vertical-align: top;
|
25 |
+
}
|
26 |
+
|
27 |
+
.cpsw-cvc-wrapper {
|
28 |
+
width: 49%;
|
29 |
+
display: inline-block;
|
30 |
+
vertical-align: top;
|
31 |
+
float: right;
|
32 |
+
}
|
33 |
+
|
34 |
+
.cpsw-number-error {
|
35 |
+
margin-bottom: 0.5em;
|
36 |
+
display: block;
|
37 |
+
}
|
38 |
+
|
39 |
+
#cpsw-save-cards_field,
|
40 |
.cpsw-save-cards {
|
41 |
+
margin-top: 1em;
|
42 |
+
padding: 3px;
|
43 |
display: block;
|
44 |
}
|
45 |
|
49 |
|
50 |
.cpsw-stripe-elements-form {
|
51 |
display: none;
|
52 |
+
margin-bottom: 0.5em;
|
53 |
}
|
54 |
|
55 |
.cpsw-stripe-info {
|
65 |
cursor: not-allowed;
|
66 |
}
|
67 |
|
68 |
+
.cpsw_stripe_ideal_form .cpsw_stripe_ideal_select,
|
69 |
+
.cpsw_stripe_p24_form .cpsw_stripe_p24_select {
|
70 |
+
margin: 0.5em 0;
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
#cpsw-payment-request-wrapper {
|
91 |
text-align: right;
|
92 |
}
|
93 |
|
94 |
+
#cpsw-payment-request-wrapper.checkout.right #cpsw-payment-request-custom-button {
|
95 |
float: right;
|
96 |
}
|
97 |
|
110 |
display: none;
|
111 |
}
|
112 |
|
113 |
+
#cpsw-payment-request-separator.cpsw-product {
|
114 |
padding: 0.5em 0;
|
115 |
}
|
116 |
|
119 |
margin-bottom: 0.5em;
|
120 |
}
|
121 |
|
122 |
+
#cpsw-payment-request-wrapper.checkout #cpsw-payment-request-custom-button {
|
123 |
margin-top: 5px;
|
124 |
}
|
125 |
|
127 |
margin-bottom: 1em;
|
128 |
}
|
129 |
|
130 |
+
#cpsw-payment-request-wrapper.cpsw-product.above .cpsw-payment-request-button-wrapper {
|
131 |
display: block;
|
132 |
padding-top: 1.5em;
|
133 |
}
|
134 |
|
135 |
+
#cpsw-payment-request-wrapper.cpsw-product.inline {
|
136 |
+
display: inline-block;
|
137 |
+
}
|
138 |
+
|
139 |
+
#cpsw-payment-request-wrapper.cpsw-product #cpsw-payment-request-title,
|
140 |
#cpsw-payment-request-wrapper.cart #cpsw-payment-request-title {
|
141 |
display: none;
|
142 |
}
|
143 |
|
144 |
+
#cpsw-payment-request-wrapper.cpsw-product #cpsw-payment-request-tagline,
|
145 |
#cpsw-payment-request-wrapper.cart #cpsw-payment-request-tagline {
|
146 |
display: none;
|
147 |
}
|
148 |
|
149 |
@media only screen and (max-width: 600px) {
|
150 |
|
151 |
+
#cpsw-payment-request-wrapper.cpsw-product.above.sticky .cpsw-payment-request-button-wrapper {
|
152 |
padding-top: 0;
|
153 |
}
|
154 |
|
155 |
+
#cpsw-payment-request-wrapper.cpsw-product.sticky {
|
156 |
position: fixed;
|
157 |
bottom: 0;
|
158 |
left: 0;
|
165 |
background-color: #88888880;
|
166 |
}
|
167 |
|
168 |
+
#cpsw-payment-request-wrapper.cpsw-product.sticky #cpsw-payment-request-separator {
|
169 |
display: none;
|
170 |
}
|
171 |
|
172 |
+
#cpsw-payment-request-wrapper.cpsw-product #cpsw-payment-request-title {
|
173 |
display: none;
|
174 |
}
|
175 |
|
176 |
+
#cpsw-payment-request-wrapper.cpsw-product #cpsw-payment-request-tagline {
|
177 |
display: none;
|
178 |
}
|
179 |
}
|
assets/icon/apple-pay-gray.svg
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 216.3 86.8" style="enable-background:new 0 0 216.3 86.8;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#333333;}
|
7 |
+
.st1{fill:#333333;}
|
8 |
+
</style>
|
9 |
+
<path class="st0" d="M31.4,6.1C36,0,42.4,0,42.4,0s0.9,5.7-3.6,11.2C33.9,17,28.4,16,28.4,16S27.3,11.5,31.4,6.1z M16.8,17
|
10 |
+
C8.7,17,0,24.3,0,38.1c0,14.1,10.2,31.7,18.4,31.7c2.8,0,7.2-2.9,11.6-2.9c4.3,0,7.5,2.7,11.5,2.7c8.9,0,15.5-18.5,15.5-18.5
|
11 |
+
s-9.4-3.6-9.4-14.2c0-9.4,7.6-13.2,7.6-13.2s-3.9-7-13.7-7c-5.7,0-10.1,3.2-12.4,3.2C26.2,20,22.1,17,16.8,17z"/>
|
12 |
+
<g>
|
13 |
+
<path class="st1" d="M101,4.8c12.3,0,21,8.5,21,20.9c0,12.4-8.8,21-21.3,21H86v21.7h-9.9V4.8H101z M86,38.4h12.4
|
14 |
+
c8.5,0,13.5-4.6,13.5-12.6S107,13.1,98.4,13.1H86V38.4z"/>
|
15 |
+
<path class="st1" d="M123.9,54.7c0-8.4,6.5-13.2,18.3-14l12.9-0.7v-3.7c0-5.5-3.7-8.5-10-8.5c-5.2,0-9,2.7-9.8,6.8h-8.9
|
16 |
+
c0.3-8.5,8.3-14.7,19-14.7c11.7,0,19.2,6.2,19.2,15.6v32.8h-9.1v-8h-0.2c-2.6,5.2-8.6,8.5-15.1,8.5
|
17 |
+
C130.5,68.9,123.9,63.2,123.9,54.7z M155.1,50.4v-3.7l-11.6,0.8c-6.5,0.4-9.9,2.8-9.9,7.1c0,4.1,3.6,6.7,9.1,6.7
|
18 |
+
C149.7,61.2,155.1,56.7,155.1,50.4z"/>
|
19 |
+
<path class="st1" d="M175,85.5v-7.8c0.7,0.2,2.2,0.2,3,0.2c4.5,0,7.1-1.9,8.7-7l0.7-2.5l-17.4-48h10.3l12.3,39.1h0.2l12.3-39.1h10
|
20 |
+
l-17.9,50.1c-4.1,11.5-8.6,15.2-18.4,15.2C178.1,85.8,175.8,85.6,175,85.5z"/>
|
21 |
+
</g>
|
22 |
+
</svg>
|
assets/icon/apple-pay-light.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 301" width="700" height="301"><defs><image width="684" height="281" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqwAAAEZCAYAAABSLXdrAAAA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JgDwL1qfgc1RXYAyNzpGIiIiIBEIeBattp/og4xLGXoxPM0ZBr/5FREREBLEF613wrVRXZ8wJNf4XERERkd5YJI5lXMp4t4SC1Fb1v8C4Fd4z9RjG9q0CVXNSRURERGTiWDgOZYxhLMVYi/Elxi6MfRlHMI5nnME4j3ER4zLG5a3/vJhxPuNMxomtf35vxk6MDRnLwp/g2tPT6RjDo8crfft/X56prRefvxEAAAAASUVORK5CYII="/></defs><style></style><use href="#img1" x="10" y="7" /></svg>
|
assets/icon/bancontact.svg
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
width="256px" height="160px" viewBox="36 36 256 160" style="enable-background:new 0 0 326.1 230.5;" xml:space="preserve"
|
5 |
+
>
|
6 |
+
<style type="text/css">
|
7 |
+
.st0{fill:#FFFFFF;}
|
8 |
+
.st1{fill:#005498;}
|
9 |
+
.st2{fill:#FFD800;}
|
10 |
+
.st3{fill:none;}
|
11 |
+
</style>
|
12 |
+
<g>
|
13 |
+
<path class="st0" d="M326.1,210.7c0,10.9-8.9,19.8-19.8,19.8H19.9c-10.9,0-19.8-8.9-19.8-19.8V19.8C0.1,8.9,9,0,19.9,0h286.4
|
14 |
+
c10.9,0,19.8,8.9,19.8,19.8L326.1,210.7L326.1,210.7z"/>
|
15 |
+
</g>
|
16 |
+
<g>
|
17 |
+
<path class="st1" d="M262,64.4h-11.8h-54.6h-11.9l-8,9l-25.8,29.1l0,0l-8,9h-11.8H76.5H64.7l7.8-9.1l3.7-4.3L84,89H72.2H57h-8.5
|
18 |
+
c-6.5,0-11.8,5.5-11.8,12.1l0,0v23.4v2.2c0,6.7,5.3,12.1,11.8,12.1h3.3h124h8.9c6.5,0,15.4-4,19.7-9l20.6-23.4L262,64.4z"/>
|
19 |
+
<path class="st2" d="M277.7,37.1c6.5,0,11.8,5.5,11.8,12.1v25.5c0,6.7-5.3,12.1-11.8,12.1h-6.4h-17.2h-11.8l7.9-9l0,0l3.9-4.5
|
20 |
+
l7.9-9h-78.3l-41.7,47H64.3l55.7-63l2.1-2.4c4.4-4.9,13.3-9,19.8-9h2.7h133.1V37.1z"/>
|
21 |
+
</g>
|
22 |
+
<path class="st1" d="M289.5,192.4v-3.7c0-0.5-0.3-0.8-1-0.8h-2.4c-0.7,0-1.2-0.1-1.3-0.4c-0.2-0.3-0.2-0.9-0.2-1.9v-14h3.9
|
23 |
+
c0.3,0,0.5-0.1,0.7-0.3s0.3-0.4,0.3-0.7v-3.9c0-0.3-0.1-0.5-0.3-0.7c-0.2-0.2-0.4-0.3-0.7-0.3h-3.9v-5.1c0-0.3-0.1-0.5-0.2-0.6
|
24 |
+
c-0.2-0.1-0.4-0.2-0.6-0.2h-0.1l-5.8,1c-0.3,0.1-0.5,0.2-0.7,0.3c-0.2,0.2-0.3,0.4-0.3,0.6v3.9H273c-0.3,0-0.5,0.1-0.7,0.3
|
25 |
+
s-0.3,0.4-0.3,0.7v3.2c0,0.3,0.1,0.5,0.3,0.6c0.2,0.2,0.4,0.3,0.7,0.4l3.9,0.6v14c0,1.7,0.2,3.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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:svg="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1007 632">
|
3 |
+
<g id="#2d5b99ff" fill="#2d5b99">
|
4 |
+
<path d="m1 44.93c0.24-21.42 19.53-40.52 40.93-40.68 304.69-0.03 609.37 0.41 914.06-0.17 11.94-0.24 24.32 3.46 32.96 12 8.26 7.98 13.05 19.44 13.05 30.92 0 180.66-0.2 361.33 0 541.99 0.2 15.43-9.42 29.93-22.75 37.25-4.14 2.58-9.07 3.36-13.29 5.76h-927.59c-1.97-0.93-4.01-1.7-6.12-2.25-16.35-4.71-29.61-19.65-31.24-36.74-0.03-182.68 0.04-365.39-0.01-548.08m628.01 22.24c0.16 20.93-0.55 41.88 0.4 62.8 4.55 0.1 9.1 0.03 13.65 0.02-0.01-6.59-0.41-13.26 1.15-19.73 5.67 5.76 9.03 13.22 13.58 19.8 5.59-0.1 11.18 0 16.77-0.15-5.77-8.54-11.53-17.09-17.13-25.74 5.27-6.4 10.64-12.74 15.54-19.44-5.58-0.02-11.16 0.01-16.73 0.25-4.18 5.83-8.47 11.58-13.05 17.09-0.21-11.63-0.07-23.26-0.07-34.89-4.71 0-9.41 0-14.11-0.01m-152.13 2.83c-0.04 20-0.07 40-0.1 60 11.1-0.29 22.29 0.84 33.32-0.88 10.15-1.42 17.71-12.76 14.31-22.63-1.23-4.96-6.16-7.34-10.31-9.48 5.97-4.52 9.21-13.48 5.13-20.24-2.86-4.96-9.02-5.81-14.16-6.58-9.38-0.88-18.8 0.14-28.19-0.19m222.98 0c0 20-0.01 40-0.05 60 4.61 0 9.23 0.02 13.86-0.03-0.02-13.67-0.2-27.33 0.06-41 8.49 13.22 15.26 27.44 23.23 40.96 4.7 0.09 9.4 0.08 14.1 0.1 0.56-20.01 0.22-40.02 0.21-60.03-4.47-0.02-8.93-0.04-13.39-0.06-0.19 11.08 0.12 22.16-0.46 33.23-6.93-10.61-12.63-21.99-18.77-33.07-6.26-0.21-12.53-0.06-18.79-0.1m-168.29 15.37c-0.49 3.72-0.72 7.46-0.87 11.2 6.24-1.8 12.82-4.65 19.39-2.91 3.2 0.72 5.3 3.44 6.62 6.27-8.15 1.16-17.18 0.64-24.2 5.63-5.14 3.57-6.13 10.88-4.37 16.51 1.7 5.92 7.88 10.07 13.99 9.63 4.82-0.28 8.94-3.11 12.94-5.54 0.7 1.3 1.41 2.6 2.13 3.91 4.18-0.01 8.36-0.04 12.54-0.1-0.17-11.3 0.4-22.61-0.23-33.9-0.26-5.61-5.09-9.96-10.25-11.38-9.06-2.43-18.68-1.57-27.69 0.68m290.5 3.95c0.05-1.5 0.11-3 0.18-4.5-4.67 0.01-9.33 0-14 0.1 0.03 15.01-0.18 30.01 0.23 45.02 4.58 0.13 9.17 0.02 13.76-0.03 0.08-10.94 0.02-21.88-0.07-32.82 2.57-0.84 5.14-1.79 7.87-2.04 2.21-0.2 4.47 1.46 4.64 3.74 1.44 10.31 0.35 20.73 0.68 31.08 4.74-0.03 9.49 0.01 14.24-0.22-0.26-10.86-0.11-21.71-0.21-32.57 2.84-0.95 5.72-2.14 8.77-2.02 2.45 0.17 3.89 2.65 3.88 4.92 0.98 9.91 0.16 19.9 0.39 29.84 4.71-0.03 9.42-0.11 14.14-0.16-0.17-9.56 0.04-19.12-0.09-28.68-0.19-4.08-0.16-8.49-2.55-12.01-2.08-3.46-5.98-5.59-10.01-5.54-6.1-0.45-10.97 3.81-15.63 7.11-3.04-3.23-6.42-7.2-11.28-7.11-5.67-0.59-10.39 3.08-14.94 5.89m-229.5-0.2c-0.14-1.48-0.29-2.96-0.43-4.44-4.57-0.01-9.14 0.04-13.71-0.06-0.24 15.11 0.01 30.23-0.1 45.35 4.72 0.07 9.44 0.04 14.17 0.04 0.05-11.11-0.15-22.23 0.07-33.34 4.26-1.02 8.73-1.69 13.01-0.34 1.52 11.16 1.09 22.45 1.11 33.68 4.64 0 9.28 0.07 13.92-0.08 0.44-11.45 0.94-22.96-0.23-34.39-0.51-6.31-5.76-12.29-12.38-12.12-5.81-0.75-10.85 2.64-15.43 5.7m168.77-3.65c-0.03 3.52-0.07 7.04-0.12 10.56 6.15-1.43 12.48-3.98 18.85-2.5 3.31 0.69 5.49 3.46 6.89 6.34-8.39 1.42-17.85 0.71-24.89 6.3-7.89 6.44-5.38 21.1 4.3 24.41 6.93 3 13.96-1.27 19.6-5.05 0 1.45 0.02 2.9 0.04 4.35 4.61-0.01 9.22 0 13.83-0.01-0.28-11 0.26-22-0.25-33-0.08-5.5-4.32-10.45-9.53-11.9-9.39-2.66-19.32-1.46-28.72 0.5m129.45 2.22c-11.84 9.03-12.59 29.87-0.25 38.79 10.54 6.79 24.08 5.27 35.35 1.18 0.18-3.95 0.1-7.91 0.11-11.87-7.16 3.89-15.85 7.61-23.9 4.16-4.25-1.44-5.6-6.11-6.83-9.93 10.57-0.01 21.14 0.01 31.71-0.02-0.5-6.41 0.04-13.51-3.92-19.01-3.68-5.55-10.65-7.78-17.05-7.57-5.28 0.18-10.9 0.96-15.22 4.27m-784.24 104.26c0.37 18.43-0.62 36.87 0.48 55.28 15.24-0.22 30.48-0.22 45.71-0.24 1.89-3.14 4.3-5.94 6.14-9.09 1.06-3.05 1.3-6.32 2.55-9.3 0.08 3.11 0.28 6.24 0.09 9.36-1.64 3.6-4.85 6.29-6.46 9.93 0.3 7.51 2.42 14.8 5.35 21.68 9.24 9.98 25.59 11.67 37.22 5 12.43-7.55 15.61-26.87 5.38-37.53 0.07-2.51 0.04-5.03-0.2-7.53 3.11-3.47 4.73-7.93 6.93-11.98 2.74 0.25 5.49 0.43 8.25 0.57 13.18 0.4 26.37 0 39.55-0.24-0.09-10.25 1.1-20.69-1.17-30.79-2.61-7.96-9.88-14.81-18.59-14.8-36.6-0.32-73.21 0-109.81-0.09-10.82-0.4-21.2 8.81-21.42 19.77m103.52 27.6c-2.03 5.05-5.58 9.82-5.36 15.49 1.78 4.36 4.99 7.93 7.55 11.84 15.05-0.2 30.1-0.36 45.16-0.46 0.03-8.82 0.04-17.65-0.1-26.47-15.75-0.05-31.5-0.34-47.25-0.4m-103.52 29.52c-0.04 8.95-0.05 17.9-0.07 26.86 19.25 0.55 38.88-2.26 57.76 2.71-8.27-7.22-12.42-18.38-11.71-29.25-15.33 0.16-30.66-0.36-45.98-0.32m103.44 16.92c-1.96 5.19-6.36 8.79-9.95 12.82 7.68-0.9 15.14-3.42 22.92-3.46 11.52-0.09 23.05 0.17 34.56-0.34-0.09-8.18-0.13-16.35-0.03-24.53-14.88-0.02-29.77 0.19-44.63-0.82-0.68 5.47-0.94 11.1-2.87 16.33m-103.82 13.53c2.71 6.87 7.27 14.06 14.88 16.02 7.74 1.68 15.81 1.17 23.63 0.32 11.1 2 22.42 0.42 33.62 0.54-0.01-4.85 0.14-9.7 0.19-14.54-8.29-0.33-16.6-0.16-24.86-0.92l1.11-0.76c-16.17-1.02-32.38-0.72-48.57-0.66m80.35 2.37c0.01 4.73 0.13 9.47 0.63 14.19 16.93 0.83 33.9 0.41 50.84 0.27 9.4-0.23 16.73-8.12 19.4-16.64-14.43 0.47-28.94-0.97-43.31 0.8-9.04 2.08-18.36 1.61-27.56 1.38m204.55 65.46c0.51 3.35 1.33 6.7 3.16 9.6 5.41-6.73 14.67-3.21 21.99-3.84 0.39 3.59 0.82 7.18 1.25 10.78-4.3 3.61-8.67 7.16-12.71 11.05-0.62 3.61-0.17 7.39-0.46 11.06-0.08 3.65 0.33 8.69 4.29 10.22 0.65-5.9 0.86-11.83 0.82-17.75 5.63-4.51 13.98-9.4 12.33-17.9 0.17-4.38 0.29-8.76 0.1-13.14-10.26 0.2-20.51 0.12-30.77-0.08m126.92 0.27c0.03 7.02-0.18 14.04 0.43 21.04 7.96 0.45 15.94 0.31 23.9-0.07 0.13 4.71 0.19 9.44 0.61 14.14-2.17 3.89-2.41 8.47-3.54 12.72 2.76 0.37 5.54 0.54 8.32 0.53 1.51-16.07 0.74-32.23 0.61-48.34-10.1-0.78-20.23-0.44-30.33-0.02m216.22 0.01c-0.06 6.39-0.38 12.8 0.11 19.18 0.01 2.46 0 4.91-0.08 7.37 5.94 0.3 11.94-0.11 17.82 0.98-0.33 4.93 1.32 10.42-1.09 14.96-8.32 2.15-16.59-1.08-24.66-2.7 1.46 3.42 4.31 6.17 7.9 7.27 7.08 2.29 14.62 0.8 21.91 1.05 1.31-7.24 1.79-14.67 1.21-22-0.04-1.29-0.07-2.57-0.08-3.84-5.95-0.74-11.93-1.11-17.91-1.38 0.03-5.18 0.07-10.35 0.15-15.52 5.53-0.11 11.07 0.09 16.61-0.02 1.04 0.13 1.73-0.3 2.07-1.27l-0.73 0.2c-0.21-0.89-0.61-2.66-0.81-3.55-7.47-0.43-14.97-0.13-22.42-0.73m39.27-0.88c-0.68 7.7-0.72 15.48 0.06 23.18-0.16 2.96-0.19 5.92-0.21 8.89 5.62-0.16 11.26-0.42 16.88 0.08 4.63 4.97-0.63 12.97 4.45 17.64 0.34-5.19 0.15-10.39 0-15.58 0.7-0.76 1.39-1.53 2.07-2.3 2.41-2.35-1.76-4.95-2.13-7.51 1.36-4.94 1.78-10.18 1.49-15.29-0.07-2.43-3.17-2.59-4.76-3.5 0.02 7 0.75 13.97 0.84 20.97l-0.66-0.08c-3.77 3.42-9.14 2.43-13.79 2.75 0.3-9.22 0.54-18.45 0.63-27.67-0.46 0.16-1.37 0.47-1.83 0.63-1.02-0.76-2.02-1.49-3.04-2.21m-546.21 32.67c6.09 0.06 12.19 0.14 18.29 0.06 0.68 4.46-0.85 9.05 0.45 13.44 0.47 1.97 2.42 2.84 4.09 3.62 0.27-5.19 0.29-10.39 0.12-15.59 1.27-1.35 2.56-2.68 3.85-4.01-1.51-1.24-3.03-2.47-4.56-3.67-0.29-7.13 0.83-14.7-1.77-21.48-2.72 7.32-1.13 15.22-2.26 22.78-4.6-0.05-9.2 0.12-13.8-0.13 0.06-8.39 0.09-16.79 0.21-25.19-1.46-0.65-2.92-1.32-4.37-1.97-0.09 10.72 0.13 21.43-0.25 32.14m87.76-30.99c-0.14 8.57 0.08 17.14-0.35 25.71 6.05 0.03 12.11-0.07 18.16-0.02 0.07 5.33 0.1 10.66 0.13 15.99-8.77 1.07-17.79 0.3-26.03-3 1.57 3.86 4.8 7.05 8.99 7.86 6.8 1.36 13.79 0.32 20.65-0.08 1.47-8.25 1.59-16.81-0.21-25.02-5.75-0.12-11.49-0.44-17.24-0.27-0.82-5.56-1.17-11.19-1.16-16.81 6.31-0.15 12.63-0.28 18.93 0.14 0-1.49 0-2.97 0.01-4.45-7.29 0.03-14.59 0.05-21.88-0.05m35.38-0.24c0.61 15.6-1.49 31.24 0.43 46.79 9.46 0.78 18.94 0.06 28.41 0.18 0.44-6.6 0.34-13.23 0.59-19.84-8.33-1.2-16.75-0.78-25.13-0.84-0.01-6.78-0.17-13.54-0.18-20.31 1.28-1.7 2.55-3.39 3.81-5.09-2.64-0.35-5.28-0.64-7.93-0.89m89.9 0.23c0.08 6.58 0.04 13.17-0.3 19.74-1.84 0.8-3.67 1.59-5.51 2.37-1.27 6.99-0.6 14.11-0.4 21.16 1.12 1 2.24 2.01 3.35 3.03 8.02 0.1 16.03-0.01 24.05 0.2 2.35-8 2.33-16.41 1.76-24.66-2.05-0.21-4.09-0.41-6.13-0.6-0.19-6.95-0.36-13.9-0.06-20.84-5.58-0.37-11.17-0.32-16.76-0.4m126.11-0.42c0.06 6.57 0.11 13.15-0.07 19.73-1.96 0.93-3.9 1.91-5.82 2.92-0.61 5.48-0.49 10.99-0.66 16.5 0.5 3.01 0.5 7.96 4.49 8.37 8.03 0.27 16.28 1.36 24.17-0.68 1.77-7.81 2.56-15.98 0.66-23.85l0.02-0.6c-1.75-0.39-3.49-0.77-5.24-1.15-1.82-6.78-1.19-13.82-1.26-20.75-5.44 0.05-10.87-0.11-16.29-0.49m35.47-0.31c0.28 2.67 0.59 5.33 0.91 7.99 7.31-4.23 15.96-3.03 24.01-2.86-0.18 3.74 0.3 7.63-0.67 11.27-3.12 4.26-7.68 7.12-11.49 10.7 0.13 3.06 0.23 6.11 0.39 9.17-0.75 3.96-0.72 8.08-0.23 12.08 1.62-0.35 3.25-0.69 4.87-1.06-0.12-5.75 0.31-11.48 0.2-17.23 3.6-3.77 9.3-5.7 11.31-10.86 0.99-6.14 0-12.39-0.51-18.54-9.6 0.12-19.23 0.43-28.79-0.66m42.11-0.32c0.08 11.26-0.32 22.52 0.35 33.76-0.47 3.58-1.21 7.23-0.61 10.85 0.39 1.58 1.35 3.71 3.31 3.61 8.67 0.58 17.37 0.1 26.06 0.25 0.56-6.09 0.4-12.23 0.07-18.33-0.58 0.09-1.74 0.27-2.32 0.36 1.35-0.37 2.64-0.92 3.96-1.42-8.47-2.64-17.41-1.84-26.14-1.98 0.08-6.18 0.09-12.37 0.08-18.55-0.16-2.79 2.33-4.65 3.66-6.85-2.8-0.63-5.61-1.19-8.42-1.7m167.19 0.3c0.67 1.43 1.37 2.87 2.05 4.32 7.73 1.77 15.67 0.66 23.5 0.62-0.02 1.86-0.28 3.75 0.01 5.6-0.97 3.83-1.32 7.78-2.26 11.62-5.51-0.11-11.02-0.4-16.52-0.63 0.45 1.58 0.91 3.16 1.39 4.75 4.57 0.07 9.4 0.57 13.77-1.13 3.9 4.81 3.89 11.3 2.72 17.08-7.93 1.33-15.97 0.47-23.94 0.06 0.26 1.97 0.57 3.94 0.96 5.89 9.04-0.05 18.08-0.01 27.12 0.01 1.92-8.46 2.34-17.47-0.2-25.86l0.81-0.34c0.2-1.92 0.38-3.84 0.55-5.76-0.11-5.01-0.1-10.01-0.16-15.02-9.87-1.43-19.87-1.15-29.8-1.21m41.86-0.01c0.64 1.48 1.31 2.98 1.96 4.47 7.74 1.45 15.61 0.59 23.43 0.58 0.26 4.68 0.48 9.37 0.62 14.05-7.37 5.2-16.66 1.19-24.87 2.02-0.11 9.01-0.26 18.03-0.04 27.04 9.87-0.02 19.74 0.06 29.61-0.04-0.66-1.79-1.32-3.58-1.99-5.37-7.71 0.09-15.43 0.06-23.14 0-0.45-5.07-0.12-10.17-0.33-15.25 7.86-0.38 15.74-0.02 23.61-0.2 0.56-3.67 0.91-7.37 1.15-11.08 0-5.07-0.18-10.15-0.61-15.2-9.77-1.08-19.59-0.96-29.4-1.02m-756.07 1.13c2.88 4.93 9.21 3.88 14.02 4.28-0.13 12.46 0.09 24.92-0.48 37.37-4.49 0.02-8.99 0.04-13.48 0.09 0.9 1.57 1.84 3.11 2.82 4.63 9.14 0.68 18.32 0.24 27.48 0.34 0.3-6.41 0.14-12.82 0.22-19.23-1.38-0.75-2.76-1.49-4.14-2.23-0.3 5.48-0.34 10.97-0.9 16.44-2.44 0.03-4.89 0.07-7.33 0.11-0.16-14.03-0.19-28.06-0.11-42.09-6.04 0.02-12.08-0.17-18.1 0.29m41.97-0.01c1.13 1.19 2.05 2.68 3.49 3.55 7.61 0.63 15.28 0.05 22.91 0.5-0.07 5.45-0.33 10.89-0.52 16.34-8.04 1.08-16.16 0.51-24.24 0.53-0.45 8.61-0.85 17.24-0.56 25.86 9.8-0.17 19.61 0.15 29.41-0.27 0.03-1.54 0.05-3.08 0.06-4.61-8.27-0.4-16.56 0-24.83-0.26-0.03-5.48-0.18-10.95-0.24-16.43 7.65 0.05 15.3-0.04 22.95 0.14 2.45-8.22 2.55-17.06 0.51-25.37-9.64-0.14-19.3-0.55-28.94 0.02m41.48 0.56c7.72 6.02 17.89 2.39 26.78 3.29-0.57 5.68 1.38 12.24-2.83 16.91-5.87 0.07-11.74 0.1-17.6 0.41 4.44 6.76 13.35 3.4 19.99 4.24 0.06 5.42 0.07 10.84-0.21 16.25-8.57 0.04-17.14 0-25.71 0.06 0.79 1.43 1.47 2.96 2.59 4.17 1.33 0.86 3.08 0.62 4.61 0.82 7.4 0.18 14.81 0.07 22.21-0.24 1.95-7.67 1.28-15.6 0.17-23.33 0.31-7.59 1.16-15.2 0.65-22.82-10.21-0.58-20.49-1.2-30.65 0.24m-65.36 71.3c2.97-0.42 5.9-1.33 8.92-1.28 2.25 0.04 3.99 2.42 3.43 4.59-1.31 6.55-7.07 10.66-11.33 15.31-0.06 1.17-0.12 2.34-0.18 3.52 5.77 0.1 11.55 0.06 17.31-0.33-3.11-3.96-8.81-2.16-13.15-2.77 3.22-3.94 7.43-7.14 9.75-11.75 1.32-2.65 1.93-6.13-0.02-8.63-3.58-4.79-12.02-4.05-14.73 1.34m19.56-0.59c4.19 0.39 10.28-2.84 12.97 1.75-0.12 4.22-4.84 5.58-7.47 8.04 2.27 0.2 4.54 0.39 6.82 0.56 0.3 3.02 1.88 7.3-1.29 9.3-3.72 1.49-7.65-0.57-11.44-0.79 3.34 6.98 15.3 5.85 17.13-1.71 1.16-3.42-1.64-6.25-3.27-8.94 1.54-2.69 4.55-6.31 1.91-9.28-4.01-4.74-11.58-3.17-15.36 1.07m18.83 13.49c4.19 0.25 8.38 0.37 12.57 0.49 0.02 2.9 0.04 5.82 0.05 8.73 0.72 0.01 2.15 0.03 2.87 0.04 0.25-3.79-0.19-8.54 3.76-10.65-1.11-0.61-2.22-1.21-3.32-1.82-0.14-4.87-0.1-9.75-0.35-14.61-6.74 4.35-12.03 10.66-15.58 17.82m-55.75-12.11c1.54 0.75 3.11 1.45 4.7 2.12 0.28 4.66 1.43 9.47 0.16 14.07-0.61 2.26-2.82 3.28-4.72 4.25 4.52 1.46 9.35 1.33 13.99 0.54-1.39-1.64-3.19-2.79-5.25-3.39-0.23-7.5-0.1-15-0.09-22.5-2.91 1.67-5.83 3.31-8.79 4.91m361.24 12.95c-0.86-1.11-1.71-2.22-2.55-3.33-2.29 0.71-3.41 2.82-4.81 4.57-1.63 0.44-2.25-1.51-3.25-2.38 0.54-1.75-2.46-2.78-3.05-1.02-1.68 4.66-2.14 10.42 1.32 14.42 0.35-2.96 0.56-5.94 0.89-8.91 1.17 1.27 2.15 2.69 3.05 4.18 1.15-1.46 2.41-2.82 3.81-4.03 0.29 2.83 0.52 5.66 0.82 8.49 1.11-1.51 2.2-3.05 3.29-4.59 2.84 1.76 5.61 5.58 9.35 3.99 6.57-2.53 6.29-14.05-0.78-15.65-3.49-1.14-5.76 2.36-8.09 4.26m15.93-4.57c0.28 4.79 0.75 9.57 0.7 14.38 0.79-2.8 1.28-5.66 1.72-8.53 2.19 3.53 3.93 7.4 6.89 10.39 0.51-4.97 0.33-9.97 0.42-14.95-0.48 0.19-1.44 0.59-1.92 0.79-0.11 2.09-0.21 4.18-0.34 6.27-3.02-2.26-4.84-5.69-7.47-8.35m10.93 1.24c1.79 0.65 3.99 1.3 4.57 3.39 1.03 3.44 0.38 7.1 0.43 10.64 0.51 0 1.55-0.01 2.06-0.01 0.14-3.95-1.04-8.39 1.16-11.95 1.18-1.94 3.63-1.18 5.5-1.36-0.99 4.8-0.85 9.98 1 14.56 0.36-2.61 0.59-5.24 0.84-7.86 2.09-0.09 4.18-0.18 6.29-0.26 0.04 1.88-0.17 3.81 0.26 5.67 1.35 1.88 3.07 3.47 4.68 5.14 2.08-5.71 2.8-11.97 6.19-17.15 4.15 3.59 4.58 9.29 5.77 14.27 1.16-3.51 1.01-7.42 2.75-10.74 0.71-1.11 2.48-2.8 3.79-1.63 1.47 3.58 0.74 7.58 0.89 11.36 3.08-0.15 6.17-0.23 9.25 0.08-0.1-0.35-0.29-1.05-0.39-1.39-3.18-0.09-7.51-0.62-7.81-4.6 2.74-0.75 5.51-1.34 8.3-1.94-2.95-0.77-6.48-0.63-8.36-3.45 2.86-0.97 5.8-1.69 8.72-2.45-4.24-0.85-8.6-1.65-12.91-0.81-1.35 1.72-2.7 3.42-4.02 5.16-2.24-2.61-4.76-5.04-8.05-6.23-1.81 5.12-2.66 10.53-4.5 15.63-0.61 0.06-1.83 0.17-2.45 0.23-0.09-5.15 0.44-10.47-1.29-15.41-0.45 2.16-0.82 4.34-1.19 6.52-1.83-0.03-3.65-0.05-5.47-0.06-0.37-1.66-0.74-3.3-1.11-4.95-4.76-1.62-10.01-1.12-14.9-0.4m61.77-1.38c-0.99 2.26-1.97 4.53-3.33 6.6 2.05-0.36 4.1-0.05 6.12 0.37-0.88-2.33-1.16-4.99-2.79-6.97m7.09 14.94c0.64 0.01 1.93 0.02 2.57 0.03-0.04-1.94-0.07-3.87-0.09-5.8 2.81 2.24 5.51 4.62 8.45 6.71-1-1.92-2.09-3.79-3.19-5.65 0.75-2.93 1.21-5.92 1.16-8.94-2.72-0.22-5.43-0.44-8.14-0.69-0.59 4.76-0.36 9.57-0.76 14.34m-12.92-1.69c0.38 0.53 0.78 1.07 1.18 1.6 1.5-1.51 3.17-2.86 4.91-4.09 2 1.69 3.66 4.39 6.62 4.25-1.12-2.55-2.36-5.03-3.59-7.52-1.6 0.99-3.2 1.98-4.81 2.95 0.03-0.94 0.07-2.83 0.09-3.77-2.23 1.63-3.02 4.32-4.4 6.58m-210.29 10.95c0.45 4.78 1.78 9.44 3.92 13.74 0.56 0.83 0.71 2.38 2.02 2.3 2.1-5.14 4-10.38 5.35-15.77-2.76 3.34-4.35 7.39-6.36 11.18-1.42-3.91-2.79-7.86-4.93-11.45m41.99 0.68c-0.12 5.17-0.05 10.34-0.02 15.52 3.13-0.14 6.49-0.54 9.03-2.55 2.52-2 2.67-5.8 1.61-8.58-2.16-3.67-6.85-3.91-10.62-4.39m56.42-0.56c0.07 1.17 0.16 2.35 0.25 3.53 3.29 0.01 6.57 0.11 9.86 0.27-0.16 10.07-0.2 20.15-0.77 30.2-3.62-0.01-7.25 0.02-10.85 0.3 6.96 5.74 16.24 1.84 24.3 2.43-0.01-5.09 0.12-10.19 0.16-15.28-1.17 0.04-2.33 0.09-3.49 0.15-0.08 3.68 0.88 7.67-0.83 11.11-1.08 1.96-3.47 2.22-5.45 2.47-0.01-11.72-0.63-23.42-0.49-35.14-4.23-0.15-8.47-0.03-12.69-0.04m78.53 13.44c-4.32 7.99-10.72 15.21-12.08 24.48 9.38-11.49 17.29-24.35 22.42-38.31-5.13 3.11-7.39 8.91-10.34 13.83m-161.12-12.35c-2.04 4.83-3.65 9.83-5.17 14.85 1.81-1.6 3.58-3.24 5.31-4.92 2.6 1.15 5.15 2.42 7.7 3.68-1.9-2.67-2.84-5.78-3.17-9.01-1.22 1.4-2.39 2.84-3.53 4.31-0.8-1.42-1.61-2.83-2.41-4.23 1.56-0.77 3.18-1.45 4.67-2.37 0.56-1.69-2.41-1.51-3.4-2.31m8 13.81c4.82 0.53 9.66 0.77 14.51 0.86-0.65-4.91-0.68-9.88-0.06-14.79-0.98 0-2.93 0.01-3.9 0.01 0.74 4.34 1.37 8.7 1.74 13.1-3.34-0.1-6.67-0.32-9.99-0.65-0.01-4.42 0.35-8.96-1.18-13.2-1.3 4.78-0.8 9.78-1.12 14.67m106.33-13.73c6.08 4.73 14 1.91 20.99 2.32-0.09 4.63-0.05 9.27-0.35 13.9-6.3-0.26-12.62-0.77-18.89 0.06-0.98 6.48-0.4 13.04-0.33 19.56 7.75 0.01 15.5-0.14 23.24-0.62-6.13-3.68-13.54-1.36-20.25-1.92 0.06-4.56 0.16-9.12 0.33-13.68 6.22 0.03 12.43-0.23 18.65-0.21 1.02-6.33 1.19-12.79 0.86-19.19-8.07-0.54-16.18-0.85-24.25-0.22m67.91 15.28c6.29 0.14 12.58 0.11 18.87 0.12-0.07 6.61-0.83 13.19-1.83 19.71 1.76 1.14 3.71 1.91 5.78 2.33 1.54-12.35 1.47-24.83 1.22-37.25-0.52-0.16-1.56-0.49-2.08-0.65-7.32 0.17-14.63 0.06-21.94-0.05-0.09 5.26-0.05 10.53-0.02 15.79m33.32-15.82c-0.12 5.26-0.04 10.53-0.01 15.79 6.36 0.16 12.73 0.03 19.06 0.75l0.16 0.57c-0.97 6.37-1.39 12.82-2.09 19.23 1.79 0.55 3.58 1.06 5.4 1.55 1.47-12.42 1.59-24.98 1.25-37.46-0.5-0.12-1.49-0.36-1.99-0.48-7.26 0.25-14.52 0.05-21.78 0.05m-173.91 11.24c-0.03 4.83-0.04 9.65-0.02 14.48 5.65-2.15 11.34-4.28 16.78-6.92 0.04-0.22 0.13-0.66 0.18-0.88-5.58-2.39-11.26-4.53-16.94-6.68m-39.41 12.98c2.51 2.07 3.68 5.06 3.77 8.28 0.65 0.04 1.96 0.12 2.62 0.16-0.01-5.15-0.12-10.3-0.32-15.45-2.08 2.29-3.41 5.29-6.07 7.01m-18.57-5.1c1.59 0.43 3.18 0.83 4.79 1.27 0.2 4.45 0.29 8.91 0.85 13.35 1.89-5.13-0.34-11.83 4.66-15.55-3.43 0.38-6.87 0.65-10.3 0.93m13.18 13.58c0.7-0.04 2.1-0.11 2.8-0.15 0.3-1.89 0.61-3.77 0.94-5.64l1.07 0.21c0.72-3.7-1.49-6.83-3.09-9.94-2.36 4.84-1.71 10.32-1.72 15.52m14.16-14.54c0.08 5.18 0.08 10.39 0.74 15.55 1.2-1.91 2.26-3.89 3.25-5.91 2.48 2.06 4.97 4.1 7.62 5.94-1.08-2.43-2.23-4.83-3.36-7.22 0.84-1.37 1.68-2.73 2.51-4.09-0.75-1.41-1.5-2.81-2.23-4.22-2.84-0.11-5.69-0.11-8.53-0.05m22.13 0.59c-0.04 4.1-0.26 8.19-0.85 12.26-1.75 0.21-4.1 0.78-4.97-1.28-1.2-3.42-0.27-7.16-0.65-10.7-0.6-0.12-1.78-0.36-2.38-0.48 0.18 4.3 0.22 8.64 1.07 12.89 2.56 1.06 5.43 1.38 8.13 0.57 2.6-3.91 1.54-8.86 1.8-13.27-0.53 0-1.61 0.01-2.15 0.01m-280.13 68.25c-3.35 7.41-4.4 16.5-0.92 24.06 4.26 9.67 19.02 12.61 26.14 4.44 0.92 1.18 1.84 2.37 2.77 3.55 1.56 0.21 3.13 0.42 4.69 0.65 1.38-3.47 2.82-6.9 4.13-10.39 4.18-0.06 8.35 0.19 12.53 0.38 1.11 2.9 1.97 5.93 3.58 8.61 1.79 1.21 4.21 0.99 6.26 1.53-2.46-8.21-5.12-16.38-8.15-24.4-1.69-4.49-3.26-9.01-4.84-13.54-2.12-0.09-4.23-0.19-6.34-0.29-0.98 2.89-2.15 5.73-2.73 8.74-3.52 7.58-6.12 15.59-7.75 23.8-1.09 0.09-2.18 0.19-3.27 0.3-0.11-1.4-0.22-2.81-0.34-4.2-3.72 0.39-6.59 3.11-10.16 3.93-4.15 0.86-8.6-1.4-10.44-5.2-3.07-5.54-0.92-11.95-0.69-17.86 2.73-2.22 5.52-5.11 9.28-5.19 4.59 0.03 8.3 3.02 12.18 5.07-0.5-3.06-0.28-7.75-4.15-8.62-7.45-3.28-15.99-0.66-21.78 4.63m63.74-5.2c-0.44 6.37 1.44 13.04-0.23 19.18 0.14 0.01 0.43 0.01 0.57 0.01l-0.35 0.25c-0.64 5.75-0.13 11.52 0.07 17.28 1.72 0.91 3.67 0.88 5.56 0.76 0.54-4.37 0.49-8.76 0.47-13.15l1.59-1.01c-0.23-0.14-0.7-0.43-0.93-0.57 0.8-0.16 2.4-0.47 3.2-0.63 3.48 5.55 8.1 10.25 12.18 15.35 2.51 0.02 5.02 0.03 7.53 0.03-3.52-5.32-7.76-10.09-12.16-14.69 2.48-3.82 5.37-7.67 5.94-12.33 0.43-4.24-2.65-8.11-6.53-9.46-5.44-1.92-11.29-0.78-16.91-1.02m33.11 0c0.46 7.74 0.14 15.5 0.46 23.24-0.21 4.7-0.55 9.41-0.6 14.12 7.12 0.3 14.69 0.79 21.27-2.49 3.92-1.99 7.92-5.57 7.48-10.4 1.37-6.83 0.99-15.08-4.76-19.89-6.46-5.9-15.83-4.49-23.85-4.58m36.34-0.12c0.61 12.68-1.56 25.72 2.17 38.08 0.41-3.9 0.17-7.85 0.89-11.71 0.46 3.72 0.52 7.48 1 11.21 0.33-0.23 1.01-0.68 1.34-0.91 0.27-5.78-0.11-11.58 0.23-17.37 5.2 0.13 10.41 0.09 15.62 0.04 0.33 5.65 0 11.31 0.27 16.97 1.96-0.19 3.93-0.35 5.9-0.49-0.64-11.94-0.18-23.9-0.43-35.85-1.98 0.05-3.95 0.1-5.91 0.17 0.04 4.75 0.02 9.49 0.02 14.24-5.16 0.01-10.33-0.14-15.49-0.09-0.13-4.74 0.04-9.47-0.18-14.2-1.81-0.03-3.62-0.06-5.43-0.09m37.7 4.91c-5.04 6.74-4.16 15.77-2.72 23.56l-0.27 0.27c3.61 5.7 9.8 10.61 16.92 9.83 5.53 0 9.62-4.15 13.36-7.68l-0.31-0.34c1.97-7.8 3.39-16.74-0.98-24.01-5.21-8.97-19.72-9.89-26-1.63m35.68-5.56c0.04 0.58 0.11 1.76 0.14 2.34-1.07 11.8-0.65 23.68-0.68 35.51 7.6 0.33 15.22 0.41 22.84 0.43 0.02-1.96 0.05-3.91 0.09-5.86-5.47-0.05-10.94 0.05-16.4 0-0.22-10.28 0.2-20.57-0.27-30.85-1.9-0.56-3.81-1.09-5.72-1.57m27.12 0.62c-0.08 12.34 0.04 24.67 0.02 37.01 7.22 0.1 15.14 1.32 21.67-2.55 10.57-6.84 10.5-24.68-0.03-31.52-6.51-3.92-14.43-2.75-21.66-2.94m36.1 0.11c0.6 12.37 0.23 24.75 0.4 37.13 7.69-0.02 15.39-0.01 23.09 0.01-0.04-1.69-0.08-3.38-0.1-5.06-5.86-0.38-11.73-0.15-17.59-0.24 0.13-4.2 0.16-8.4 0.24-12.59 5.49 0.04 10.99 0.14 16.49 0.09-0.07-1.67-0.13-3.33-0.19-4.99-5.46-0.01-10.9-0.22-16.35-0.19-0.08-3.02-0.07-6.02-0.02-9.03 5.97 0 11.94-0.07 17.91 0.05-0.15-1.75-0.31-3.5-0.47-5.24-7.8-0.02-15.61 0.02-23.41 0.06m30.34-0.12c0.07 12.34-0.13 24.69 0.14 37.04 1.88 0.1 3.77 0.22 5.66 0.33 0.15-5.36 0.18-10.73 0.58-16.07 7.27 2.54 9.79 10.65 15.8 14.8 2.11 1.59 4.8 1.71 7.35 1.7-3.95-5.49-8.3-10.66-12.72-15.76 3.58-3.11 7.22-7.19 6.91-12.28-0.03-4.55-3.87-8.21-8.12-9.15-5.12-1.11-10.41-0.44-15.6-0.61z"/>
|
5 |
+
<path d="m492 93.69c0.06-4.51-0.07-9.03 0.31-13.53 3.3 0.51 6.75 0.5 9.92 1.64 4.33 1.27 4.29 7.49 1.57 10.32-3.68 1.63-7.88 1.2-11.8 1.57z"/>
|
6 |
+
<path d="m894.99 101.47c1.26-3.64 3.14-7.67 7.03-9.06 3.05-0.87 7.16-0.43 8.98 2.53 1.29 2.07 1.94 4.45 2.69 6.75-6.24 0.17-12.47-0.1-18.7-0.22z"/>
|
7 |
+
<path d="m492.04 103.82c4.79 0.17 9.94-0.55 14.39 1.66 4.71 2.41 3.96 10.24-0.78 12.21-4.29 1.84-9.1 1.07-13.63 1.48 0-5.12 0-10.23 0.02-15.35z"/>
|
8 |
+
<path d="m543.4 111.56c3.72-2.19 8.14-2.38 12.28-3.15 0.1 3.5 0.15 6.99 0.2 10.49-4.05 1.71-9.61 4.43-13.37 0.78-0.75-2.56-1.58-6.23 0.89-8.12z"/>
|
9 |
+
<path d="m774.79 110.75c3.52-1.55 7.43-1.73 11.19-2.33-0.03 3.58-0.04 7.17 0.07 10.75-3.4 1.48-7.21 2.95-10.95 2.02-4.48-1.31-4.55-8.72-0.31-10.44z"/>
|
10 |
+
<path d="m444.5 352.52c2.81 0.12 5.62 0.29 8.44 0.5-0.42 5.37-0.41 10.76-0.75 16.13-2.39 0.16-4.79 0.31-7.18 0.45-0.29-5.69-0.51-11.38-0.51-17.08z"/>
|
11 |
+
<path d="m522.01 352.75c7.01-0.11 14.02-0.08 21.03 0.03-0.05 3.56-0.31 7.11-0.67 10.66-6.67 1.02-13.44 0.42-20.15 0.48-0.11-3.73-0.18-7.45-0.21-11.17z"/>
|
12 |
+
<path d="m570.07 353.08c2.81-0.16 5.61-0.34 8.42-0.5 0.04 5.53-0.01 11.06-0.48 16.57-2.16 0.17-4.33 0.3-6.49 0.43-0.49-5.5-0.74-11.02-1.45-16.5z"/>
|
13 |
+
<path d="m438.6 374.22c6.62-0.09 13.25 0.06 19.87 0.07 0 5.51 0.41 11.01 0.5 16.52-6.84 0.05-13.67 0.06-20.5 0.04 0.05-5.55 0.08-11.09 0.13-16.63z"/>
|
14 |
+
<path d="m565.15 374.15c0.63 0.01 1.88 0.03 2.51 0.05 5.25 0.85 10.57 0.68 15.87 0.62 0.09 5.29 0.16 10.6-0.29 15.88-5.95-0.09-11.89-0.02-17.83-0.08-0.42-1.9-0.85-3.78-1.16-5.68 0.02-3.62 0.45-7.21 0.9-10.79z"/>
|
15 |
+
<path d="m649.61 378.71c6.28-0.36 12.6 0.31 18.87-0.45 0.09 3.9 0.24 7.8 0.45 11.7-6.67 0.35-13.35 0.68-20.04 0.53-0.09-3.82-0.1-7.65 0-11.47l0.72-0.31z"/>
|
16 |
+
<path d="m354.66 379.53c6.63-0.04 13.27 0 19.91-0.04 0.18 3.6 0.29 7.2 0.22 10.8-6.58 0.25-13.16 0.15-19.73 0.24-0.28-3.66-0.35-7.33-0.4-11z"/>
|
17 |
+
<path d="m157.54 430.98c2.67-3.36 5.51-6.58 8.42-9.74 0.07 3.25 0.16 6.5 0.25 9.74-2.89 0.01-5.78 0.01-8.67 0z"/>
|
18 |
+
<path d="m462.21 433.34c2.35-0.05 4.7 0 7.05 0.2-0.21 3.84 0.43 9.23-4.37 10.49-3.11-2.72-2.56-7-2.68-10.69z"/>
|
19 |
+
<path d="m375.57 455.78c3.71 0.22 7.27 3.24 6.73 7.21-0.15 3.53-3.55 5.52-6.77 5.62-0.08-4.28-0.07-8.56 0.04-12.83z"/>
|
20 |
+
<path d="m532.28 457.74c5.58-0.03 11.16-0.12 16.74-0.08-0.15 3.09-0.34 6.18-0.52 9.27-5.3 0.12-10.6 0.04-15.9 0.06-0.07-3.09-0.17-6.17-0.32-9.25z"/>
|
21 |
+
<path d="m565.6 457.78c5.58-0.02 11.15-0.02 16.73 0-0.24 3.05-0.4 6.1-0.52 9.16-5.25 0.05-10.5 0.01-15.75 0.01-0.17-3.06-0.33-6.12-0.46-9.17z"/>
|
22 |
+
<path d="m361.17 475.19c1.25-0.04 2.51-0.06 3.77-0.08 0.01 1.29 0.02 2.58 0.03 3.88-1.3 0.02-2.61 0.04-3.9 0.06 0.02-1.29 0.06-2.58 0.1-3.86z"/>
|
23 |
+
<path d="m169.78 540.79c4.17 0.72 8.32 1.58 12.46 2.47-0.65 3.42-1.43 6.82-2.42 10.17-1.38 0.05-2.76 0.11-4.14 0.18-1.87 0.01-3.75-0.01-5.62-0.02-0.07-4.27-0.17-8.53-0.28-12.8z"/>
|
24 |
+
<path d="m203.03 540.88c4.76 0.8 10.26 0.57 14.1 3.97 3.73 3.83 3.51 9.55 4.75 14.43-4.33 5.56-10.82 8.96-17.76 9.9-0.28-1.54-0.56-3.07-0.76-4.62-0.71-7.87-0.5-15.79-0.33-23.68z"/>
|
25 |
+
<path d="m275.72 544.78c3.41-5.3 12.26-5.63 15.84-0.35 3.6 5.23 2.41 11.92 2.36 17.89-3.04 2.91-6.21 6.92-10.89 6.58-5.04-0.06-7.38-5.22-9.91-8.75 0.19-5.16-0.36-10.84 2.6-15.37z"/>
|
26 |
+
<path d="m406.48 541.13c3.02 0.24 6.23 0.05 9.03 1.42 3.83 1.76 3.69 8.04 0.06 9.96-2.8 1.42-6 1.53-9.04 2.03-0.05-4.47-0.02-8.94-0.05-13.41z"/>
|
27 |
+
<path d="m339.85 541.3c3.75 0.32 7.69 0.12 11.23 1.6 8.69 4.47 9.03 18.84 0.65 23.81-3.64 1.7-7.81 1.47-11.72 1.87-0.02-9.09-0.25-18.19-0.16-27.28z"/>
|
28 |
+
<path d="m141.55 548.34c0.61-1.63 1.33-3.21 2.04-4.78 0.81 2.64 1.56 5.3 2.28 7.97 0.6 2.27 1.19 4.54 1.79 6.81-2.9-0.03-5.8-0.06-8.71-0.09 0.85-3.31 1.6-6.64 2.6-9.91z"/>
|
29 |
+
</g>
|
30 |
+
<g id="#fdfdfcff" fill="#fdfdfc">
|
31 |
+
<path d="m629.01 67.17c4.7 0.01 9.4 0.01 14.11 0.01 0 11.63-0.14 23.26 0.07 34.89 4.58-5.51 8.87-11.26 13.05-17.09 5.57-0.24 11.15-0.27 16.73-0.25-4.9 6.7-10.27 13.04-15.54 19.44 5.6 8.65 11.36 17.2 17.13 25.74-5.59 0.15-11.18 0.05-16.77 0.15-4.55-6.58-7.91-14.04-13.58-19.8-1.56 6.47-1.16 13.14-1.15 19.73-4.55 0.01-9.1 0.08-13.65-0.02-0.95-20.92-0.24-41.87-0.4-62.8z"/>
|
32 |
+
<path d="m476.88 70c9.39 0.33 18.81-0.69 28.19 0.19 5.14 0.77 11.3 1.62 14.16 6.58 4.08 6.76 0.84 15.72-5.13 20.24 4.15 2.14 9.08 4.52 10.31 9.48 3.4 9.87-4.16 21.21-14.31 22.63-11.03 1.72-22.22 0.59-33.32 0.88 0.03-20 0.06-40 0.1-60m15.12 23.69c3.92-0.37 8.12 0.06 11.8-1.57 2.72-2.83 2.76-9.05-1.57-10.32-3.17-1.14-6.62-1.13-9.92-1.64-0.38 4.5-0.25 9.02-0.31 13.53m0.04 10.13c-0.02 5.12-0.02 10.23-0.02 15.35 4.53-0.41 9.34 0.36 13.63-1.48 4.74-1.97 5.49-9.8 0.78-12.21-4.45-2.21-9.6-1.49-14.39-1.66z"/>
|
33 |
+
<path d="m699.86 70c6.26 0.04 12.53-0.11 18.79 0.1 6.14 11.08 11.84 22.46 18.77 33.07 0.58-11.07 0.27-22.15 0.46-33.23 4.46 0.02 8.92 0.04 13.39 0.06 0.01 20.01 0.35 40.02-0.21 60.03-4.7-0.02-9.4-0.01-14.1-0.1-7.97-13.52-14.74-27.74-23.23-40.96-0.26 13.67-0.08 27.33-0.06 41-4.63 0.05-9.25 0.03-13.86 0.03 0.04-20 0.05-40 0.05-60z"/>
|
34 |
+
<path d="m531.57 85.37c9.01-2.25 18.63-3.11 27.69-0.68 5.16 1.42 9.99 5.77 10.25 11.38 0.63 11.29 0.06 22.6 0.23 33.9-4.18 0.06-8.36 0.09-12.54 0.1-0.72-1.31-1.43-2.61-2.13-3.91-4 2.43-8.12 5.26-12.94 5.54-6.11 0.44-12.29-3.71-13.99-9.63-1.76-5.63-0.77-12.94 4.37-16.51 7.02-4.99 16.05-4.47 24.2-5.63-1.32-2.83-3.42-5.55-6.62-6.27-6.57-1.74-13.15 1.11-19.39 2.91 0.15-3.74 0.38-7.48 0.87-11.2m11.83 26.19c-2.47 1.89-1.64 5.56-0.89 8.12 3.76 3.65 9.32 0.93 13.37-0.78-0.05-3.5-0.1-6.99-0.2-10.49-4.14 0.77-8.56 0.96-12.28 3.15z"/>
|
35 |
+
<path d="m822.07 89.32c4.55-2.81 9.27-6.48 14.94-5.89 4.86-0.09 8.24 3.88 11.28 7.11 4.66-3.3 9.53-7.56 15.63-7.11 4.03-0.05 7.93 2.08 10.01 5.54 2.39 3.52 2.36 7.93 2.55 12.01 0.13 9.56-0.08 19.12 0.09 28.68-4.72 0.05-9.43 0.13-14.14 0.16-0.23-9.94 0.59-19.93-0.39-29.84 0.01-2.27-1.43-4.75-3.88-4.92-3.05-0.12-5.93 1.07-8.77 2.02 0.1 10.86-0.05 21.71 0.21 32.57-4.75 0.23-9.5 0.19-14.24 0.22-0.33-10.35 0.76-20.77-0.68-31.08-0.17-2.28-2.43-3.94-4.64-3.74-2.73 0.25-5.3 1.2-7.87 2.04 0.09 10.94 0.15 21.88 0.07 32.82-4.59 0.05-9.18 0.16-13.76 0.03-0.41-15.01-0.2-30.01-0.23-45.02 4.67-0.1 9.33-0.09 14-0.1-0.07 1.5-0.13 3-0.18 4.5z"/>
|
36 |
+
<path d="m592.57 89.12c4.58-3.06 9.62-6.45 15.43-5.7 6.62-0.17 11.87 5.81 12.38 12.12 1.17 11.43 0.67 22.94 0.23 34.39-4.64 0.15-9.28 0.08-13.92 0.08-0.02-11.23 0.41-22.52-1.11-33.68-4.28-1.35-8.75-0.68-13.01 0.34-0.22 11.11-0.02 22.23-0.07 33.34-4.73 0-9.45 0.03-14.17-0.04 0.11-15.12-0.14-30.24 0.1-45.35 4.57 0.1 9.14 0.05 13.71 0.06 0.14 1.48 0.29 2.96 0.43 4.44z"/>
|
37 |
+
<path d="m761.34 85.47c9.4-1.96 19.33-3.16 28.72-0.5 5.21 1.45 9.45 6.4 9.53 11.9 0.51 11-0.03 22 0.25 33-4.61 0.01-9.22 0-13.83 0.01-0.02-1.45-0.04-2.9-0.04-4.35-5.64 3.78-12.67 8.05-19.6 5.05-9.68-3.31-12.19-17.97-4.3-24.41 7.04-5.59 16.5-4.88 24.89-6.3-1.4-2.88-3.58-5.65-6.89-6.34-6.37-1.48-12.7 1.07-18.85 2.5 0.05-3.52 0.09-7.04 0.12-10.56m13.45 25.28c-4.24 1.72-4.17 9.13 0.31 10.44 3.74 0.93 7.55-0.54 10.95-2.02-0.11-3.58-0.1-7.17-0.07-10.75-3.76 0.6-7.67 0.78-11.19 2.33z"/>
|
38 |
+
<path d="m890.79 87.69c4.32-3.31 9.94-4.09 15.22-4.27 6.4-0.21 13.37 2.02 17.05 7.57 3.96 5.5 3.42 12.6 3.92 19.01-10.57 0.03-21.14 0.01-31.71 0.02 1.23 3.82 2.58 8.49 6.83 9.93 8.05 3.45 16.74-0.27 23.9-4.16-0.01 3.96 0.07 7.92-0.11 11.87-11.27 4.09-24.81 5.61-35.35-1.18-12.34-8.92-11.59-29.76 0.25-38.79m4.2 13.78c6.23 0.12 12.46 0.39 18.7 0.22-0.75-2.3-1.4-4.68-2.69-6.75-1.82-2.96-5.93-3.4-8.98-2.53-3.89 1.39-5.77 5.42-7.03 9.06z"/>
|
39 |
+
<path d="m106.55 191.95c0.22-10.96 10.6-20.17 21.42-19.77 36.6 0.09 73.21-0.23 109.81 0.09 8.71-0.01 15.98 6.84 18.59 14.8-0.03 0.45-0.1 1.35-0.13 1.8-7.85 0.76-15.77 0.39-23.62 1.27l4.59 4.05c-6.23 6.42-12.89 12.41-19.27 18.67 0.02 1.74 0.03 3.49 0.05 5.24-2.76-0.14-5.51-0.32-8.25-0.57-2.2 4.05-3.82 8.51-6.93 11.98-7.86 7.24-16.56 13.6-23.72 21.6-6.14 6.22-11.45 13.42-18.68 18.46-2.93-6.88-5.05-14.17-5.35-21.68 1.61-3.64 4.82-6.33 6.46-9.93 0.19-3.12-0.01-6.25-0.09-9.36-1.25 2.98-1.49 6.25-2.55 9.3-1.84 3.15-4.25 5.95-6.14 9.09-15.23 0.02-30.47 0.02-45.71 0.24-1.1-18.41-0.11-36.85-0.48-55.28z"/>
|
40 |
+
<path d="m106.55 249.07c15.32-0.04 30.65 0.48 45.98 0.32-0.71 10.87 3.44 22.03 11.71 29.25-18.88-4.97-38.51-2.16-57.76-2.71 0.02-8.96 0.03-17.91 0.07-26.86z"/>
|
41 |
+
<path d="m106.17 279.52c16.19-0.06 32.4-0.36 48.57 0.66l-1.11 0.76c-5.42 4.49-13.91 4.44-17.51 11.1 2.83 1.3 5.65 2.67 8.56 3.82-7.82 0.85-15.89 1.36-23.63-0.32-7.61-1.96-12.17-9.15-14.88-16.02z"/>
|
42 |
+
<path d="m734.21 347.63c7.45 0.6 14.95 0.3 22.42 0.73 0.2 0.89 0.6 2.66 0.81 3.55-6.3 1.59-12.88 0.17-19.29 0.53-0.72 6.35 1.34 13.75-3.11 19.09-0.29-1.58-0.55-3.14-0.72-4.72-0.49-6.38-0.17-12.79-0.11-19.18z"/>
|
43 |
+
<path d="m773.48 346.75c1.02 0.72 2.02 1.45 3.04 2.21 0.56 7.02 1.6 14.96-2.98 20.97-0.78-7.7-0.74-15.48-0.06-23.18z"/>
|
44 |
+
<path d="m227.27 379.42c0.38-10.71 0.16-21.42 0.25-32.14 1.45 0.65 2.91 1.32 4.37 1.97-0.12 8.4-0.15 16.8-0.21 25.19 4.6 0.25 9.2 0.08 13.8 0.13 1.13-7.56-0.46-15.46 2.26-22.78 2.6 6.78 1.48 14.35 1.77 21.48 1.53 1.2 3.05 2.43 4.56 3.67-1.29 1.33-2.58 2.66-3.85 4.01 0.17 5.2 0.15 10.4-0.12 15.59-1.67-0.78-3.62-1.65-4.09-3.62-1.3-4.39 0.23-8.98-0.45-13.44-6.1 0.08-12.2 0-18.29-0.06z"/>
|
45 |
+
<path d="m315.03 348.43c7.29 0.1 14.59 0.08 21.88 0.05-0.01 1.48-0.01 2.96-0.01 4.45-6.3-0.42-12.62-0.29-18.93-0.14-0.01 5.62 0.34 11.25 1.16 16.81 5.75-0.17 11.49 0.15 17.24 0.27 1.8 8.21 1.68 16.77 0.21 25.02-6.86 0.4-13.85 1.44-20.65 0.08-4.19-0.81-7.42-4-8.99-7.86 8.24 3.3 17.26 4.07 26.03 3-0.03-5.33-0.06-10.66-0.13-15.99-6.05-0.05-12.11 0.05-18.16 0.02 0.43-8.57 0.21-17.14 0.35-25.71z"/>
|
46 |
+
<path d="m350.41 348.19c2.65 0.25 5.29 0.54 7.93 0.89-1.26 1.7-2.53 3.39-3.81 5.09 0.01 6.77 0.17 13.53 0.18 20.31 8.38 0.06 16.8-0.36 25.13 0.84-0.25 6.61-0.15 13.24-0.59 19.84-9.47-0.12-18.95 0.6-28.41-0.18-1.92-15.55 0.18-31.19-0.43-46.79m4.25 31.34c0.05 3.67 0.12 7.34 0.4 11 6.57-0.09 13.15 0.01 19.73-0.24 0.07-3.6-0.04-7.2-0.22-10.8-6.64 0.04-13.28 0-19.91 0.04z"/>
|
47 |
+
<path d="m440.31 348.42c5.59 0.08 11.18 0.03 16.76 0.4-0.3 6.94-0.13 13.89 0.06 20.84 2.04 0.19 4.08 0.39 6.13 0.6 0.57 8.25 0.59 16.66-1.76 24.66-8.02-0.21-16.03-0.1-24.05-0.2-1.11-1.02-2.23-2.03-3.35-3.03-0.2-7.05-0.87-14.17 0.4-21.16 1.84-0.78 3.67-1.57 5.51-2.37 0.34-6.57 0.38-13.16 0.3-19.74m4.19 4.1c0 5.7 0.22 11.39 0.51 17.08 2.39-0.14 4.79-0.29 7.18-0.45 0.34-5.37 0.33-10.76 0.75-16.13-2.82-0.21-5.63-0.38-8.44-0.5m-5.9 21.7c-0.05 5.54-0.08 11.08-0.13 16.63 6.83 0.02 13.66 0.01 20.5-0.04-0.09-5.51-0.5-11.01-0.5-16.52-6.62-0.01-13.25-0.16-19.87-0.07z"/>
|
48 |
+
<path d="m517.99 347.62c9.4 1.54 18.94 1.46 28.44 1.31 0.44 12.77 1.35 25.65-0.53 38.35-1.04-1.49-2.07-2.98-2.97-4.55-0.42-4.7-0.48-9.43-0.61-14.14-7.96 0.38-15.94 0.52-23.9 0.07-0.61-7-0.4-14.02-0.43-21.04m4.02 5.13c0.03 3.72 0.1 7.44 0.21 11.17 6.71-0.06 13.48 0.54 20.15-0.48 0.36-3.55 0.62-7.1 0.67-10.66-7.01-0.11-14.02-0.14-21.03-0.03z"/>
|
49 |
+
<path d="m566.42 348c5.42 0.38 10.85 0.54 16.29 0.49 0.07 6.93-0.56 13.97 1.26 20.75 1.75 0.38 3.49 0.76 5.24 1.15l-0.02 0.6c-0.19 3.88-0.24 7.78-0.87 11.63-0.63 0-1.87-0.01-2.5-0.01-0.46-2.85-0.66-5.72-0.93-8.58-5.74 0.08-11.49-0.39-17.23 0.17-0.63-0.02-1.88-0.04-2.51-0.05-0.45 3.58-0.88 7.17-0.9 10.79-1.46 0.73-2.93 1.47-4.38 2.21 0.17-5.51 0.05-11.02 0.66-16.5 1.92-1.01 3.86-1.99 5.82-2.92 0.18-6.58 0.13-13.16 0.07-19.73m3.65 5.08c0.71 5.48 0.96 11 1.45 16.5 2.16-0.13 4.33-0.26 6.49-0.43 0.47-5.51 0.52-11.04 0.48-16.57-2.81 0.16-5.61 0.34-8.42 0.5z"/>
|
50 |
+
<path d="m601.89 347.69c9.56 1.09 19.19 0.78 28.79 0.66 0.51 6.15 1.5 12.4 0.51 18.54-2.01 5.16-7.71 7.09-11.31 10.86-1.78 1.93-3.39 4.02-4.84 6.21-0.16-3.06-0.26-6.11-0.39-9.17 3.81-3.58 8.37-6.44 11.49-10.7 0.97-3.64 0.49-7.53 0.67-11.27-8.05-0.17-16.7-1.37-24.01 2.86-0.32-2.66-0.63-5.32-0.91-7.99z"/>
|
51 |
+
<path d="m644 347.37c2.81 0.51 5.62 1.07 8.42 1.7-1.33 2.2-3.82 4.06-3.66 6.85 0.01 6.18 0 12.37-0.08 18.55 8.73 0.14 17.67-0.66 26.14 1.98-1.32 0.5-2.61 1.05-3.96 1.42-0.6 0.09-1.78 0.29-2.38 0.39-6.27 0.76-12.59 0.09-18.87 0.45l-0.72 0.31c-1.53 0.7-3.03 1.41-4.54 2.11-0.67-11.24-0.27-22.5-0.35-33.76z"/>
|
52 |
+
<path d="m811.19 347.67c9.93 0.06 19.93-0.22 29.8 1.21 0.06 5.01 0.05 10.01 0.16 15.02-0.95 0.66-1.89 1.32-2.82 1.99-0.28-2.61-0.8-5.18-1.58-7.68-0.29-1.85-0.03-3.74-0.01-5.6-7.83 0.04-15.77 1.15-23.5-0.62-0.68-1.45-1.38-2.89-2.05-4.32z"/>
|
53 |
+
<path d="m853.05 347.66c9.81 0.06 19.63-0.06 29.4 1.02 0.43 5.05 0.61 10.13 0.61 15.2-1.34 0.96-2.67 1.93-4 2.88-0.14-4.68-0.36-9.37-0.62-14.05-7.82 0.01-15.69 0.87-23.43-0.58-0.65-1.49-1.32-2.99-1.96-4.47z"/>
|
54 |
+
<path d="m96.98 348.79c6.02-0.46 12.06-0.27 18.1-0.29-0.08 14.03-0.05 28.06 0.11 42.09 2.44-0.04 4.89-0.08 7.33-0.11 0.56-5.47 0.6-10.96 0.9-16.44 1.38 0.74 2.76 1.48 4.14 2.23-0.08 6.41 0.08 12.82-0.22 19.23-9.16-0.1-18.34 0.34-27.48-0.34-0.98-1.52-1.92-3.06-2.82-4.63 4.49-0.05 8.99-0.07 13.48-0.09 0.57-12.45 0.35-24.91 0.48-37.37-4.81-0.4-11.14 0.65-14.02-4.28z"/>
|
55 |
+
<path d="m138.95 348.78c9.64-0.57 19.3-0.16 28.94-0.02 2.04 8.31 1.94 17.15-0.51 25.37-7.65-0.18-15.3-0.09-22.95-0.14 0.06 5.48 0.21 10.95 0.24 16.43 8.27 0.26 16.56-0.14 24.83 0.26-0.01 1.53-0.03 3.07-0.06 4.61-9.8 0.42-19.61 0.1-29.41 0.27-0.29-8.62 0.11-17.25 0.56-25.86 8.08-0.02 16.2 0.55 24.24-0.53 0.19-5.45 0.45-10.89 0.52-16.34-7.63-0.45-15.3 0.13-22.91-0.5-1.44-0.87-2.36-2.36-3.49-3.55z"/>
|
56 |
+
<path d="m180.43 349.34c10.16-1.44 20.44-0.82 30.65-0.24 0.51 7.62-0.34 15.23-0.65 22.82 1.11 7.73 1.78 15.66-0.17 23.33-7.4 0.31-14.81 0.42-22.21 0.24-1.53-0.2-3.28 0.04-4.61-0.82-1.12-1.21-1.8-2.74-2.59-4.17 8.57-0.06 17.14-0.02 25.71-0.06 0.28-5.41 0.27-10.83 0.21-16.25-6.64-0.84-15.55 2.52-19.99-4.24 5.86-0.31 11.73-0.34 17.6-0.41 4.21-4.67 2.26-11.23 2.83-16.91-8.89-0.9-19.06 2.73-26.78-3.29z"/>
|
57 |
+
<path d="m791.33 352.36c1.59 0.91 4.69 1.07 4.76 3.5 0.29 5.11-0.13 10.35-1.49 15.29-0.29 0.8-0.58 1.59-0.87 2.39-0.39-0.05-1.17-0.16-1.56-0.21-0.09-7-0.82-13.97-0.84-20.97z"/>
|
58 |
+
<path d="m417.47 363.89c1.4-1.13 2.83-2.23 4.27-3.32 1.65 8.5-6.7 13.39-12.33 17.9 0.04 5.92-0.17 11.85-0.82 17.75-3.96-1.53-4.37-6.57-4.29-10.22 0.29-3.67-0.16-7.45 0.46-11.06 4.04-3.89 8.41-7.44 12.71-11.05z"/>
|
59 |
+
<path d="m115.07 420.64c2.71-5.39 11.15-6.13 14.73-1.34 1.95 2.5 1.34 5.98 0.02 8.63-2.32 4.61-6.53 7.81-9.75 11.75 4.34 0.61 10.04-1.19 13.15 2.77-5.76 0.39-11.54 0.43-17.31 0.33 0.06-1.18 0.12-2.35 0.18-3.52 4.26-4.65 10.02-8.76 11.33-15.31 0.56-2.17-1.18-4.55-3.43-4.59-3.02-0.05-5.95 0.86-8.92 1.28z"/>
|
60 |
+
<path d="m134.63 420.05c3.78-4.24 11.35-5.81 15.36-1.07 2.64 2.97-0.37 6.59-1.91 9.28 1.63 2.69 4.43 5.52 3.27 8.94-1.83 7.56-13.79 8.69-17.13 1.71 3.79 0.22 7.72 2.28 11.44 0.79 3.17-2 1.59-6.28 1.29-9.3-2.28-0.17-4.55-0.36-6.82-0.56 2.63-2.46 7.35-3.82 7.47-8.04-2.69-4.59-8.78-1.36-12.97-1.75z"/>
|
61 |
+
<path d="m153.46 433.54c3.55-7.16 8.84-13.47 15.58-17.82 0.25 4.86 0.21 9.74 0.35 14.61 1.1 0.61 2.21 1.21 3.32 1.82-3.95 2.11-3.51 6.86-3.76 10.65-0.72-0.01-2.15-0.03-2.87-0.04-0.01-2.91-0.03-5.83-0.05-8.73-4.19-0.12-8.38-0.24-12.57-0.49m4.08-2.56c2.89 0.01 5.78 0.01 8.67 0-0.09-3.24-0.18-6.49-0.25-9.74-2.91 3.16-5.75 6.38-8.42 9.74z"/>
|
62 |
+
<path d="m97.71 421.43c2.96-1.6 5.88-3.24 8.79-4.91-0.01 7.5-0.14 15 0.09 22.5 2.06 0.6 3.86 1.75 5.25 3.39-4.64 0.79-9.47 0.92-13.99-0.54 1.9-0.97 4.11-1.99 4.72-4.25 1.27-4.6 0.12-9.41-0.16-14.07-1.59-0.67-3.16-1.37-4.7-2.12z"/>
|
63 |
+
<path d="m474.88 429.81c2.63 2.66 4.45 6.09 7.47 8.35 0.13-2.09 0.23-4.18 0.34-6.27 0.48-0.2 1.44-0.6 1.92-0.79-0.09 4.98 0.09 9.98-0.42 14.95-2.96-2.99-4.7-6.86-6.89-10.39-0.44 2.87-0.93 5.73-1.72 8.53 0.05-4.81-0.42-9.59-0.7-14.38z"/>
|
64 |
+
<path d="m485.81 431.05c4.89-0.72 10.14-1.22 14.9 0.4 0.37 1.65 0.74 3.29 1.11 4.95 1.82 0.01 3.64 0.03 5.47 0.06 0.37-2.18 0.74-4.36 1.19-6.52 1.73 4.94 1.2 10.26 1.29 15.41 0.62-0.06 1.84-0.17 2.45-0.23 1.84-5.1 2.69-10.51 4.5-15.63 3.29 1.19 5.81 3.62 8.05 6.23 1.32-1.74 2.67-3.44 4.02-5.16 4.31-0.84 8.67-0.04 12.91 0.81-2.92 0.76-5.86 1.48-8.72 2.45 1.88 2.82 5.41 2.68 8.36 3.45-2.79 0.6-5.56 1.19-8.3 1.94 0.3 3.98 4.63 4.51 7.81 4.6 0.1 0.34 0.29 1.04 0.39 1.39-3.08-0.31-6.17-0.23-9.25-0.08-0.15-3.78 0.58-7.78-0.89-11.36-1.31-1.17-3.08 0.52-3.79 1.63-1.74 3.32-1.59 7.23-2.75 10.74-1.19-4.98-1.62-10.68-5.77-14.27-3.39 5.18-4.11 11.44-6.19 17.15-1.61-1.67-3.33-3.26-4.68-5.14-0.43-1.86-0.22-3.79-0.26-5.67-2.11 0.08-4.2 0.17-6.29 0.26-0.25 2.62-0.48 5.25-0.84 7.86-1.85-4.58-1.99-9.76-1-14.56-1.87 0.18-4.32-0.58-5.5 1.36-2.2 3.56-1.02 8-1.16 11.95-0.51 0-1.55 0.01-2.06 0.01-0.05-3.54 0.6-7.2-0.43-10.64-0.58-2.09-2.78-2.74-4.57-3.39z"/>
|
65 |
+
<path d="m547.58 429.67c1.63 1.98 1.91 4.64 2.79 6.97-2.02-0.42-4.07-0.73-6.12-0.37 1.36-2.07 2.34-4.34 3.33-6.6z"/>
|
66 |
+
<path d="m445.29 432.22c0.59-1.76 3.59-0.73 3.05 1.02-0.93 1.38-3.07 0.57-3.05-1.02z"/>
|
67 |
+
<path d="m554.67 444.61c0.4-4.77 0.17-9.58 0.76-14.34 2.71 0.25 5.42 0.47 8.14 0.69 0.05 3.02-0.41 6.01-1.16 8.94 1.1 1.86 2.19 3.73 3.19 5.65-2.94-2.09-5.64-4.47-8.45-6.71 0.02 1.93 0.05 3.86 0.09 5.8-0.64-0.01-1.93-0.02-2.57-0.03m3.2-10.87c0.09 0.86 0.26 2.57 0.35 3.43 1.4-0.7 3.1-1.28 3.07-3.16-0.85-0.07-2.57-0.2-3.42-0.27z"/>
|
68 |
+
<path d="m541.75 442.92c1.38-2.26 2.17-4.95 4.4-6.58-0.02 0.94-0.06 2.83-0.09 3.77 1.61-0.97 3.21-1.96 4.81-2.95 1.23 2.49 2.47 4.97 3.59 7.52-2.96 0.14-4.62-2.56-6.62-4.25-1.74 1.23-3.41 2.58-4.91 4.09-0.4-0.53-0.8-1.07-1.18-1.6z"/>
|
69 |
+
<path d="m331.46 453.87c2.14 3.59 3.51 7.54 4.93 11.45 2.01-3.79 3.6-7.84 6.36-11.18-1.35 5.39-3.25 10.63-5.35 15.77-1.31 0.08-1.46-1.47-2.02-2.3-2.14-4.3-3.47-8.96-3.92-13.74z"/>
|
70 |
+
<path d="m373.45 454.55c3.77 0.48 8.46 0.72 10.62 4.39 1.06 2.78 0.91 6.58-1.61 8.58-2.54 2.01-5.9 2.41-9.03 2.55-0.03-5.18-0.1-10.35 0.02-15.52m2.12 1.23c-0.11 4.27-0.12 8.55-0.04 12.83 3.22-0.1 6.62-2.09 6.77-5.62 0.54-3.97-3.02-6.99-6.73-7.21z"/>
|
71 |
+
<path d="m429.87 453.99c4.22 0.01 8.46-0.11 12.69 0.04-0.14 11.72 0.48 23.42 0.49 35.14 1.98-0.25 4.37-0.51 5.45-2.47 1.71-3.44 0.75-7.43 0.83-11.11 1.16-0.06 2.32-0.11 3.49-0.15-0.04 5.09-0.17 10.19-0.16 15.28-8.06-0.59-17.34 3.31-24.3-2.43 3.6-0.28 7.23-0.31 10.85-0.3 0.57-10.05 0.61-20.13 0.77-30.2-3.29-0.16-6.57-0.26-9.86-0.27-0.09-1.18-0.18-2.36-0.25-3.53z"/>
|
72 |
+
<path d="m508.4 467.43c2.95-4.92 5.21-10.72 10.34-13.83-5.13 13.96-13.04 26.82-22.42 38.31 1.36-9.27 7.76-16.49 12.08-24.48z"/>
|
73 |
+
<path d="m347.28 455.08c0.99 0.8 3.96 0.62 3.4 2.31-1.49 0.92-3.11 1.6-4.67 2.37 0.8 1.4 1.61 2.81 2.41 4.23 1.14-1.47 2.31-2.91 3.53-4.31 0.33 3.23 1.27 6.34 3.17 9.01-2.55-1.26-5.1-2.53-7.7-3.68-1.73 1.68-3.5 3.32-5.31 4.92 1.52-5.02 3.13-10.02 5.17-14.85z"/>
|
74 |
+
<path d="m355.28 468.89c0.32-4.89-0.18-9.89 1.12-14.67 1.53 4.24 1.17 8.78 1.18 13.2 3.32 0.33 6.65 0.55 9.99 0.65-0.37-4.4-1-8.76-1.74-13.1 0.97 0 2.92-0.01 3.9-0.01-0.62 4.91-0.59 9.88 0.06 14.79-4.85-0.09-9.69-0.33-14.51-0.86z"/>
|
75 |
+
<path d="m461.61 455.16c8.07-0.63 16.18-0.32 24.25 0.22 0.33 6.4 0.16 12.86-0.86 19.19-6.22-0.02-12.43 0.24-18.65 0.21-0.17 4.56-0.27 9.12-0.33 13.68 6.71 0.56 14.12-1.76 20.25 1.92-7.74 0.48-15.49 0.63-23.24 0.62-0.07-6.52-0.65-13.08 0.33-19.56 6.27-0.83 12.59-0.32 18.89-0.06 0.3-4.63 0.26-9.27 0.35-13.9-6.99-0.41-14.91 2.41-20.99-2.32z"/>
|
76 |
+
<path d="m529.52 470.44c-0.03-5.26-0.07-10.53 0.02-15.79 7.31 0.11 14.62 0.22 21.94 0.05 0.28 9.88 1.11 19.8-0.27 29.65-1.44-4.48-2.07-9.16-2.82-13.79-6.29-0.01-12.58 0.02-18.87-0.12m2.76-12.7c0.15 3.08 0.25 6.16 0.32 9.25 5.3-0.02 10.6 0.06 15.9-0.06 0.18-3.09 0.37-6.18 0.52-9.27-5.58-0.04-11.16 0.05-16.74 0.08z"/>
|
77 |
+
<path d="m562.84 454.62c7.26 0 14.52 0.2 21.78-0.05 0.52 8.71 0.56 17.46 0.13 26.17-1-2.98-1.84-6-2.7-9.01l-0.16-0.57c-6.33-0.72-12.7-0.59-19.06-0.75-0.03-5.26-0.11-10.53 0.01-15.79m2.76 3.16c0.13 3.05 0.29 6.11 0.46 9.17 5.25 0 10.5 0.04 15.75-0.01 0.12-3.06 0.28-6.11 0.52-9.16-5.58-0.02-11.15-0.02-16.73 0z"/>
|
78 |
+
<path d="m330.95 473.74c3.43-0.28 6.87-0.55 10.3-0.93-5 3.72-2.77 10.42-4.66 15.55-0.56-4.44-0.65-8.9-0.85-13.35-1.61-0.44-3.2-0.84-4.79-1.27z"/>
|
79 |
+
<path d="m380.42 473.37c0.54 0 1.62-0.01 2.15-0.01-0.26 4.41 0.8 9.36-1.8 13.27-2.7 0.81-5.57 0.49-8.13-0.57-0.85-4.25-0.89-8.59-1.07-12.89 0.6 0.12 1.78 0.36 2.38 0.48 0.38 3.54-0.55 7.28 0.65 10.7 0.87 2.06 3.22 1.49 4.97 1.28 0.59-4.07 0.81-8.16 0.85-12.26z"/>
|
80 |
+
<path d="m100.29 541.62c5.79-5.29 14.33-7.91 21.78-4.63 3.87 0.87 3.65 5.56 4.15 8.62-3.88-2.05-7.59-5.04-12.18-5.07-3.76 0.08-6.55 2.97-9.28 5.19-1.49-1.37-2.98-2.75-4.47-4.11z"/>
|
81 |
+
<path d="m140.14 536.22c2.11 0.1 4.22 0.2 6.34 0.29 1.58 4.53 3.15 9.05 4.84 13.54-1.82 0.49-3.64 0.98-5.45 1.48-0.72-2.67-1.47-5.33-2.28-7.97-0.71 1.57-1.43 3.15-2.04 4.78-1.21 0.2-2.42 0.4-3.62 0.61-0.2-1.34-0.37-2.66-0.52-3.99 0.58-3.01 1.75-5.85 2.73-8.74z"/>
|
82 |
+
<path d="m164.03 536.42c5.62 0.24 11.47-0.9 16.91 1.02 3.88 1.35 6.96 5.22 6.53 9.46-0.57 4.66-3.46 8.51-5.94 12.33-1.42-1.54-2.9-3.02-4.39-4.49-1.28 0.86-2.57 1.72-3.85 2.59 0.17 0.3 0.52 0.91 0.69 1.21-0.8 0.16-2.4 0.47-3.2 0.63-0.41-0.09-1.22-0.27-1.62-0.37 0.73-3.15 4.03-3.92 6.52-5.19 1.38-0.07 2.76-0.13 4.14-0.18 0.99-3.35 1.77-6.75 2.42-10.17-4.14-0.89-8.29-1.75-12.46-2.47-0.69 3.38-0.88 7.04-3.04 9.9-1.28 1.37-1.02 3.67-2.37 4.92-0.14 0-0.43 0-0.57-0.01 1.67-6.14-0.21-12.81 0.23-19.18z"/>
|
83 |
+
<path d="m197.14 536.42c8.02 0.09 17.39-1.32 23.85 4.58 5.75 4.81 6.13 13.06 4.76 19.89-0.21 0.65-0.63 1.96-0.84 2.61-1.04-1.39-2.07-2.78-3.03-4.22-1.24-4.88-1.02-10.6-4.75-14.43-3.84-3.4-9.34-3.17-14.1-3.97-0.17 7.89-0.38 15.81 0.33 23.68-1.9-1.67-3.81-3.32-5.76-4.9-0.32-7.74 0-15.5-0.46-23.24z"/>
|
84 |
+
<path d="m233.48 536.3c1.81 0.03 3.62 0.06 5.43 0.09 0.22 4.73 0.05 9.46 0.18 14.2 5.16-0.05 10.33 0.1 15.49 0.09 0-4.75 0.02-9.49-0.02-14.24 1.96-0.07 3.93-0.12 5.91-0.17 0.25 11.95-0.21 23.91 0.43 35.85-1.97 0.14-3.94 0.3-5.9 0.49-0.27-5.66 0.06-11.32-0.27-16.97-5.21 0.05-10.42 0.09-15.62-0.04-0.34 5.79 0.04 11.59-0.23 17.37-0.33 0.23-1.01 0.68-1.34 0.91-0.48-3.73-0.54-7.49-1-11.21-0.72 3.86-0.48 7.81-0.89 11.71-3.73-12.36-1.56-25.4-2.17-38.08z"/>
|
85 |
+
<path d="m271.18 541.21c6.28-8.26 20.79-7.34 26 1.63 4.37 7.27 2.95 16.21 0.98 24.01-1.42-1.51-2.83-3.03-4.24-4.53 0.05-5.97 1.24-12.66-2.36-17.89-3.58-5.28-12.43-4.95-15.84 0.35-2.96 4.53-2.41 10.21-2.6 15.37-1.55 1.53-3.1 3.07-4.66 4.62-1.44-7.79-2.32-16.82 2.72-23.56z"/>
|
86 |
+
<path d="m306.86 535.65c1.91 0.48 3.82 1.01 5.72 1.57 0.47 10.28 0.05 20.57 0.27 30.85-0.53-0.2-1.59-0.59-2.12-0.79-3.48-9.35-2.64-19.52-3.73-29.29-0.03-0.58-0.1-1.76-0.14-2.34z"/>
|
87 |
+
<path d="m333.98 536.27c7.23 0.19 15.15-0.98 21.66 2.94 10.53 6.84 10.6 24.68 0.03 31.52-6.53 3.87-14.45 2.65-21.67 2.55 0.02-12.34-0.1-24.67-0.02-37.01m5.87 5.03c-0.09 9.09 0.14 18.19 0.16 27.28 3.91-0.4 8.08-0.17 11.72-1.87 8.38-4.97 8.04-19.34-0.65-23.81-3.54-1.48-7.48-1.28-11.23-1.6z"/>
|
88 |
+
<path d="m370.08 536.38c7.8-0.04 15.61-0.08 23.41-0.06 0.16 1.74 0.32 3.49 0.47 5.24-5.97-0.12-11.94-0.05-17.91-0.05-0.05 3.01-0.06 6.01 0.02 9.03 5.45-0.03 10.89 0.18 16.35 0.19 0.06 1.66 0.12 3.32 0.19 4.99-5.5 0.05-11-0.05-16.49-0.09-0.08 4.19-0.11 8.39-0.24 12.59 5.86 0.09 11.73-0.14 17.59 0.24 0.02 1.68 0.06 3.37 0.1 5.06-7.7-0.02-15.4-0.03-23.09-0.01-0.17-12.38 0.2-24.76-0.4-37.13z"/>
|
89 |
+
<path d="m400.42 536.26c5.19 0.17 10.48-0.5 15.6 0.61 4.25 0.94 8.09 4.6 8.12 9.15 0.31 5.09-3.33 9.17-6.91 12.28 4.42 5.1 8.77 10.27 12.72 15.76-2.55 0.01-5.24-0.11-7.35-1.7-6.01-4.15-8.53-12.26-15.8-14.8-0.4 5.34-0.43 10.71-0.58 16.07-1.89-0.11-3.78-0.23-5.66-0.33-0.27-12.35-0.07-24.7-0.14-37.04m6.06 4.87c0.03 4.47 0 8.94 0.05 13.41 3.04-0.5 6.24-0.61 9.04-2.03 3.63-1.92 3.77-8.2-0.06-9.96-2.8-1.37-6.01-1.18-9.03-1.42z"/>
|
90 |
+
</g>
|
91 |
+
<g id="#c6c6c6ff" fill="#c6c6c6">
|
92 |
+
<path d="m256.37 187.07c2.27 10.1 1.08 20.54 1.17 30.79-13.18 0.24-26.37 0.64-39.55 0.24-0.02-1.75-0.03-3.5-0.05-5.24 6.38-6.26 13.04-12.25 19.27-18.67l-4.59-4.05c7.85-0.88 15.77-0.51 23.62-1.27 0.03-0.45 0.1-1.35 0.13-1.8z"/>
|
93 |
+
<path d="m210.07 219.55c15.75 0.06 31.5 0.35 47.25 0.4 0.14 8.82 0.13 17.65 0.1 26.47-15.06 0.1-30.11 0.26-45.16 0.46-2.56-3.91-5.77-7.48-7.55-11.84-0.22-5.67 3.33-10.44 5.36-15.49z"/>
|
94 |
+
<path d="m179.09 251.11c7.16-8 15.86-14.36 23.72-21.6 0.24 2.5 0.27 5.02 0.2 7.53 10.23 10.66 7.05 29.98-5.38 37.53-11.63 6.67-27.98 4.98-37.22-5 7.23-5.04 12.54-12.24 18.68-18.46z"/>
|
95 |
+
<path d="m209.99 265.99c1.93-5.23 2.19-10.86 2.87-16.33 14.86 1.01 29.75 0.8 44.63 0.82-0.1 8.18-0.06 16.35 0.03 24.53-11.51 0.51-23.04 0.25-34.56 0.34-7.78 0.04-15.24 2.56-22.92 3.46 3.59-4.03 7.99-7.63 9.95-12.82z"/>
|
96 |
+
<path d="m186.52 281.89c9.2 0.23 18.52 0.7 27.56-1.38 14.37-1.77 28.88-0.33 43.31-0.8-2.67 8.52-10 16.41-19.4 16.64-16.94 0.14-33.91 0.56-50.84-0.27-0.5-4.72-0.62-9.46-0.63-14.19z"/>
|
97 |
+
<path d="m136.12 292.04c3.6-6.66 12.09-6.61 17.51-11.1 8.26 0.76 16.57 0.59 24.86 0.92-0.05 4.84-0.2 9.69-0.19 14.54-11.2-0.12-22.52 1.46-33.62-0.54-2.91-1.15-5.73-2.52-8.56-3.82z"/>
|
98 |
+
<path d="m391.07 347.35c10.26 0.2 20.51 0.28 30.77 0.08 0.19 4.38 0.07 8.76-0.1 13.14-1.44 1.09-2.87 2.19-4.27 3.32-0.43-3.6-0.86-7.19-1.25-10.78-7.32 0.63-16.58-2.89-21.99 3.84-1.83-2.9-2.65-6.25-3.16-9.6z"/>
|
99 |
+
<path d="m776.52 348.96c0.46-0.16 1.37-0.47 1.83-0.63-0.09 9.22-0.33 18.45-0.63 27.67 4.65-0.32 10.02 0.67 13.79-2.75l0.66 0.08c0.39 0.05 1.17 0.16 1.56 0.21 0.29-0.8 0.58-1.59 0.87-2.39 0.37 2.56 4.54 5.16 2.13 7.51-0.68 0.77-1.37 1.54-2.07 2.3 0.15 5.19 0.34 10.39 0 15.58-5.08-4.67 0.18-12.67-4.45-17.64-5.62-0.5-11.26-0.24-16.88-0.08 0.02-2.97 0.05-5.93 0.21-8.89 4.58-6.01 3.54-13.95 2.98-20.97z"/>
|
100 |
+
<path d="m757.44 351.91l0.73-0.2c-0.34 0.97-1.03 1.4-2.07 1.27-5.54 0.11-11.08-0.09-16.61 0.02-0.08 5.17-0.12 10.34-0.15 15.52 5.98 0.27 11.96 0.64 17.91 1.38 0.01 1.27 0.04 2.55 0.08 3.84-0.44 0.5-1.31 1.5-1.75 2-1.18-0.2-2.35-0.4-3.52-0.58-5.88-1.09-11.88-0.68-17.82-0.98 0.08-2.46 0.09-4.91 0.08-7.37 0.17 1.58 0.43 3.14 0.72 4.72 4.45-5.34 2.39-12.74 3.11-19.09 6.41-0.36 12.99 1.06 19.29-0.53z"/>
|
101 |
+
<path d="m836.75 358.21c0.78 2.5 1.3 5.07 1.58 7.68 0.93-0.67 1.87-1.33 2.82-1.99-0.17 1.92-0.35 3.84-0.55 5.76l-0.81 0.34c-2.23 0.93-4.43 1.92-6.66 2.82-4.37 1.7-9.2 1.2-13.77 1.13-0.48-1.59-0.94-3.17-1.39-4.75 5.5 0.23 11.01 0.52 16.52 0.63 0.94-3.84 1.29-7.79 2.26-11.62z"/>
|
102 |
+
<path d="m458.95 434.38c2.33-1.9 4.6-5.4 8.09-4.26 7.07 1.6 7.35 13.12 0.78 15.65-3.74 1.59-6.51-2.23-9.35-3.99-1.09 1.54-2.18 3.08-3.29 4.59-0.3-2.83-0.53-5.66-0.82-8.49-1.4 1.21-2.66 2.57-3.81 4.03-0.9-1.49-1.88-2.91-3.05-4.18-0.33 2.97-0.54 5.95-0.89 8.91-3.46-4-3-9.76-1.32-14.42-0.02 1.59 2.12 2.4 3.05 1.02 1 0.87 1.62 2.82 3.25 2.38 1.4-1.75 2.52-3.86 4.81-4.57 0.84 1.11 1.69 2.22 2.55 3.33m3.26-1.04c0.12 3.69-0.43 7.97 2.68 10.69 4.8-1.26 4.16-6.65 4.37-10.49-2.35-0.2-4.7-0.25-7.05-0.2z"/>
|
103 |
+
<path d="m388.93 465.86c5.68 2.15 11.36 4.29 16.94 6.68-0.05 0.22-0.14 0.66-0.18 0.88-5.44 2.64-11.13 4.77-16.78 6.92-0.02-4.83-0.01-9.65 0.02-14.48z"/>
|
104 |
+
<path d="m349.52 478.84c2.66-1.72 3.99-4.72 6.07-7.01 0.2 5.15 0.31 10.3 0.32 15.45-0.66-0.04-1.97-0.12-2.62-0.16-0.09-3.22-1.26-6.21-3.77-8.28z"/>
|
105 |
+
<path d="m344.13 487.32c0.01-5.2-0.64-10.68 1.72-15.52 1.6 3.11 3.81 6.24 3.09 9.94l-1.07-0.21c-0.33 1.87-0.64 3.75-0.94 5.64-0.7 0.04-2.1 0.11-2.8 0.15z"/>
|
106 |
+
<path d="m358.29 472.78c2.84-0.06 5.69-0.06 8.53 0.05 0.73 1.41 1.48 2.81 2.23 4.22-0.83 1.36-1.67 2.72-2.51 4.09 1.13 2.39 2.28 4.79 3.36 7.22-2.65-1.84-5.14-3.88-7.62-5.94-0.99 2.02-2.05 4-3.25 5.91-0.66-5.16-0.66-10.37-0.74-15.55m2.88 2.41c-0.04 1.28-0.08 2.57-0.1 3.86 1.29-0.02 2.6-0.04 3.9-0.06-0.01-1.3-0.02-2.59-0.03-3.88-1.26 0.02-2.52 0.04-3.77 0.08z"/>
|
107 |
+
<path d="m306.32 573.5c0.03-11.83-0.39-23.71 0.68-35.51 1.09 9.77 0.25 19.94 3.73 29.29 0.53 0.2 1.59 0.59 2.12 0.79 5.46 0.05 10.93-0.05 16.4 0-0.04 1.95-0.07 3.9-0.09 5.86-7.62-0.02-15.24-0.1-22.84-0.43z"/>
|
108 |
+
<path d="m166.74 550.69c2.16-2.86 2.35-6.52 3.04-9.9 0.11 4.27 0.21 8.53 0.28 12.8 1.87 0.01 3.75 0.03 5.62 0.02-2.49 1.27-5.79 2.04-6.52 5.19 0.4 0.1 1.21 0.28 1.62 0.37 0.23 0.14 0.7 0.43 0.93 0.57l-1.59 1.01c0.02 4.39 0.07 8.78-0.47 13.15-1.89 0.12-3.84 0.15-5.56-0.76-0.2-5.76-0.71-11.53-0.07-17.28l0.35-0.25c1.35-1.25 1.09-3.55 2.37-4.92z"/>
|
109 |
+
<path d="m99.37 565.68c-3.48-7.56-2.43-16.65 0.92-24.06 1.49 1.36 2.98 2.74 4.47 4.11-0.23 5.91-2.38 12.32 0.69 17.86 1.84 3.8 6.29 6.06 10.44 5.2 3.57-0.82 6.44-3.54 10.16-3.93 0.12 1.39 0.23 2.8 0.34 4.2 1.09-0.11 2.18-0.21 3.27-0.3 1.63-8.21 4.23-16.22 7.75-23.8 0.15 1.33 0.32 2.65 0.52 3.99 1.2-0.21 2.41-0.41 3.62-0.61-1 3.27-1.75 6.6-2.6 9.91 2.91 0.03 5.81 0.06 8.71 0.09-0.6-2.27-1.19-4.54-1.79-6.81 1.81-0.5 3.63-0.99 5.45-1.48 3.03 8.02 5.69 16.19 8.15 24.4-2.05-0.54-4.47-0.32-6.26-1.53-1.61-2.68-2.47-5.71-3.58-8.61-4.18-0.19-8.35-0.44-12.53-0.38-1.31 3.49-2.75 6.92-4.13 10.39-1.56-0.23-3.13-0.44-4.69-0.65-0.93-1.18-1.85-2.37-2.77-3.55-7.12 8.17-21.88 5.23-26.14-4.44z"/>
|
110 |
+
<path d="m173.29 557.33c1.28-0.87 2.57-1.73 3.85-2.59 1.49 1.47 2.97 2.95 4.39 4.49 4.4 4.6 8.64 9.37 12.16 14.69-2.51 0-5.02-0.01-7.53-0.03-4.08-5.1-8.7-9.8-12.18-15.35-0.17-0.3-0.52-0.91-0.69-1.21z"/>
|
111 |
+
<path d="m197.6 559.66c1.95 1.58 3.86 3.23 5.76 4.9 0.2 1.55 0.48 3.08 0.76 4.62 6.94-0.94 13.43-4.34 17.76-9.9 0.96 1.44 1.99 2.83 3.03 4.22 0.21-0.65 0.63-1.96 0.84-2.61 0.44 4.83-3.56 8.41-7.48 10.4-6.58 3.28-14.15 2.79-21.27 2.49 0.05-4.71 0.39-9.42 0.6-14.12z"/>
|
112 |
+
<path d="m268.46 564.77c1.56-1.55 3.11-3.09 4.66-4.62 2.53 3.53 4.87 8.69 9.91 8.75 4.68 0.34 7.85-3.67 10.89-6.58 1.41 1.5 2.82 3.02 4.24 4.53l0.31 0.34c-3.74 3.53-7.83 7.68-13.36 7.68-7.12 0.78-13.31-4.13-16.92-9.83l0.27-0.27z"/>
|
113 |
+
</g>
|
114 |
+
<g id="#788ba6ff" fill="#788ba6">
|
115 |
+
<path d="m517.99 347.62c10.1-0.42 20.23-0.76 30.33 0.02 0.13 16.11 0.9 32.27-0.61 48.34-2.78 0.01-5.56-0.16-8.32-0.53 1.13-4.25 1.37-8.83 3.54-12.72 0.9 1.57 1.93 3.06 2.97 4.55 1.88-12.7 0.97-25.58 0.53-38.35-9.5 0.15-19.04 0.23-28.44-1.31z"/>
|
116 |
+
<path d="m879.06 366.76c1.33-0.95 2.66-1.92 4-2.88-0.24 3.71-0.59 7.41-1.15 11.08-7.87 0.18-15.75-0.18-23.61 0.2 0.21 5.08-0.12 10.18 0.33 15.25 7.71 0.06 15.43 0.09 23.14 0 0.67 1.79 1.33 3.58 1.99 5.37-9.87 0.1-19.74 0.02-29.61 0.04-0.22-9.01-0.07-18.03 0.04-27.04 8.21-0.83 17.5 3.18 24.87-2.02z"/>
|
117 |
+
<path d="m833.13 372.82c2.23-0.9 4.43-1.89 6.66-2.82 2.54 8.39 2.12 17.4 0.2 25.86-9.04-0.02-18.08-0.06-27.12-0.01-0.39-1.95-0.7-3.92-0.96-5.89 7.97 0.41 16.01 1.27 23.94-0.06 1.17-5.78 1.18-12.27-2.72-17.08z"/>
|
118 |
+
<path d="m589.19 370.99c1.9 7.87 1.11 16.04-0.66 23.85-7.89 2.04-16.14 0.95-24.17 0.68-3.99-0.41-3.99-5.36-4.49-8.37 1.45-0.74 2.92-1.48 4.38-2.21 0.31 1.9 0.74 3.78 1.16 5.68 5.94 0.06 11.88-0.01 17.83 0.08 0.45-5.28 0.38-10.59 0.29-15.88-5.3 0.06-10.62 0.23-15.87-0.62 5.74-0.56 11.49-0.09 17.23-0.17 0.27 2.86 0.47 5.73 0.93 8.58 0.63 0 1.87 0.01 2.5 0.01 0.63-3.85 0.68-7.75 0.87-11.63z"/>
|
119 |
+
<path d="m755.58 375.74c0.44-0.5 1.31-1.5 1.75-2 0.58 7.33 0.1 14.76-1.21 22-7.29-0.25-14.83 1.24-21.91-1.05-3.59-1.1-6.44-3.85-7.9-7.27 8.07 1.62 16.34 4.85 24.66 2.7 2.41-4.54 0.76-10.03 1.09-14.96 1.17 0.18 2.34 0.38 3.52 0.58z"/>
|
120 |
+
<path d="m615.04 383.96c1.45-2.19 3.06-4.28 4.84-6.21 0.11 5.75-0.32 11.48-0.2 17.23-1.62 0.37-3.25 0.71-4.87 1.06-0.49-4-0.52-8.12 0.23-12.08z"/>
|
121 |
+
<path d="m668.48 378.26c0.6-0.1 1.78-0.3 2.38-0.39 0.58-0.09 1.74-0.27 2.32-0.36 0.33 6.1 0.49 12.24-0.07 18.33-8.69-0.15-17.39 0.33-26.06-0.25-1.96 0.1-2.92-2.03-3.31-3.61-0.6-3.62 0.14-7.27 0.61-10.85 1.51-0.7 3.01-1.41 4.54-2.11-0.1 3.82-0.09 7.65 0 11.47 6.69 0.15 13.37-0.18 20.04-0.53-0.21-3.9-0.36-7.8-0.45-11.7z"/>
|
122 |
+
<path d="m551.48 454.7c0.52 0.16 1.56 0.49 2.08 0.65 0.25 12.42 0.32 24.9-1.22 37.25-2.07-0.42-4.02-1.19-5.78-2.33 1-6.52 1.76-13.1 1.83-19.71 0.75 4.63 1.38 9.31 2.82 13.79 1.38-9.85 0.55-19.77 0.27-29.65z"/>
|
123 |
+
<path d="m584.62 454.57c0.5 0.12 1.49 0.36 1.99 0.48 0.34 12.48 0.22 25.04-1.25 37.46-1.82-0.49-3.61-1-5.4-1.55 0.7-6.41 1.12-12.86 2.09-19.23 0.86 3.01 1.7 6.03 2.7 9.01 0.43-8.71 0.39-17.46-0.13-26.17z"/>
|
124 |
+
</g>
|
125 |
+
<g id="#4e74a9ff">
|
126 |
+
<path d="m557.87 433.74c0.85 0.07 2.57 0.2 3.42 0.27 0.03 1.88-1.67 2.46-3.07 3.16-0.09-0.86-0.26-2.57-0.35-3.43z" fill="#4e74a9"/>
|
127 |
+
</g>
|
128 |
+
<metadata>
|
129 |
+
<rdf:RDF>
|
130 |
+
<cc:Work>
|
131 |
+
<dc:format>image/svg+xml</dc:format>
|
132 |
+
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
133 |
+
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
|
134 |
+
<dc:publisher>
|
135 |
+
<cc:Agent rdf:about="http://openclipart.org/">
|
136 |
+
<dc:title>Openclipart</dc:title>
|
137 |
+
</cc:Agent>
|
138 |
+
</dc:publisher>
|
139 |
+
<dc:title>Credit Card (Front)</dc:title>
|
140 |
+
<dc:date>2013-08-20T23:45:47</dc:date>
|
141 |
+
<dc:description>A foo credit card (front)</dc:description>
|
142 |
+
<dc:source>http://openclipart.org/detail/182038/credit-card-front-by-jmlevick-182038</dc:source>
|
143 |
+
<dc:creator>
|
144 |
+
<cc:Agent>
|
145 |
+
<dc:title>Jmlevick</dc:title>
|
146 |
+
</cc:Agent>
|
147 |
+
</dc:creator>
|
148 |
+
<dc:subject>
|
149 |
+
<rdf:Bag>
|
150 |
+
<rdf:li>bank</rdf:li>
|
151 |
+
<rdf:li>buy</rdf:li>
|
152 |
+
<rdf:li>card</rdf:li>
|
153 |
+
<rdf:li>credit</rdf:li>
|
154 |
+
<rdf:li>credit card</rdf:li>
|
155 |
+
<rdf:li>front</rdf:li>
|
156 |
+
<rdf:li>money</rdf:li>
|
157 |
+
<rdf:li>plastic</rdf:li>
|
158 |
+
<rdf:li>purchase</rdf:li>
|
159 |
+
<rdf:li>shopping</rdf:li>
|
160 |
+
</rdf:Bag>
|
161 |
+
</dc:subject>
|
162 |
+
</cc:Work>
|
163 |
+
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
164 |
+
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
|
165 |
+
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
|
166 |
+
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
|
167 |
+
</cc:License>
|
168 |
+
</rdf:RDF>
|
169 |
+
</metadata>
|
170 |
+
</svg>
|
assets/icon/express-checkout.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0"?><svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="100px" height="100px"> <path d="M 9.984375 15.001953 C 9.149375 15.041953 8.1182969 15.573313 7.5292969 16.320312 C 6.9892969 16.964312 6.5275313 18.010188 6.6445312 18.992188 C 7.5875313 19.074188 8.5301406 18.500438 9.1191406 17.773438 C 9.6991406 17.026437 10.082375 16.024953 9.984375 15.001953 z M 18 17 L 18 32 L 20.375 32 L 20.375 27 L 23.625 27 C 26.608 27 28.75 24.925 28.75 22 C 28.75 19.075 26.647125 17 23.703125 17 L 18 17 z M 20.375 19 L 23.125 19 C 25.172 19 26.375 20.105 26.375 22 C 26.375 23.895 25.182 25 23.125 25 L 20.375 25 L 20.375 19 z M 9.875 19.5 C 8.5 19.5 7.517 20.25 6.875 20.25 C 6.223 20.25 5.25 19.509766 4.125 19.509766 C 2.75 19.509766 1.4033594 20.372859 0.69335938 21.630859 C -0.76564063 24.145859 0.31460937 27.869016 1.7246094 29.916016 C 2.4156094 30.930016 3.25 32 4.375 32 C 5.406 31.961 5.755 31.375 7 31.375 C 8.254 31.375 8.625 32 9.75 32 C 10.875 32 11.556094 30.969078 12.246094 29.955078 C 13.034094 28.805078 13.356 27.684 13.375 27.625 C 13.356 27.606 11.197734 26.77725 11.177734 24.28125 C 11.158734 22.19525 12.879031 21.200578 12.957031 21.142578 C 11.984031 19.700578 10.375 19.5 10 19.5 L 9.875 19.5 z M 34.199219 21 C 31.710219 21 29.870734 22.395453 29.802734 24.314453 L 31.912109 24.314453 C 32.086109 23.402453 32.948859 22.804688 34.130859 22.804688 C 35.563859 22.804688 36.373047 23.460969 36.373047 24.667969 L 36.375 25.5 L 33.443359 25.654297 C 30.722359 25.815297 29.25 26.908594 29.25 28.808594 C 29.25 30.727594 30.770219 32.001953 32.949219 32.001953 C 34.421219 32.001953 35.78725 31.270328 36.40625 30.111328 L 36.455078 30.111328 L 36.455078 31.886719 L 38.623047 31.886719 L 38.623047 24.515625 C 38.624047 22.376625 36.882219 21 34.199219 21 z M 39.5 21 L 43.507812 31.949219 L 43.292969 32.615234 C 42.930969 33.744234 42.344828 34.177734 41.298828 34.177734 C 41.119828 34.177734 40.781 34.159625 40.625 34.140625 L 40.625 35.945312 C 40.783 35.980313 41.332906 36 41.503906 36 C 43.810906 36 44.896703 35.132047 45.845703 32.498047 L 50 21 L 47.595703 21 L 44.808594 29.884766 L 44.759766 29.884766 L 41.972656 21 L 39.5 21 z M 36.375 27 L 36.367188 27.867188 C 36.367188 29.254188 35.166125 30.242188 33.578125 30.242188 C 32.329125 30.242188 31.535156 29.653953 31.535156 28.751953 C 31.535156 27.820953 32.300672 27.279359 33.763672 27.193359 L 36.375 27 z"/></svg>
|
assets/icon/gpay_gray.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="41" height="17" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z" fill="#5F6368"/><path d="M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944" fill="#4285F4"/><path d="M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703" fill="#34A853"/><path d="M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z" fill="#FABB05"/><path d="M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774" fill="#E94235"/><path d="M0 0h41.285v18H0z"/></g></svg>
|
assets/icon/gpay_light.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg width="41" height="17" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z" fill="#FFF"/><path d="M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944" fill="#4285F4"/><path d="M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703" fill="#34A853"/><path d="M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z" fill="#FABB05"/><path d="M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774" fill="#E94235"/></g></svg>
|
assets/icon/klarna.svg
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 452.9 101.1" style="enable-background:new 0 0 452.9 101.1;" xml:space="preserve">
|
5 |
+
<path d="M79.7,0H57.4c0,18.3-8.4,35-23,46l-8.8,6.6l34.2,46.6h28.1L56.4,56.3C71.3,41.5,79.7,21.5,79.7,0z"/>
|
6 |
+
<rect width="22.8" height="99.2"/>
|
7 |
+
<rect x="94.5" width="21.5" height="99.2"/>
|
8 |
+
<path d="M304.6,28.7c-8.2,0-16,2.5-21.2,9.6v-7.7H263v68.6h20.7v-36c0-10.4,7-15.5,15.4-15.5c9,0,14.2,5.4,14.2,15.4v36.2h20.5V55.6
|
9 |
+
C333.8,39.6,321.1,28.7,304.6,28.7z"/>
|
10 |
+
<path d="M181,30.6V35c-5.8-4-12.8-6.3-20.4-6.3c-20,0-36.2,16.2-36.2,36.2s16.2,36.2,36.2,36.2c7.6,0,14.6-2.3,20.4-6.3v4.4h20.5
|
11 |
+
V30.6H181z M162.3,82.5c-10.3,0-18.6-7.9-18.6-17.6s8.3-17.6,18.6-17.6c10.3,0,18.6,7.9,18.6,17.6S172.6,82.5,162.3,82.5z"/>
|
12 |
+
<path d="M233.3,39.5v-8.9h-21v68.6h21.1v-32c0-10.8,11.7-16.6,19.8-16.6c0.1,0,0.2,0,0.2,0v-20C245.1,30.6,237.4,34.2,233.3,39.5z"
|
13 |
+
/>
|
14 |
+
<path d="M397.6,30.6V35c-5.8-4-12.8-6.3-20.4-6.3c-20,0-36.2,16.2-36.2,36.2s16.2,36.2,36.2,36.2c7.6,0,14.6-2.3,20.4-6.3v4.4h20.5
|
15 |
+
V30.6H397.6z M378.9,82.5c-10.3,0-18.6-7.9-18.6-17.6s8.3-17.6,18.6-17.6c10.3,0,18.6,7.9,18.6,17.6
|
16 |
+
C397.6,74.6,389.2,82.5,378.9,82.5z"/>
|
17 |
+
<g>
|
18 |
+
<path d="M434,32.6c0-1-0.7-1.6-1.8-1.6h-1.9v5.2h0.9v-1.9h1l0.8,1.9h1l-0.9-2.1C433.7,33.8,434,33.3,434,32.6z M432.2,33.4h-1v-1.6
|
19 |
+
h1c0.6,0,0.9,0.3,0.9,0.8S432.9,33.4,432.2,33.4z"/>
|
20 |
+
<path d="M431.9,28.8c-2.7,0-4.9,2.2-4.9,4.9c0.1,2.7,2.2,4.9,4.9,4.9s4.9-2.2,4.9-4.9C436.8,31,434.6,28.8,431.9,28.8z M431.9,37.7
|
21 |
+
c-2.2,0-3.9-1.8-3.9-4c0-2.2,1.8-4,3.9-4c2.2,0,3.9,1.8,3.9,4C435.8,35.9,434,37.7,431.9,37.7z"/>
|
22 |
+
</g>
|
23 |
+
<path d="M440,74.9c-7.1,0-12.9,5.8-12.9,12.9c0,7.1,5.8,12.9,12.9,12.9c7.1,0,12.9-5.8,12.9-12.9C452.9,80.6,447.1,74.9,440,74.9z"
|
24 |
+
/>
|
25 |
+
</svg>
|
assets/icon/p24.svg
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Warstwa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
viewBox="0 0 1920 672" enable-background="new 0 0 1920 672" xml:space="preserve">
|
6 |
+
<g>
|
7 |
+
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#D13239" points="409.6,384.9 566,384.7 560.3,420.3 429.5,545.2
|
8 |
+
539.3,545 532.9,583.4 371.2,583.5 378,543.8 503.4,423.7 403.3,423.7 409.6,384.9 "/>
|
9 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#D13239" d="M238.5,324c-3.4-3.6-8.3-6.4-13.7-8.6c-5.7-2.2-12-3.8-18.2-4.9
|
10 |
+
c-7.8-1.4-15.4-2-20.8-2.2c-5-0.2-8.2-0.2-8.2-0.2l-68.4,0l-50.9,0L12.7,583.5l42.6,0l16.8-102l82.6,0.4c0,0,32.2,1.3,55-10.8
|
11 |
+
c22.8-12.1,28.9-39.6,28.9-39.6s2.5-10.2,4.6-22.6c2.3-13.7,4.6-30.1,5.8-38.8c0.5-3.8,0.8-6.2,0.8-6.2s0.6-2.8,0.6-7.2
|
12 |
+
c0.1-6.1-0.8-15.3-5.6-24.1C243.1,329.5,241.1,326.7,238.5,324z M205.7,372.6c0,0.5-3.8,22.6-8.8,48.8c-1.9,10-9.6,15.4-18.4,17.3
|
13 |
+
c-14.6,3.1-30.3,2.5-30.3,2.5l-69-0.2l15.2-91.5l62.5,0.2c0,0,4.2-0.1,10.1,0c6.7,0.1,15.6,0.4,22.9,1.4c6.3,0.8,11.3,2.1,12.9,4.1
|
14 |
+
c2.1,2.6,2.9,6,3.2,9C206.4,368.6,205.7,372.3,205.7,372.6z"/>
|
15 |
+
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#D13239" points="778.1,308.1 819.1,308.1 773.2,583.5 732.1,583.4
|
16 |
+
778.1,308.1 "/>
|
17 |
+
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#D13239" points="996.9,384.9 1036.2,384.8 1050.1,524.6 1110.6,384.6
|
18 |
+
1159.1,384.7 1173.4,525.1 1233.8,384.8 1274.6,384.8 1188,583.3 1139.6,583.3 1125.6,444.3 1064.5,583.3 1016.9,583.5
|
19 |
+
996.9,384.9 "/>
|
20 |
+
<g>
|
21 |
+
<path fill="#D13239" d="M702.4,386.5c-11.5-3.7-31.4-4.5-48.3-4.3c-16.3,0.2-23.8,1-29.9,2.3c0,0-29,4.2-45.5,24.6
|
22 |
+
c-16.5,20.4-21.4,65-21.4,65s-9.8,49.3-6.9,65.8c2.9,16.4,8,31.7,26.6,38.8c18.6,7.2,34.4,6.8,34.4,6.8s33.2,2.6,58.2-3.3
|
23 |
+
c25-5.9,38.2-23.5,38.2-23.5s5.9-7.6,10.1-16.6c4.2-9,5.5-15.3,5.7-16.1l2.6-10.7l-42.5,0.1c0,0-2.3,28.1-25.3,30.7
|
24 |
+
c-22.9,2.6-35.2,1.6-39.7,1.4c-4.4-0.2-29,0.9-27-19.7c0-0.3,0-0.7,0.1-1.3c1.1-23.4,3.7-29.5,3.7-29.5l133.5-0.4l5.7-33
|
25 |
+
C741.3,426.2,736.6,397.7,702.4,386.5z M693.5,458.9l-91.5-0.1l3.6-14.5c0,0,3.2-11.4,9.5-16.2c6.4-4.8,14.5-5.7,22.1-6.4
|
26 |
+
c7.6-0.7,27.9-2.2,44.4,1.2c5.5,1.1,10.7,4.2,12.1,8.8C696.9,442.5,693.5,458.9,693.5,458.9z"/>
|
27 |
+
<path fill="#D13239" d="M592,526.9c0,0.3-0.1,0.6-0.1,0.9C591.8,529.4,592,526.8,592,526.9z"/>
|
28 |
+
</g>
|
29 |
+
<g>
|
30 |
+
<path fill="#D13239" d="M843.8,527c0,0.3-0.1,0.6-0.1,0.9C843.7,529.5,843.8,526.9,843.8,527z"/>
|
31 |
+
<path fill="#D13239" d="M954.3,386.6c-11.5-3.7-31.4-4.5-48.3-4.3c-16.3,0.2-23.8,1-29.9,2.3c0,0-29,4.2-45.5,24.6
|
32 |
+
c-16.5,20.4-21.4,65-21.4,65s-9.8,49.3-6.9,65.8c2.9,16.4,8,31.7,26.6,38.8c18.6,7.2,34.4,6.8,34.4,6.8s33.2,2.6,58.2-3.3
|
33 |
+
c25-5.9,38.2-23.5,38.2-23.5s5.9-7.6,10.1-16.6c4.2-9,5.5-15.3,5.7-16.1l2.6-10.7l-42.5,0.1c0,0-2.3,28.1-25.3,30.7
|
34 |
+
c-22.9,2.6-35.2,1.6-39.7,1.5c-4.4-0.2-29,0.8-27-19.7c0-0.3,0-0.7,0.1-1.3c1.1-23.4,3.7-29.5,3.7-29.5l133.5-0.4l5.7-33
|
35 |
+
C993.2,426.3,988.5,397.7,954.3,386.6z M945,458.9l-91.5-0.1l3.6-14.5c0,0,3.2-11.4,9.5-16.2c6.3-4.8,14.5-5.7,22.1-6.4
|
36 |
+
c7.6-0.7,27.9-2.2,44.4,1.2c5.5,1.1,10.7,4.2,12.1,8.8C948.4,442.4,945,458.9,945,458.9z"/>
|
37 |
+
</g>
|
38 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#D13239" d="M1321.8,384.9l26.3,145.2l74.3-145.3l41.8,0.4l-107.1,207.5
|
39 |
+
c0,0-19.4,37.6-31.4,47.1c-12,9.5-19.4,13.8-29.2,14.8c-9.8,1-13.8,1.7-23.2,0l-10-1.8l6.2-37.1c0,0,16.6,3.1,26.4-0.8
|
40 |
+
c9.9-3.9,17.8-20.7,17.8-20.7l5-8.4l-38.7-201L1321.8,384.9L1321.8,384.9z"/>
|
41 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M1479.4,404.6l43.1,0.1l2.6-16.7c0,0,4.6-30.2,14.9-36
|
42 |
+
c3.3-1.9,8.6-3.6,14.7-4.7c11.3-2,25.6-2.2,37.3-1.8c17.9,0.6,24.7,0.8,42.9,2.9c18.2,2.1,13.6,19.7,13.6,19.7l-3.6,26.3
|
43 |
+
c0,0-1.6,11.8-5.8,19.1c-3.7,6.5-13.9,10.9-19.8,12.8c-14.2,4.6-62.8,17-62.8,17l-38.2,11c0,0-23.5,6.8-36.6,21.3
|
44 |
+
c-13.2,14.6-18.4,31.1-20.2,39.7c-1.8,8.6-11.9,68.1-11.9,68.1l206.2,0.1l6.9-41.2l-163.1,0.2l2.9-16.8c0,0,1.9-17.3,8.9-23
|
45 |
+
c2.2-1.8,3.3-4.2,16.3-8.8c7.8-2.8,34.4-9.9,34.4-9.9l61.5-16.8c0,0,33.6-8.6,46.8-27c13.2-18.3,18.3-53.4,18.3-53.4
|
46 |
+
s3.6-34.1,0.8-44.8c-2.7-10.7-12.8-23.5-25.1-29c-12.3-5.5-25.1-8.7-62.2-8.2c-37.1,0.5-55.5,2.2-74.3,9.2
|
47 |
+
c-18.8,6.9-29.7,19.5-36.6,37.3C1483.8,368.2,1479.4,404.6,1479.4,404.6L1479.4,404.6z"/>
|
48 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M1867.6,481.2l28.9-173.2l-51.2,0l-159.4,171.2l-7.2,43.4l139.4,0
|
49 |
+
l-10.2,60.8l42.8,0.1l10.1-60.9l39.5,0.1l7.1-41.5L1867.6,481.2z M1825,481.3l-90.1-0.1l109.7-116.9L1825,481.3z"/>
|
50 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M328.9,330.8h131.3c0,0,29.4-23.8,50.3-39.1
|
51 |
+
c20.9-15.3,58.9-39.4,58.9-39.4l-74.2-34.7c0,0-62.7,38.8-89.3,57.1C380.1,291.6,328.9,330.8,328.9,330.8L328.9,330.8z"/>
|
52 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M611.1,227.8l-60.9-41c0,0,55.1-31.3,128.4-60.5
|
53 |
+
c73.2-29.2,112.3-41.4,112.3-41.4l12.4,58.1c0,0-70.5,23.6-110.9,42.7C650.6,203.5,611.1,227.8,611.1,227.8L611.1,227.8z"/>
|
54 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M848.3,130.3l-10.6-59.5c0,0,75.2-20,144-32.8
|
55 |
+
c68.9-12.8,160.2-18.9,160.2-18.9l-30.2,91.9c0,0-80.3-11-155.7-0.7C897.3,117.3,848.3,130.3,848.3,130.3L848.3,130.3z"/>
|
56 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M1159.5,118.8l50.8-102.1c0,0,111.3-2.2,207.3,12.7
|
57 |
+
c96,14.8,183.8,37.6,181.9,38.6l-243.4,127.3c0,0-56.9-36-127.5-58.1C1188.6,125.4,1159.5,118.8,1159.5,118.8L1159.5,118.8z"/>
|
58 |
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#B3B2B1" d="M1399.7,223l53.5,40.6h439.7c0,0-0.9-14.2-12.6-34.4
|
59 |
+
c-7.3-12.6-20.6-26-34.5-39.9c-5.1-5-25.3-20.8-40.5-30.7c-38.8-25.2-60.5-34.9-100.8-53.2L1399.7,223L1399.7,223z"/>
|
60 |
+
<path fill="#D13239" d="M357.4,384.7c-16.5,0-32.1,6.5-45.4,13.8l2.3-13.8h-43.7l-35,197.7h43.8l19.4-109.5
|
61 |
+
c4-22.2,20.6-49.7,53-49.7l22.6-0.1l6.8-38.4H357.4z"/>
|
62 |
+
</g>
|
63 |
+
</svg>
|
assets/icon/payment-request-icon.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 31" width="50" height="31"><defs><image width="30" height="29" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAMAAACKeiw+AAAAAXNSR0IB2cksfwAAAXdQTFRFAAAAnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewq0m8niuxnCewnCewnCewnCewqka79en32KrgnSmxnCewnCewnCewqkW7/v7+3bXknCewoza17dnx3LPjnCewnCew27HinCewnCewnCew2q/hnSiwnCew69Xv2a3hnCewoTG02azgnCiwnCewoDG09Of20ZvanCewyIjT9er3pz64nCewyInTpz+5nCewzpTY9ev3qEC5nCew9uz4qEG5nCew9u34qEK6nCewnCewtV7E/v3+9+74qUO6nCewnCew9Oj2nCewnCewnCewyovVrUy9nCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewnCewp0z7WgAAAH10Uk5TAAlipNDt+urMnVcEHJLu/uaJDQNp5FQLn/38h6uUkHYBVvv+/vZGEdL+///+wQpt/v//3f7//7E0//UlbP/+WP//yf7//tb+///P/v/+r/7+e/7//kL//jH//sWN/v///m8h/9wWeP7+Zgy6pgcf08cjzhORTso9ntvUlTNYLLjaAAABQElEQVR4nG3TZ1fCMBQG4AsoVVGj4qIuwIGiFaK4B+6FW3GLe4N76483rSfNTen77eZJm5PkBoDH4XTl5LrdSl5+gQesKSwqJmZKSssk9JYrREpFJdKqah+xRK0RWmtFPXX8z/V2SkiD3+BAkA80NmFubtE11MrrtnB7B3atk3GEV9EwpV2SB9hpdPMi1kMp7cXe54F+sSfDB5APDsEwmm34yKgYiIMLLxYbYz4uPAIT0l4ndZ+aFjwjMZmdYz4veEHmBNPFJcHLkq7ouorWXsO6znRjU9ROSFp0a1vUwR0IKZLu7qHp+w6AA14cpig9OsZrnbArOTU/T6TOoljPL/QbvTTrq2tpGzdGO9zeEdukM//ddP9gp48Z3otPz9mqoVZ/Sasyul+9+B34394R+rSPrGeU/PwyGkf9/vk1B/8A52xLuvlFBNIAAAAASUVORK5CYII="/></defs><style></style><use href="#img1" x="9" y="1" /></svg>
|
assets/js/payment-request.js
CHANGED
@@ -9,10 +9,17 @@
|
|
9 |
const jsNonce = cpsw_payment_request.nonce.js_nonce;
|
10 |
const endpoint = cpsw_payment_request.ajax_endpoint;
|
11 |
const isResponsive = cpsw_payment_request.is_responsive;
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
let smallScreen = true;
|
14 |
-
|
15 |
let requestType = '';
|
|
|
16 |
|
17 |
if ( '' === pubKey ) {
|
18 |
return;
|
@@ -67,27 +74,23 @@
|
|
67 |
function generatePaymentButton( data ) {
|
68 |
try {
|
69 |
const paymentRequest = stripe.paymentRequest( data );
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
let height = style.height;
|
74 |
-
|
75 |
-
if ( $( document ).width() < 660 ) {
|
76 |
-
height = 40;
|
77 |
smallScreen = true;
|
78 |
} else {
|
79 |
smallScreen = false;
|
80 |
}
|
81 |
|
82 |
-
const prButton =
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
} );
|
92 |
|
93 |
paymentRequest.canMakePayment().then( function( result ) {
|
@@ -97,19 +100,42 @@
|
|
97 |
|
98 |
if ( result.applePay ) {
|
99 |
requestType = 'apple_pay';
|
|
|
100 |
} else if ( result.googlePay ) {
|
101 |
requestType = 'google_pay';
|
|
|
102 |
} else {
|
103 |
requestType = 'payment_request_api';
|
|
|
104 |
}
|
105 |
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
if ( $( '#cpsw-payment-request-separator' ).hasClass( 'cart' ) ) {
|
114 |
$( '#cpsw-payment-request-separator' ).show();
|
115 |
}
|
@@ -118,13 +144,22 @@
|
|
118 |
$( '#cpsw-payment-request-separator' ).show();
|
119 |
}
|
120 |
|
121 |
-
if ( $( '#cpsw-payment-request-separator' ).hasClass( 'product' ) ) {
|
122 |
if ( smallScreen && $( '#cpsw-payment-request-wrapper' ).hasClass( 'sticky' ) ) {
|
123 |
$( '#cpsw-payment-request-separator' ).hide();
|
124 |
-
} else {
|
125 |
$( '#cpsw-payment-request-separator' ).show();
|
126 |
}
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
} );
|
129 |
|
130 |
paymentRequest.on( 'shippingaddresschange', function( e ) {
|
@@ -265,10 +300,10 @@
|
|
265 |
|
266 |
$( document.body ).on( 'woocommerce_variation_has_changed', function() {
|
267 |
if ( addToCart.is( '.disabled' ) ) {
|
268 |
-
$( '#cpsw-payment-request-button' ).addClass( 'payment-method-disabled' );
|
269 |
return;
|
270 |
}
|
271 |
-
$( '#cpsw-payment-request-button' ).removeClass( 'payment-method-disabled' );
|
272 |
blockPaymentRequestButton();
|
273 |
|
274 |
$.when( getSelectedProductData() ).then( function( response ) {
|
@@ -372,15 +407,15 @@
|
|
372 |
}
|
373 |
|
374 |
function blockPaymentRequestButton( ) {
|
375 |
-
if ( $( '
|
376 |
return;
|
377 |
}
|
378 |
|
379 |
-
$( '
|
380 |
}
|
381 |
|
382 |
function unblockPaymentRequestButton() {
|
383 |
-
$( '
|
384 |
}
|
385 |
|
386 |
function getAttributes() {
|
@@ -462,6 +497,78 @@
|
|
462 |
return data;
|
463 |
}
|
464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
function createPaymentMethod( event ) {
|
466 |
const data = preparePaymentMethod( event );
|
467 |
return $.ajax( {
|
@@ -554,6 +661,55 @@
|
|
554 |
displayErrorMessage( message );
|
555 |
}
|
556 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
initializePaymentButton();
|
558 |
|
559 |
$( document.body ).on( 'updated_cart_totals', function() {
|
@@ -567,19 +723,20 @@
|
|
567 |
|
568 |
// Responsive behaviour for product page.
|
569 |
$( window ).on( 'resize', function() {
|
570 |
-
if ( $( '#cpsw-payment-request-wrapper' ).hasClass( 'product' ) ) {
|
571 |
-
|
|
|
|
|
572 |
$( '#cpsw-payment-request-wrapper' ).removeClass( 'sticky' );
|
573 |
$( '#cpsw-payment-request-separator' ).show();
|
574 |
} else {
|
575 |
-
if ( 'no' === cpsw_payment_request.product_advanced_options ) {
|
576 |
-
return;
|
577 |
-
}
|
578 |
if ( 'yes' === isResponsive ) {
|
579 |
$( '#cpsw-payment-request-wrapper' ).addClass( 'sticky' );
|
580 |
$( '#cpsw-payment-request-separator' ).hide();
|
581 |
}
|
582 |
}
|
|
|
|
|
583 |
}
|
584 |
} );
|
585 |
}( jQuery ) );
|
9 |
const jsNonce = cpsw_payment_request.nonce.js_nonce;
|
10 |
const endpoint = cpsw_payment_request.ajax_endpoint;
|
11 |
const isResponsive = cpsw_payment_request.is_responsive;
|
12 |
+
let addToCartButton = '';
|
13 |
+
let productWrapper = '';
|
14 |
+
let quantityInput = '';
|
15 |
+
let addToCartHeight = '';
|
16 |
+
let addToCartWidth = '';
|
17 |
+
let totalWidth = '';
|
18 |
+
let quantityWidth = '';
|
19 |
+
let availableWidth = '';
|
20 |
let smallScreen = true;
|
|
|
21 |
let requestType = '';
|
22 |
+
let buttonClass = '';
|
23 |
|
24 |
if ( '' === pubKey ) {
|
25 |
return;
|
74 |
function generatePaymentButton( data ) {
|
75 |
try {
|
76 |
const paymentRequest = stripe.paymentRequest( data );
|
77 |
+
let iconUrl = '';
|
78 |
|
79 |
+
if ( $( document ).width() < 600 ) {
|
|
|
|
|
|
|
|
|
|
|
80 |
smallScreen = true;
|
81 |
} else {
|
82 |
smallScreen = false;
|
83 |
}
|
84 |
|
85 |
+
const prButton = $( '.cpsw-payment-request-custom-button-render' );
|
86 |
+
|
87 |
+
if ( $( document ).width() > 600 ) {
|
88 |
+
$( '#cpsw-payment-request-wrapper' ).removeClass( 'sticky' );
|
89 |
+
}
|
90 |
+
|
91 |
+
prButton.on( 'click', function() {
|
92 |
+
paymentRequest.show();
|
93 |
+
return false;
|
94 |
} );
|
95 |
|
96 |
paymentRequest.canMakePayment().then( function( result ) {
|
100 |
|
101 |
if ( result.applePay ) {
|
102 |
requestType = 'apple_pay';
|
103 |
+
buttonClass = 'cpsw-express-checkout-applepay-button';
|
104 |
} else if ( result.googlePay ) {
|
105 |
requestType = 'google_pay';
|
106 |
+
buttonClass = 'cpsw-express-checkout-googlepay-button';
|
107 |
} else {
|
108 |
requestType = 'payment_request_api';
|
109 |
+
buttonClass = 'cpsw-express-checkout-payment-button';
|
110 |
}
|
111 |
|
112 |
+
if ( 'google_pay' === requestType ) {
|
113 |
+
iconUrl = 'dark' === style.theme ? cpsw_payment_request.icons.gpay_light : cpsw_payment_request.icons.gpay_gray;
|
114 |
+
} else if ( 'apple_pay' === requestType ) {
|
115 |
+
iconUrl = 'dark' === style.theme ? cpsw_payment_request.icons.applepay_light : cpsw_payment_request.icons.applepay_gray;
|
116 |
+
} else {
|
117 |
+
iconUrl = cpsw_payment_request.icons.payment_request;
|
118 |
+
}
|
119 |
+
|
120 |
+
cpswAdjustButtonOnProductPage();
|
121 |
+
cpswAdjustButtonOnCheckoutPage();
|
122 |
+
cpswAdjustButtonOnCartPage();
|
123 |
+
$( '.cpsw-payment-request-custom-button-render' ).addClass( 'cpsw-express-' + requestType );
|
124 |
|
125 |
+
if ( '' !== iconUrl ) {
|
126 |
+
$( '.cpsw-express-checkout-button-icon' ).show();
|
127 |
+
$( '.cpsw-express-checkout-button-icon' ).attr( 'src', iconUrl );
|
128 |
}
|
129 |
|
130 |
+
$( '.cpsw-payment-request-custom-button-render' ).addClass( buttonClass + '--' + style.theme );
|
131 |
+
$( '#cpsw-payment-request-custom-button' ).show();
|
132 |
+
|
133 |
+
attachPaymentRequestButtonEventListeners( prButton, paymentRequest );
|
134 |
+
|
135 |
+
$( '#cpsw-payment-request-wrapper' ).css( 'display', 'inline-block' );
|
136 |
+
|
137 |
+
makeButtonInline();
|
138 |
+
|
139 |
if ( $( '#cpsw-payment-request-separator' ).hasClass( 'cart' ) ) {
|
140 |
$( '#cpsw-payment-request-separator' ).show();
|
141 |
}
|
144 |
$( '#cpsw-payment-request-separator' ).show();
|
145 |
}
|
146 |
|
147 |
+
if ( $( '#cpsw-payment-request-separator' ).hasClass( 'cpsw-product' ) ) {
|
148 |
if ( smallScreen && $( '#cpsw-payment-request-wrapper' ).hasClass( 'sticky' ) ) {
|
149 |
$( '#cpsw-payment-request-separator' ).hide();
|
150 |
+
} else if ( ! $( '#cpsw-payment-request-wrapper' ).hasClass( 'inline' ) ) {
|
151 |
$( '#cpsw-payment-request-separator' ).show();
|
152 |
}
|
153 |
}
|
154 |
+
|
155 |
+
if ( ! $( '.cpsw-express-checkout-button-icon' ).hasClass( 'cpsw-express-checkout-button-icon-top' ) && $( '.cpsw-express-checkout-button-shines' ).height() <= 48 ) {
|
156 |
+
let buttonIconWidth = '39px';
|
157 |
+
if ( 'payment_request_api' === requestType ) {
|
158 |
+
buttonIconWidth = '26px';
|
159 |
+
}
|
160 |
+
$( '.cpsw-express-checkout-button-icon' ).css( 'width', buttonIconWidth );
|
161 |
+
$( '.cpsw-express-checkout-button-icon' ).addClass( 'cpsw-express-checkout-button-icon-top' );
|
162 |
+
}
|
163 |
} );
|
164 |
|
165 |
paymentRequest.on( 'shippingaddresschange', function( e ) {
|
300 |
|
301 |
$( document.body ).on( 'woocommerce_variation_has_changed', function() {
|
302 |
if ( addToCart.is( '.disabled' ) ) {
|
303 |
+
$( '#cpsw-payment-request-custom-button' ).addClass( 'payment-method-disabled' );
|
304 |
return;
|
305 |
}
|
306 |
+
$( '#cpsw-payment-request-custom-button' ).removeClass( 'payment-method-disabled' );
|
307 |
blockPaymentRequestButton();
|
308 |
|
309 |
$.when( getSelectedProductData() ).then( function( response ) {
|
407 |
}
|
408 |
|
409 |
function blockPaymentRequestButton( ) {
|
410 |
+
if ( $( '.cpsw-payment-request-custom-button-render' ).data( 'blockUI.isBlocked' ) ) {
|
411 |
return;
|
412 |
}
|
413 |
|
414 |
+
$( '.cpsw-payment-request-custom-button-render' ).addClass( 'cpsw_request_button_blocked' ).block( { message: null } );
|
415 |
}
|
416 |
|
417 |
function unblockPaymentRequestButton() {
|
418 |
+
$( '.cpsw-payment-request-custom-button-render' ).removeClass( 'cpsw_request_button_blocked' ).unblock();
|
419 |
}
|
420 |
|
421 |
function getAttributes() {
|
497 |
return data;
|
498 |
}
|
499 |
|
500 |
+
function cpswAdjustButtonOnCheckoutPage() {
|
501 |
+
if ( $( '.place-order #place_order' ).length > 0 ) {
|
502 |
+
const wcCheckoutButton = $( '.place-order #place_order' );
|
503 |
+
const cpswExpressCheckoutButton = $( '.cpsw-payment-request-custom-button-render' );
|
504 |
+
if ( $( '.place-order #place_order' ).outerHeight() > 30 ) {
|
505 |
+
$( '.cpsw-payment-request-custom-button-render' ).css( 'height', $( '.place-order #place_order' ).outerHeight() + 'px' );
|
506 |
+
}
|
507 |
+
$( '.cpsw-payment-request-custom-button-render' ).css( 'font-size', $( '.place-order #place_order' ).css( 'font-size' ) );
|
508 |
+
|
509 |
+
cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcCheckoutButton );
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
function cpswAdjustButtonOnCartPage() {
|
514 |
+
if ( $( '.wc-proceed-to-checkout .checkout-button' ).length > 0 ) {
|
515 |
+
const wcCartButton = $( '.wc-proceed-to-checkout .checkout-button' );
|
516 |
+
const cpswExpressCheckoutButton = $( '.cpsw-payment-request-custom-button-render' );
|
517 |
+
if ( $( '.place-order #place_order' ).outerHeight() > 30 ) {
|
518 |
+
$( '.cpsw-payment-request-custom-button-render' ).css( 'height', $( '.wc-proceed-to-checkout .checkout-button' ).outerHeight() + 'px' );
|
519 |
+
}
|
520 |
+
$( '.cpsw-payment-request-custom-button-render' ).css( 'font-size', $( '.wc-proceed-to-checkout .checkout-button' ).css( 'font-size' ) );
|
521 |
+
|
522 |
+
cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcCartButton );
|
523 |
+
}
|
524 |
+
}
|
525 |
+
|
526 |
+
function cpswAdjustButtonOnProductPage() {
|
527 |
+
if ( $( 'form.cart button.single_add_to_cart_button' ).length > 0 ) {
|
528 |
+
const wcAddToCartButton = $( 'form.cart button.single_add_to_cart_button' );
|
529 |
+
const cpswExpressCheckoutButton = $( '.cpsw-payment-request-custom-button-render' );
|
530 |
+
const cpswExpressCheckoutWrapper = $( '#cpsw-payment-request-wrapper' );
|
531 |
+
const makeWidth = style.button_length > 10 ? 'min-width' : 'width';
|
532 |
+
|
533 |
+
if ( 'above' === style.button_position ) {
|
534 |
+
cpswExpressCheckoutWrapper.css( 'width', '100%' );
|
535 |
+
$( '#cpsw-payment-request-separator' ).css( 'width', '200px' );
|
536 |
+
$( '.cpsw-payment-request-button-wrapper' ).css( makeWidth, '200px' );
|
537 |
+
wcAddToCartButton.css( makeWidth, '200px' );
|
538 |
+
wcAddToCartButton.css( 'float', 'left' );
|
539 |
+
$( 'form.cart' ).css( 'display', 'inline-block' );
|
540 |
+
cpswExpressCheckoutButton.css( makeWidth, '200px' );
|
541 |
+
} else {
|
542 |
+
let addToCartMinWidth = wcAddToCartButton.outerWidth() + $( 'form.cart .quantity' ).width() + parseInt( $( 'form.cart .quantity' ).css( 'marginRight' ).replace( 'px', '' ) );
|
543 |
+
|
544 |
+
if ( 'inline' === style.button_position ) {
|
545 |
+
addToCartMinWidth = wcAddToCartButton.innerWidth();
|
546 |
+
|
547 |
+
if ( $( 'form.cart' ).width() < 500 ) {
|
548 |
+
makeButtonInline();
|
549 |
+
}
|
550 |
+
}
|
551 |
+
|
552 |
+
cpswExpressCheckoutWrapper.css( makeWidth, addToCartMinWidth + 'px' );
|
553 |
+
cpswExpressCheckoutButton.css( makeWidth, addToCartMinWidth + 'px' );
|
554 |
+
}
|
555 |
+
|
556 |
+
cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcAddToCartButton );
|
557 |
+
}
|
558 |
+
}
|
559 |
+
|
560 |
+
function cpswStyleExpressCheckoutButton( cpswExpressCheckoutButton, wcDefaultClass ) {
|
561 |
+
cpswExpressCheckoutButton.css( 'padding', wcDefaultClass.css( 'padding' ) );
|
562 |
+
cpswExpressCheckoutButton.css( 'border-radius', wcDefaultClass.css( 'border-radius' ) );
|
563 |
+
cpswExpressCheckoutButton.css( 'box-shadow', wcDefaultClass.css( 'box-shadow' ) );
|
564 |
+
cpswExpressCheckoutButton.css( 'font-weight', wcDefaultClass.css( 'font-weight' ) );
|
565 |
+
cpswExpressCheckoutButton.css( 'text-shadow', wcDefaultClass.css( 'text-shadow' ) );
|
566 |
+
cpswExpressCheckoutButton.css( 'font-size', wcDefaultClass.css( 'font-size' ) );
|
567 |
+
cpswExpressCheckoutButton.css( 'padding', wcDefaultClass.css( 'padding' ) );
|
568 |
+
cpswExpressCheckoutButton.css( 'line-height', wcDefaultClass.css( 'line-height' ) );
|
569 |
+
cpswExpressCheckoutButton.css( 'max-height', wcDefaultClass.outerHeight() + 'px' );
|
570 |
+
}
|
571 |
+
|
572 |
function createPaymentMethod( event ) {
|
573 |
const data = preparePaymentMethod( event );
|
574 |
return $.ajax( {
|
661 |
displayErrorMessage( message );
|
662 |
}
|
663 |
|
664 |
+
function makeButtonInline() {
|
665 |
+
if ( $( '#cpsw-payment-request-wrapper' ).hasClass( 'inline' ) && ! $( '#cpsw-payment-request-wrapper' ).hasClass( 'sticky' ) ) {
|
666 |
+
productWrapper = $( '#cpsw-payment-request-wrapper' ).parent();
|
667 |
+
addToCartButton = productWrapper.children( '.single_add_to_cart_button' );
|
668 |
+
quantityInput = productWrapper.children( '.quantity' );
|
669 |
+
|
670 |
+
addToCartButton.css( { marginRight: quantityInput.css( 'marginRight' ) } );
|
671 |
+
|
672 |
+
totalWidth = productWrapper.outerWidth();
|
673 |
+
addToCartWidth = addToCartButton.outerWidth();
|
674 |
+
quantityWidth = quantityInput.outerWidth();
|
675 |
+
|
676 |
+
availableWidth = totalWidth - ( addToCartWidth + quantityWidth + 10 );
|
677 |
+
if ( availableWidth > addToCartWidth ) {
|
678 |
+
addToCartButton.css( {
|
679 |
+
margin: 0,
|
680 |
+
marginRight: quantityInput.css( 'marginRight' ),
|
681 |
+
clear: 'unset',
|
682 |
+
} );
|
683 |
+
|
684 |
+
$( '#cpsw-payment-request-wrapper' ).css( {
|
685 |
+
margin: '0px',
|
686 |
+
display: 'inline-block',
|
687 |
+
} );
|
688 |
+
} else {
|
689 |
+
addToCartButton.css( {
|
690 |
+
margin: '10px 0',
|
691 |
+
clear: 'both',
|
692 |
+
} );
|
693 |
+
|
694 |
+
$( '#cpsw-payment-request-wrapper' ).css( {
|
695 |
+
marginTop: '10px',
|
696 |
+
display: 'block',
|
697 |
+
} );
|
698 |
+
}
|
699 |
+
|
700 |
+
addToCartHeight = addToCartButton.outerHeight();
|
701 |
+
if ( addToCartHeight > 60 ) {
|
702 |
+
addToCartButton.css( { height: 60 } );
|
703 |
+
}
|
704 |
+
|
705 |
+
if ( addToCartHeight < 35 ) {
|
706 |
+
addToCartButton.css( { height: 35 } );
|
707 |
+
}
|
708 |
+
|
709 |
+
$( '#cpsw-payment-request-wrapper' ).width( addToCartWidth );
|
710 |
+
}
|
711 |
+
}
|
712 |
+
|
713 |
initializePaymentButton();
|
714 |
|
715 |
$( document.body ).on( 'updated_cart_totals', function() {
|
723 |
|
724 |
// Responsive behaviour for product page.
|
725 |
$( window ).on( 'resize', function() {
|
726 |
+
if ( $( '#cpsw-payment-request-wrapper' ).hasClass( 'cpsw-product' ) ) {
|
727 |
+
debounce( 250, makeButtonInline() );
|
728 |
+
|
729 |
+
if ( $( document ).width() > 600 ) {
|
730 |
$( '#cpsw-payment-request-wrapper' ).removeClass( 'sticky' );
|
731 |
$( '#cpsw-payment-request-separator' ).show();
|
732 |
} else {
|
|
|
|
|
|
|
733 |
if ( 'yes' === isResponsive ) {
|
734 |
$( '#cpsw-payment-request-wrapper' ).addClass( 'sticky' );
|
735 |
$( '#cpsw-payment-request-separator' ).hide();
|
736 |
}
|
737 |
}
|
738 |
+
|
739 |
+
cpswAdjustButtonOnProductPage();
|
740 |
}
|
741 |
} );
|
742 |
}( jQuery ) );
|
assets/js/stripe-elements.js
CHANGED
@@ -23,8 +23,9 @@
|
|
23 |
let paymentForm = null;
|
24 |
let paymentMethod = '';
|
25 |
let isAllowedCard = '';
|
26 |
-
let
|
27 |
-
let
|
|
|
28 |
|
29 |
const style = {
|
30 |
base: {
|
@@ -133,12 +134,19 @@
|
|
133 |
|
134 |
// Create an instance of the idealBank Element
|
135 |
const ideal = elements.create( 'idealBank', options );
|
|
|
|
|
136 |
|
137 |
ideal.on( 'change', function( event ) {
|
138 |
-
|
139 |
$( '.cpsw_stripe_ideal_error' ).html( '' );
|
140 |
} );
|
141 |
|
|
|
|
|
|
|
|
|
|
|
142 |
function mountCard() {
|
143 |
$( '.cpsw-stripe-elements-form' ).show();
|
144 |
if ( 0 === $( '.cpsw-stripe-elements-form' ).length ) {
|
@@ -149,12 +157,12 @@
|
|
149 |
card.unmount();
|
150 |
}
|
151 |
card.mount( '.cpsw-stripe-elements-form .cpsw-cc' );
|
152 |
-
$( '.cpsw-stripe-elements-form div' ).css( { backgroundColor: '#fff', padding: '
|
153 |
} else if ( 'no' === inlineCC ) {
|
154 |
cardNumber.mount( '.cpsw-stripe-elements-form .cpsw-number' );
|
155 |
cardExpiry.mount( '.cpsw-stripe-elements-form .cpsw-expiry' );
|
156 |
cardCvc.mount( '.cpsw-stripe-elements-form .cpsw-cvc' );
|
157 |
-
$( '.cpsw-stripe-elements-form div' ).css( { backgroundColor: '#fff', padding: '
|
158 |
}
|
159 |
}
|
160 |
|
@@ -165,12 +173,28 @@
|
|
165 |
}
|
166 |
|
167 |
ideal.mount( '.cpsw_stripe_ideal_form .cpsw_stripe_ideal_select' );
|
168 |
-
$( '.cpsw_stripe_ideal_form .cpsw_stripe_ideal_select' ).css( { backgroundColor: '#fff'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
function createStripePaymentMethod() {
|
172 |
let paymentObject = {};
|
173 |
-
switch (
|
174 |
case 'cpsw_stripe':
|
175 |
if ( 'no' === inlineCC ) {
|
176 |
card = cardNumber;
|
@@ -222,7 +246,7 @@
|
|
222 |
}
|
223 |
|
224 |
function confirmStripePayment( clientSecret, redirectURL ) {
|
225 |
-
switch (
|
226 |
case 'cpsw_stripe':
|
227 |
stripe.confirmCardPayment( clientSecret, {} ).then( function( result ) {
|
228 |
if ( result.error ) {
|
@@ -241,20 +265,81 @@
|
|
241 |
} );
|
242 |
break;
|
243 |
case 'cpsw_ideal':
|
244 |
-
stripe.confirmIdealPayment(
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
ideal,
|
249 |
-
},
|
250 |
-
return_url: homeURL + redirectURL,
|
251 |
},
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
break;
|
254 |
case 'cpsw_alipay':
|
255 |
-
stripe.confirmAlipayPayment(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
clientSecret,
|
257 |
{
|
|
|
|
|
|
|
258 |
return_url: homeURL + redirectURL,
|
259 |
},
|
260 |
);
|
@@ -264,6 +349,37 @@
|
|
264 |
}
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
function confirmCardSetup() {
|
268 |
$.ajax( {
|
269 |
type: 'POST',
|
@@ -291,15 +407,15 @@
|
|
291 |
} );
|
292 |
}
|
293 |
|
294 |
-
function
|
295 |
if ( 0 < $( '.wc_payment_method' ).length ) {
|
296 |
const selectedPaymentMethod = $( '.wc_payment_method input[name="payment_method"]:checked' ).val();
|
297 |
-
if ( -1 === $.inArray( selectedPaymentMethod, [ 'cpsw_stripe', 'cpsw_alipay', 'cpsw_ideal' ] ) ) {
|
298 |
return false;
|
299 |
}
|
300 |
-
return
|
301 |
} else if ( 0 < $( '#payment_method_cpsw_stripe' ).length && $( '#payment_method_cpsw_stripe' ).is( ':checked' ) && 'cpsw_stripe' === $( '#payment_method_cpsw_stripe' ).val() ) {
|
302 |
-
return
|
303 |
}
|
304 |
return false;
|
305 |
}
|
@@ -323,7 +439,7 @@
|
|
323 |
}
|
324 |
|
325 |
function onHashChange() {
|
326 |
-
if ( !
|
327 |
return;
|
328 |
}
|
329 |
const partials = window.location.hash.match(
|
@@ -382,7 +498,7 @@
|
|
382 |
}
|
383 |
|
384 |
const processingSubmit = function( e ) {
|
385 |
-
if ( 'cpsw_stripe' ===
|
386 |
if ( false === isAllowedCard ) {
|
387 |
return false;
|
388 |
}
|
@@ -401,12 +517,12 @@
|
|
401 |
|
402 |
$( 'form.woocommerce-checkout' ).on( 'submit checkout_place_order_cpsw_ideal', function() {
|
403 |
// check for iDEAL.
|
404 |
-
if ( 'cpsw_ideal' ===
|
405 |
-
if ( '' ===
|
406 |
-
$( '.cpsw_stripe_ideal_error' ).html( cpsw_global_settings.
|
407 |
$( '.woocommerce-error' ).remove();
|
408 |
$( 'form.woocommerce-checkout' ).unblock();
|
409 |
-
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + cpsw_global_settings.
|
410 |
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
411 |
return false;
|
412 |
}
|
@@ -414,6 +530,21 @@
|
|
414 |
}
|
415 |
} );
|
416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
$( 'form.woocommerce-checkout' ).on( 'submit checkout_place_order_cpsw_stripe', processingSubmit );
|
418 |
|
419 |
if ( $( 'form#order_review' ).length ) {
|
@@ -436,8 +567,7 @@
|
|
436 |
$( 'input[type=radio][name="wc-cpsw_stripe-payment-token"]' ).change( function() {
|
437 |
hideShowElements();
|
438 |
} );
|
439 |
-
|
440 |
-
mountIdeal();
|
441 |
$( "input[name='wc-cpsw-payment-token']" ).click( function() {
|
442 |
hideShowCard();
|
443 |
} );
|
@@ -449,6 +579,5 @@
|
|
449 |
$( '.cpsw-stripe-elements-form' ).hide();
|
450 |
|
451 |
window.addEventListener( 'hashchange', onHashChange );
|
452 |
-
|
453 |
-
mountIdeal();
|
454 |
}( jQuery ) );
|
23 |
let paymentForm = null;
|
24 |
let paymentMethod = '';
|
25 |
let isAllowedCard = '';
|
26 |
+
let selectedGatewayId = '';
|
27 |
+
let selectedIdealBank = '';
|
28 |
+
let selectedP24Bank = '';
|
29 |
|
30 |
const style = {
|
31 |
base: {
|
134 |
|
135 |
// Create an instance of the idealBank Element
|
136 |
const ideal = elements.create( 'idealBank', options );
|
137 |
+
// Create an instance of the p24 Element
|
138 |
+
const p24 = elements.create( 'p24Bank', options );
|
139 |
|
140 |
ideal.on( 'change', function( event ) {
|
141 |
+
selectedIdealBank = event.value;
|
142 |
$( '.cpsw_stripe_ideal_error' ).html( '' );
|
143 |
} );
|
144 |
|
145 |
+
p24.on( 'change', function( event ) {
|
146 |
+
selectedP24Bank = event.value;
|
147 |
+
$( '.cpsw_stripe_p24_error' ).html( '' );
|
148 |
+
} );
|
149 |
+
|
150 |
function mountCard() {
|
151 |
$( '.cpsw-stripe-elements-form' ).show();
|
152 |
if ( 0 === $( '.cpsw-stripe-elements-form' ).length ) {
|
157 |
card.unmount();
|
158 |
}
|
159 |
card.mount( '.cpsw-stripe-elements-form .cpsw-cc' );
|
160 |
+
$( '.cpsw-stripe-elements-form div' ).css( { backgroundColor: '#fff', padding: '1em' } );
|
161 |
} else if ( 'no' === inlineCC ) {
|
162 |
cardNumber.mount( '.cpsw-stripe-elements-form .cpsw-number' );
|
163 |
cardExpiry.mount( '.cpsw-stripe-elements-form .cpsw-expiry' );
|
164 |
cardCvc.mount( '.cpsw-stripe-elements-form .cpsw-cvc' );
|
165 |
+
$( '.cpsw-stripe-elements-form div' ).css( { backgroundColor: '#fff', padding: '1em', marginTop: '0.5em' } );
|
166 |
}
|
167 |
}
|
168 |
|
173 |
}
|
174 |
|
175 |
ideal.mount( '.cpsw_stripe_ideal_form .cpsw_stripe_ideal_select' );
|
176 |
+
$( '.cpsw_stripe_ideal_form .cpsw_stripe_ideal_select' ).css( { backgroundColor: '#fff' } );
|
177 |
+
}
|
178 |
+
|
179 |
+
function mountP24() {
|
180 |
+
$( '.cpsw_stripe_p24_form' ).show();
|
181 |
+
if ( 0 === $( '.cpsw_stripe_p24_form' ).length ) {
|
182 |
+
return;
|
183 |
+
}
|
184 |
+
|
185 |
+
p24.mount( '.cpsw_stripe_p24_form .cpsw_stripe_p24_select' );
|
186 |
+
$( '.cpsw_stripe_p24_form .cpsw_stripe_p24_select' ).css( { backgroundColor: '#fff' } );
|
187 |
+
}
|
188 |
+
|
189 |
+
function mountGateways() {
|
190 |
+
mountCard();
|
191 |
+
mountIdeal();
|
192 |
+
mountP24();
|
193 |
}
|
194 |
|
195 |
function createStripePaymentMethod() {
|
196 |
let paymentObject = {};
|
197 |
+
switch ( selectedGatewayId ) {
|
198 |
case 'cpsw_stripe':
|
199 |
if ( 'no' === inlineCC ) {
|
200 |
card = cardNumber;
|
246 |
}
|
247 |
|
248 |
function confirmStripePayment( clientSecret, redirectURL ) {
|
249 |
+
switch ( selectedGatewayId ) {
|
250 |
case 'cpsw_stripe':
|
251 |
stripe.confirmCardPayment( clientSecret, {} ).then( function( result ) {
|
252 |
if ( result.error ) {
|
265 |
} );
|
266 |
break;
|
267 |
case 'cpsw_ideal':
|
268 |
+
stripe.confirmIdealPayment( clientSecret, {
|
269 |
+
payment_method: {
|
270 |
+
ideal,
|
271 |
+
billing_details: getBillingDetails(),
|
|
|
|
|
|
|
272 |
},
|
273 |
+
return_url: homeURL + redirectURL,
|
274 |
+
} ).then( function( result ) {
|
275 |
+
if ( result.error ) {
|
276 |
+
// Show error to your customer (e.g., insufficient funds)
|
277 |
+
$( '.woocommerce-error' ).remove();
|
278 |
+
$( 'form.woocommerce-checkout' ).unblock();
|
279 |
+
logError( result.error );
|
280 |
+
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + result.error.message + '</div>' ).show();
|
281 |
+
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
282 |
+
}
|
283 |
+
} );
|
284 |
break;
|
285 |
case 'cpsw_alipay':
|
286 |
+
stripe.confirmAlipayPayment( clientSecret, {
|
287 |
+
payment_method: {
|
288 |
+
billing_details: getBillingDetails(),
|
289 |
+
},
|
290 |
+
return_url: homeURL + redirectURL,
|
291 |
+
} ).then( function( result ) {
|
292 |
+
if ( result.error ) {
|
293 |
+
// Show error to your customer (e.g., insufficient funds)
|
294 |
+
$( '.woocommerce-error' ).remove();
|
295 |
+
$( 'form.woocommerce-checkout' ).unblock();
|
296 |
+
logError( result.error );
|
297 |
+
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + result.error.message + '</div>' ).show();
|
298 |
+
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
299 |
+
}
|
300 |
+
} );
|
301 |
+
break;
|
302 |
+
case 'cpsw_klarna':
|
303 |
+
stripe.confirmKlarnaPayment( clientSecret, {
|
304 |
+
payment_method: {
|
305 |
+
billing_details: getBillingDetails(),
|
306 |
+
},
|
307 |
+
return_url: homeURL + redirectURL,
|
308 |
+
} ).then( function( result ) {
|
309 |
+
if ( result.error ) {
|
310 |
+
// Show error to your customer (e.g., insufficient funds)
|
311 |
+
$( '.woocommerce-error' ).remove();
|
312 |
+
$( 'form.woocommerce-checkout' ).unblock();
|
313 |
+
logError( result.error );
|
314 |
+
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + result.error.message + '</div>' ).show();
|
315 |
+
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
316 |
+
}
|
317 |
+
} );
|
318 |
+
break;
|
319 |
+
case 'cpsw_bancontact':
|
320 |
+
stripe.confirmBancontactPayment( clientSecret, {
|
321 |
+
payment_method: {
|
322 |
+
billing_details: getBillingDetails(),
|
323 |
+
},
|
324 |
+
return_url: homeURL + redirectURL,
|
325 |
+
} ).then( function( result ) {
|
326 |
+
if ( result.error ) {
|
327 |
+
// Show error to your customer (e.g., insufficient funds)
|
328 |
+
$( '.woocommerce-error' ).remove();
|
329 |
+
$( 'form.woocommerce-checkout' ).unblock();
|
330 |
+
logError( result.error );
|
331 |
+
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + result.error.message + '</div>' ).show();
|
332 |
+
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
333 |
+
}
|
334 |
+
} );
|
335 |
+
break;
|
336 |
+
case 'cpsw_p24':
|
337 |
+
stripe.confirmP24Payment(
|
338 |
clientSecret,
|
339 |
{
|
340 |
+
payment_method: {
|
341 |
+
billing_details: getBillingDetails(),
|
342 |
+
},
|
343 |
return_url: homeURL + redirectURL,
|
344 |
},
|
345 |
);
|
349 |
}
|
350 |
}
|
351 |
|
352 |
+
function getBillingDetails() {
|
353 |
+
const billingFirstName = document.getElementById( 'billing_first_name' );
|
354 |
+
const billingLastName = document.getElementById( 'billing_last_name' );
|
355 |
+
const billingEmail = document.getElementById( 'billing_email' );
|
356 |
+
const billingPhone = document.getElementById( 'billing_phone' );
|
357 |
+
const billingCountry = document.getElementById( 'billing_country' );
|
358 |
+
const billingPostcode = document.getElementById( 'billing_postcode' );
|
359 |
+
const billingCity = document.getElementById( 'billing_city' );
|
360 |
+
const billingState = document.getElementById( 'billing_state' );
|
361 |
+
const billingAddress1 = document.getElementById( 'billing_address_1' );
|
362 |
+
const billingAddress2 = document.getElementById( 'billing_address_2' );
|
363 |
+
const firstName = null !== billingFirstName ? billingFirstName.value : '';
|
364 |
+
const lastName = null !== billingLastName ? billingLastName.value : '';
|
365 |
+
|
366 |
+
const billingDetails = {
|
367 |
+
name: firstName + ' ' + lastName,
|
368 |
+
email: null !== billingEmail ? billingEmail.value : '',
|
369 |
+
phone: null !== billingPhone ? billingPhone.value : '',
|
370 |
+
address: {
|
371 |
+
country: null !== billingCountry ? billingCountry.value : '',
|
372 |
+
city: null !== billingCity ? billingCity.value : '',
|
373 |
+
postal_code: null !== billingPostcode ? billingPostcode.value : '',
|
374 |
+
state: null !== billingState ? billingState.value : '',
|
375 |
+
line1: null !== billingAddress1 ? billingAddress1.value : '',
|
376 |
+
line2: null !== billingAddress2 ? billingAddress2.value : '',
|
377 |
+
},
|
378 |
+
};
|
379 |
+
|
380 |
+
return billingDetails;
|
381 |
+
}
|
382 |
+
|
383 |
function confirmCardSetup() {
|
384 |
$.ajax( {
|
385 |
type: 'POST',
|
407 |
} );
|
408 |
}
|
409 |
|
410 |
+
function selectedGateway() {
|
411 |
if ( 0 < $( '.wc_payment_method' ).length ) {
|
412 |
const selectedPaymentMethod = $( '.wc_payment_method input[name="payment_method"]:checked' ).val();
|
413 |
+
if ( -1 === $.inArray( selectedPaymentMethod, [ 'cpsw_stripe', 'cpsw_alipay', 'cpsw_ideal', 'cpsw_klarna', 'cpsw_p24', 'cpsw_bancontact' ] ) ) {
|
414 |
return false;
|
415 |
}
|
416 |
+
return selectedGatewayId = selectedPaymentMethod;
|
417 |
} else if ( 0 < $( '#payment_method_cpsw_stripe' ).length && $( '#payment_method_cpsw_stripe' ).is( ':checked' ) && 'cpsw_stripe' === $( '#payment_method_cpsw_stripe' ).val() ) {
|
418 |
+
return selectedGatewayId = 'cpsw_stripe';
|
419 |
}
|
420 |
return false;
|
421 |
}
|
439 |
}
|
440 |
|
441 |
function onHashChange() {
|
442 |
+
if ( ! selectedGateway() ) {
|
443 |
return;
|
444 |
}
|
445 |
const partials = window.location.hash.match(
|
498 |
}
|
499 |
|
500 |
const processingSubmit = function( e ) {
|
501 |
+
if ( 'cpsw_stripe' === selectedGateway() && ! savedCard && '' === paymentMethod ) {
|
502 |
if ( false === isAllowedCard ) {
|
503 |
return false;
|
504 |
}
|
517 |
|
518 |
$( 'form.woocommerce-checkout' ).on( 'submit checkout_place_order_cpsw_ideal', function() {
|
519 |
// check for iDEAL.
|
520 |
+
if ( 'cpsw_ideal' === selectedGateway() ) {
|
521 |
+
if ( '' === selectedIdealBank ) {
|
522 |
+
$( '.cpsw_stripe_ideal_error' ).html( cpsw_global_settings.empty_bank_message );
|
523 |
$( '.woocommerce-error' ).remove();
|
524 |
$( 'form.woocommerce-checkout' ).unblock();
|
525 |
+
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + cpsw_global_settings.empty_bank_message + '</div>' ).show();
|
526 |
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
527 |
return false;
|
528 |
}
|
530 |
}
|
531 |
} );
|
532 |
|
533 |
+
$( 'form.woocommerce-checkout' ).on( 'submit checkout_place_order_cpsw_p24', function() {
|
534 |
+
// check for P24.
|
535 |
+
if ( 'cpsw_p24' === selectedGateway() ) {
|
536 |
+
if ( '' === selectedP24Bank ) {
|
537 |
+
$( '.cpsw_stripe_p24_error' ).html( cpsw_global_settings.empty_bank_message );
|
538 |
+
$( '.woocommerce-error' ).remove();
|
539 |
+
$( 'form.woocommerce-checkout' ).unblock();
|
540 |
+
$( '.woocommerce-notices-wrapper:first-child' ).html( '<div class="woocommerce-error cpsw-errors">' + cpsw_global_settings.empty_bank_message + '</div>' ).show();
|
541 |
+
window.scrollTo( { top: 0, behavior: 'smooth' } );
|
542 |
+
return false;
|
543 |
+
}
|
544 |
+
$( '.cpsw_stripe_p24_error' ).html( '' );
|
545 |
+
}
|
546 |
+
} );
|
547 |
+
|
548 |
$( 'form.woocommerce-checkout' ).on( 'submit checkout_place_order_cpsw_stripe', processingSubmit );
|
549 |
|
550 |
if ( $( 'form#order_review' ).length ) {
|
567 |
$( 'input[type=radio][name="wc-cpsw_stripe-payment-token"]' ).change( function() {
|
568 |
hideShowElements();
|
569 |
} );
|
570 |
+
mountGateways();
|
|
|
571 |
$( "input[name='wc-cpsw-payment-token']" ).click( function() {
|
572 |
hideShowCard();
|
573 |
} );
|
579 |
$( '.cpsw-stripe-elements-form' ).hide();
|
580 |
|
581 |
window.addEventListener( 'hashchange', onHashChange );
|
582 |
+
mountGateways();
|
|
|
583 |
}( jQuery ) );
|
autoloader.php
CHANGED
@@ -10,12 +10,16 @@ namespace CPSW;
|
|
10 |
|
11 |
use CPSW\Gateway\Stripe\Card_Payments;
|
12 |
use CPSW\Gateway\Stripe\Alipay;
|
|
|
13 |
use CPSW\Gateway\Stripe\Payment_Request_Api;
|
14 |
use CPSW\Gateway\Stripe\Ideal;
|
|
|
|
|
15 |
use CPSW\Compatibility\Apple_Pay;
|
16 |
use CPSW\Admin\Admin_Controller;
|
17 |
use CPSW\Gateway\Stripe\Webhook;
|
18 |
use CPSW\Gateway\Stripe\Frontend_Scripts;
|
|
|
19 |
|
20 |
/**
|
21 |
* CPSW_Loader
|
@@ -80,12 +84,19 @@ class CPSW_Loader {
|
|
80 |
* @since 0.0.1
|
81 |
*/
|
82 |
public function __construct() {
|
|
|
|
|
|
|
83 |
spl_autoload_register( [ $this, 'autoload' ] );
|
84 |
-
|
|
|
|
|
85 |
$this->setup_classes();
|
86 |
add_action( 'plugins_loaded', [ $this, 'load_classes' ] );
|
87 |
add_filter( 'plugin_action_links_' . CPSW_BASE, [ $this, 'action_links' ] );
|
88 |
add_action( 'woocommerce_init', [ $this, 'frontend_scripts' ] );
|
|
|
|
|
89 |
}
|
90 |
|
91 |
/**
|
@@ -95,7 +106,6 @@ class CPSW_Loader {
|
|
95 |
*/
|
96 |
public function setup_classes() {
|
97 |
Admin_Controller::get_instance();
|
98 |
-
Webhook::get_instance();
|
99 |
Apple_Pay::get_instance();
|
100 |
}
|
101 |
|
@@ -119,12 +129,16 @@ class CPSW_Loader {
|
|
119 |
*
|
120 |
* @param array $links existing links.
|
121 |
* @return array
|
|
|
122 |
*/
|
123 |
public function action_links( $links ) {
|
124 |
-
$plugin_links =
|
125 |
-
'
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
128 |
|
129 |
return array_merge( $plugin_links, $links );
|
130 |
}
|
@@ -133,26 +147,34 @@ class CPSW_Loader {
|
|
133 |
* Loads classes on plugins_loaded hook.
|
134 |
*
|
135 |
* @return void
|
|
|
136 |
*/
|
137 |
public function load_classes() {
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
Payment_Request_Api::get_instance();
|
142 |
-
Alipay::get_instance();
|
143 |
-
Ideal::get_instance();
|
144 |
-
} else {
|
145 |
add_action( 'admin_notices', [ $this, 'wc_is_not_active' ] );
|
|
|
146 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
* Loads classes on plugins_loaded hook.
|
151 |
*
|
152 |
* @return void
|
|
|
153 |
*/
|
154 |
public function wc_is_not_active() {
|
155 |
-
|
156 |
$install_url = wp_nonce_url(
|
157 |
add_query_arg(
|
158 |
array(
|
@@ -165,10 +187,82 @@ class CPSW_Loader {
|
|
165 |
);
|
166 |
echo '<div class="notice notice-error is-dismissible"><p>';
|
167 |
// translators: 1$-2$: opening and closing <strong> tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin.
|
168 |
-
echo sprintf( esc_html__( '%1$
|
169 |
echo '</p></div>';
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
|
174 |
/**
|
10 |
|
11 |
use CPSW\Gateway\Stripe\Card_Payments;
|
12 |
use CPSW\Gateway\Stripe\Alipay;
|
13 |
+
use CPSW\Gateway\Stripe\Klarna;
|
14 |
use CPSW\Gateway\Stripe\Payment_Request_Api;
|
15 |
use CPSW\Gateway\Stripe\Ideal;
|
16 |
+
use CPSW\Gateway\Stripe\Bancontact;
|
17 |
+
use CPSW\Gateway\Stripe\P24;
|
18 |
use CPSW\Compatibility\Apple_Pay;
|
19 |
use CPSW\Admin\Admin_Controller;
|
20 |
use CPSW\Gateway\Stripe\Webhook;
|
21 |
use CPSW\Gateway\Stripe\Frontend_Scripts;
|
22 |
+
use CPSW\Wizard\Onboarding;
|
23 |
|
24 |
/**
|
25 |
* CPSW_Loader
|
84 |
* @since 0.0.1
|
85 |
*/
|
86 |
public function __construct() {
|
87 |
+
// Activation hook.
|
88 |
+
register_activation_hook( CPSW_FILE, [ $this, 'install' ] );
|
89 |
+
|
90 |
spl_autoload_register( [ $this, 'autoload' ] );
|
91 |
+
if ( ! class_exists( '\Stripe\Stripe' ) ) {
|
92 |
+
require_once 'lib/stripe-php/init.php';
|
93 |
+
}
|
94 |
$this->setup_classes();
|
95 |
add_action( 'plugins_loaded', [ $this, 'load_classes' ] );
|
96 |
add_filter( 'plugin_action_links_' . CPSW_BASE, [ $this, 'action_links' ] );
|
97 |
add_action( 'woocommerce_init', [ $this, 'frontend_scripts' ] );
|
98 |
+
add_action( 'admin_init', [ $this, 'check_for_onboarding' ] );
|
99 |
+
add_action( 'plugins_loaded', [ $this, 'load_cpsw_textdomain' ] );
|
100 |
}
|
101 |
|
102 |
/**
|
106 |
*/
|
107 |
public function setup_classes() {
|
108 |
Admin_Controller::get_instance();
|
|
|
109 |
Apple_Pay::get_instance();
|
110 |
}
|
111 |
|
129 |
*
|
130 |
* @param array $links existing links.
|
131 |
* @return array
|
132 |
+
* @since 1.0.0
|
133 |
*/
|
134 |
public function action_links( $links ) {
|
135 |
+
$plugin_links = apply_filters(
|
136 |
+
'cpsw_plugin_action_links',
|
137 |
+
[
|
138 |
+
'cpsw_settings' => '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' ) . '">' . __( 'Settings', 'checkout-plugins-stripe-woo' ) . '</a>',
|
139 |
+
'cpsw_documentation' => '<a href="' . esc_url( 'https://checkoutplugins.com/docs/stripe-api-settings/' ) . '" target="_blank" >' . __( 'Documentation', 'checkout-plugins-stripe-woo' ) . '</a>',
|
140 |
+
]
|
141 |
+
);
|
142 |
|
143 |
return array_merge( $plugin_links, $links );
|
144 |
}
|
147 |
* Loads classes on plugins_loaded hook.
|
148 |
*
|
149 |
* @return void
|
150 |
+
* @since 1.0.0
|
151 |
*/
|
152 |
public function load_classes() {
|
153 |
+
// Initializing Onboarding.
|
154 |
+
Onboarding::get_instance();
|
155 |
+
if ( ! class_exists( 'woocommerce' ) ) {
|
|
|
|
|
|
|
|
|
156 |
add_action( 'admin_notices', [ $this, 'wc_is_not_active' ] );
|
157 |
+
return;
|
158 |
}
|
159 |
+
// Initializing Gateways.
|
160 |
+
|
161 |
+
Bancontact::get_instance();
|
162 |
+
P24::get_instance();
|
163 |
+
Klarna::get_instance();
|
164 |
+
Ideal::get_instance();
|
165 |
+
Alipay::get_instance();
|
166 |
+
Card_Payments::get_instance();
|
167 |
+
Payment_Request_Api::get_instance();
|
168 |
+
Webhook::get_instance();
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
* Loads classes on plugins_loaded hook.
|
173 |
*
|
174 |
* @return void
|
175 |
+
* @since 1.0.0
|
176 |
*/
|
177 |
public function wc_is_not_active() {
|
|
|
178 |
$install_url = wp_nonce_url(
|
179 |
add_query_arg(
|
180 |
array(
|
187 |
);
|
188 |
echo '<div class="notice notice-error is-dismissible"><p>';
|
189 |
// translators: 1$-2$: opening and closing <strong> tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin.
|
190 |
+
echo sprintf( esc_html__( '%1$sCheckout Plugins - Stripe for WooCommerce is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for Checkout Plugins - Stripe for WooCommerce to work. Please %5$sinstall & activate WooCommerce »%6$s', 'checkout-plugins-stripe-woo' ), '<strong>', '</strong>', '<a href="http://wordpress.org/extend/plugins/woocommerce/">', '</a>', '<a href="' . esc_url( $install_url ) . '">', '</a>' );
|
191 |
echo '</p></div>';
|
192 |
}
|
193 |
|
194 |
+
/**
|
195 |
+
* Checks for installation routine
|
196 |
+
* Loads plugins translation file
|
197 |
+
*
|
198 |
+
* @return void
|
199 |
+
* @since 1.3.0
|
200 |
+
*/
|
201 |
+
public function install() {
|
202 |
+
if ( get_option( 'cpsw_setup_status', false ) || apply_filters( 'cpsw_prevent_onboarding_redirect', false ) ) {
|
203 |
+
return;
|
204 |
+
}
|
205 |
+
|
206 |
+
update_option( 'cpsw_start_onboarding', true );
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Checks whether onboarding is required or not
|
211 |
+
*
|
212 |
+
* @return void
|
213 |
+
* @since 1.3.0
|
214 |
+
*/
|
215 |
+
public function check_for_onboarding() {
|
216 |
+
if ( ! get_option( 'cpsw_start_onboarding', false ) ) {
|
217 |
+
return;
|
218 |
+
}
|
219 |
+
$onboarding_url = admin_url( 'index.php?page=cpsw-onboarding' );
|
220 |
+
|
221 |
+
if ( ! class_exists( 'woocommerce' ) ) {
|
222 |
+
$onboarding_url = add_query_arg( 'cpsw_call', 'setup-woocommerce', $onboarding_url );
|
223 |
+
}
|
224 |
+
|
225 |
+
wp_safe_redirect( esc_url_raw( $onboarding_url ) );
|
226 |
+
delete_option( 'cpsw_start_onboarding' );
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Loads plugins translation file
|
231 |
+
*
|
232 |
+
* @return void
|
233 |
+
* @since 1.3.0
|
234 |
+
*/
|
235 |
+
public function load_cpsw_textdomain() {
|
236 |
+
// Default languages directory.
|
237 |
+
$lang_dir = CPSW_DIR . 'languages/';
|
238 |
+
|
239 |
+
// Traditional WordPress plugin locale filter.
|
240 |
+
global $wp_version;
|
241 |
+
|
242 |
+
$get_locale = get_locale();
|
243 |
+
|
244 |
+
if ( $wp_version >= 4.7 ) {
|
245 |
+
$get_locale = get_user_locale();
|
246 |
+
}
|
247 |
+
|
248 |
+
$locale = apply_filters( 'plugin_locale', $get_locale, 'checkout-plugins-stripe-woo' );
|
249 |
+
$mofile = sprintf( '%1$s-%2$s.mo', 'checkout-plugins-stripe-woo', $locale );
|
250 |
+
|
251 |
+
// Setup paths to current locale file.
|
252 |
+
$mofile_local = $lang_dir . $mofile;
|
253 |
+
$mofile_global = WP_LANG_DIR . '/plugins/' . $mofile;
|
254 |
+
|
255 |
+
if ( file_exists( $mofile_global ) ) {
|
256 |
+
// Look in global /wp-content/languages/checkout-plugins-stripe-woo/ folder.
|
257 |
+
load_textdomain( 'checkout-plugins-stripe-woo', $mofile_global );
|
258 |
+
} elseif ( file_exists( $mofile_local ) ) {
|
259 |
+
// Look in local /wp-content/plugins/checkout-plugins-stripe-woo/languages/ folder.
|
260 |
+
load_textdomain( 'checkout-plugins-stripe-woo', $mofile_local );
|
261 |
+
} else {
|
262 |
+
// Load the default language files.
|
263 |
+
load_plugin_textdomain( 'checkout-plugins-stripe-woo', false, $lang_dir );
|
264 |
+
}
|
265 |
+
}
|
266 |
}
|
267 |
|
268 |
/**
|
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.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://brainstormforce.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.
|
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.3.0
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://brainstormforce.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.3.0' );
|
24 |
|
25 |
require_once 'autoloader.php';
|
gateway/abstract-payment-gateway.php
CHANGED
@@ -40,8 +40,9 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
40 |
* Constructor
|
41 |
*/
|
42 |
public function __construct() {
|
43 |
-
add_filter( 'woocommerce_payment_gateways', [ $this, 'add_gateway_class' ] );
|
44 |
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, [ $this, 'process_admin_options' ] );
|
|
|
45 |
}
|
46 |
|
47 |
/**
|
@@ -77,7 +78,7 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
77 |
* @return array
|
78 |
*/
|
79 |
public function add_gateway_class( $methods ) {
|
80 |
-
$methods
|
81 |
return $methods;
|
82 |
}
|
83 |
|
@@ -200,6 +201,7 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
200 |
$args = [
|
201 |
'email' => $user_email,
|
202 |
];
|
|
|
203 |
if ( $order ) {
|
204 |
$args = [
|
205 |
'description' => 'Customer for Order #' . $order->get_id(),
|
@@ -212,10 +214,11 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
212 |
'postal_code' => method_exists( $order, 'get_billing_postcode' ) ? $order->get_billing_postcode() : $order->billing_postcode,
|
213 |
'state' => method_exists( $order, 'get_billing_state' ) ? $order->get_billing_state() : $order->billing_state,
|
214 |
],
|
215 |
-
'name' => ( method_exists( $order, 'get_billing_first_name' ) ? $order->get_billing_first_name() : $order->billing_first_name ) . ( method_exists( $order, 'get_billing_last_name' ) ? $order->get_billing_last_name() : $order->billing_last_name ),
|
216 |
];
|
217 |
}
|
218 |
|
|
|
219 |
$stripe_api = new Stripe_Api();
|
220 |
$response = $stripe_api->customers( 'create', [ $args ] );
|
221 |
$response = $response['success'] ? $response['data'] : false;
|
@@ -241,7 +244,6 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
241 |
}
|
242 |
|
243 |
try {
|
244 |
-
|
245 |
$order = wc_get_order( $order_id );
|
246 |
$intent_secret = $order->get_meta( '_cpsw_intent_secret', true );
|
247 |
|
@@ -250,6 +252,11 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
250 |
$refund_response = $response['success'] ? $response['data'] : false;
|
251 |
|
252 |
if ( $refund_response ) {
|
|
|
|
|
|
|
|
|
|
|
253 |
$refund_time = gmdate( 'Y-m-d H:i:s', time() );
|
254 |
$order->update_meta_data( '_cpsw_refund_id', $refund_response->id );
|
255 |
$order->add_order_note( __( 'Reason : ', 'checkout-plugins-stripe-woo' ) . $reason . '.<br>' . __( 'Amount : ', 'checkout-plugins-stripe-woo' ) . get_woocommerce_currency_symbol() . $amount . '.<br>' . __( 'Status : ', 'checkout-plugins-stripe-woo' ) . ( ( 'succeeded' === $refund_response->status ) ? 'Success' : 'Failed' ) . ' [ ' . $refund_time . ' ] ' . ( is_null( $refund_response->id ) ? '' : '<br>' . __( 'Transaction ID : ', 'checkout-plugins-stripe-woo' ) . $refund_response->id ) );
|
@@ -281,6 +288,10 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
281 |
// Store charge data.
|
282 |
$order->update_meta_data( '_cpsw_charge_captured', $captured );
|
283 |
|
|
|
|
|
|
|
|
|
284 |
if ( 'yes' === $captured ) {
|
285 |
/**
|
286 |
* Charge can be captured but in a pending state. Payment methods
|
@@ -300,7 +311,9 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
300 |
}
|
301 |
|
302 |
if ( 'succeeded' === $response->status ) {
|
303 |
-
$order->
|
|
|
|
|
304 |
|
305 |
/* translators: transaction id */
|
306 |
$message = sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'checkout-plugins-stripe-woo' ), $response->id );
|
@@ -341,11 +354,14 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
341 |
* @return array current user data.
|
342 |
*/
|
343 |
public function get_clients_details() {
|
344 |
-
return
|
345 |
-
'
|
346 |
-
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
349 |
}
|
350 |
|
351 |
/**
|
@@ -484,8 +500,11 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
484 |
*/
|
485 |
public function payment_icons( $gateway_id ) {
|
486 |
$icons = [
|
487 |
-
'cpsw_alipay'
|
488 |
-
'cpsw_ideal'
|
|
|
|
|
|
|
489 |
];
|
490 |
|
491 |
return apply_filters(
|
@@ -520,20 +539,231 @@ abstract class Abstract_Payment_Gateway extends WC_Payment_Gateway {
|
|
520 |
$intent_response = $response['data'];
|
521 |
$currency = $intent_response->currency;
|
522 |
|
523 |
-
$refund_params =
|
524 |
-
'
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
'
|
529 |
-
'
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
|
|
|
|
|
|
535 |
|
536 |
$stripe_api = new Stripe_Api();
|
537 |
return $stripe_api->refunds( 'create', [ $refund_params ] );
|
538 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
}
|
40 |
* Constructor
|
41 |
*/
|
42 |
public function __construct() {
|
43 |
+
add_filter( 'woocommerce_payment_gateways', [ $this, 'add_gateway_class' ], 999 );
|
44 |
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, [ $this, 'process_admin_options' ] );
|
45 |
+
add_action( 'woocommerce_admin_order_totals_after_total', [ $this, 'get_stripe_order_data' ] );
|
46 |
}
|
47 |
|
48 |
/**
|
78 |
* @return array
|
79 |
*/
|
80 |
public function add_gateway_class( $methods ) {
|
81 |
+
array_unshift( $methods, $this );
|
82 |
return $methods;
|
83 |
}
|
84 |
|
201 |
$args = [
|
202 |
'email' => $user_email,
|
203 |
];
|
204 |
+
|
205 |
if ( $order ) {
|
206 |
$args = [
|
207 |
'description' => 'Customer for Order #' . $order->get_id(),
|
214 |
'postal_code' => method_exists( $order, 'get_billing_postcode' ) ? $order->get_billing_postcode() : $order->billing_postcode,
|
215 |
'state' => method_exists( $order, 'get_billing_state' ) ? $order->get_billing_state() : $order->billing_state,
|
216 |
],
|
217 |
+
'name' => ( method_exists( $order, 'get_billing_first_name' ) ? $order->get_billing_first_name() : $order->billing_first_name ) . ' ' . ( method_exists( $order, 'get_billing_last_name' ) ? $order->get_billing_last_name() : $order->billing_last_name ),
|
218 |
];
|
219 |
}
|
220 |
|
221 |
+
$args = apply_filters( 'cpsw_create_stripe_customer_args', $args );
|
222 |
$stripe_api = new Stripe_Api();
|
223 |
$response = $stripe_api->customers( 'create', [ $args ] );
|
224 |
$response = $response['success'] ? $response['data'] : false;
|
244 |
}
|
245 |
|
246 |
try {
|
|
|
247 |
$order = wc_get_order( $order_id );
|
248 |
$intent_secret = $order->get_meta( '_cpsw_intent_secret', true );
|
249 |
|
252 |
$refund_response = $response['success'] ? $response['data'] : false;
|
253 |
|
254 |
if ( $refund_response ) {
|
255 |
+
|
256 |
+
if ( isset( $refund_response->balance_transaction ) ) {
|
257 |
+
$this->update_balance( $order, $refund_response->balance_transaction );
|
258 |
+
}
|
259 |
+
|
260 |
$refund_time = gmdate( 'Y-m-d H:i:s', time() );
|
261 |
$order->update_meta_data( '_cpsw_refund_id', $refund_response->id );
|
262 |
$order->add_order_note( __( 'Reason : ', 'checkout-plugins-stripe-woo' ) . $reason . '.<br>' . __( 'Amount : ', 'checkout-plugins-stripe-woo' ) . get_woocommerce_currency_symbol() . $amount . '.<br>' . __( 'Status : ', 'checkout-plugins-stripe-woo' ) . ( ( 'succeeded' === $refund_response->status ) ? 'Success' : 'Failed' ) . ' [ ' . $refund_time . ' ] ' . ( is_null( $refund_response->id ) ? '' : '<br>' . __( 'Transaction ID : ', 'checkout-plugins-stripe-woo' ) . $refund_response->id ) );
|
288 |
// Store charge data.
|
289 |
$order->update_meta_data( '_cpsw_charge_captured', $captured );
|
290 |
|
291 |
+
if ( isset( $response->balance_transaction ) ) {
|
292 |
+
$this->update_balance( $order, $response->balance_transaction, true );
|
293 |
+
}
|
294 |
+
|
295 |
if ( 'yes' === $captured ) {
|
296 |
/**
|
297 |
* Charge can be captured but in a pending state. Payment methods
|
311 |
}
|
312 |
|
313 |
if ( 'succeeded' === $response->status ) {
|
314 |
+
if ( $order->has_status( [ 'pending', 'failed' ] ) ) {
|
315 |
+
$order->payment_complete( $response->id );
|
316 |
+
}
|
317 |
|
318 |
/* translators: transaction id */
|
319 |
$message = sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'checkout-plugins-stripe-woo' ), $response->id );
|
354 |
* @return array current user data.
|
355 |
*/
|
356 |
public function get_clients_details() {
|
357 |
+
return apply_filters(
|
358 |
+
'cswp_clients_details',
|
359 |
+
[
|
360 |
+
'ip' => isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( $_SERVER['REMOTE_ADDR'] ) : '',
|
361 |
+
'agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( $_SERVER['HTTP_USER_AGENT'] ) : '',
|
362 |
+
'referer' => isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_text_field( $_SERVER['HTTP_REFERER'] ) : '',
|
363 |
+
]
|
364 |
+
);
|
365 |
}
|
366 |
|
367 |
/**
|
500 |
*/
|
501 |
public function payment_icons( $gateway_id ) {
|
502 |
$icons = [
|
503 |
+
'cpsw_alipay' => '<img src="' . $this->assets_url . 'icon/alipay.svg" class="cpsw-alipay-icon" alt="Alipay" width="50px" />',
|
504 |
+
'cpsw_ideal' => '<img src="' . $this->assets_url . 'icon/ideal.svg" class="cpsw-ideal-icon" alt="iDEAL" width="32" />',
|
505 |
+
'cpsw_klarna' => '<img src="' . $this->assets_url . 'icon/klarna.svg" class="cpsw-klarna-icon" alt="Klarna" width="60" />',
|
506 |
+
'cpsw_p24' => '<img src="' . $this->assets_url . 'icon/p24.svg" class="cpsw-p24-icon" alt="Przelewy24" width="60" />',
|
507 |
+
'cpsw_bancontact' => '<img src="' . $this->assets_url . 'icon/bancontact.svg" class="cpsw-bancontact-icon" alt="Bancontact" width="40" />',
|
508 |
];
|
509 |
|
510 |
return apply_filters(
|
539 |
$intent_response = $response['data'];
|
540 |
$currency = $intent_response->currency;
|
541 |
|
542 |
+
$refund_params = apply_filters(
|
543 |
+
'cpsw_refund_request_args',
|
544 |
+
[
|
545 |
+
'payment_intent' => $intent_secret_id,
|
546 |
+
'amount' => $this->get_formatted_amount( $amount, $currency ),
|
547 |
+
'reason' => 'requested_by_customer',
|
548 |
+
'metadata' => [
|
549 |
+
'order_id' => $order->get_order_number(),
|
550 |
+
'customer_ip' => $client['ip'],
|
551 |
+
'agent' => $client['agent'],
|
552 |
+
'referer' => $client['referer'],
|
553 |
+
'reason_for_refund' => $reason,
|
554 |
+
],
|
555 |
+
]
|
556 |
+
);
|
557 |
|
558 |
$stripe_api = new Stripe_Api();
|
559 |
return $stripe_api->refunds( 'create', [ $refund_params ] );
|
560 |
}
|
561 |
+
|
562 |
+
/**
|
563 |
+
* Get stripe order data
|
564 |
+
*
|
565 |
+
* @param int $order_id WooCommerce order id.
|
566 |
+
* @return void
|
567 |
+
* @since 1.3.0
|
568 |
+
*/
|
569 |
+
public function get_stripe_order_data( $order_id ) {
|
570 |
+
if ( apply_filters( 'cpsw_hide_stripe_order_data', false, $order_id ) ) {
|
571 |
+
return;
|
572 |
+
}
|
573 |
+
|
574 |
+
$order = wc_get_order( $order_id );
|
575 |
+
|
576 |
+
if ( $this->id !== $order->get_payment_method() || empty( $order->get_meta( '_cpsw_display_stripe_data' ) ) ) {
|
577 |
+
return;
|
578 |
+
}
|
579 |
+
|
580 |
+
$currency = $this->get_stripe_currency( $order );
|
581 |
+
$net = $this->get_stripe_net( $order );
|
582 |
+
$fees = $this->get_stripe_fee( $order );
|
583 |
+
|
584 |
+
if ( ! $currency || ! $net || ! $fees ) {
|
585 |
+
return;
|
586 |
+
}
|
587 |
+
|
588 |
+
?>
|
589 |
+
|
590 |
+
<tr>
|
591 |
+
<td class="label stripe-fees">
|
592 |
+
<?php echo wp_kses_post( wc_help_tip( __( 'Fee charged by stripe for this order.', 'checkout-plugins-stripe-woo' ) ) ); ?>
|
593 |
+
<?php esc_html_e( 'Stripe Fee:', 'checkout-plugins-stripe-woo' ); ?>
|
594 |
+
</td>
|
595 |
+
<td style='width:"1%";'></td>
|
596 |
+
<td class="total">
|
597 |
+
<?php echo wp_kses_post( wc_price( $fees, [ 'currency' => $currency ] ) ); ?>
|
598 |
+
</td>
|
599 |
+
</tr>
|
600 |
+
<tr>
|
601 |
+
<td class="label stripe-payout">
|
602 |
+
<?php echo wp_kses_post( wc_help_tip( __( 'Net amount that will be credited to your Stripe bank account.', 'checkout-plugins-stripe-woo' ) ) ); ?>
|
603 |
+
<?php esc_html_e( 'Stripe Payout:', 'checkout-plugins-stripe-woo' ); ?>
|
604 |
+
</td>
|
605 |
+
<td style='width:"1%";'></td>
|
606 |
+
<td class="net">
|
607 |
+
<?php echo wp_kses_post( wc_price( $net, [ 'currency' => $currency ] ) ); ?>
|
608 |
+
</td>
|
609 |
+
</tr>
|
610 |
+
|
611 |
+
<?php
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Get stripe currency
|
616 |
+
*
|
617 |
+
* @param object $order WooCommerce Order.
|
618 |
+
* @return string
|
619 |
+
* @since 1.3.0
|
620 |
+
*/
|
621 |
+
public function get_stripe_currency( $order ) {
|
622 |
+
return $order->get_meta( '_cpsw_stripe_currency', true );
|
623 |
+
}
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Get stripe fee amount
|
627 |
+
*
|
628 |
+
* @param object $order WooCommerce Order.
|
629 |
+
* @return string
|
630 |
+
* @since 1.3.0
|
631 |
+
*/
|
632 |
+
public function get_stripe_fee( $order ) {
|
633 |
+
return (float) $order->get_meta( '_cpsw_stripe_fee', true );
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Get stripe net amount
|
638 |
+
*
|
639 |
+
* @param object $order WooCommerce Order.
|
640 |
+
* @return string
|
641 |
+
* @since 1.3.0
|
642 |
+
*/
|
643 |
+
public function get_stripe_net( $order ) {
|
644 |
+
return $order->get_meta( '_cpsw_stripe_net', true );
|
645 |
+
}
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Update stripe transaction data in local database
|
649 |
+
*
|
650 |
+
* @param object $order WooCommerce order.
|
651 |
+
* @param array $data array of stripe meta_data to be added.
|
652 |
+
* @return void
|
653 |
+
* @since 1.3.0
|
654 |
+
*/
|
655 |
+
public function update_stripe_order_data( $order, $data ) {
|
656 |
+
foreach ( $data as $key => $value ) {
|
657 |
+
$order->update_meta_data( '_cpsw_stripe_' . $key, $value );
|
658 |
+
}
|
659 |
+
}
|
660 |
+
|
661 |
+
/**
|
662 |
+
* Update stripe transaction data balance from balance transactions api
|
663 |
+
*
|
664 |
+
* @param object $order WooCommerce order.
|
665 |
+
* @param string $transaction_id stripe transaction id.
|
666 |
+
* @param boolean $initiate send true if this call will initiate balance transation update, use for intent creations only.
|
667 |
+
* @return void
|
668 |
+
* @since 1.3.0
|
669 |
+
*/
|
670 |
+
public function update_balance( $order, $transaction_id, $initiate = false ) {
|
671 |
+
if ( $initiate ) {
|
672 |
+
$order->update_meta_data( '_cpsw_display_stripe_data', true );
|
673 |
+
} elseif ( empty( $order->get_meta( '_cpsw_display_stripe_data' ) ) ) {
|
674 |
+
return;
|
675 |
+
}
|
676 |
+
|
677 |
+
$stripe = new Stripe_Api();
|
678 |
+
$response = $stripe->balance_transactions( 'retrieve', [ $transaction_id ] );
|
679 |
+
$balance = $response['success'] ? $response['data'] : false;
|
680 |
+
|
681 |
+
if ( ! $balance ) {
|
682 |
+
Logger::error( __( 'Unable to update stripe transaction balance', 'checkout-plugins-stripe-woo' ) );
|
683 |
+
return;
|
684 |
+
}
|
685 |
+
|
686 |
+
$fee_refund = ! empty( $balance->fee ) ? $this->format_amount( $order, $balance->fee ) : 0;
|
687 |
+
$net_refund = ! empty( $balance->net ) ? $this->format_amount( $order, $balance->net ) : 0;
|
688 |
+
|
689 |
+
$fee = (float) $this->get_stripe_fee( $order ) + (float) $fee_refund;
|
690 |
+
$net = (float) $this->get_stripe_net( $order ) + (float) $net_refund;
|
691 |
+
$currency = ! empty( $balance->currency ) ? strtoupper( $balance->currency ) : null;
|
692 |
+
|
693 |
+
$data = [
|
694 |
+
'fee' => $fee,
|
695 |
+
'net' => $net,
|
696 |
+
'currency' => $currency,
|
697 |
+
];
|
698 |
+
|
699 |
+
$this->update_stripe_order_data( $order, $data );
|
700 |
+
|
701 |
+
if ( is_callable( [ $order, 'save' ] ) ) {
|
702 |
+
$order->save();
|
703 |
+
}
|
704 |
+
}
|
705 |
+
|
706 |
+
/**
|
707 |
+
* Format amount from stripe as per currency
|
708 |
+
*
|
709 |
+
* @param object $balance_transaction stripe balance transaction object.
|
710 |
+
* @param int $amount fee or net amount to be formated.
|
711 |
+
* @return float
|
712 |
+
* @since 1.3.0
|
713 |
+
*/
|
714 |
+
public function format_amount( $balance_transaction, $amount ) {
|
715 |
+
if ( ! is_object( $balance_transaction ) ) {
|
716 |
+
return;
|
717 |
+
}
|
718 |
+
$amount = $this->get_original_amount( $amount, $balance_transaction->currency );
|
719 |
+
|
720 |
+
return number_format( $amount, 2, '.', '' );
|
721 |
+
}
|
722 |
+
|
723 |
+
/**
|
724 |
+
* Returns amount received from stripe in woocomerce as per currency
|
725 |
+
*
|
726 |
+
* @since 1.3.0
|
727 |
+
*
|
728 |
+
* @param string $total amount to be processed.
|
729 |
+
* @param string $currency transaction currency.
|
730 |
+
*
|
731 |
+
* @return int
|
732 |
+
*/
|
733 |
+
public function get_original_amount( $total, $currency = '' ) {
|
734 |
+
if ( ! $currency ) {
|
735 |
+
$currency = get_woocommerce_currency();
|
736 |
+
}
|
737 |
+
|
738 |
+
if ( in_array( strtolower( $currency ), self::$zero_currencies, true ) ) {
|
739 |
+
// Zero decimal currencies accepted by stripe.
|
740 |
+
return absint( $total );
|
741 |
+
} else {
|
742 |
+
return (float) wc_format_decimal( ( (float) $total / 100 ), wc_get_price_decimals() ); // In cents.
|
743 |
+
}
|
744 |
+
}
|
745 |
+
|
746 |
+
/**
|
747 |
+
* Wrapper function to update stripe balance transaction data in order meta
|
748 |
+
*
|
749 |
+
* @param object $order WooCommerce Order.
|
750 |
+
* @param string $intent_id associated stripe intent id.
|
751 |
+
* @param boolean $initiate send true if this call will initiate balance transation update, use for intent creations only.
|
752 |
+
* @return void
|
753 |
+
* @since 1.3.0
|
754 |
+
*/
|
755 |
+
public function update_stripe_balance( $order, $intent_id, $initiate = false ) {
|
756 |
+
$stripe_api = new Stripe_Api();
|
757 |
+
$response = $stripe_api->payment_intents( 'retrieve', [ $intent_id ] );
|
758 |
+
$intent = $response['success'] ? $response['data'] : false;
|
759 |
+
|
760 |
+
if ( $intent ) {
|
761 |
+
|
762 |
+
$charge_obj = end( $intent->charges->data );
|
763 |
+
// Update payout details.
|
764 |
+
if ( isset( $charge_obj->balance_transaction ) ) {
|
765 |
+
$this->update_balance( $order, $charge_obj->balance_transaction, $initiate );
|
766 |
+
}
|
767 |
+
}
|
768 |
+
}
|
769 |
}
|
gateway/local-gateway.php
CHANGED
@@ -10,8 +10,13 @@ namespace CPSW\Gateway;
|
|
10 |
|
11 |
use CPSW\Inc\Traits\Get_Instance;
|
12 |
use CPSW\Gateway\Abstract_Payment_Gateway;
|
|
|
13 |
use CPSW\Inc\Notice;
|
14 |
use CPSW\Inc\Helper;
|
|
|
|
|
|
|
|
|
15 |
|
16 |
/**
|
17 |
* Local Gateway
|
@@ -30,6 +35,8 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
30 |
public function __construct() {
|
31 |
parent::__construct();
|
32 |
add_action( 'admin_init', [ $this, 'add_notice' ] );
|
|
|
|
|
33 |
}
|
34 |
|
35 |
/**
|
@@ -89,7 +96,7 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
89 |
$desc .= sprintf( __( ' & billing country is <strong>%s</strong>', 'checkout-plugins-stripe-woo' ), implode( ', ', $this->get_option( 'specific_countries', array() ) ) );
|
90 |
}
|
91 |
|
92 |
-
return $desc;
|
93 |
}
|
94 |
|
95 |
/**
|
@@ -102,7 +109,7 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
102 |
public function get_local_payment_settings() {
|
103 |
$method_title = $this->method_title;
|
104 |
|
105 |
-
|
106 |
'enabled' => [
|
107 |
'label' => ' ',
|
108 |
'type' => 'checkbox',
|
@@ -176,6 +183,8 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
176 |
},
|
177 |
],
|
178 |
];
|
|
|
|
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -287,6 +296,18 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
287 |
return $this->payment_icons( $this->id );
|
288 |
}
|
289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
/**
|
291 |
* Add notices
|
292 |
*
|
@@ -295,9 +316,13 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
295 |
* @return void
|
296 |
*/
|
297 |
public function add_notice() {
|
|
|
|
|
|
|
|
|
298 |
$notice = Notice::get_instance();
|
299 |
|
300 |
-
if ( ! $
|
301 |
return;
|
302 |
}
|
303 |
|
@@ -319,6 +344,16 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
319 |
/* translators: %1$s Payment method, %2$s List of supported currencies */
|
320 |
$notice->add( $this->id . '_currency', 'notice notice-error', sprintf( __( '%1$s is enabled - it requires store currency to be set to %2$s.', 'checkout-plugins-stripe-woo' ), ucfirst( str_replace( 'cpsw_', '', $this->id ) ), implode( ', ', $this->get_supported_currency() ) ), true );
|
321 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
}
|
323 |
|
324 |
/**
|
@@ -346,6 +381,238 @@ class Local_Gateway extends Abstract_Payment_Gateway {
|
|
346 |
*/
|
347 |
public function get_test_mode_description() {
|
348 |
/* translators: HTML Entities. */
|
349 |
-
return apply_filters( 'cpsw_local_gateway_test_description', sprintf( esc_html__( '%1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
}
|
351 |
}
|
10 |
|
11 |
use CPSW\Inc\Traits\Get_Instance;
|
12 |
use CPSW\Gateway\Abstract_Payment_Gateway;
|
13 |
+
use CPSW\Gateway\Stripe\Stripe_Api;
|
14 |
use CPSW\Inc\Notice;
|
15 |
use CPSW\Inc\Helper;
|
16 |
+
use CPSW\Inc\Logger;
|
17 |
+
use Exception;
|
18 |
+
use WP_Error;
|
19 |
+
use WC_AJAX;
|
20 |
|
21 |
/**
|
22 |
* Local Gateway
|
35 |
public function __construct() {
|
36 |
parent::__construct();
|
37 |
add_action( 'admin_init', [ $this, 'add_notice' ] );
|
38 |
+
add_action( 'wc_ajax_' . $this->id . '_verify_payment_intent', [ $this, 'verify_intent' ] );
|
39 |
+
add_filter( 'woocommerce_payment_successful_result', [ $this, 'modify_successful_payment_result' ], 999, 2 );
|
40 |
}
|
41 |
|
42 |
/**
|
96 |
$desc .= sprintf( __( ' & billing country is <strong>%s</strong>', 'checkout-plugins-stripe-woo' ), implode( ', ', $this->get_option( 'specific_countries', array() ) ) );
|
97 |
}
|
98 |
|
99 |
+
return apply_filters( 'cpsw_local_payment_description', $desc );
|
100 |
}
|
101 |
|
102 |
/**
|
109 |
public function get_local_payment_settings() {
|
110 |
$method_title = $this->method_title;
|
111 |
|
112 |
+
$settings = [
|
113 |
'enabled' => [
|
114 |
'label' => ' ',
|
115 |
'type' => 'checkbox',
|
183 |
},
|
184 |
],
|
185 |
];
|
186 |
+
|
187 |
+
return apply_filters( 'cpsw_local_methods_default_settings', $settings );
|
188 |
}
|
189 |
|
190 |
/**
|
296 |
return $this->payment_icons( $this->id );
|
297 |
}
|
298 |
|
299 |
+
/**
|
300 |
+
* Check current section is cpsw section.
|
301 |
+
*
|
302 |
+
* @since 1.3.0
|
303 |
+
*
|
304 |
+
* @return boolean
|
305 |
+
*/
|
306 |
+
public function is_current_section() {
|
307 |
+
$notice = Notice::get_instance();
|
308 |
+
return $notice->is_cpsw_section( $this->id );
|
309 |
+
}
|
310 |
+
|
311 |
/**
|
312 |
* Add notices
|
313 |
*
|
316 |
* @return void
|
317 |
*/
|
318 |
public function add_notice() {
|
319 |
+
if ( 'yes' !== $this->enabled ) {
|
320 |
+
return;
|
321 |
+
}
|
322 |
+
|
323 |
$notice = Notice::get_instance();
|
324 |
|
325 |
+
if ( ! $this->is_current_section() ) {
|
326 |
return;
|
327 |
}
|
328 |
|
344 |
/* translators: %1$s Payment method, %2$s List of supported currencies */
|
345 |
$notice->add( $this->id . '_currency', 'notice notice-error', sprintf( __( '%1$s is enabled - it requires store currency to be set to %2$s.', 'checkout-plugins-stripe-woo' ), ucfirst( str_replace( 'cpsw_', '', $this->id ) ), implode( ', ', $this->get_supported_currency() ) ), true );
|
346 |
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Action for add more notices for local gateways.
|
350 |
+
*
|
351 |
+
* @since 1.3.0
|
352 |
+
*
|
353 |
+
* @param obj $notice Notice object.
|
354 |
+
* @param obj $this Current full class object.
|
355 |
+
*/
|
356 |
+
do_action( 'cpsw_add_notices_for_local_gateways', $notice, $this );
|
357 |
}
|
358 |
|
359 |
/**
|
381 |
*/
|
382 |
public function get_test_mode_description() {
|
383 |
/* translators: HTML Entities. */
|
384 |
+
return apply_filters( 'cpsw_local_gateway_test_description', sprintf( esc_html__( '%1$1sTest Mode Enabled :%2$2s You will be redirected to an authorization page hosted by Stripe.', 'checkout-plugins-stripe-woo' ), '<strong>', '</strong>' ) );
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Get request data
|
389 |
+
*
|
390 |
+
* @since 1.3.0
|
391 |
+
*
|
392 |
+
* @param WC_Order $order wooCommerce order.
|
393 |
+
*
|
394 |
+
* @return array $data to for create payment intent.
|
395 |
+
*/
|
396 |
+
public function get_data( $order ) {
|
397 |
+
$data = [
|
398 |
+
'amount' => $this->get_formatted_amount( $order->get_total() ),
|
399 |
+
'currency' => $this->get_currency(),
|
400 |
+
'description' => $this->get_order_description( $order ),
|
401 |
+
'metadata' => $this->get_metadata( $order->get_id() ),
|
402 |
+
'payment_method_types' => [ $this->payment_method_types ],
|
403 |
+
'customer' => $this->get_customer_id( $order ),
|
404 |
+
];
|
405 |
+
|
406 |
+
if ( ! empty( $this->capture_method ) ) {
|
407 |
+
$data['capture_method'] = $this->capture_method;
|
408 |
+
}
|
409 |
+
|
410 |
+
return apply_filters( 'cpsw_local_gateways_payment_intent_data', $data );
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* Process woocommerce orders after payment is done
|
415 |
+
*
|
416 |
+
* @since 1.3.0
|
417 |
+
*
|
418 |
+
* @param int $order_id wooCommerce order id.
|
419 |
+
*
|
420 |
+
* @return array data to redirect after payment processing.
|
421 |
+
*/
|
422 |
+
public function process_payment( $order_id ) {
|
423 |
+
try {
|
424 |
+
$order = wc_get_order( $order_id );
|
425 |
+
$idempotency_key = $order->get_order_key() . time();
|
426 |
+
$data = $this->get_data( $order );
|
427 |
+
|
428 |
+
/* translators: %1$1s method title, %2$2s order id, %3$3s order total amount */
|
429 |
+
Logger::info( sprintf( __( 'Begin processing payment with %1$1s for order %2$2s for the amount of %3$3s', 'checkout-plugins-stripe-woo' ), $this->method_title, $order_id, $order->get_total() ) );
|
430 |
+
$intent_data = $this->get_payment_intent( $order_id, $idempotency_key, $data, true );
|
431 |
+
|
432 |
+
/**
|
433 |
+
* Action when process payment.
|
434 |
+
*
|
435 |
+
* @since 1.3.0
|
436 |
+
*
|
437 |
+
* @param obj $intent_data Payment intent data.
|
438 |
+
* @param obj $order WooCommerce main order.
|
439 |
+
*/
|
440 |
+
do_action( 'cpsw_local_gateways_process_payment', $intent_data, $order );
|
441 |
+
|
442 |
+
if ( $intent_data ) {
|
443 |
+
if ( isset( $intent_data['success'] ) && false === $intent_data['success'] ) {
|
444 |
+
$error = '';
|
445 |
+
if ( 'currency' === $intent_data['type'] ) {
|
446 |
+
$error = __( 'Contact seller. ', 'checkout-plugins-stripe-woo' );
|
447 |
+
|
448 |
+
if ( 'test' === Helper::get_payment_mode() ) {
|
449 |
+
$error = __( 'Store currency doesn\'t match stripe currency. ', 'checkout-plugins-stripe-woo' );
|
450 |
+
}
|
451 |
+
}
|
452 |
+
|
453 |
+
wc_add_notice( $error . $intent_data['message'], 'error' );
|
454 |
+
|
455 |
+
return [
|
456 |
+
'result' => 'fail',
|
457 |
+
'redirect' => '',
|
458 |
+
];
|
459 |
+
}
|
460 |
+
|
461 |
+
return [
|
462 |
+
'result' => 'success',
|
463 |
+
'redirect' => false,
|
464 |
+
'intent_secret' => $intent_data['client_secret'],
|
465 |
+
];
|
466 |
+
} else {
|
467 |
+
return [
|
468 |
+
'result' => 'fail',
|
469 |
+
'redirect' => '',
|
470 |
+
];
|
471 |
+
}
|
472 |
+
} catch ( Exception $e ) {
|
473 |
+
Logger::error( $e->getMessage(), true );
|
474 |
+
return new WP_Error( 'order-error', '<div class="woocommerce-error">' . $e->getMessage() . '</div>', [ 'status' => 200 ] );
|
475 |
+
}
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Modify redirect url
|
480 |
+
*
|
481 |
+
* @since 1.3.0
|
482 |
+
*
|
483 |
+
* @param array $result redirect url array.
|
484 |
+
* @param int $order_id woocommerce order id.
|
485 |
+
*
|
486 |
+
* @return array modified redirect url array.
|
487 |
+
*/
|
488 |
+
public function modify_successful_payment_result( $result, $order_id ) {
|
489 |
+
if ( empty( $order_id ) ) {
|
490 |
+
return $result;
|
491 |
+
}
|
492 |
+
|
493 |
+
$order = wc_get_order( $order_id );
|
494 |
+
|
495 |
+
if ( $this->id !== $order->get_payment_method() ) {
|
496 |
+
return $result;
|
497 |
+
}
|
498 |
+
|
499 |
+
if ( ! isset( $result['intent_secret'] ) ) {
|
500 |
+
return $result;
|
501 |
+
}
|
502 |
+
|
503 |
+
// Put the final thank you page redirect into the verification URL.
|
504 |
+
$verification_url = add_query_arg(
|
505 |
+
[
|
506 |
+
'order' => $order_id,
|
507 |
+
'confirm_payment_nonce' => wp_create_nonce( 'cpsw_confirm_payment_intent' ),
|
508 |
+
'redirect_to' => rawurlencode( $result['redirect'] ),
|
509 |
+
],
|
510 |
+
WC_AJAX::get_endpoint( $this->id . '_verify_payment_intent' )
|
511 |
+
);
|
512 |
+
|
513 |
+
// Combine into a hash.
|
514 |
+
$redirect = sprintf( '#confirm-pi-%s:%s', $result['intent_secret'], rawurlencode( $verification_url ) );
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Action modify mayment successful result.
|
518 |
+
*
|
519 |
+
* @since 1.3.0
|
520 |
+
*
|
521 |
+
* @param obj $result Payment successful result.
|
522 |
+
* @param obj $order WooCommerce main order.
|
523 |
+
*/
|
524 |
+
do_action( 'cpsw_local_gateways_modify_successful_payment_result', $result, $order );
|
525 |
+
|
526 |
+
return [
|
527 |
+
'result' => 'success',
|
528 |
+
'redirect' => $redirect,
|
529 |
+
];
|
530 |
+
}
|
531 |
+
|
532 |
+
/**
|
533 |
+
* Process order after stripe payment
|
534 |
+
*
|
535 |
+
* @since 1.3.0
|
536 |
+
*
|
537 |
+
* @param object $response intent response data.
|
538 |
+
* @param string $order_id currnt coocommerce id.
|
539 |
+
*
|
540 |
+
* @return array return data.
|
541 |
+
*/
|
542 |
+
public function process_order( $response, $order_id ) {
|
543 |
+
$order = wc_get_order( $order_id );
|
544 |
+
|
545 |
+
if ( isset( $response->balance_transaction ) ) {
|
546 |
+
$this->update_balance( $order, $response->balance_transaction, true );
|
547 |
+
}
|
548 |
+
|
549 |
+
if ( true === $response->captured ) {
|
550 |
+
$order->payment_complete( $response->id );
|
551 |
+
/* translators: order id */
|
552 |
+
Logger::info( sprintf( __( 'Payment successful Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
553 |
+
|
554 |
+
$order->add_order_note( __( 'Payment Status: ', 'checkout-plugins-stripe-woo' ) . ucfirst( $response->status ) . ', ' . __( 'Source: Payment is Completed via ', 'checkout-plugins-stripe-woo' ) . ucfirst( $response->payment_method_details->type ) );
|
555 |
+
} else {
|
556 |
+
/* translators: transaction id */
|
557 |
+
$order->update_status( 'on-hold', sprintf( __( 'Charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
558 |
+
/* translators: transaction id */
|
559 |
+
Logger::info( sprintf( __( 'Charge authorized Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
560 |
+
}
|
561 |
+
|
562 |
+
WC()->cart->empty_cart();
|
563 |
+
|
564 |
+
/**
|
565 |
+
* Action when process order.
|
566 |
+
*
|
567 |
+
* @since 1.3.0
|
568 |
+
*
|
569 |
+
* @param obj $response Payment response data.
|
570 |
+
* @param obj $order WooCommerce main order.
|
571 |
+
* @param string $this->id Current payment gateway id.
|
572 |
+
*/
|
573 |
+
do_action( 'cpsw_local_gateways_process_order', $response, $order, $this->id );
|
574 |
+
|
575 |
+
return $this->get_return_url( $order );
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Verify intent state and redirect.
|
580 |
+
*
|
581 |
+
* @since 1.3.0
|
582 |
+
*
|
583 |
+
* @return void
|
584 |
+
*/
|
585 |
+
public function verify_intent() {
|
586 |
+
$order_id = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
587 |
+
$order = wc_get_order( $order_id );
|
588 |
+
|
589 |
+
$intent_secret = get_post_meta( $order_id, '_cpsw_intent_secret', true );
|
590 |
+
$stripe_api = new Stripe_Api();
|
591 |
+
$response = $stripe_api->payment_intents( 'retrieve', [ $intent_secret['id'] ] );
|
592 |
+
$intent = $response['success'] ? $response['data'] : false;
|
593 |
+
|
594 |
+
/**
|
595 |
+
* Action when verify intent.
|
596 |
+
*
|
597 |
+
* @since 1.3.0
|
598 |
+
*
|
599 |
+
* @param obj $intent Payment intent data.
|
600 |
+
* @param obj $order WooCommerce main order.
|
601 |
+
*/
|
602 |
+
do_action( 'cpsw_local_gateways_process_order', $intent, $order );
|
603 |
+
|
604 |
+
if ( 'succeeded' === $intent->status || 'requires_capture' === $intent->status ) {
|
605 |
+
$redirect_to = $this->process_order( end( $intent->charges->data ), $order_id );
|
606 |
+
$redirect_url = apply_filters( 'cpsw_redirect_order_url', $redirect_to, $order );
|
607 |
+
wp_safe_redirect( $redirect_url );
|
608 |
+
} elseif ( isset( $response['data']->last_payment_error ) ) {
|
609 |
+
$message = isset( $response['data']->last_payment_error->message ) ? $response['data']->last_payment_error->message : '';
|
610 |
+
$order->update_status( 'wc-failed' );
|
611 |
+
|
612 |
+
// translators: %s: payment fail message.
|
613 |
+
wc_add_notice( sprintf( __( 'Payment failed. %s', 'checkout-plugins-stripe-woo' ), $message ), 'error' );
|
614 |
+
wp_safe_redirect( wc_get_checkout_url() );
|
615 |
+
}
|
616 |
+
exit();
|
617 |
}
|
618 |
}
|
gateway/stripe/alipay.php
CHANGED
@@ -9,12 +9,8 @@
|
|
9 |
namespace CPSW\Gateway\Stripe;
|
10 |
|
11 |
use CPSW\Inc\Helper;
|
12 |
-
use CPSW\Inc\Logger;
|
13 |
use CPSW\Inc\Traits\Get_Instance;
|
14 |
use CPSW\Gateway\Local_Gateway;
|
15 |
-
use WC_AJAX;
|
16 |
-
use Exception;
|
17 |
-
use WP_Error;
|
18 |
|
19 |
/**
|
20 |
* Alipay
|
@@ -32,6 +28,13 @@ class Alipay extends Local_Gateway {
|
|
32 |
*/
|
33 |
public $id = 'cpsw_alipay';
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Constructor
|
37 |
*
|
@@ -51,9 +54,6 @@ class Alipay extends Local_Gateway {
|
|
51 |
$this->title = $this->get_option( 'title' );
|
52 |
$this->description = $this->get_option( 'description' );
|
53 |
$this->order_button_text = $this->get_option( 'order_button_text' );
|
54 |
-
|
55 |
-
add_action( 'wc_ajax_cpsw_verify_alipay_payment_intent', [ $this, 'verify_intent' ] );
|
56 |
-
add_filter( 'woocommerce_payment_successful_result', [ $this, 'modify_successful_payment_result' ], 999, 2 );
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -65,6 +65,8 @@ class Alipay extends Local_Gateway {
|
|
65 |
*/
|
66 |
public function method_description() {
|
67 |
$payment_description = $this->payment_description();
|
|
|
|
|
68 |
|
69 |
return sprintf(
|
70 |
/* translators: %1$s: Break, %2$s: Gateway appear message, %3$s: Break, %4$s: Gateway appear message currency wise, %4$s: HTML entities */
|
@@ -72,8 +74,7 @@ class Alipay extends Local_Gateway {
|
|
72 |
'<br/>',
|
73 |
$payment_description,
|
74 |
'<br/>',
|
75 |
-
|
76 |
-
sprintf( __( '%1$sEUR%2$s is supported only for billing country %1$sDenmark (DK), Norway (NO), Sweden (SE) & Switzerland (CH)%2$s.', 'checkout-plugins-stripe-woo' ), '<strong>', '</strong>' ),
|
77 |
);
|
78 |
}
|
79 |
|
@@ -148,6 +149,13 @@ class Alipay extends Local_Gateway {
|
|
148 |
$pay_button_text = '';
|
149 |
}
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
echo '<div
|
152 |
id="cpsw-alipay-payment-data"
|
153 |
data-amount="' . esc_attr( $total ) . '"
|
@@ -159,178 +167,16 @@ class Alipay extends Local_Gateway {
|
|
159 |
|
160 |
echo '</div>';
|
161 |
if ( 'test' === Helper::get_payment_mode() ) {
|
162 |
-
echo '<div class="
|
163 |
echo wp_kses_post( $this->get_test_mode_description() );
|
164 |
echo '</div>';
|
165 |
}
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Verify intent state and redirect.
|
170 |
-
*
|
171 |
-
* @since 1.2.0
|
172 |
-
*
|
173 |
-
* @return void
|
174 |
-
*/
|
175 |
-
public function verify_intent() {
|
176 |
-
$order_id = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
177 |
-
$order = wc_get_order( $order_id );
|
178 |
-
|
179 |
-
$intent_secret = get_post_meta( $order_id, '_cpsw_intent_secret', true );
|
180 |
-
$stripe_api = new Stripe_Api();
|
181 |
-
$response = $stripe_api->payment_intents( 'retrieve', [ $intent_secret['id'] ] );
|
182 |
-
$intent = $response['success'] ? $response['data'] : false;
|
183 |
-
|
184 |
-
if ( 'succeeded' === $intent->status || 'requires_capture' === $intent->status ) {
|
185 |
-
$redirect_to = $this->process_order( end( $intent->charges->data ), $order_id );
|
186 |
-
$redirect_url = apply_filters( 'cpsw_redirect_order_url', $redirect_to, $order );
|
187 |
-
wp_safe_redirect( $redirect_url );
|
188 |
-
} elseif ( isset( $response['data']->last_payment_error ) ) {
|
189 |
-
$message = isset( $response['data']->last_payment_error->message ) ? $response['data']->last_payment_error->message : '';
|
190 |
-
|
191 |
-
// translators: %s: payment fail message.
|
192 |
-
wc_add_notice( sprintf( __( 'Payment failed. %s', 'checkout-plugins-stripe-woo' ), $message ), 'error' );
|
193 |
-
wp_safe_redirect( wc_get_checkout_url() );
|
194 |
-
}
|
195 |
-
exit();
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Process order after stripe payment
|
200 |
-
*
|
201 |
-
* @since 1.2.0
|
202 |
-
*
|
203 |
-
* @param object $response intent response data.
|
204 |
-
* @param string $order_id currnt coocommerce id.
|
205 |
-
*
|
206 |
-
* @return array return data.
|
207 |
-
*/
|
208 |
-
public function process_order( $response, $order_id ) {
|
209 |
-
$order = wc_get_order( $order_id );
|
210 |
-
|
211 |
-
if ( true === $response->captured ) {
|
212 |
-
$order->payment_complete( $response->id );
|
213 |
-
/* translators: order id */
|
214 |
-
Logger::info( sprintf( __( 'Payment successful Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
215 |
-
}
|
216 |
-
if ( ! $response->captured ) {
|
217 |
-
/* translators: transaction id */
|
218 |
-
$order->update_status( 'on-hold', sprintf( __( 'Charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
219 |
-
/* translators: transaction id */
|
220 |
-
Logger::info( sprintf( __( 'Charge authorized Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
221 |
-
}
|
222 |
-
|
223 |
-
$order->add_order_note( __( 'Payment Status : ', 'checkout-plugins-stripe-woo' ) . ucfirst( $response->status ) . __( ' Source : ', 'checkout-plugins-stripe-woo' ) . $response->payment_method_details->type );
|
224 |
-
WC()->cart->empty_cart();
|
225 |
-
|
226 |
-
return $this->get_return_url( $order );
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Modify redirect url
|
231 |
-
*
|
232 |
-
* @since 1.2.0
|
233 |
-
*
|
234 |
-
* @param array $result redirect url array.
|
235 |
-
* @param int $order_id woocommerce order id.
|
236 |
-
*
|
237 |
-
* @return array modified redirect url array.
|
238 |
-
*/
|
239 |
-
public function modify_successful_payment_result( $result, $order_id ) {
|
240 |
-
if ( empty( $order_id ) ) {
|
241 |
-
return $result;
|
242 |
-
}
|
243 |
-
|
244 |
-
$order = wc_get_order( $order_id );
|
245 |
-
|
246 |
-
if ( $this->id !== $order->get_payment_method() ) {
|
247 |
-
return $result;
|
248 |
-
}
|
249 |
-
|
250 |
-
if ( ! isset( $result['intent_secret'] ) ) {
|
251 |
-
return $result;
|
252 |
-
}
|
253 |
-
|
254 |
-
// Put the final thank you page redirect into the verification URL.
|
255 |
-
$verification_url = add_query_arg(
|
256 |
-
[
|
257 |
-
'order' => $order_id,
|
258 |
-
'confirm_payment_nonce' => wp_create_nonce( 'cpsw_confirm_payment_intent' ),
|
259 |
-
'redirect_to' => rawurlencode( $result['redirect'] ),
|
260 |
-
],
|
261 |
-
WC_AJAX::get_endpoint( 'cpsw_verify_alipay_payment_intent' )
|
262 |
-
);
|
263 |
-
|
264 |
-
// Combine into a hash.
|
265 |
-
$redirect = sprintf( '#confirm-pi-%s:%s', $result['intent_secret'], rawurlencode( $verification_url ) );
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Process woocommerce orders after payment is done
|
275 |
-
*
|
276 |
-
* @since 1.2.0
|
277 |
-
*
|
278 |
-
* @param int $order_id wooCommerce order id.
|
279 |
-
*
|
280 |
-
* @return array data to redirect after payment processing.
|
281 |
-
*/
|
282 |
-
public function process_payment( $order_id ) {
|
283 |
-
try {
|
284 |
-
$order = wc_get_order( $order_id );
|
285 |
-
$customer_id = $this->get_customer_id( $order );
|
286 |
-
$idempotency_key = $order->get_order_key() . time();
|
287 |
-
|
288 |
-
$data = [
|
289 |
-
'amount' => $this->get_formatted_amount( $order->get_total() ),
|
290 |
-
'currency' => $this->get_currency(),
|
291 |
-
'description' => $this->get_order_description( $order ),
|
292 |
-
'metadata' => $this->get_metadata( $order_id ),
|
293 |
-
'payment_method_types' => [ 'alipay' ],
|
294 |
-
'customer' => $customer_id,
|
295 |
-
];
|
296 |
-
|
297 |
-
/* translators: %1$1s order id, %2$2s order total amount */
|
298 |
-
Logger::info( sprintf( __( 'Begin processing payment with Alipay for order %1$1s for the amount of %2$2s', 'checkout-plugins-stripe-woo' ), $order_id, $order->get_total() ) );
|
299 |
-
$intent_data = $this->get_payment_intent( $order_id, $idempotency_key, $data, true );
|
300 |
-
|
301 |
-
if ( $intent_data ) {
|
302 |
-
if ( isset( $intent_data['success'] ) && false === $intent_data['success'] ) {
|
303 |
-
$error = '';
|
304 |
-
if ( 'currency' === $intent_data['type'] ) {
|
305 |
-
$error = __( 'Contact seller. ', 'checkout-plugins-stripe-woo' );
|
306 |
-
|
307 |
-
if ( 'test' === Helper::get_payment_mode() ) {
|
308 |
-
$error = __( 'Store currency doesn\'t match stripe currency. ', 'checkout-plugins-stripe-woo' );
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
wc_add_notice( $error . $intent_data['message'], 'error' );
|
313 |
-
|
314 |
-
return [
|
315 |
-
'result' => 'fail',
|
316 |
-
'redirect' => '',
|
317 |
-
];
|
318 |
-
}
|
319 |
-
|
320 |
-
return [
|
321 |
-
'result' => 'success',
|
322 |
-
'redirect' => false,
|
323 |
-
'intent_secret' => $intent_data['client_secret'],
|
324 |
-
];
|
325 |
-
} else {
|
326 |
-
return [
|
327 |
-
'result' => 'fail',
|
328 |
-
'redirect' => '',
|
329 |
-
];
|
330 |
-
}
|
331 |
-
} catch ( Exception $e ) {
|
332 |
-
Logger::error( $e->getMessage(), true );
|
333 |
-
return new WP_Error( 'order-error', '<div class="woocommerce-error">' . $e->getMessage() . '</div>', [ 'status' => 200 ] );
|
334 |
-
}
|
335 |
}
|
336 |
}
|
9 |
namespace CPSW\Gateway\Stripe;
|
10 |
|
11 |
use CPSW\Inc\Helper;
|
|
|
12 |
use CPSW\Inc\Traits\Get_Instance;
|
13 |
use CPSW\Gateway\Local_Gateway;
|
|
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* Alipay
|
28 |
*/
|
29 |
public $id = 'cpsw_alipay';
|
30 |
|
31 |
+
/**
|
32 |
+
* Payment method types
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $payment_method_types = 'alipay';
|
37 |
+
|
38 |
/**
|
39 |
* Constructor
|
40 |
*
|
54 |
$this->title = $this->get_option( 'title' );
|
55 |
$this->description = $this->get_option( 'description' );
|
56 |
$this->order_button_text = $this->get_option( 'order_button_text' );
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
65 |
*/
|
66 |
public function method_description() {
|
67 |
$payment_description = $this->payment_description();
|
68 |
+
/* translators: HTML Entities.*/
|
69 |
+
$extra_description = $this->is_current_section() && 'EUR' === get_woocommerce_currency() ? sprintf( __( '%1$sEUR%2$s is supported only for billing country %1$sDenmark (DK), Norway (NO), Sweden (SE) & Switzerland (CH)%2$s.', 'checkout-plugins-stripe-woo' ), '<strong>', '</strong>' ) : '';
|
70 |
|
71 |
return sprintf(
|
72 |
/* translators: %1$s: Break, %2$s: Gateway appear message, %3$s: Break, %4$s: Gateway appear message currency wise, %4$s: HTML entities */
|
74 |
'<br/>',
|
75 |
$payment_description,
|
76 |
'<br/>',
|
77 |
+
$extra_description,
|
|
|
78 |
);
|
79 |
}
|
80 |
|
149 |
$pay_button_text = '';
|
150 |
}
|
151 |
|
152 |
+
/**
|
153 |
+
* Action before payment field.
|
154 |
+
*
|
155 |
+
* @since 1.3.0
|
156 |
+
*/
|
157 |
+
do_action( $this->id . '_before_payment_field_checkout' );
|
158 |
+
|
159 |
echo '<div
|
160 |
id="cpsw-alipay-payment-data"
|
161 |
data-amount="' . esc_attr( $total ) . '"
|
167 |
|
168 |
echo '</div>';
|
169 |
if ( 'test' === Helper::get_payment_mode() ) {
|
170 |
+
echo '<div class="cpsw_stripe_test_description">';
|
171 |
echo wp_kses_post( $this->get_test_mode_description() );
|
172 |
echo '</div>';
|
173 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Bancontact Gateway
|
4 |
+
*
|
5 |
+
* @package checkout-plugins-stripe-woo
|
6 |
+
* @since 1.3.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace CPSW\Gateway\Stripe;
|
10 |
+
|
11 |
+
use CPSW\Inc\Helper;
|
12 |
+
use CPSW\Inc\Traits\Get_Instance;
|
13 |
+
use CPSW\Gateway\Local_Gateway;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Bancontact
|
17 |
+
*
|
18 |
+
* @since 1.3.0
|
19 |
+
*/
|
20 |
+
class Bancontact extends Local_Gateway {
|
21 |
+
|
22 |
+
use Get_Instance;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Gateway id
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $id = 'cpsw_bancontact';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Payment method types
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $payment_method_types = 'bancontact';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Constructor
|
40 |
+
*
|
41 |
+
* @since 1.3.0
|
42 |
+
*/
|
43 |
+
public function __construct() {
|
44 |
+
parent::__construct();
|
45 |
+
|
46 |
+
$this->method_title = __( 'Bancontact', 'checkout-plugins-stripe-woo' );
|
47 |
+
$this->method_description = $this->method_description();
|
48 |
+
$this->has_fields = true;
|
49 |
+
$this->init_supports();
|
50 |
+
|
51 |
+
$this->init_form_fields();
|
52 |
+
$this->init_settings();
|
53 |
+
// get_option should be called after init_form_fields().
|
54 |
+
$this->title = $this->get_option( 'title' );
|
55 |
+
$this->description = $this->get_option( 'description' );
|
56 |
+
$this->order_button_text = $this->get_option( 'order_button_text' );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Description for Bancontact gateway
|
61 |
+
*
|
62 |
+
* @since 1.3.0
|
63 |
+
*
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function method_description() {
|
67 |
+
$payment_description = $this->payment_description();
|
68 |
+
|
69 |
+
return sprintf(
|
70 |
+
/* translators: %1$s: Break, %2$s: Gateway appear message, %3$s: Break, %4$s: Gateway appear message currency wise, %4$s: HTML entities */
|
71 |
+
__( 'Accept payment using Bancontact. %1$s %2$s', 'checkout-plugins-stripe-woo' ),
|
72 |
+
'<br/>',
|
73 |
+
$payment_description,
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Returns all supported currencies for this payment method.
|
79 |
+
*
|
80 |
+
* @since 1.3.0
|
81 |
+
*
|
82 |
+
* @return array
|
83 |
+
*/
|
84 |
+
public function get_supported_currency() {
|
85 |
+
return apply_filters(
|
86 |
+
'cpsw_bancontact_supported_currencies',
|
87 |
+
[
|
88 |
+
'EUR',
|
89 |
+
]
|
90 |
+
);
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Add more gateway form fields
|
95 |
+
*
|
96 |
+
* @since 1.3.0
|
97 |
+
*
|
98 |
+
* @return array
|
99 |
+
*/
|
100 |
+
public function get_local_payment_settings() {
|
101 |
+
$local_settings = parent::get_local_payment_settings();
|
102 |
+
|
103 |
+
$local_settings['allowed_countries']['default'] = 'specific';
|
104 |
+
$local_settings['specific_countries']['default'] = [ 'BE' ];
|
105 |
+
|
106 |
+
return $local_settings;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Checks whether this gateway is available.
|
111 |
+
*
|
112 |
+
* @since 1.3.0
|
113 |
+
*
|
114 |
+
* @return boolean
|
115 |
+
*/
|
116 |
+
public function is_available() {
|
117 |
+
if ( ! in_array( $this->get_currency(), $this->get_supported_currency(), true ) ) {
|
118 |
+
return false;
|
119 |
+
}
|
120 |
+
|
121 |
+
return parent::is_available();
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Creates markup for payment form for card payments
|
126 |
+
*
|
127 |
+
* @since 1.3.0
|
128 |
+
*
|
129 |
+
* @return void
|
130 |
+
*/
|
131 |
+
public function payment_fields() {
|
132 |
+
global $wp;
|
133 |
+
|
134 |
+
$user = wp_get_current_user();
|
135 |
+
$total = WC()->cart->total;
|
136 |
+
|
137 |
+
// If paying from order, we need to get total from order not cart.
|
138 |
+
if ( isset( $_GET['pay_for_order'] ) && ! empty( $_GET['key'] ) ) { // phpcs:ignore
|
139 |
+
$order = wc_get_order( wc_clean( $wp->query_vars['order-pay'] ) );
|
140 |
+
$total = $order->get_total();
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( is_add_payment_method_page() ) {
|
144 |
+
$pay_button_text = __( 'Add Payment', 'checkout-plugins-stripe-woo' );
|
145 |
+
$total = '';
|
146 |
+
} else {
|
147 |
+
$pay_button_text = '';
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Action before payment field.
|
152 |
+
*
|
153 |
+
* @since 1.3.0
|
154 |
+
*/
|
155 |
+
do_action( $this->id . '_before_payment_field_checkout' );
|
156 |
+
|
157 |
+
echo '<div
|
158 |
+
id="cpsw-bancontact-payment-data"
|
159 |
+
data-amount="' . esc_attr( $total ) . '"
|
160 |
+
data-currency="' . esc_attr( strtolower( $this->get_currency() ) ) . '">';
|
161 |
+
|
162 |
+
if ( $this->description ) {
|
163 |
+
echo wp_kses_post( $this->description );
|
164 |
+
}
|
165 |
+
|
166 |
+
echo '</div>';
|
167 |
+
if ( 'test' === Helper::get_payment_mode() ) {
|
168 |
+
echo '<div class="cpsw_stripe_test_description">';
|
169 |
+
echo wp_kses_post( $this->get_test_mode_description() );
|
170 |
+
echo '</div>';
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Action after payment field.
|
175 |
+
*
|
176 |
+
* @since 1.3.0
|
177 |
+
*/
|
178 |
+
do_action( $this->id . '_after_payment_field_checkout' );
|
179 |
+
}
|
180 |
+
}
|
gateway/stripe/card-payments.php
CHANGED
@@ -74,13 +74,16 @@ class Card_Payments extends Abstract_Payment_Gateway {
|
|
74 |
* @return void
|
75 |
*/
|
76 |
public function init_supports() {
|
77 |
-
$this->supports =
|
78 |
-
'
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
/**
|
@@ -89,100 +92,103 @@ class Card_Payments extends Abstract_Payment_Gateway {
|
|
89 |
* @return void
|
90 |
$ */
|
91 |
public function init_form_fields() {
|
92 |
-
$this->form_fields =
|
93 |
-
'
|
94 |
-
|
95 |
-
'
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
'title' => __( 'Title', 'checkout-plugins-stripe-woo' ),
|
101 |
-
'type' => 'text',
|
102 |
-
'description' => __( 'Title of Card Element', 'checkout-plugins-stripe-woo' ),
|
103 |
-
'default' => __( 'Credit Card (Stripe)', 'checkout-plugins-stripe-woo' ),
|
104 |
-
'desc_tip' => true,
|
105 |
-
],
|
106 |
-
'description' => [
|
107 |
-
'title' => __( 'Description', 'checkout-plugins-stripe-woo' ),
|
108 |
-
'type' => 'textarea',
|
109 |
-
'css' => 'width:25em',
|
110 |
-
'description' => __( 'Description on Card Elements for Live mode', 'checkout-plugins-stripe-woo' ),
|
111 |
-
'default' => __( 'Pay with your credit card via Stripe', 'checkout-plugins-stripe-woo' ),
|
112 |
-
'desc_tip' => true,
|
113 |
-
],
|
114 |
-
'statement_descriptor' => [
|
115 |
-
'title' => __( 'Statement Descriptor', 'checkout-plugins-stripe-woo' ),
|
116 |
-
'type' => 'text',
|
117 |
-
'description' => __( '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.', 'checkout-plugins-stripe-woo' ),
|
118 |
-
'default' => get_bloginfo( 'name' ),
|
119 |
-
'desc_tip' => true,
|
120 |
-
],
|
121 |
-
'charge_type' => [
|
122 |
-
'title' => __( 'Charge Type', 'checkout-plugins-stripe-woo' ),
|
123 |
-
'type' => 'select',
|
124 |
-
'description' => __( 'Select how to charge Order', 'checkout-plugins-stripe-woo' ),
|
125 |
-
'default' => 'automatic',
|
126 |
-
'options' => [
|
127 |
-
'automatic' => __( 'Charge', 'checkout-plugins-stripe-woo' ),
|
128 |
-
'manual' => __( 'Authorize', 'checkout-plugins-stripe-woo' ),
|
129 |
],
|
130 |
-
'
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
'description' => __( 'Save card details for future orders', 'checkout-plugins-stripe-woo' ),
|
137 |
-
'default' => 'yes',
|
138 |
-
'desc_tip' => true,
|
139 |
-
],
|
140 |
-
'inline_cc' => [
|
141 |
-
'label' => __( 'Enable Inline Credit Card Form', 'checkout-plugins-stripe-woo' ),
|
142 |
-
'title' => __( 'Inline Credit Card Form', 'checkout-plugins-stripe-woo' ),
|
143 |
-
'type' => 'checkbox',
|
144 |
-
'description' => __( 'Use inline credit card for card payments', 'checkout-plugins-stripe-woo' ),
|
145 |
-
'default' => 'yes',
|
146 |
-
'desc_tip' => true,
|
147 |
-
],
|
148 |
-
'allowed_cards' => [
|
149 |
-
'title' => __( 'Allowed Cards', 'checkout-plugins-stripe-woo' ),
|
150 |
-
'type' => 'multiselect',
|
151 |
-
'class' => 'cpsw_select_woo',
|
152 |
-
'desc_tip' => __( 'Accepts payments using selected cards. If empty all stripe cards are accepted.', 'checkout-plugins-stripe-woo' ),
|
153 |
-
'options' => [
|
154 |
-
'mastercard' => 'MasterCard',
|
155 |
-
'visa' => 'Visa',
|
156 |
-
'amex' => 'American Express',
|
157 |
-
'discover' => 'Discover',
|
158 |
-
'jcb' => 'JCB',
|
159 |
-
'diners' => 'Diners Club',
|
160 |
-
'unionpay' => 'UnionPay',
|
161 |
],
|
162 |
-
'
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
'' => __( 'Default', 'checkout-plugins-stripe-woo' ),
|
170 |
-
'wc-processing' => __( 'Processing', 'checkout-plugins-stripe-woo' ),
|
171 |
-
'wc-on-hold' => __( 'On Hold', 'checkout-plugins-stripe-woo' ),
|
172 |
-
'wc-completed' => __( 'Completed', 'checkout-plugins-stripe-woo' ),
|
173 |
],
|
174 |
-
'
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
'
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
/**
|
@@ -227,15 +233,18 @@ $ */
|
|
227 |
|
228 |
/* translators: %1$1s order id, %2$2s order total amount */
|
229 |
Logger::info( sprintf( __( 'Begin processing payment with new payment method for order %1$1s for the amount of %2$2s', 'checkout-plugins-stripe-woo' ), $order_id, $order->get_total() ) );
|
230 |
-
$intent_data = $this->get_payment_intent( $order_id, $idempotency_key, $data );
|
231 |
if ( $intent_data ) {
|
232 |
-
return
|
233 |
-
'
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
239 |
} else {
|
240 |
return [
|
241 |
'result' => 'fail',
|
@@ -296,7 +305,7 @@ $ */
|
|
296 |
$request['statement_descriptor'] = $this->statement_descriptor;
|
297 |
}
|
298 |
|
299 |
-
$response = $this->create_payment_for_saved_payment_method( $request );
|
300 |
|
301 |
if ( $response['success'] ) {
|
302 |
$intent = $response['data'];
|
@@ -325,13 +334,16 @@ $ */
|
|
325 |
'redirect' => $intent->next_action->redirect_to_url->url,
|
326 |
];
|
327 |
} else {
|
328 |
-
return
|
329 |
-
'
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
335 |
}
|
336 |
}
|
337 |
|
@@ -501,14 +513,17 @@ $ */
|
|
501 |
* @return object
|
502 |
*/
|
503 |
public function prepare_payment_method( $payment_method, $token ) {
|
504 |
-
return (object)
|
505 |
-
'
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
|
|
|
|
|
|
512 |
}
|
513 |
|
514 |
/**
|
@@ -609,22 +624,25 @@ $ */
|
|
609 |
* @return array return data.
|
610 |
*/
|
611 |
public function process_order( $response, $order_id ) {
|
612 |
-
|
613 |
$order = wc_get_order( $order_id );
|
614 |
|
|
|
|
|
|
|
|
|
615 |
if ( true === $response->captured ) {
|
616 |
$order->payment_complete( $response->id );
|
617 |
/* translators: order id */
|
618 |
Logger::info( sprintf( __( 'Payment successful Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
619 |
-
|
620 |
-
|
|
|
621 |
/* translators: transaction id */
|
622 |
$order->update_status( 'on-hold', sprintf( __( 'Charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
623 |
/* translators: transaction id */
|
624 |
Logger::info( sprintf( __( 'Charge authorized Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
625 |
}
|
626 |
|
627 |
-
$order->add_order_note( __( 'Payment Status : ', 'checkout-plugins-stripe-woo' ) . ucfirst( $response->status ) . __( ' Source : ', 'checkout-plugins-stripe-woo' ) . $response->payment_method_details->card->brand );
|
628 |
WC()->cart->empty_cart();
|
629 |
|
630 |
return $this->get_return_url( $order );
|
@@ -699,7 +717,7 @@ $ */
|
|
699 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" title="Diners Club" ' . $style . ' />';
|
700 |
}
|
701 |
}
|
702 |
-
return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id );
|
703 |
}
|
704 |
|
705 |
/**
|
@@ -714,6 +732,14 @@ $ */
|
|
714 |
return;
|
715 |
}
|
716 |
$display_tokenization = $this->supports( 'tokenization' ) && is_checkout();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
echo '<div class="status-box"></div>';
|
718 |
echo '<div class="cpsw-stipe-pay-data">';
|
719 |
echo '<div class="cpsw-stripe-info">';
|
@@ -733,27 +759,34 @@ $ */
|
|
733 |
if ( 'no' === $this->inline_cc ) {
|
734 |
?>
|
735 |
<strong><?php esc_html_e( 'Enter Card Details', 'checkout-plugins-stripe-woo' ); ?>:</strong>
|
736 |
-
<span class="cpsw-number"></span><span class="cpsw-number-error"></span
|
737 |
-
<span
|
738 |
<strong><?php esc_html_e( 'Expiry Date', 'checkout-plugins-stripe-woo' ); ?></strong>
|
739 |
<span class="cpsw-expiry"></span><span class="cpsw-expiry-error"></span>
|
740 |
</span>
|
741 |
-
<span
|
742 |
<strong><?php esc_html_e( 'CVC', 'checkout-plugins-stripe-woo' ); ?></strong>
|
743 |
<span class="cpsw-cvc"></span><span class="cpsw-cvc-error"></span>
|
744 |
</span>
|
745 |
<?php
|
746 |
}
|
747 |
echo ( apply_filters( 'cpsw_display_save_payment_method_checkbox', $display_tokenization ) && $this->enable_saved_cards() ) ? '<span class="cpsw-save-cards"><label><input type="checkbox" name="enable_saved_card" value="on"/>' . wp_kses_post( apply_filters( 'cpsw_saved_cards_label', __( 'Save Card for Future Payments', 'checkout-plugins-stripe-woo' ) ) ) . '</label></span>' : '';
|
748 |
-
do_action( '
|
749 |
echo '</div>';
|
750 |
if ( 'test' === Helper::get_payment_mode() ) {
|
751 |
echo '<div class="cpsw-test-description">';
|
752 |
/* translators: %1$1s - %6$6s: HTML Markup */
|
753 |
-
printf( esc_html__( '%1$1s Test Mode Enabled
|
754 |
echo '</div>';
|
755 |
}
|
756 |
echo '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
}
|
758 |
|
759 |
/**
|
74 |
* @return void
|
75 |
*/
|
76 |
public function init_supports() {
|
77 |
+
$this->supports = apply_filters(
|
78 |
+
'cpsw_card_payment_supports',
|
79 |
+
[
|
80 |
+
'products',
|
81 |
+
'refunds',
|
82 |
+
'tokenization',
|
83 |
+
'add_payment_method',
|
84 |
+
'pre-orders',
|
85 |
+
]
|
86 |
+
);
|
87 |
}
|
88 |
|
89 |
/**
|
92 |
* @return void
|
93 |
$ */
|
94 |
public function init_form_fields() {
|
95 |
+
$this->form_fields = apply_filters(
|
96 |
+
'cpsw_card_payment_form_fields',
|
97 |
+
[
|
98 |
+
'enabled' => [
|
99 |
+
'label' => ' ',
|
100 |
+
'type' => 'checkbox',
|
101 |
+
'title' => __( 'Enable Stripe Gateway', 'checkout-plugins-stripe-woo' ),
|
102 |
+
'default' => 'no',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
],
|
104 |
+
'title' => [
|
105 |
+
'title' => __( 'Title', 'checkout-plugins-stripe-woo' ),
|
106 |
+
'type' => 'text',
|
107 |
+
'description' => __( 'Title of Card Element', 'checkout-plugins-stripe-woo' ),
|
108 |
+
'default' => __( 'Credit Card (Stripe)', 'checkout-plugins-stripe-woo' ),
|
109 |
+
'desc_tip' => true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
],
|
111 |
+
'description' => [
|
112 |
+
'title' => __( 'Description', 'checkout-plugins-stripe-woo' ),
|
113 |
+
'type' => 'textarea',
|
114 |
+
'css' => 'width:25em',
|
115 |
+
'description' => __( 'Description on Card Elements for Live mode', 'checkout-plugins-stripe-woo' ),
|
116 |
+
'default' => __( 'Pay with your credit card via Stripe', 'checkout-plugins-stripe-woo' ),
|
117 |
+
'desc_tip' => true,
|
|
|
|
|
|
|
|
|
118 |
],
|
119 |
+
'statement_descriptor' => [
|
120 |
+
'title' => __( 'Statement Descriptor', 'checkout-plugins-stripe-woo' ),
|
121 |
+
'type' => 'text',
|
122 |
+
'description' => __( '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.', 'checkout-plugins-stripe-woo' ),
|
123 |
+
'default' => get_bloginfo( 'name' ),
|
124 |
+
'desc_tip' => true,
|
125 |
+
],
|
126 |
+
'charge_type' => [
|
127 |
+
'title' => __( 'Charge Type', 'checkout-plugins-stripe-woo' ),
|
128 |
+
'type' => 'select',
|
129 |
+
'description' => __( 'Select how to charge Order', 'checkout-plugins-stripe-woo' ),
|
130 |
+
'default' => 'automatic',
|
131 |
+
'options' => [
|
132 |
+
'automatic' => __( 'Charge', 'checkout-plugins-stripe-woo' ),
|
133 |
+
'manual' => __( 'Authorize', 'checkout-plugins-stripe-woo' ),
|
134 |
+
],
|
135 |
+
'desc_tip' => true,
|
136 |
+
],
|
137 |
+
'enable_saved_cards' => [
|
138 |
+
'label' => __( 'Enable Payment via Saved Cards', 'checkout-plugins-stripe-woo' ),
|
139 |
+
'title' => __( 'Saved Cards', 'checkout-plugins-stripe-woo' ),
|
140 |
+
'type' => 'checkbox',
|
141 |
+
'description' => __( 'Save card details for future orders', 'checkout-plugins-stripe-woo' ),
|
142 |
+
'default' => 'yes',
|
143 |
+
'desc_tip' => true,
|
144 |
+
],
|
145 |
+
'inline_cc' => [
|
146 |
+
'label' => __( 'Enable Inline Credit Card Form', 'checkout-plugins-stripe-woo' ),
|
147 |
+
'title' => __( 'Inline Credit Card Form', 'checkout-plugins-stripe-woo' ),
|
148 |
+
'type' => 'checkbox',
|
149 |
+
'description' => __( 'Use inline credit card for card payments', 'checkout-plugins-stripe-woo' ),
|
150 |
+
'default' => 'yes',
|
151 |
+
'desc_tip' => true,
|
152 |
+
],
|
153 |
+
'allowed_cards' => [
|
154 |
+
'title' => __( 'Allowed Cards', 'checkout-plugins-stripe-woo' ),
|
155 |
+
'type' => 'multiselect',
|
156 |
+
'class' => 'cpsw_select_woo',
|
157 |
+
'desc_tip' => __( 'Accepts payments using selected cards. If empty all stripe cards are accepted.', 'checkout-plugins-stripe-woo' ),
|
158 |
+
'options' => [
|
159 |
+
'mastercard' => 'MasterCard',
|
160 |
+
'visa' => 'Visa',
|
161 |
+
'amex' => 'American Express',
|
162 |
+
'discover' => 'Discover',
|
163 |
+
'jcb' => 'JCB',
|
164 |
+
'diners' => 'Diners Club',
|
165 |
+
'unionpay' => 'UnionPay',
|
166 |
+
],
|
167 |
+
'default' => [],
|
168 |
+
],
|
169 |
+
'order_status' => [
|
170 |
+
'type' => 'select',
|
171 |
+
'title' => __( 'Order Status', 'checkout-plugins-stripe-woo' ),
|
172 |
+
'class' => 'cpsw_select_woo',
|
173 |
+
'options' => [
|
174 |
+
'' => __( 'Default', 'checkout-plugins-stripe-woo' ),
|
175 |
+
'wc-processing' => __( 'Processing', 'checkout-plugins-stripe-woo' ),
|
176 |
+
'wc-on-hold' => __( 'On Hold', 'checkout-plugins-stripe-woo' ),
|
177 |
+
'wc-completed' => __( 'Completed', 'checkout-plugins-stripe-woo' ),
|
178 |
+
],
|
179 |
+
'default' => '',
|
180 |
+
'tool_tip' => true,
|
181 |
+
'description' => __( '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.', 'checkout-plugins-stripe-woo' ),
|
182 |
+
],
|
183 |
+
'order_button_text' => [
|
184 |
+
'title' => __( 'Order Button Label', 'checkout-plugins-stripe-woo' ),
|
185 |
+
'type' => 'text',
|
186 |
+
'description' => __( 'Customize label for Order button', 'checkout-plugins-stripe-woo' ),
|
187 |
+
'default' => __( 'Pay via Stripe', 'checkout-plugins-stripe-woo' ),
|
188 |
+
'desc_tip' => true,
|
189 |
+
],
|
190 |
+
]
|
191 |
+
);
|
192 |
}
|
193 |
|
194 |
/**
|
233 |
|
234 |
/* translators: %1$1s order id, %2$2s order total amount */
|
235 |
Logger::info( sprintf( __( 'Begin processing payment with new payment method for order %1$1s for the amount of %2$2s', 'checkout-plugins-stripe-woo' ), $order_id, $order->get_total() ) );
|
236 |
+
$intent_data = $this->get_payment_intent( $order_id, $idempotency_key, apply_filters( 'cpsw_card_payment_intent_post_data', $data ) );
|
237 |
if ( $intent_data ) {
|
238 |
+
return apply_filters(
|
239 |
+
'cpsw_card_payment_return_intent_data',
|
240 |
+
[
|
241 |
+
'result' => 'success',
|
242 |
+
'redirect' => $this->get_return_url( $order ),
|
243 |
+
'payment_method' => $payment_method,
|
244 |
+
'intent_secret' => $intent_data['client_secret'],
|
245 |
+
'save_card' => $this->should_save_card( $order_id ),
|
246 |
+
]
|
247 |
+
);
|
248 |
} else {
|
249 |
return [
|
250 |
'result' => 'fail',
|
305 |
$request['statement_descriptor'] = $this->statement_descriptor;
|
306 |
}
|
307 |
|
308 |
+
$response = $this->create_payment_for_saved_payment_method( apply_filters( 'cpsw_saved_card_payment_intent_post_data', $request ) );
|
309 |
|
310 |
if ( $response['success'] ) {
|
311 |
$intent = $response['data'];
|
334 |
'redirect' => $intent->next_action->redirect_to_url->url,
|
335 |
];
|
336 |
} else {
|
337 |
+
return apply_filters(
|
338 |
+
'cpsw_saved_card_payment_return_data',
|
339 |
+
[
|
340 |
+
'result' => 'success',
|
341 |
+
'redirect' => $this->get_return_url( $order ),
|
342 |
+
'payment_method' => $intent_data['id'],
|
343 |
+
'intent_secret' => $intent_data['client_secret'],
|
344 |
+
'save_card' => false,
|
345 |
+
]
|
346 |
+
);
|
347 |
}
|
348 |
}
|
349 |
|
513 |
* @return object
|
514 |
*/
|
515 |
public function prepare_payment_method( $payment_method, $token ) {
|
516 |
+
return (object) apply_filters(
|
517 |
+
'cpsw_prepare_payment_method_args',
|
518 |
+
[
|
519 |
+
'token_id' => $token->get_id(),
|
520 |
+
'customer' => $payment_method->customer,
|
521 |
+
'source' => $payment_method->id,
|
522 |
+
'source_object' => $payment_method,
|
523 |
+
'payment_method' => $payment_method->id,
|
524 |
+
'payment_method_object' => $payment_method,
|
525 |
+
]
|
526 |
+
);
|
527 |
}
|
528 |
|
529 |
/**
|
624 |
* @return array return data.
|
625 |
*/
|
626 |
public function process_order( $response, $order_id ) {
|
|
|
627 |
$order = wc_get_order( $order_id );
|
628 |
|
629 |
+
if ( isset( $response->balance_transaction ) ) {
|
630 |
+
$this->update_balance( $order, $response->balance_transaction, true );
|
631 |
+
}
|
632 |
+
|
633 |
if ( true === $response->captured ) {
|
634 |
$order->payment_complete( $response->id );
|
635 |
/* translators: order id */
|
636 |
Logger::info( sprintf( __( 'Payment successful Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
637 |
+
|
638 |
+
$order->add_order_note( __( 'Payment Status: ', 'checkout-plugins-stripe-woo' ) . ucfirst( $response->status ) . ', ' . __( 'Source: Payment is Completed via ', 'checkout-plugins-stripe-woo' ) . $response->payment_method_details->card->brand );
|
639 |
+
} else {
|
640 |
/* translators: transaction id */
|
641 |
$order->update_status( 'on-hold', sprintf( __( 'Charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
642 |
/* translators: transaction id */
|
643 |
Logger::info( sprintf( __( 'Charge authorized Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
644 |
}
|
645 |
|
|
|
646 |
WC()->cart->empty_cart();
|
647 |
|
648 |
return $this->get_return_url( $order );
|
717 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" title="Diners Club" ' . $style . ' />';
|
718 |
}
|
719 |
}
|
720 |
+
return apply_filters( 'woocommerce_gateway_icon', '<span class="cpsw_stripe_icons">' . $icon . '</span>', $this->id );
|
721 |
}
|
722 |
|
723 |
/**
|
732 |
return;
|
733 |
}
|
734 |
$display_tokenization = $this->supports( 'tokenization' ) && is_checkout();
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Action before payment field.
|
738 |
+
*
|
739 |
+
* @since 1.3.0
|
740 |
+
*/
|
741 |
+
do_action( $this->id . '_before_payment_field_checkout' );
|
742 |
+
|
743 |
echo '<div class="status-box"></div>';
|
744 |
echo '<div class="cpsw-stipe-pay-data">';
|
745 |
echo '<div class="cpsw-stripe-info">';
|
759 |
if ( 'no' === $this->inline_cc ) {
|
760 |
?>
|
761 |
<strong><?php esc_html_e( 'Enter Card Details', 'checkout-plugins-stripe-woo' ); ?>:</strong>
|
762 |
+
<span class="cpsw-number"></span><span class="cpsw-number-error"></span>
|
763 |
+
<span class="cpsw-expiry-wrapper">
|
764 |
<strong><?php esc_html_e( 'Expiry Date', 'checkout-plugins-stripe-woo' ); ?></strong>
|
765 |
<span class="cpsw-expiry"></span><span class="cpsw-expiry-error"></span>
|
766 |
</span>
|
767 |
+
<span class="cpsw-cvc-wrapper">
|
768 |
<strong><?php esc_html_e( 'CVC', 'checkout-plugins-stripe-woo' ); ?></strong>
|
769 |
<span class="cpsw-cvc"></span><span class="cpsw-cvc-error"></span>
|
770 |
</span>
|
771 |
<?php
|
772 |
}
|
773 |
echo ( apply_filters( 'cpsw_display_save_payment_method_checkbox', $display_tokenization ) && $this->enable_saved_cards() ) ? '<span class="cpsw-save-cards"><label><input type="checkbox" name="enable_saved_card" value="on"/>' . wp_kses_post( apply_filters( 'cpsw_saved_cards_label', __( 'Save Card for Future Payments', 'checkout-plugins-stripe-woo' ) ) ) . '</label></span>' : '';
|
774 |
+
do_action( 'cpsw_payment_fields_' . $this->id, $this->id );
|
775 |
echo '</div>';
|
776 |
if ( 'test' === Helper::get_payment_mode() ) {
|
777 |
echo '<div class="cpsw-test-description">';
|
778 |
/* translators: %1$1s - %6$6s: HTML Markup */
|
779 |
+
printf( esc_html__( '%1$1s Test Mode Enabled:%2$2s Use demo card 4242424242424242 with any future date and CVV. Check more %3$3sdemo cards%4$4s', 'checkout-plugins-stripe-woo' ), '<b>', '</b>', "<a href='https://stripe.com/docs/testing' referrer='noopener' target='_blank'>", '</a>' );
|
780 |
echo '</div>';
|
781 |
}
|
782 |
echo '</div>';
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Action after payment field.
|
786 |
+
*
|
787 |
+
* @since 1.3.0
|
788 |
+
*/
|
789 |
+
do_action( $this->id . '_after_payment_field_checkout' );
|
790 |
}
|
791 |
|
792 |
/**
|
gateway/stripe/frontend-scripts.php
CHANGED
@@ -64,7 +64,10 @@ class Frontend_Scripts {
|
|
64 |
if (
|
65 |
'yes' === Helper::get_setting( 'enabled', 'cpsw_stripe' ) ||
|
66 |
'yes' === Helper::get_setting( 'enabled', 'cpsw_alipay' ) ||
|
67 |
-
'yes' === Helper::get_setting( 'enabled', 'cpsw_ideal' )
|
|
|
|
|
|
|
68 |
) {
|
69 |
$this->enqueue_card_payments_scripts( $public_key );
|
70 |
}
|
@@ -90,14 +93,14 @@ class Frontend_Scripts {
|
|
90 |
$this->prefix . 'stripe-elements',
|
91 |
'cpsw_global_settings',
|
92 |
[
|
93 |
-
'public_key'
|
94 |
-
'inline_cc'
|
95 |
-
'is_ssl'
|
96 |
-
'mode'
|
97 |
-
'ajax_url'
|
98 |
-
'js_nonce'
|
99 |
-
'allowed_cards'
|
100 |
-
'default_cards'
|
101 |
'mastercard' => __( 'MasterCard', 'checkout-plugins-stripe-woo' ),
|
102 |
'visa' => __( 'Visa', 'checkout-plugins-stripe-woo' ),
|
103 |
'amex' => __( 'American Express', 'checkout-plugins-stripe-woo' ),
|
@@ -106,9 +109,9 @@ class Frontend_Scripts {
|
|
106 |
'diners' => __( 'Diners Club', 'checkout-plugins-stripe-woo' ),
|
107 |
'unionpay' => __( 'UnionPay', 'checkout-plugins-stripe-woo' ),
|
108 |
],
|
109 |
-
'not_allowed_string'
|
110 |
-
'get_home_url'
|
111 |
-
'
|
112 |
]
|
113 |
);
|
114 |
|
@@ -116,7 +119,11 @@ class Frontend_Scripts {
|
|
116 |
wp_register_script( $this->prefix . 'payment-request', $this->assets_url . 'js/payment-request.js', [ 'jquery', $this->prefix . 'stripe-external', $this->prefix . 'stripe-elements' ], $this->version, true );
|
117 |
wp_enqueue_script( $this->prefix . 'payment-request' );
|
118 |
|
|
|
|
|
|
|
119 |
$needs_shipping = false;
|
|
|
120 |
|
121 |
if ( ! is_null( WC()->cart ) && WC()->cart->needs_shipping() ) {
|
122 |
$needs_shipping = true;
|
@@ -128,15 +135,15 @@ class Frontend_Scripts {
|
|
128 |
apply_filters(
|
129 |
'cpsw_payment_request_localization',
|
130 |
[
|
131 |
-
'ajax_url'
|
132 |
-
'ajax_endpoint'
|
133 |
-
'public_key'
|
134 |
-
'mode'
|
135 |
-
'currency_code'
|
136 |
-
'country_code'
|
137 |
-
'needs_shipping'
|
138 |
-
'phone_required'
|
139 |
-
'nonce'
|
140 |
'checkout' => wp_create_nonce( 'cpsw_checkout' ),
|
141 |
'payment' => wp_create_nonce( 'cpsw_payment_request' ),
|
142 |
'add_to_cart' => wp_create_nonce( 'cpsw_add_to_cart' ),
|
@@ -145,14 +152,21 @@ class Frontend_Scripts {
|
|
145 |
'shipping_option' => wp_create_nonce( 'cpsw_shipping_option' ),
|
146 |
'js_nonce' => wp_create_nonce( 'cpsw_js_error_nonce' ),
|
147 |
],
|
148 |
-
'style'
|
149 |
-
'
|
150 |
-
'
|
151 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
],
|
153 |
-
'is_product_page'
|
154 |
-
'
|
155 |
-
'is_responsive' => Helper::get_setting( 'express_checkout_product_sticky_footer', 'cpsw_stripe' ),
|
156 |
]
|
157 |
)
|
158 |
);
|
64 |
if (
|
65 |
'yes' === Helper::get_setting( 'enabled', 'cpsw_stripe' ) ||
|
66 |
'yes' === Helper::get_setting( 'enabled', 'cpsw_alipay' ) ||
|
67 |
+
'yes' === Helper::get_setting( 'enabled', 'cpsw_ideal' ) ||
|
68 |
+
'yes' === Helper::get_setting( 'enabled', 'cpsw_klarna' ) ||
|
69 |
+
'yes' === Helper::get_setting( 'enabled', 'cpsw_p24' ) ||
|
70 |
+
'yes' === Helper::get_setting( 'enabled', 'cpsw_bancontact' )
|
71 |
) {
|
72 |
$this->enqueue_card_payments_scripts( $public_key );
|
73 |
}
|
93 |
$this->prefix . 'stripe-elements',
|
94 |
'cpsw_global_settings',
|
95 |
[
|
96 |
+
'public_key' => $public_key,
|
97 |
+
'inline_cc' => Helper::get_setting( 'inline_cc', 'cpsw_stripe' ),
|
98 |
+
'is_ssl' => is_ssl(),
|
99 |
+
'mode' => Helper::get_payment_mode(),
|
100 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
101 |
+
'js_nonce' => wp_create_nonce( 'cpsw_js_error_nonce' ),
|
102 |
+
'allowed_cards' => Helper::get_setting( 'allowed_cards', 'cpsw_stripe' ),
|
103 |
+
'default_cards' => [
|
104 |
'mastercard' => __( 'MasterCard', 'checkout-plugins-stripe-woo' ),
|
105 |
'visa' => __( 'Visa', 'checkout-plugins-stripe-woo' ),
|
106 |
'amex' => __( 'American Express', 'checkout-plugins-stripe-woo' ),
|
109 |
'diners' => __( 'Diners Club', 'checkout-plugins-stripe-woo' ),
|
110 |
'unionpay' => __( 'UnionPay', 'checkout-plugins-stripe-woo' ),
|
111 |
],
|
112 |
+
'not_allowed_string' => __( 'is not allowed', 'checkout-plugins-stripe-woo' ),
|
113 |
+
'get_home_url' => get_home_url(),
|
114 |
+
'empty_bank_message' => __( 'Please select a bank to proceed.', 'checkout-plugins-stripe-woo' ),
|
115 |
]
|
116 |
);
|
117 |
|
119 |
wp_register_script( $this->prefix . 'payment-request', $this->assets_url . 'js/payment-request.js', [ 'jquery', $this->prefix . 'stripe-external', $this->prefix . 'stripe-elements' ], $this->version, true );
|
120 |
wp_enqueue_script( $this->prefix . 'payment-request' );
|
121 |
|
122 |
+
wp_register_style( $this->prefix . 'express-checkout', $this->assets_url . 'css/express-checkout.css', [], $this->version );
|
123 |
+
wp_enqueue_style( $this->prefix . 'express-checkout' );
|
124 |
+
|
125 |
$needs_shipping = false;
|
126 |
+
$button_text = empty( Helper::get_setting( 'express_checkout_button_text', 'cpsw_stripe' ) ) ? __( 'Pay now', 'checkout-plugins-stripe-woo' ) : Helper::get_setting( 'express_checkout_button_text', 'cpsw_stripe' );
|
127 |
|
128 |
if ( ! is_null( WC()->cart ) && WC()->cart->needs_shipping() ) {
|
129 |
$needs_shipping = true;
|
135 |
apply_filters(
|
136 |
'cpsw_payment_request_localization',
|
137 |
[
|
138 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
139 |
+
'ajax_endpoint' => WC_AJAX::get_endpoint( '%%endpoint%%' ),
|
140 |
+
'public_key' => $public_key,
|
141 |
+
'mode' => Helper::get_payment_mode(),
|
142 |
+
'currency_code' => strtolower( get_woocommerce_currency() ),
|
143 |
+
'country_code' => substr( get_option( 'woocommerce_default_country' ), 0, 2 ),
|
144 |
+
'needs_shipping' => $needs_shipping,
|
145 |
+
'phone_required' => 'required' === get_option( 'woocommerce_checkout_phone_field', 'required' ),
|
146 |
+
'nonce' => [
|
147 |
'checkout' => wp_create_nonce( 'cpsw_checkout' ),
|
148 |
'payment' => wp_create_nonce( 'cpsw_payment_request' ),
|
149 |
'add_to_cart' => wp_create_nonce( 'cpsw_add_to_cart' ),
|
152 |
'shipping_option' => wp_create_nonce( 'cpsw_shipping_option' ),
|
153 |
'js_nonce' => wp_create_nonce( 'cpsw_js_error_nonce' ),
|
154 |
],
|
155 |
+
'style' => [
|
156 |
+
'theme' => Helper::get_setting( 'express_checkout_button_theme', 'cpsw_stripe' ),
|
157 |
+
'icon' => Helper::get_setting( 'express_checkout_button_icon', 'cpsw_stripe' ),
|
158 |
+
'button_position' => Helper::get_setting( 'express_checkout_product_page_position', 'cpsw_stripe' ),
|
159 |
+
'button_length' => strlen( $button_text ),
|
160 |
+
],
|
161 |
+
'icons' => [
|
162 |
+
'applepay_gray' => CPSW_URL . 'assets/icon/apple-pay-gray.svg',
|
163 |
+
'applepay_light' => CPSW_URL . 'assets/icon/apple-pay-light.svg',
|
164 |
+
'gpay_light' => CPSW_URL . 'assets/icon/gpay_light.svg',
|
165 |
+
'gpay_gray' => CPSW_URL . 'assets/icon/gpay_gray.svg',
|
166 |
+
'payment_request' => CPSW_URL . 'assets/icon/payment-request-icon.svg',
|
167 |
],
|
168 |
+
'is_product_page' => is_product() || wc_post_content_has_shortcode( 'product_page' ),
|
169 |
+
'is_responsive' => Helper::get_setting( 'express_checkout_product_sticky_footer', 'cpsw_stripe' ),
|
|
|
170 |
]
|
171 |
)
|
172 |
);
|
gateway/stripe/ideal.php
CHANGED
@@ -9,12 +9,8 @@
|
|
9 |
namespace CPSW\Gateway\Stripe;
|
10 |
|
11 |
use CPSW\Inc\Helper;
|
12 |
-
use CPSW\Inc\Logger;
|
13 |
use CPSW\Inc\Traits\Get_Instance;
|
14 |
use CPSW\Gateway\Local_Gateway;
|
15 |
-
use WC_AJAX;
|
16 |
-
use Exception;
|
17 |
-
use WP_Error;
|
18 |
|
19 |
/**
|
20 |
* IDEAL gateway
|
@@ -32,6 +28,13 @@ class Ideal extends Local_Gateway {
|
|
32 |
*/
|
33 |
public $id = 'cpsw_ideal';
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Constructor
|
37 |
*
|
@@ -50,9 +53,6 @@ class Ideal extends Local_Gateway {
|
|
50 |
$this->title = $this->get_option( 'title' );
|
51 |
$this->description = $this->get_option( 'description' );
|
52 |
$this->order_button_text = $this->get_option( 'order_button_text' );
|
53 |
-
|
54 |
-
add_action( 'wc_ajax_cpsw_verify_ideal_payment_intent', [ $this, 'verify_ideal_intent' ] );
|
55 |
-
add_filter( 'woocommerce_payment_successful_result', [ $this, 'modify_successful_payment_result' ], 999, 2 );
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -107,6 +107,13 @@ class Ideal extends Local_Gateway {
|
|
107 |
* @return void
|
108 |
*/
|
109 |
public function payment_fields() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
echo '<div class="status-box"></div>';
|
111 |
echo '<div class="cpsw_stripe_ideal_form">';
|
112 |
if ( $this->description ) {
|
@@ -115,150 +122,18 @@ class Ideal extends Local_Gateway {
|
|
115 |
echo '<div class="cpsw_stripe_ideal_select"></div>';
|
116 |
echo '<div class="cpsw_stripe_ideal_error"></div>';
|
117 |
if ( 'test' === Helper::get_payment_mode() ) {
|
118 |
-
echo '<div class="
|
119 |
echo wp_kses_post( $this->get_test_mode_description() );
|
120 |
echo '</div>';
|
121 |
}
|
122 |
echo '</div>';
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Modify redirect url
|
127 |
-
*
|
128 |
-
* @param array $result redirect url array.
|
129 |
-
* @param int $order_id woocommerce order id.
|
130 |
-
* @return array modified redirect url array.
|
131 |
-
*/
|
132 |
-
public function modify_successful_payment_result( $result, $order_id ) {
|
133 |
-
if ( empty( $order_id ) ) {
|
134 |
-
return $result;
|
135 |
-
}
|
136 |
-
|
137 |
-
$order = wc_get_order( $order_id );
|
138 |
-
if ( $this->id !== $order->get_payment_method() ) {
|
139 |
-
return $result;
|
140 |
-
}
|
141 |
-
|
142 |
-
if ( ! isset( $result['intent_secret'] ) ) {
|
143 |
-
return $result;
|
144 |
-
}
|
145 |
-
|
146 |
-
// Put the final thank you page redirect into the verification URL.
|
147 |
-
$verification_url = add_query_arg(
|
148 |
-
[
|
149 |
-
'order' => $order_id,
|
150 |
-
'confirm_payment_nonce' => wp_create_nonce( 'cpsw_confirm_payment_intent' ),
|
151 |
-
'redirect_to' => rawurlencode( $result['redirect'] ),
|
152 |
-
],
|
153 |
-
WC_AJAX::get_endpoint( 'cpsw_verify_ideal_payment_intent' )
|
154 |
-
);
|
155 |
-
|
156 |
-
// Combine into a hash.
|
157 |
-
$redirect = sprintf( '#confirm-pi-%s:%s', $result['intent_secret'], rawurlencode( $verification_url ) );
|
158 |
-
|
159 |
-
return [
|
160 |
-
'result' => 'success',
|
161 |
-
'redirect' => $redirect,
|
162 |
-
];
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Verify intent state and redirect.
|
167 |
-
*
|
168 |
-
* @return void
|
169 |
-
*/
|
170 |
-
public function verify_ideal_intent() {
|
171 |
-
$order_id = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
172 |
-
$order = wc_get_order( $order_id );
|
173 |
-
|
174 |
-
$intent_secret = get_post_meta( $order_id, '_cpsw_intent_secret', true );
|
175 |
-
$stripe_api = new Stripe_Api();
|
176 |
-
$response = $stripe_api->payment_intents( 'retrieve', [ $intent_secret['id'] ] );
|
177 |
-
$intent = $response['success'] ? $response['data'] : false;
|
178 |
-
|
179 |
-
if ( 'succeeded' === $intent->status || 'requires_capture' === $intent->status ) {
|
180 |
-
$redirect_to = $this->process_order( end( $intent->charges->data ), $order_id );
|
181 |
-
$redirect_url = apply_filters( 'cpsw_redirect_order_url', $redirect_to, $order );
|
182 |
-
wp_safe_redirect( $redirect_url );
|
183 |
-
} elseif ( isset( $response['data']->last_payment_error ) ) {
|
184 |
-
$message = isset( $response['data']->last_payment_error->message ) ? $response['data']->last_payment_error->message : '';
|
185 |
-
$order->update_status( 'wc-failed' );
|
186 |
-
// translators: %s: payment fail message.
|
187 |
-
wc_add_notice( sprintf( __( 'Payment failed. %s', 'checkout-plugins-stripe-woo' ), $message ), 'error' );
|
188 |
-
wp_safe_redirect( wc_get_checkout_url() );
|
189 |
-
}
|
190 |
-
exit();
|
191 |
-
}
|
192 |
|
193 |
/**
|
194 |
-
*
|
195 |
*
|
196 |
-
* @
|
197 |
-
* @param string $order_id currnt coocommerce id.
|
198 |
-
* @return array return data.
|
199 |
*/
|
200 |
-
|
201 |
-
|
202 |
-
$order = wc_get_order( $order_id );
|
203 |
-
|
204 |
-
if ( true === $response->captured ) {
|
205 |
-
$order->payment_complete( $response->id );
|
206 |
-
/* translators: order id */
|
207 |
-
Logger::info( sprintf( __( 'Payment successful Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
208 |
-
}
|
209 |
-
if ( ! $response->captured ) {
|
210 |
-
/* translators: transaction id */
|
211 |
-
$order->update_status( 'on-hold', sprintf( __( 'Charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
212 |
-
/* translators: transaction id */
|
213 |
-
Logger::info( sprintf( __( 'Charge authorized Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
214 |
-
}
|
215 |
-
|
216 |
-
$order->add_order_note( __( 'Payment Status : ', 'checkout-plugins-stripe-woo' ) . ucfirst( $response->status ) . __( ' Source : ', 'checkout-plugins-stripe-woo' ) . $response->payment_method_details->type );
|
217 |
-
WC()->cart->empty_cart();
|
218 |
-
|
219 |
-
return $this->get_return_url( $order );
|
220 |
-
}
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Process woocommerce orders after payment is done
|
224 |
-
*
|
225 |
-
* @param int $order_id wooCommerce order id.
|
226 |
-
* @return array data to redirect after payment processing.
|
227 |
-
*/
|
228 |
-
public function process_payment( $order_id ) {
|
229 |
-
try {
|
230 |
-
$order = wc_get_order( $order_id );
|
231 |
-
$customer_id = $this->get_customer_id( $order );
|
232 |
-
$idempotency_key = $order->get_order_key() . time();
|
233 |
-
|
234 |
-
$data = [
|
235 |
-
'amount' => $this->get_formatted_amount( $order->get_total() ),
|
236 |
-
'currency' => get_woocommerce_currency(),
|
237 |
-
'description' => $this->get_order_description( $order ),
|
238 |
-
'metadata' => $this->get_metadata( $order_id ),
|
239 |
-
'payment_method_types' => [ 'ideal' ],
|
240 |
-
'customer' => $customer_id,
|
241 |
-
];
|
242 |
-
|
243 |
-
/* translators: %1$1s order id, %2$2s order total amount */
|
244 |
-
Logger::info( sprintf( __( 'Begin processing payment with iDEAL for order %1$1s for the amount of %2$2s', 'checkout-plugins-stripe-woo' ), $order_id, $order->get_total() ) );
|
245 |
-
$intent_data = $this->get_payment_intent( $order_id, $idempotency_key, $data );
|
246 |
-
if ( $intent_data ) {
|
247 |
-
return [
|
248 |
-
'result' => 'success',
|
249 |
-
'redirect' => false,
|
250 |
-
'intent_secret' => $intent_data['client_secret'],
|
251 |
-
];
|
252 |
-
} else {
|
253 |
-
return [
|
254 |
-
'result' => 'fail',
|
255 |
-
'redirect' => '',
|
256 |
-
];
|
257 |
-
}
|
258 |
-
} catch ( Exception $e ) {
|
259 |
-
Logger::error( $e->getMessage(), true );
|
260 |
-
return new WP_Error( 'order-error', '<div class="woocommerce-error">' . $e->getMessage() . '</div>', [ 'status' => 200 ] );
|
261 |
-
}
|
262 |
}
|
263 |
}
|
264 |
|
9 |
namespace CPSW\Gateway\Stripe;
|
10 |
|
11 |
use CPSW\Inc\Helper;
|
|
|
12 |
use CPSW\Inc\Traits\Get_Instance;
|
13 |
use CPSW\Gateway\Local_Gateway;
|
|
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* IDEAL gateway
|
28 |
*/
|
29 |
public $id = 'cpsw_ideal';
|
30 |
|
31 |
+
/**
|
32 |
+
* Payment method types
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $payment_method_types = 'ideal';
|
37 |
+
|
38 |
/**
|
39 |
* Constructor
|
40 |
*
|
53 |
$this->title = $this->get_option( 'title' );
|
54 |
$this->description = $this->get_option( 'description' );
|
55 |
$this->order_button_text = $this->get_option( 'order_button_text' );
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
/**
|
107 |
* @return void
|
108 |
*/
|
109 |
public function payment_fields() {
|
110 |
+
/**
|
111 |
+
* Action before payment field.
|
112 |
+
*
|
113 |
+
* @since 1.3.0
|
114 |
+
*/
|
115 |
+
do_action( $this->id . '_before_payment_field_checkout' );
|
116 |
+
|
117 |
echo '<div class="status-box"></div>';
|
118 |
echo '<div class="cpsw_stripe_ideal_form">';
|
119 |
if ( $this->description ) {
|
122 |
echo '<div class="cpsw_stripe_ideal_select"></div>';
|
123 |
echo '<div class="cpsw_stripe_ideal_error"></div>';
|
124 |
if ( 'test' === Helper::get_payment_mode() ) {
|
125 |
+
echo '<div class="cpsw_stripe_test_description">';
|
126 |
echo wp_kses_post( $this->get_test_mode_description() );
|
127 |
echo '</div>';
|
128 |
}
|
129 |
echo '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
/**
|
132 |
+
* Action after payment field.
|
133 |
*
|
134 |
+
* @since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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Klarna Gateway
|
4 |
+
*
|
5 |
+
* @package checkout-plugins-stripe-woo
|
6 |
+
* @since 1.3.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace CPSW\Gateway\Stripe;
|
10 |
+
|
11 |
+
use CPSW\Inc\Helper;
|
12 |
+
use CPSW\Inc\Traits\Get_Instance;
|
13 |
+
use CPSW\Gateway\Local_Gateway;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Klarna
|
17 |
+
*
|
18 |
+
* @since 1.3.0
|
19 |
+
*/
|
20 |
+
class Klarna extends Local_Gateway {
|
21 |
+
|
22 |
+
use Get_Instance;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Gateway id
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $id = 'cpsw_klarna';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Payment method types
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $payment_method_types = 'klarna';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Allow countries
|
40 |
+
*
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
public $allow_countries = [ 'US', 'AT', 'FI', 'DE', 'NL', 'DK', 'NO', 'SE', 'GB', 'BE', 'ES', 'IT' ];
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor
|
47 |
+
*
|
48 |
+
* @since 1.3.0
|
49 |
+
*/
|
50 |
+
public function __construct() {
|
51 |
+
parent::__construct();
|
52 |
+
|
53 |
+
$this->method_title = __( 'Klarna', 'checkout-plugins-stripe-woo' );
|
54 |
+
$this->method_description = $this->method_description();
|
55 |
+
$this->has_fields = true;
|
56 |
+
$this->init_supports();
|
57 |
+
|
58 |
+
$this->init_form_fields();
|
59 |
+
$this->init_settings();
|
60 |
+
// get_option should be called after init_form_fields().
|
61 |
+
$this->title = $this->get_option( 'title' );
|
62 |
+
$this->description = $this->get_option( 'description' );
|
63 |
+
$this->order_button_text = $this->get_option( 'order_button_text' );
|
64 |
+
$this->capture_method = $this->get_option( 'charge_type' );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Description for Klarna gateway
|
69 |
+
*
|
70 |
+
* @since 1.3.0
|
71 |
+
*
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public function method_description() {
|
75 |
+
$payment_description = $this->payment_description();
|
76 |
+
/* translators: HTML Entities.*/
|
77 |
+
$extra_description = $this->is_current_section() ? sprintf( __( 'Klarna is supported only for billing country %1$sUnited States (US), Austria (AT), Finland (FI), Germany (DE), Netherlands (NL), Denmark (DK), Norway (NO), Sweden (SE), United Kingdom (UK) (GB), Belgium (BE), Spain (ES), Italy (IT)%2$s.', 'checkout-plugins-stripe-woo' ), '<strong>', '</strong>' ) : '';
|
78 |
+
|
79 |
+
return sprintf(
|
80 |
+
/* translators: %1$s: Break, %2$s: Gateway appear message, %3$s: Break, %4$s: Gateway appear message currency wise, %4$s: HTML entities */
|
81 |
+
__( 'Accept payment using Klarna. %1$s %2$s %3$s %4$s', 'checkout-plugins-stripe-woo' ),
|
82 |
+
'<br/>',
|
83 |
+
$payment_description,
|
84 |
+
'<br/>',
|
85 |
+
$extra_description,
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Returns all supported currencies for this payment method.
|
91 |
+
*
|
92 |
+
* @since 1.3.0
|
93 |
+
*
|
94 |
+
* @return array
|
95 |
+
*/
|
96 |
+
public function get_supported_currency() {
|
97 |
+
return apply_filters(
|
98 |
+
'cpsw_klarna_supported_currencies',
|
99 |
+
[
|
100 |
+
'EUR',
|
101 |
+
'USD',
|
102 |
+
'GBP',
|
103 |
+
'DKK',
|
104 |
+
'SEK',
|
105 |
+
'NOK',
|
106 |
+
]
|
107 |
+
);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Checks whether this gateway is available.
|
112 |
+
*
|
113 |
+
* @since 1.3.0
|
114 |
+
*
|
115 |
+
* @return boolean
|
116 |
+
*/
|
117 |
+
public function is_available() {
|
118 |
+
if ( ! in_array( $this->get_currency(), $this->get_supported_currency(), true ) ) {
|
119 |
+
return false;
|
120 |
+
}
|
121 |
+
|
122 |
+
if ( ! in_array( $this->get_billing_country(), $this->allow_countries, true ) ) {
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
return parent::is_available();
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Add more gateway form fields
|
131 |
+
*
|
132 |
+
* @since 1.3.0
|
133 |
+
*
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
+
public function get_local_payment_settings() {
|
137 |
+
$charge_type = [
|
138 |
+
'charge_type' => [
|
139 |
+
'title' => __( 'Charge Type', 'checkout-plugins-stripe-woo' ),
|
140 |
+
'type' => 'select',
|
141 |
+
'description' => __( 'Select how to charge Order', 'checkout-plugins-stripe-woo' ),
|
142 |
+
'default' => 'automatic',
|
143 |
+
'options' => [
|
144 |
+
'automatic' => __( 'Charge', 'checkout-plugins-stripe-woo' ),
|
145 |
+
'manual' => __( 'Authorize', 'checkout-plugins-stripe-woo' ),
|
146 |
+
],
|
147 |
+
'desc_tip' => true,
|
148 |
+
],
|
149 |
+
];
|
150 |
+
|
151 |
+
$local_settings = parent::get_local_payment_settings();
|
152 |
+
|
153 |
+
$local_settings['allowed_countries']['default'] = 'specific';
|
154 |
+
$local_settings['specific_countries']['default'] = $this->allow_countries;
|
155 |
+
$local_settings['specific_countries']['options'] = $this->allow_countries;
|
156 |
+
$local_settings['except_countries']['options'] = $this->allow_countries;
|
157 |
+
|
158 |
+
return array_merge( $local_settings, $charge_type );
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Creates markup for payment form for card payments
|
163 |
+
*
|
164 |
+
* @since 1.3.0
|
165 |
+
*
|
166 |
+
* @return void
|
167 |
+
*/
|
168 |
+
public function payment_fields() {
|
169 |
+
global $wp;
|
170 |
+
|
171 |
+
$user = wp_get_current_user();
|
172 |
+
$total = WC()->cart->total;
|
173 |
+
|
174 |
+
// If paying from order, we need to get total from order not cart.
|
175 |
+
if ( isset( $_GET['pay_for_order'] ) && ! empty( $_GET['key'] ) ) { // phpcs:ignore
|
176 |
+
$order = wc_get_order( wc_clean( $wp->query_vars['order-pay'] ) );
|
177 |
+
$total = $order->get_total();
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( is_add_payment_method_page() ) {
|
181 |
+
$pay_button_text = __( 'Add Payment', 'checkout-plugins-stripe-woo' );
|
182 |
+
$total = '';
|
183 |
+
} else {
|
184 |
+
$pay_button_text = '';
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Action before payment field.
|
189 |
+
*
|
190 |
+
* @since 1.3.0
|
191 |
+
*/
|
192 |
+
do_action( $this->id . '_before_payment_field_checkout' );
|
193 |
+
|
194 |
+
echo '<div
|
195 |
+
id="cpsw-klarna-payment-data"
|
196 |
+
data-amount="' . esc_attr( $total ) . '"
|
197 |
+
data-currency="' . esc_attr( strtolower( $this->get_currency() ) ) . '">';
|
198 |
+
|
199 |
+
if ( $this->description ) {
|
200 |
+
echo wp_kses_post( $this->description );
|
201 |
+
}
|
202 |
+
|
203 |
+
echo '</div>';
|
204 |
+
if ( 'test' === Helper::get_payment_mode() ) {
|
205 |
+
echo '<div class="cpsw_stripe_test_description">';
|
206 |
+
echo '<label>';
|
207 |
+
esc_html_e( 'Test mode sms:', 'checkout-plugins-stripe-woo' );
|
208 |
+
echo '</label> <strong>123456</strong>';
|
209 |
+
echo '<br><br>';
|
210 |
+
echo wp_kses_post( $this->get_test_mode_description() );
|
211 |
+
echo '</div>';
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Action after payment field.
|
216 |
+
*
|
217 |
+
* @since 1.3.0
|
218 |
+
*/
|
219 |
+
do_action( $this->id . '_after_payment_field_checkout' );
|
220 |
+
}
|
221 |
+
}
|
gateway/stripe/p24.php
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Przelewy24 Gateway
|
4 |
+
*
|
5 |
+
* @package checkout-plugins-stripe-woo
|
6 |
+
* @since 1.3.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace CPSW\Gateway\Stripe;
|
10 |
+
|
11 |
+
use CPSW\Inc\Helper;
|
12 |
+
use CPSW\Inc\Traits\Get_Instance;
|
13 |
+
use CPSW\Gateway\Local_Gateway;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Przelewy24 gateway
|
17 |
+
*
|
18 |
+
* @since 1.3.0
|
19 |
+
*/
|
20 |
+
class P24 extends Local_Gateway {
|
21 |
+
|
22 |
+
use Get_Instance;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Gateway id
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $id = 'cpsw_p24';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Payment method types
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $payment_method_types = 'p24';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Constructor
|
40 |
+
*
|
41 |
+
* @since 1.3.0
|
42 |
+
*/
|
43 |
+
public function __construct() {
|
44 |
+
parent::__construct();
|
45 |
+
$this->method_title = __( 'Przelewy24', 'checkout-plugins-stripe-woo' );
|
46 |
+
$this->method_description = $this->method_description();
|
47 |
+
$this->has_fields = true;
|
48 |
+
|
49 |
+
$this->init_supports();
|
50 |
+
$this->init_form_fields();
|
51 |
+
$this->init_settings();
|
52 |
+
|
53 |
+
$this->title = $this->get_option( 'title' );
|
54 |
+
$this->description = $this->get_option( 'description' );
|
55 |
+
$this->order_button_text = $this->get_option( 'order_button_text' );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Description for p24 gateway
|
60 |
+
*
|
61 |
+
* @since 1.3.0
|
62 |
+
*
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function method_description() {
|
66 |
+
$payment_description = $this->payment_description();
|
67 |
+
|
68 |
+
return sprintf(
|
69 |
+
/* translators: %1$s: Break, %2$s: HTML entities */
|
70 |
+
__( 'Accept payment using Przelewy24. %1$s %2$s', 'checkout-plugins-stripe-woo' ),
|
71 |
+
'<br/>',
|
72 |
+
$payment_description
|
73 |
+
);
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Checks whether this gateway is available.
|
78 |
+
*
|
79 |
+
* @since 1.3.0
|
80 |
+
*
|
81 |
+
* @return boolean
|
82 |
+
*/
|
83 |
+
public function is_available() {
|
84 |
+
if ( ! in_array( $this->get_currency(), $this->get_supported_currency(), true ) ) {
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
return parent::is_available();
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Returns all supported currencies for this payment method.
|
92 |
+
*
|
93 |
+
* @since 1.3.0
|
94 |
+
*
|
95 |
+
* @return array
|
96 |
+
*/
|
97 |
+
public function get_supported_currency() {
|
98 |
+
return apply_filters(
|
99 |
+
'cpsw_p24_supported_currencies',
|
100 |
+
[
|
101 |
+
'EUR',
|
102 |
+
'PLN',
|
103 |
+
]
|
104 |
+
);
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Add more gateway form fields
|
109 |
+
*
|
110 |
+
* @since 1.3.0
|
111 |
+
*
|
112 |
+
* @return array
|
113 |
+
*/
|
114 |
+
public function get_local_payment_settings() {
|
115 |
+
$local_settings = parent::get_local_payment_settings();
|
116 |
+
|
117 |
+
$local_settings['allowed_countries']['default'] = 'specific';
|
118 |
+
$local_settings['specific_countries']['default'] = [ 'PL' ];
|
119 |
+
|
120 |
+
return $local_settings;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Creates markup for payment form for P24
|
125 |
+
*
|
126 |
+
* @since 1.3.0
|
127 |
+
*
|
128 |
+
* @return void
|
129 |
+
*/
|
130 |
+
public function payment_fields() {
|
131 |
+
/**
|
132 |
+
* Action before payment field.
|
133 |
+
*
|
134 |
+
* @since 1.3.0
|
135 |
+
*/
|
136 |
+
do_action( $this->id . '_before_payment_field_checkout' );
|
137 |
+
|
138 |
+
echo '<div class="status-box"></div>';
|
139 |
+
echo '<div class="cpsw_stripe_p24_form">';
|
140 |
+
if ( $this->description ) {
|
141 |
+
echo wp_kses_post( $this->description );
|
142 |
+
}
|
143 |
+
echo '<div class="cpsw_stripe_p24_select"></div>';
|
144 |
+
echo '<div class="cpsw_stripe_p24_error"></div>';
|
145 |
+
if ( 'test' === Helper::get_payment_mode() ) {
|
146 |
+
echo '<div class="cpsw_stripe_test_description">';
|
147 |
+
echo wp_kses_post( $this->get_test_mode_description() );
|
148 |
+
echo '</div>';
|
149 |
+
}
|
150 |
+
echo '</div>';
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Action after payment field.
|
154 |
+
*
|
155 |
+
* @since 1.3.0
|
156 |
+
*/
|
157 |
+
do_action( $this->id . '_after_payment_field_checkout' );
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
gateway/stripe/payment-request-api.php
CHANGED
@@ -38,7 +38,7 @@ class Payment_Request_Api extends Card_Payments {
|
|
38 |
$product_page_action = 'woocommerce_after_add_to_cart_quantity';
|
39 |
$product_page_priority = 10;
|
40 |
|
41 |
-
if ( '
|
42 |
$product_page_action = 'woocommerce_after_add_to_cart_button';
|
43 |
$product_page_priority = 1;
|
44 |
}
|
@@ -50,7 +50,7 @@ class Payment_Request_Api extends Card_Payments {
|
|
50 |
$checkout_page_action = 'woocommerce_checkout_before_customer_details';
|
51 |
$checkout_page_priority = 5;
|
52 |
|
53 |
-
if ( '
|
54 |
$checkout_page_action = 'woocommerce_checkout_billing';
|
55 |
$checkout_page_priority = 1;
|
56 |
}
|
@@ -124,83 +124,101 @@ class Payment_Request_Api extends Card_Payments {
|
|
124 |
return;
|
125 |
}
|
126 |
|
127 |
-
if ( 'yes'
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
$container_class = 'cart';
|
135 |
-
}
|
136 |
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
}
|
152 |
}
|
|
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
}
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
}
|
168 |
-
}
|
169 |
}
|
|
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
?>
|
172 |
-
<div
|
173 |
-
|
174 |
-
|
175 |
-
$this->payment_request_button_separator();
|
176 |
-
}
|
177 |
?>
|
178 |
-
<
|
179 |
-
<?php
|
180 |
-
if ( ! empty( trim( $options['express_checkout_title'] ) && 'yes' === $options['express_checkout_product_checkout_page'] ) ) {
|
181 |
-
?>
|
182 |
-
<h3 id="cpsw-payment-request-title"><?php echo esc_html( Helper::get_setting( 'express_checkout_title', 'cpsw_stripe' ) ); ?></h3>
|
183 |
-
<?php
|
184 |
-
}
|
185 |
-
if ( ! empty( trim( $options['express_checkout_tagline'] ) && 'yes' === $options['express_checkout_product_checkout_page'] ) ) {
|
186 |
-
?>
|
187 |
-
<p id="cpsw-payment-request-tagline"><?php echo wp_kses_post( Helper::get_setting( 'express_checkout_tagline', 'cpsw_stripe' ) ); ?></p>
|
188 |
<?php
|
189 |
-
|
|
|
190 |
?>
|
191 |
-
|
192 |
-
|
193 |
-
<!-- A Stripe Element will be inserted here. -->
|
194 |
-
</div>
|
195 |
-
</div>
|
196 |
-
<?php
|
197 |
-
if ( $separator_below ) {
|
198 |
-
$this->payment_request_button_separator();
|
199 |
}
|
200 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
</div>
|
202 |
-
|
|
|
|
|
203 |
}
|
|
|
|
|
|
|
|
|
204 |
}
|
205 |
|
206 |
/**
|
@@ -209,50 +227,46 @@ class Payment_Request_Api extends Card_Payments {
|
|
209 |
* @return void
|
210 |
*/
|
211 |
public function payment_request_button_separator() {
|
212 |
-
|
213 |
-
|
214 |
-
if ( ! isset( $gateways['cpsw_stripe'] ) ) {
|
215 |
return;
|
216 |
}
|
217 |
|
218 |
-
|
219 |
-
return;
|
220 |
-
}
|
221 |
|
222 |
-
if (
|
223 |
-
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
|
|
234 |
}
|
|
|
235 |
|
236 |
-
|
|
|
|
|
237 |
|
238 |
-
|
239 |
-
$
|
|
|
240 |
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
if ( ! empty( $options['express_checkout_separator_checkout'] ) ) {
|
245 |
-
$separator_text = $options['express_checkout_separator_checkout'];
|
246 |
-
}
|
247 |
-
}
|
248 |
-
}
|
249 |
-
if ( ! empty( $separator_text ) ) {
|
250 |
-
?>
|
251 |
-
<div id="cpsw-payment-request-separator" class="<?php echo esc_html( $container_class . ' ' . $alignment_class ); ?>">
|
252 |
<?php echo esc_html( $separator_text ); ?>
|
253 |
-
|
254 |
-
|
255 |
-
}
|
256 |
}
|
257 |
}
|
258 |
|
38 |
$product_page_action = 'woocommerce_after_add_to_cart_quantity';
|
39 |
$product_page_priority = 10;
|
40 |
|
41 |
+
if ( 'below' === $settings['express_checkout_product_page_position'] || 'inline' === $settings['express_checkout_product_page_position'] ) {
|
42 |
$product_page_action = 'woocommerce_after_add_to_cart_button';
|
43 |
$product_page_priority = 1;
|
44 |
}
|
50 |
$checkout_page_action = 'woocommerce_checkout_before_customer_details';
|
51 |
$checkout_page_priority = 5;
|
52 |
|
53 |
+
if ( 'above-billing' === $settings['express_checkout_checkout_page_position'] ) {
|
54 |
$checkout_page_action = 'woocommerce_checkout_billing';
|
55 |
$checkout_page_priority = 1;
|
56 |
}
|
124 |
return;
|
125 |
}
|
126 |
|
127 |
+
if ( 'yes' !== $this->express_checkout ) {
|
128 |
+
return;
|
129 |
+
}
|
130 |
+
|
131 |
+
$container_class = '';
|
132 |
+
$button_tag = 'button';
|
133 |
+
$button_class = 'button alt';
|
|
|
|
|
134 |
|
135 |
+
if ( $this->is_product() ) {
|
136 |
+
$container_class = 'cpsw-product';
|
137 |
+
} elseif ( is_checkout() ) {
|
138 |
+
$container_class = 'checkout';
|
139 |
+
} elseif ( is_cart() ) {
|
140 |
+
$container_class = 'cart';
|
141 |
+
$button_class = 'button alt wc-forward';
|
142 |
+
$button_tag = 'a';
|
143 |
+
}
|
144 |
|
145 |
+
$options = Helper::get_gateway_settings( 'cpsw_stripe' );
|
146 |
+
$separator_below = true;
|
147 |
+
$position_class = 'above';
|
148 |
+
$alignment_class = '';
|
149 |
+
$button_width = '';
|
150 |
+
$button_label = '' === $options['express_checkout_button_text'] ? __( 'Pay now', 'checkout-plugins-stripe-woo' ) : ucfirst( $options['express_checkout_button_text'] );
|
151 |
|
152 |
+
if ( 'checkout' === $container_class ) {
|
153 |
+
$alignment_class = $options['express_checkout_button_alignment'];
|
154 |
+
if ( ! empty( $options['express_checkout_button_width'] && $options['express_checkout_button_width'] > 0 ) ) {
|
155 |
+
$button_width = 'min-width:' . (int) $options['express_checkout_button_width'] . 'px';
|
156 |
+
} else {
|
157 |
+
$button_width = 'width: 100%';
|
|
|
158 |
}
|
159 |
+
}
|
160 |
|
161 |
+
if ( 'cpsw-product' === $container_class ) {
|
162 |
+
if ( 'below' === $options['express_checkout_product_page_position'] ) {
|
163 |
+
$separator_below = false;
|
164 |
+
$position_class = 'below';
|
165 |
+
}
|
|
|
166 |
|
167 |
+
if ( 'inline' === $options['express_checkout_product_page_position'] ) {
|
168 |
+
$separator_below = false;
|
169 |
+
$position_class = 'inline';
|
170 |
+
}
|
171 |
|
172 |
+
if ( 'yes' === $options['express_checkout_product_sticky_footer'] ) {
|
173 |
+
$container_class .= ' sticky';
|
|
|
|
|
174 |
}
|
175 |
+
}
|
176 |
|
177 |
+
?>
|
178 |
+
<div id="cpsw-payment-request-wrapper" class="<?php echo esc_attr( $container_class . ' ' . $position_class . ' ' . $alignment_class ); ?>" style="display: none;">
|
179 |
+
<?php
|
180 |
+
if ( ! $separator_below ) {
|
181 |
+
$this->payment_request_button_separator();
|
182 |
+
}
|
183 |
?>
|
184 |
+
<div class="cpsw-payment-request-button-wrapper">
|
185 |
+
<?php
|
186 |
+
if ( ! empty( trim( $options['express_checkout_title'] ) ) ) {
|
|
|
|
|
187 |
?>
|
188 |
+
<h3 id="cpsw-payment-request-title"><?php echo esc_html( Helper::get_setting( 'express_checkout_title', 'cpsw_stripe' ) ); ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
<?php
|
190 |
+
}
|
191 |
+
if ( ! empty( trim( $options['express_checkout_tagline'] ) ) ) {
|
192 |
?>
|
193 |
+
<p id="cpsw-payment-request-tagline"><?php echo wp_kses_post( Helper::get_setting( 'express_checkout_tagline', 'cpsw_stripe' ) ); ?></p>
|
194 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
}
|
196 |
?>
|
197 |
+
<div id="cpsw-payment-request-custom-button" style="<?php echo esc_attr( $button_width ); ?>">
|
198 |
+
<<?php echo esc_attr( $button_tag ); ?> lang="auto" class="cpsw-payment-request-custom-button-render cpsw_express_checkout_button cpsw-express-checkout-button <?php echo esc_attr( $button_class ); ?>" style="<?php echo esc_attr( $button_width ); ?>">
|
199 |
+
<div class="cpsw-express-checkout-button-inner" tabindex="-1">
|
200 |
+
<div class="cpsw-express-checkout-button-shines">
|
201 |
+
<div class="cpsw-express-checkout-button-shine cpsw-express-checkout-button-shine--scroll"></div>
|
202 |
+
<div class="cpsw-express-checkout-button-shine cpsw-express-checkout-button-shine--hover"></div>
|
203 |
+
</div>
|
204 |
+
<div class="cpsw-express-checkout-button-content">
|
205 |
+
<?php echo esc_html( $button_label ); ?>
|
206 |
+
<img src="" class="cpsw-express-checkout-button-icon">
|
207 |
+
</div>
|
208 |
+
<div class="cpsw-express-checkout-button-overlay"></div>
|
209 |
+
<div class="cpsw-express-checkout-button-border"></div>
|
210 |
+
</div>
|
211 |
+
</<?php echo esc_attr( $button_tag ); ?>>
|
212 |
+
</div>
|
213 |
</div>
|
214 |
+
<?php
|
215 |
+
if ( $separator_below ) {
|
216 |
+
$this->payment_request_button_separator();
|
217 |
}
|
218 |
+
?>
|
219 |
+
</div>
|
220 |
+
<?php
|
221 |
+
|
222 |
}
|
223 |
|
224 |
/**
|
227 |
* @return void
|
228 |
*/
|
229 |
public function payment_request_button_separator() {
|
230 |
+
if ( 'yes' !== $this->express_checkout ) {
|
|
|
|
|
231 |
return;
|
232 |
}
|
233 |
|
234 |
+
$container_class = '';
|
|
|
|
|
235 |
|
236 |
+
if ( $this->is_product() ) {
|
237 |
+
$container_class = 'cpsw-product';
|
238 |
+
} elseif ( is_checkout() ) {
|
239 |
+
$container_class = 'checkout';
|
240 |
+
} elseif ( is_cart() ) {
|
241 |
+
$container_class = 'cart';
|
242 |
}
|
243 |
|
244 |
+
$options = Helper::get_gateway_settings( 'cpsw_stripe' );
|
245 |
+
$alignment_class = '';
|
246 |
+
$separator_text = $options['express_checkout_separator_product'];
|
247 |
+
$display_separator = true;
|
248 |
+
|
249 |
+
if ( 'checkout' === $container_class ) {
|
250 |
+
$alignment_class = $options['express_checkout_button_alignment'];
|
251 |
+
if ( ! empty( $options['express_checkout_separator_checkout'] ) ) {
|
252 |
+
$separator_text = $options['express_checkout_separator_checkout'];
|
253 |
}
|
254 |
+
}
|
255 |
|
256 |
+
if ( 'cart' === $container_class && ! empty( $options['express_checkout_separator_cart'] ) ) {
|
257 |
+
$separator_text = $options['express_checkout_separator_cart'];
|
258 |
+
}
|
259 |
|
260 |
+
if ( 'cpsw-product' === $container_class && 'inline' === $options['express_checkout_product_page_position'] ) {
|
261 |
+
$display_separator = false;
|
262 |
+
}
|
263 |
|
264 |
+
if ( ! empty( $separator_text ) && $display_separator ) {
|
265 |
+
?>
|
266 |
+
<div id="cpsw-payment-request-separator" class="<?php echo esc_html( $container_class . ' ' . $alignment_class ); ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
<?php echo esc_html( $separator_text ); ?>
|
268 |
+
</div>
|
269 |
+
<?php
|
|
|
270 |
}
|
271 |
}
|
272 |
|
gateway/stripe/stripe-api.php
CHANGED
@@ -206,4 +206,16 @@ class Stripe_Api {
|
|
206 |
public function apple_pay_domains( $method, $args ) {
|
207 |
return $this->execute( 'applePayDomains', $method, $args );
|
208 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
206 |
public function apple_pay_domains( $method, $args ) {
|
207 |
return $this->execute( 'applePayDomains', $method, $args );
|
208 |
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Executes Stripe balance transactions query
|
212 |
+
*
|
213 |
+
* @param string $method method to be used.
|
214 |
+
* @param array $args parameter.
|
215 |
+
* @return array
|
216 |
+
* @since 1.3.0
|
217 |
+
*/
|
218 |
+
public function balance_transactions( $method, $args ) {
|
219 |
+
return $this->execute( 'balanceTransactions', $method, $args );
|
220 |
+
}
|
221 |
}
|
gateway/stripe/webhook.php
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
namespace CPSW\Gateway\Stripe;
|
10 |
|
|
|
11 |
use CPSW\Inc\Traits\Get_Instance;
|
12 |
use CPSW\Inc\Helper;
|
13 |
use CPSW\Inc\Logger;
|
@@ -16,7 +17,7 @@ use DateTime;
|
|
16 |
/**
|
17 |
* Webhook endpoints
|
18 |
*/
|
19 |
-
class Webhook {
|
20 |
|
21 |
const CPSW_LIVE_BEGAN_AT = 'cpsw_live_webhook_began_at';
|
22 |
const CPSW_LIVE_LAST_SUCCESS_AT = 'cpsw_live_webhook_last_success_at';
|
@@ -28,13 +29,6 @@ class Webhook {
|
|
28 |
const CPSW_TEST_LAST_FAILURE_AT = 'cpsw_test_webhook_last_failure_at';
|
29 |
const CPSW_TEST_LAST_ERROR = 'cpsw_test_webhook_last_error';
|
30 |
|
31 |
-
/**
|
32 |
-
* Zero currencies accepted by stripe.
|
33 |
-
*
|
34 |
-
* @var array
|
35 |
-
*/
|
36 |
-
private static $zero_currencies = [ 'BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VUV', 'XAF', 'XOF', 'XPF', 'VND' ];
|
37 |
-
|
38 |
use Get_Instance;
|
39 |
|
40 |
/**
|
@@ -199,7 +193,6 @@ class Webhook {
|
|
199 |
$this->charge_dispute_closed( $dispute );
|
200 |
break;
|
201 |
case 'payment_intent.succeeded':
|
202 |
-
case 'payment_intent.amount_capturable_updated':
|
203 |
$intent = $event->data->object;
|
204 |
$this->payment_intent_succeeded( $intent );
|
205 |
break;
|
@@ -238,34 +231,46 @@ class Webhook {
|
|
238 |
|
239 |
$order = wc_get_order( $order_id );
|
240 |
|
241 |
-
$order->set_transaction_id( $charge->id );
|
242 |
-
|
243 |
if ( 'cpsw_stripe' === $order->get_payment_method() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
// Check and see if capture is partial.
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
$order->add_order_note( sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'checkout-plugins-stripe-woo' ), $charge->id ) );
|
262 |
-
}
|
263 |
|
264 |
-
|
265 |
-
|
266 |
-
}
|
267 |
}
|
268 |
|
|
|
|
|
|
|
269 |
}
|
270 |
|
271 |
/**
|
@@ -284,16 +289,14 @@ class Webhook {
|
|
284 |
|
285 |
$order = wc_get_order( $order_id );
|
286 |
|
287 |
-
if (
|
288 |
$transaction_id = $order->get_transaction_id();
|
289 |
$captured = $charge->captured;
|
290 |
$refund_id = $order->get_meta( '_cpsw_refund_id' );
|
291 |
$currency = strtoupper( $charge->currency );
|
292 |
$raw_amount = $charge->refunds->data[0]->amount;
|
293 |
|
294 |
-
|
295 |
-
$raw_amount = $raw_amount / 100;
|
296 |
-
}
|
297 |
|
298 |
$amount = wc_price( $raw_amount, [ 'currency' => $currency ] );
|
299 |
|
@@ -333,6 +336,10 @@ class Webhook {
|
|
333 |
$refund_id = $charge->refunds->data[0]->id;
|
334 |
$order->update_meta_data( '_cpsw_refund_id', $refund_id );
|
335 |
|
|
|
|
|
|
|
|
|
336 |
$refund_time = gmdate( 'Y-m-d H:i:s', time() );
|
337 |
$order->add_order_note( __( 'Reason : ', 'checkout-plugins-stripe-woo' ) . $reason . '.<br>' . __( 'Amount : ', 'checkout-plugins-stripe-woo' ) . $amount . '.<br>' . __( 'Status : Success', 'checkout-plugins-stripe-woo' ) . ' [ ' . $refund_time . ' ] <br>' . __( 'Transaction ID : ', 'checkout-plugins-stripe-woo' ) . $refund_id );
|
338 |
Logger::info( $reason . ' : ' . __( 'Amount : ', 'checkout-plugins-stripe-woo' ) . get_woocommerce_currency_symbol() . str_pad( $raw_amount, 2, 0 ) . __( ' Transaction ID : ', 'checkout-plugins-stripe-woo' ) . $refund_id, true );
|
@@ -411,18 +418,25 @@ class Webhook {
|
|
411 |
}
|
412 |
|
413 |
$order = wc_get_order( $order_id );
|
414 |
-
|
415 |
-
if ( ! $order->has_status(
|
416 |
-
[ 'pending', 'failed' ],
|
417 |
-
$order
|
418 |
-
) ) {
|
419 |
return;
|
420 |
}
|
421 |
|
422 |
-
$
|
423 |
-
|
424 |
-
|
425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
}
|
427 |
|
428 |
/**
|
@@ -504,74 +518,6 @@ class Webhook {
|
|
504 |
return $wpdb->get_var( $wpdb->prepare( "SELECT post_id from {$wpdb->prefix}postmeta where meta_key = '_cpsw_intent_secret' and meta_value like %s", '%' . $payment_intent . '%' ) );
|
505 |
}
|
506 |
|
507 |
-
/**
|
508 |
-
* Process response for saved cards
|
509 |
-
*
|
510 |
-
* @param object $response intent response.
|
511 |
-
* @param object $order order response.
|
512 |
-
* @return array
|
513 |
-
*/
|
514 |
-
public function process_response( $response, $order ) {
|
515 |
-
Logger::info( 'Processing: ' . $response->id );
|
516 |
-
|
517 |
-
$order_id = $order->get_id();
|
518 |
-
$captured = ( isset( $response->captured ) && $response->captured ) ? 'yes' : 'no';
|
519 |
-
|
520 |
-
// Store charge data.
|
521 |
-
$order->update_meta_data( '_cpsw_charge_captured', $captured );
|
522 |
-
|
523 |
-
if ( 'yes' === $captured ) {
|
524 |
-
/**
|
525 |
-
* Charge can be captured but in a pending state. Payment methods
|
526 |
-
* that are asynchronous may take couple days to clear. Webhook will
|
527 |
-
* take care of the status changes.
|
528 |
-
*/
|
529 |
-
if ( 'pending' === $response->status ) {
|
530 |
-
$order_stock_reduced = $order->get_meta( '_order_stock_reduced', true );
|
531 |
-
|
532 |
-
if ( ! $order_stock_reduced ) {
|
533 |
-
wc_reduce_stock_levels( $order_id );
|
534 |
-
}
|
535 |
-
|
536 |
-
$order->set_transaction_id( $response->id );
|
537 |
-
/* translators: transaction id */
|
538 |
-
$order->update_status( 'on-hold', sprintf( __( 'Stripe charge awaiting payment: %s.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
539 |
-
}
|
540 |
-
|
541 |
-
if ( 'succeeded' === $response->status ) {
|
542 |
-
$order->payment_complete( $response->id );
|
543 |
-
|
544 |
-
/* translators: transaction id */
|
545 |
-
$message = sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'checkout-plugins-stripe-woo' ), $response->id );
|
546 |
-
Logger::info( $message, true );
|
547 |
-
$order->add_order_note( $message );
|
548 |
-
}
|
549 |
-
|
550 |
-
if ( 'failed' === $response->status ) {
|
551 |
-
$message = __( 'Payment processing failed. Please retry.', 'checkout-plugins-stripe-woo' );
|
552 |
-
Logger::error( $message, true );
|
553 |
-
$order->add_order_note( $message );
|
554 |
-
}
|
555 |
-
} else {
|
556 |
-
$order->set_transaction_id( $response->id );
|
557 |
-
|
558 |
-
if ( $order->has_status( [ 'pending', 'failed' ] ) ) {
|
559 |
-
wc_reduce_stock_levels( $order_id );
|
560 |
-
}
|
561 |
-
|
562 |
-
/* translators: transaction id */
|
563 |
-
$order->update_status( 'on-hold', sprintf( __( 'Stripe charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
564 |
-
}
|
565 |
-
|
566 |
-
if ( is_callable( [ $order, 'save' ] ) ) {
|
567 |
-
$order->save();
|
568 |
-
}
|
569 |
-
|
570 |
-
do_action( 'cpsw_process_response', $response, $order );
|
571 |
-
|
572 |
-
return $response;
|
573 |
-
}
|
574 |
-
|
575 |
/**
|
576 |
* Sends order failure email.
|
577 |
*
|
8 |
|
9 |
namespace CPSW\Gateway\Stripe;
|
10 |
|
11 |
+
use CPSW\Gateway\Abstract_Payment_Gateway;
|
12 |
use CPSW\Inc\Traits\Get_Instance;
|
13 |
use CPSW\Inc\Helper;
|
14 |
use CPSW\Inc\Logger;
|
17 |
/**
|
18 |
* Webhook endpoints
|
19 |
*/
|
20 |
+
class Webhook extends Abstract_Payment_Gateway {
|
21 |
|
22 |
const CPSW_LIVE_BEGAN_AT = 'cpsw_live_webhook_began_at';
|
23 |
const CPSW_LIVE_LAST_SUCCESS_AT = 'cpsw_live_webhook_last_success_at';
|
29 |
const CPSW_TEST_LAST_FAILURE_AT = 'cpsw_test_webhook_last_failure_at';
|
30 |
const CPSW_TEST_LAST_ERROR = 'cpsw_test_webhook_last_error';
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
use Get_Instance;
|
33 |
|
34 |
/**
|
193 |
$this->charge_dispute_closed( $dispute );
|
194 |
break;
|
195 |
case 'payment_intent.succeeded':
|
|
|
196 |
$intent = $event->data->object;
|
197 |
$this->payment_intent_succeeded( $intent );
|
198 |
break;
|
231 |
|
232 |
$order = wc_get_order( $order_id );
|
233 |
|
|
|
|
|
234 |
if ( 'cpsw_stripe' === $order->get_payment_method() ) {
|
235 |
+
$order->set_transaction_id( $charge->id );
|
236 |
+
$this->make_charge( $charge, $order );
|
237 |
+
}
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Make charge via webhook call
|
243 |
+
*
|
244 |
+
* @param object $intent Stripe intent object.
|
245 |
+
* @param object $order WC order object.
|
246 |
+
* @return void
|
247 |
+
*/
|
248 |
+
public function make_charge( $intent, $order ) {
|
249 |
// Check and see if capture is partial.
|
250 |
+
if ( $intent->amount_refunded > 0 ) {
|
251 |
+
$partial_amount = $intent->amount_captured;
|
252 |
+
$currency = strtoupper( $intent->currency );
|
253 |
+
$partial_amount = $this->get_original_amount( $partial_amount, $currency );
|
254 |
+
$order->set_total( $partial_amount );
|
255 |
+
/* translators: order id */
|
256 |
+
Logger::info( sprintf( __( 'Stripe charge partially captured with amount %1$1s Order id - %2$2s', 'checkout-plugins-stripe-woo' ), $partial_amount, $order->get_id() ), true );
|
257 |
+
/* translators: partial captured amount */
|
258 |
+
$order->add_order_note( sprintf( __( 'This charge was partially captured via Stripe Dashboard with the amount : %s', 'checkout-plugins-stripe-woo' ), $partial_amount ) );
|
259 |
+
} else {
|
260 |
+
$order->payment_complete( $intent->id );
|
261 |
+
/* translators: order id */
|
262 |
+
Logger::info( sprintf( __( 'Stripe charge completely captured Order id - %1s', 'checkout-plugins-stripe-woo' ), $order->get_id() ), true );
|
263 |
+
/* translators: transaction id */
|
264 |
+
$order->add_order_note( sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'checkout-plugins-stripe-woo' ), $intent->id ) );
|
265 |
+
}
|
|
|
|
|
266 |
|
267 |
+
if ( isset( $intent->balance_transaction ) ) {
|
268 |
+
$this->update_balance( $order, $intent->balance_transaction, true );
|
|
|
269 |
}
|
270 |
|
271 |
+
if ( is_callable( [ $order, 'save' ] ) ) {
|
272 |
+
$order->save();
|
273 |
+
}
|
274 |
}
|
275 |
|
276 |
/**
|
289 |
|
290 |
$order = wc_get_order( $order_id );
|
291 |
|
292 |
+
if ( 0 === strpos( $order->get_payment_method(), 'cpsw_' ) ) {
|
293 |
$transaction_id = $order->get_transaction_id();
|
294 |
$captured = $charge->captured;
|
295 |
$refund_id = $order->get_meta( '_cpsw_refund_id' );
|
296 |
$currency = strtoupper( $charge->currency );
|
297 |
$raw_amount = $charge->refunds->data[0]->amount;
|
298 |
|
299 |
+
$raw_amount = $this->get_original_amount( $raw_amount, $currency );
|
|
|
|
|
300 |
|
301 |
$amount = wc_price( $raw_amount, [ 'currency' => $currency ] );
|
302 |
|
336 |
$refund_id = $charge->refunds->data[0]->id;
|
337 |
$order->update_meta_data( '_cpsw_refund_id', $refund_id );
|
338 |
|
339 |
+
if ( isset( $charge->refunds->data[0]->balance_transaction ) ) {
|
340 |
+
$this->update_balance( $order, $charge->refunds->data[0]->balance_transaction );
|
341 |
+
}
|
342 |
+
|
343 |
$refund_time = gmdate( 'Y-m-d H:i:s', time() );
|
344 |
$order->add_order_note( __( 'Reason : ', 'checkout-plugins-stripe-woo' ) . $reason . '.<br>' . __( 'Amount : ', 'checkout-plugins-stripe-woo' ) . $amount . '.<br>' . __( 'Status : Success', 'checkout-plugins-stripe-woo' ) . ' [ ' . $refund_time . ' ] <br>' . __( 'Transaction ID : ', 'checkout-plugins-stripe-woo' ) . $refund_id );
|
345 |
Logger::info( $reason . ' : ' . __( 'Amount : ', 'checkout-plugins-stripe-woo' ) . get_woocommerce_currency_symbol() . str_pad( $raw_amount, 2, 0 ) . __( ' Transaction ID : ', 'checkout-plugins-stripe-woo' ) . $refund_id, true );
|
418 |
}
|
419 |
|
420 |
$order = wc_get_order( $order_id );
|
421 |
+
if ( 'cpsw_stripe' === $order->get_payment_method() ) {
|
|
|
|
|
|
|
|
|
422 |
return;
|
423 |
}
|
424 |
|
425 |
+
if ( 'manual' === $intent->capture_method && 0 === strpos( $order->get_payment_method(), 'cpsw_' ) ) {
|
426 |
+
$this->make_charge( $intent, $order );
|
427 |
+
} else {
|
428 |
+
if ( ! $order->has_status(
|
429 |
+
[ 'pending', 'failed' ],
|
430 |
+
$order
|
431 |
+
) ) {
|
432 |
+
return;
|
433 |
+
}
|
434 |
+
|
435 |
+
$charge = end( $intent->charges->data );
|
436 |
+
/* translators: transaction id, order id */
|
437 |
+
Logger::info( sprintf( __( 'Stripe PaymentIntent %1$1s succeeded for order %2$2s', 'checkout-plugins-stripe-woo' ), $charge->id, $order_id ) );
|
438 |
+
$this->process_response( $charge, $order );
|
439 |
+
}
|
440 |
}
|
441 |
|
442 |
/**
|
518 |
return $wpdb->get_var( $wpdb->prepare( "SELECT post_id from {$wpdb->prefix}postmeta where meta_key = '_cpsw_intent_secret' and meta_value like %s", '%' . $payment_intent . '%' ) );
|
519 |
}
|
520 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
/**
|
522 |
* Sends order failure email.
|
523 |
*
|
inc/helper.php
CHANGED
@@ -40,19 +40,17 @@ class Helper {
|
|
40 |
'checkout',
|
41 |
],
|
42 |
'express_checkout_enabled' => 'no',
|
43 |
-
'
|
44 |
'express_checkout_button_theme' => 'dark',
|
45 |
'express_checkout_button_height' => '40',
|
46 |
'express_checkout_title' => 'Express Checkout',
|
47 |
'express_checkout_tagline' => 'Checkout quickly to use you favourite tool.',
|
48 |
-
'express_checkout_product_options' => 'no',
|
49 |
'express_checkout_product_page_position' => 'above',
|
50 |
-
'express_checkout_product_button_width' => '',
|
51 |
'express_checkout_product_sticky_footer' => 'yes',
|
52 |
-
'
|
53 |
-
'express_checkout_product_checkout_page' => 'no',
|
54 |
'express_checkout_button_width' => '',
|
55 |
'express_checkout_button_alignment' => 'left',
|
|
|
56 |
'express_checkout_separator_checkout' => 'OR',
|
57 |
'express_checkout_checkout_page_position' => 'above-checkout',
|
58 |
],
|
40 |
'checkout',
|
41 |
],
|
42 |
'express_checkout_enabled' => 'no',
|
43 |
+
'express_checkout_button_text' => 'Pay now',
|
44 |
'express_checkout_button_theme' => 'dark',
|
45 |
'express_checkout_button_height' => '40',
|
46 |
'express_checkout_title' => 'Express Checkout',
|
47 |
'express_checkout_tagline' => 'Checkout quickly to use you favourite tool.',
|
|
|
48 |
'express_checkout_product_page_position' => 'above',
|
|
|
49 |
'express_checkout_product_sticky_footer' => 'yes',
|
50 |
+
'express_checkout_separator_product' => 'OR',
|
|
|
51 |
'express_checkout_button_width' => '',
|
52 |
'express_checkout_button_alignment' => 'left',
|
53 |
+
'express_checkout_separator_cart' => 'OR',
|
54 |
'express_checkout_separator_checkout' => 'OR',
|
55 |
'express_checkout_checkout_page_position' => 'above-checkout',
|
56 |
],
|
inc/notice.php
CHANGED
@@ -50,11 +50,14 @@ class Notice {
|
|
50 |
* @return void
|
51 |
*/
|
52 |
public function add( $slug, $class, $message, $dismissible = false ) {
|
53 |
-
$this->notices[ $slug ] =
|
54 |
-
'
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
50 |
* @return void
|
51 |
*/
|
52 |
public function add( $slug, $class, $message, $dismissible = false ) {
|
53 |
+
$this->notices[ $slug ] = apply_filters(
|
54 |
+
'cpsw_notices_add_args',
|
55 |
+
[
|
56 |
+
'class' => $class,
|
57 |
+
'message' => $message,
|
58 |
+
'dismissible' => $dismissible,
|
59 |
+
]
|
60 |
+
);
|
61 |
}
|
62 |
|
63 |
/**
|
inc/traits/subscriptions.php
CHANGED
@@ -58,16 +58,8 @@ trait Subscriptions {
|
|
58 |
wcs_user_has_subscription( get_current_user_id(), '', $subs_statuses ) &&
|
59 |
is_add_payment_method_page()
|
60 |
) {
|
61 |
-
$
|
62 |
-
$id
|
63 |
-
woocommerce_form_field(
|
64 |
-
$id,
|
65 |
-
[
|
66 |
-
'type' => 'checkbox',
|
67 |
-
'label' => $label,
|
68 |
-
'default' => apply_filters( 'cpsw_save_to_subs_checked', false ),
|
69 |
-
]
|
70 |
-
);
|
71 |
}
|
72 |
}
|
73 |
|
@@ -78,7 +70,7 @@ trait Subscriptions {
|
|
78 |
* @param object $source_object source object.
|
79 |
*/
|
80 |
public function handle_add_payment_method_success( $source_id, $source_object ) {
|
81 |
-
if ( isset( $_POST[
|
82 |
$all_subs = wcs_get_users_subscriptions();
|
83 |
$subs_statuses = apply_filters( 'cpsw_update_subs_payment_method_card_status', [ 'active' ] );
|
84 |
$stripe_customer = $this->get_customer_id();
|
@@ -315,9 +307,10 @@ trait Subscriptions {
|
|
315 |
if ( ! empty( trim( $this->statement_descriptor ) ) ) {
|
316 |
$request['statement_descriptor'] = $this->statement_descriptor;
|
317 |
}
|
|
|
318 |
Logger::info( "Stripe Payment initiated for order $order_id" );
|
319 |
$stripe_api = new Stripe_Api();
|
320 |
-
$response = $stripe_api->payment_intents( 'create', [ $request ] );
|
321 |
$intent = $response['success'] ? $response['data'] : false;
|
322 |
|
323 |
if ( $intent ) {
|
@@ -331,74 +324,6 @@ trait Subscriptions {
|
|
331 |
return $intent;
|
332 |
}
|
333 |
|
334 |
-
/**
|
335 |
-
* Process intent response
|
336 |
-
*
|
337 |
-
* @param object $response intent response.
|
338 |
-
* @param WC_Order $order Current order.
|
339 |
-
* @throws Exception Stripe Exception.
|
340 |
-
* @return object
|
341 |
-
*/
|
342 |
-
public function process_response( $response, $order ) {
|
343 |
-
Logger::info( 'Processing: ' . $response->id );
|
344 |
-
|
345 |
-
$order_id = $order->get_id();
|
346 |
-
$captured = ( isset( $response->captured ) && $response->captured ) ? 'yes' : 'no';
|
347 |
-
|
348 |
-
// Store charge data.
|
349 |
-
$order->update_meta_data( '_cpsw_charge_captured', $captured );
|
350 |
-
|
351 |
-
if ( 'yes' === $captured ) {
|
352 |
-
/**
|
353 |
-
* Charge can be captured but in a pending state. Webhook required to update status.
|
354 |
-
*/
|
355 |
-
if ( 'pending' === $response->status ) {
|
356 |
-
$order_stock_reduced = $order->get_meta( '_order_stock_reduced', true );
|
357 |
-
|
358 |
-
if ( ! $order_stock_reduced ) {
|
359 |
-
wc_reduce_stock_levels( $order_id );
|
360 |
-
}
|
361 |
-
|
362 |
-
$order->set_transaction_id( $response->id );
|
363 |
-
/* translators: transaction id */
|
364 |
-
$order->update_status( 'on-hold', sprintf( __( 'Stripe charge awaiting payment: %s.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
365 |
-
}
|
366 |
-
|
367 |
-
if ( 'succeeded' === $response->status ) {
|
368 |
-
$order->payment_complete( $response->id );
|
369 |
-
|
370 |
-
/* translators: transaction id */
|
371 |
-
$message = sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'checkout-plugins-stripe-woo' ), $response->id );
|
372 |
-
Logger::info( $message, true );
|
373 |
-
$order->add_order_note( $message );
|
374 |
-
|
375 |
-
}
|
376 |
-
|
377 |
-
if ( 'failed' === $response->status ) {
|
378 |
-
$localized_message = __( 'Payment processing failed. Please retry.', 'checkout-plugins-stripe-woo' );
|
379 |
-
$order->add_order_note( $localized_message );
|
380 |
-
throw new Exception( print_r( $response, true ), $localized_message ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
|
381 |
-
}
|
382 |
-
} else {
|
383 |
-
$order->set_transaction_id( $response->id );
|
384 |
-
|
385 |
-
if ( $order->has_status( [ 'pending', 'failed' ] ) ) {
|
386 |
-
wc_reduce_stock_levels( $order_id );
|
387 |
-
}
|
388 |
-
|
389 |
-
/* translators: transaction id */
|
390 |
-
$order->update_status( 'on-hold', sprintf( __( 'Stripe charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment.', 'checkout-plugins-stripe-woo' ), $response->id ) );
|
391 |
-
}
|
392 |
-
|
393 |
-
if ( is_callable( [ $order, 'save' ] ) ) {
|
394 |
-
$order->save();
|
395 |
-
}
|
396 |
-
|
397 |
-
do_action( 'cpsw_stripe_process_response', $response, $order );
|
398 |
-
|
399 |
-
return $response;
|
400 |
-
}
|
401 |
-
|
402 |
/**
|
403 |
* Creates setup intent for update payment method
|
404 |
*
|
@@ -704,11 +629,11 @@ trait Subscriptions {
|
|
704 |
WC_Emails::instance();
|
705 |
|
706 |
/**
|
707 |
-
*
|
708 |
*
|
709 |
* @param WC_Order $renewal_order The order that is being renewed.
|
710 |
*/
|
711 |
-
do_action( '
|
712 |
|
713 |
// Fail the payment attempt (order would be currently pending because of retry rules).
|
714 |
$charge = end( $existing_intent->charges->data );
|
58 |
wcs_user_has_subscription( get_current_user_id(), '', $subs_statuses ) &&
|
59 |
is_add_payment_method_page()
|
60 |
) {
|
61 |
+
$id = sprintf( '%1$s-update-subs-payment-method-card', $this->id );
|
62 |
+
echo '<span class="cpsw-save-cards"><label><input type="checkbox" name="' . esc_attr( $id ) . '" value="1"/>' . wp_kses_post( apply_filters( 'cpsw_save_to_subs_text', __( 'Update the payment method used for all of my active subscriptions.', 'checkout-plugins-stripe-woo' ) ) ) . '</label></span>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
}
|
65 |
|
70 |
* @param object $source_object source object.
|
71 |
*/
|
72 |
public function handle_add_payment_method_success( $source_id, $source_object ) {
|
73 |
+
if ( isset( $_POST[ $this->id . '-update-subs-payment-method-card' ] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
74 |
$all_subs = wcs_get_users_subscriptions();
|
75 |
$subs_statuses = apply_filters( 'cpsw_update_subs_payment_method_card_status', [ 'active' ] );
|
76 |
$stripe_customer = $this->get_customer_id();
|
307 |
if ( ! empty( trim( $this->statement_descriptor ) ) ) {
|
308 |
$request['statement_descriptor'] = $this->statement_descriptor;
|
309 |
}
|
310 |
+
|
311 |
Logger::info( "Stripe Payment initiated for order $order_id" );
|
312 |
$stripe_api = new Stripe_Api();
|
313 |
+
$response = $stripe_api->payment_intents( 'create', [ apply_filters( 'cpsw_create_and_confirm_intent_post_data', $request ) ] );
|
314 |
$intent = $response['success'] ? $response['data'] : false;
|
315 |
|
316 |
if ( $intent ) {
|
324 |
return $intent;
|
325 |
}
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
/**
|
328 |
* Creates setup intent for update payment method
|
329 |
*
|
629 |
WC_Emails::instance();
|
630 |
|
631 |
/**
|
632 |
+
* Action when authentication already failed.
|
633 |
*
|
634 |
* @param WC_Order $renewal_order The order that is being renewed.
|
635 |
*/
|
636 |
+
do_action( 'cpsw_has_authentication_already_failed', $renewal_order );
|
637 |
|
638 |
// Fail the payment attempt (order would be currently pending because of retry rules).
|
639 |
$charge = end( $existing_intent->charges->data );
|
languages/checkout-plugins-stripe-woo.pot
ADDED
@@ -0,0 +1,1471 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2022 Brainstorm Force
|
2 |
+
# This file is distributed under the GPLv2 or later.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Checkout Plugins - Stripe for WooCommerce 1.2.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-01-21T08:45:42+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"
|
16 |
+
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
msgid "Checkout Plugins - Stripe for WooCommerce"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#. Plugin URI of the plugin
|
22 |
+
msgid "https://www.checkoutplugins.com/"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#. Description of the plugin
|
26 |
+
msgid "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!"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#. Author of the plugin
|
30 |
+
msgid "Brainstorm Force"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#. Author URI of the plugin
|
34 |
+
msgid "https://brainstormforce.com/"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: admin/admin-controller.php:79
|
38 |
+
#: admin/admin-controller.php:783
|
39 |
+
msgid "Stripe API Settings"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: admin/admin-controller.php:80
|
43 |
+
msgid "Credit Cards"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: admin/admin-controller.php:81
|
47 |
+
#: admin/admin-controller.php:1430
|
48 |
+
#: wizard/build/app.js:895
|
49 |
+
msgid "Express Checkout"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: admin/admin-controller.php:82
|
53 |
+
#: gateway/stripe/alipay.php:46
|
54 |
+
msgid "Alipay"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: admin/admin-controller.php:83
|
58 |
+
#: gateway/stripe/ideal.php:45
|
59 |
+
msgid "iDEAL"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: admin/admin-controller.php:84
|
63 |
+
#: gateway/stripe/klarna.php:53
|
64 |
+
msgid "Klarna"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: admin/admin-controller.php:85
|
68 |
+
#: gateway/stripe/p24.php:45
|
69 |
+
msgid "Przelewy24"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: admin/admin-controller.php:239
|
73 |
+
msgid "Something went wrong! Please reload the page and try again."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: admin/admin-controller.php:240
|
77 |
+
#: admin/admin-controller.php:671
|
78 |
+
msgid "Connect to Stripe"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: admin/admin-controller.php:241
|
82 |
+
msgid "Please enter all keys to connect to stripe."
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: admin/admin-controller.php:242
|
86 |
+
msgid "You must enter your API keys or connect the plugin before performing a connection test. Mode:"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: admin/admin-controller.php:243
|
90 |
+
msgid "Keys Unavailable."
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: admin/admin-controller.php:244
|
94 |
+
msgid "Your Stripe account has been disconnected."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: admin/admin-controller.php:245
|
98 |
+
msgid "You can connect other Stripe account now."
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#. translators: Html Markup
|
102 |
+
#: admin/admin-controller.php:281
|
103 |
+
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."
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#. translators: %1$1s HTML Markup
|
107 |
+
#: admin/admin-controller.php:296
|
108 |
+
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>"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: admin/admin-controller.php:306
|
112 |
+
#: admin/admin-controller.php:788
|
113 |
+
msgid "Stripe Connect"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: admin/admin-controller.php:309
|
117 |
+
#: admin/admin-controller.php:490
|
118 |
+
#: admin/admin-controller.php:1386
|
119 |
+
msgid "Hide API keys"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: admin/admin-controller.php:311
|
123 |
+
#: admin/admin-controller.php:487
|
124 |
+
#: admin/admin-controller.php:1382
|
125 |
+
#: wizard/build/app.js:951
|
126 |
+
msgid "Manage API keys manually"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#. translators: %1$1s: mode, %2$2s, %3$3s: HTML Markup
|
130 |
+
#: admin/admin-controller.php:314
|
131 |
+
msgid "Stripe Keys for %1$1s mode are not set correctly. Reconnect via %2$2s or %3$3s"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: admin/admin-controller.php:324
|
135 |
+
msgid "No SSL was detected, Stripe live mode requires SSL."
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: admin/admin-controller.php:331
|
139 |
+
msgid "Your Stripe account has been connected to your WooCommerce store. You may now accept payments in live and test mode."
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: admin/admin-controller.php:338
|
143 |
+
msgid "We were not able to connect your Stripe account. Please try again. "
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: admin/admin-controller.php:347
|
147 |
+
#: admin/admin-controller.php:963
|
148 |
+
#: admin/admin-controller.php:1063
|
149 |
+
msgid "Error: The current user doesn’t have sufficient permissions to perform this action. Please reload the page and try again."
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: admin/admin-controller.php:379
|
153 |
+
#: admin/admin-controller.php:462
|
154 |
+
#: wizard/build/app.js:996
|
155 |
+
msgid "Connect with Stripe"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: admin/admin-controller.php:380
|
159 |
+
#: admin/admin-controller.php:672
|
160 |
+
#: admin/admin-controller.php:814
|
161 |
+
msgid "We make it easy to connect Stripe to your site. Click the Connect button to go through our connect flow."
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#. translators: %1$1s, %2$2s: HTML Markup
|
165 |
+
#: admin/admin-controller.php:403
|
166 |
+
msgid "Have questions about connecting with Stripe? Read %1$s document. %2$s"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: admin/admin-controller.php:411
|
170 |
+
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 Stripe Gateway for WooCommerce settings."
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#. translators: %1$1s %2$2s %3$3s: HTML Markup
|
174 |
+
#: admin/admin-controller.php:456
|
175 |
+
msgid "Your manually managed API keys are valid."
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: admin/admin-controller.php:460
|
179 |
+
msgid "It is highly recommended to Connect with Stripe for easier setup and improved security."
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#. translators: $1s Acoount name, $2s html markup, $3s account id, $4s html markup
|
183 |
+
#: admin/admin-controller.php:470
|
184 |
+
msgid "Account (%1$1s) %2$2s %3$3s %4$4s is connected."
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: admin/admin-controller.php:480
|
188 |
+
msgid "Disconnect & connect other account?"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: admin/admin-controller.php:482
|
192 |
+
msgid "Test Connection"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: admin/admin-controller.php:497
|
196 |
+
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 Stripe Gateway for WooCommerce payment gateway settings. With Stripe Connect you'll be ready to go with just a few clicks."
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: admin/admin-controller.php:634
|
200 |
+
msgid "Clear all Stripe account keys"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: admin/admin-controller.php:663
|
204 |
+
#: admin/admin-controller.php:667
|
205 |
+
msgid "Re-Connect to Stripe"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: admin/admin-controller.php:665
|
209 |
+
#: admin/admin-controller.php:669
|
210 |
+
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."
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: admin/admin-controller.php:700
|
214 |
+
msgid "Connect Manually"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: admin/admin-controller.php:725
|
218 |
+
msgid "Stripe"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: admin/admin-controller.php:795
|
222 |
+
msgid "Connection Status"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: admin/admin-controller.php:799
|
226 |
+
#: admin/admin-controller.php:800
|
227 |
+
msgid "This is your Stripe Connect ID and serves as a unique identifier."
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: admin/admin-controller.php:804
|
231 |
+
msgid "Stripe Account Keys"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: admin/admin-controller.php:807
|
235 |
+
msgid "This will disable any connection to Stripe."
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: admin/admin-controller.php:811
|
239 |
+
msgid "Connect Stripe Account"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: admin/admin-controller.php:818
|
243 |
+
msgid "Live Publishable Key"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: admin/admin-controller.php:820
|
247 |
+
#: admin/admin-controller.php:878
|
248 |
+
msgid "Your publishable key is used to initialize Stripe assets."
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: admin/admin-controller.php:824
|
252 |
+
msgid "Live Secret Key"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: admin/admin-controller.php:826
|
256 |
+
msgid "Your secret key is used to authenticate Stripe requests."
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: admin/admin-controller.php:830
|
260 |
+
msgid "Test Publishable Key"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: admin/admin-controller.php:832
|
264 |
+
msgid "Your test publishable key is used to initialize Stripe assets."
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: admin/admin-controller.php:836
|
268 |
+
msgid "Test Secret Key"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: admin/admin-controller.php:838
|
272 |
+
msgid "Your test secret key is used to authenticate Stripe requests for testing purposes."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: admin/admin-controller.php:842
|
276 |
+
msgid "Mode"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: admin/admin-controller.php:848
|
280 |
+
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."
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: admin/admin-controller.php:853
|
284 |
+
msgid "Webhook URL"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#. translators: %1$1s - %2$2s HTML markup
|
288 |
+
#: admin/admin-controller.php:857
|
289 |
+
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"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: admin/admin-controller.php:861
|
293 |
+
msgid "Live Webhook Secret"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#. translators: %1$1s Webhook Status
|
297 |
+
#: admin/admin-controller.php:864
|
298 |
+
#: admin/admin-controller.php:871
|
299 |
+
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"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: admin/admin-controller.php:868
|
303 |
+
msgid "Test Webhook Secret"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: admin/admin-controller.php:875
|
307 |
+
msgid "Debug Log"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: admin/admin-controller.php:877
|
311 |
+
msgid "Log debug messages"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: admin/admin-controller.php:914
|
315 |
+
msgid "Please try again."
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: admin/admin-controller.php:959
|
319 |
+
#: admin/admin-controller.php:1059
|
320 |
+
msgid "Error: Sorry, the nonce security check didn’t pass. Please reload the page and try again."
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: admin/admin-controller.php:972
|
324 |
+
#: admin/admin-controller.php:1037
|
325 |
+
msgid "Test Mode:"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: admin/admin-controller.php:974
|
329 |
+
msgid "Please enter secret key to test."
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: admin/admin-controller.php:979
|
333 |
+
#: admin/admin-controller.php:1041
|
334 |
+
msgid "Live Mode:"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: admin/admin-controller.php:981
|
338 |
+
msgid "Please enter secret key to live."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: admin/admin-controller.php:985
|
342 |
+
msgid "Error: Empty String provided for keys"
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#. translators: %1$1s mode
|
346 |
+
#: admin/admin-controller.php:997
|
347 |
+
msgid "My first %1s customer (created for API docs)"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: admin/admin-controller.php:1002
|
351 |
+
msgid "Connected to Stripe successfully"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: admin/admin-controller.php:1069
|
355 |
+
msgid "Stripe keys are reset successfully."
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: admin/admin-controller.php:1079
|
359 |
+
#: inc/traits/subscriptions.php:342
|
360 |
+
msgid "Invalid Nonce"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: admin/admin-controller.php:1201
|
364 |
+
msgid "My First Test Customer (created for API docs)"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: admin/admin-controller.php:1250
|
368 |
+
msgid "My First Live Customer (created for API docs)"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: admin/admin-controller.php:1423
|
372 |
+
msgid "Express Checkout is a feature of Card Payments. Enable Card Payments to use Express Checkout"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#. translators: HTML Markup
|
376 |
+
#: admin/admin-controller.php:1433
|
377 |
+
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."
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: admin/admin-controller.php:1437
|
381 |
+
#: wizard/build/app.js:911
|
382 |
+
msgid "Enable Express Checkout"
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: admin/admin-controller.php:1443
|
386 |
+
msgid "Show button on"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: admin/admin-controller.php:1447
|
390 |
+
msgid "Choose page to display Express Checkout buttons."
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: admin/admin-controller.php:1449
|
394 |
+
msgid "Product"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: admin/admin-controller.php:1450
|
398 |
+
msgid "Cart"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: admin/admin-controller.php:1451
|
402 |
+
msgid "Checkout"
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: admin/admin-controller.php:1456
|
406 |
+
msgid "Button type"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: admin/admin-controller.php:1459
|
410 |
+
msgid "Select label for Express Checkout button. Unfortunately, we can't customize the label because of the restrictions from Stripe."
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: admin/admin-controller.php:1462
|
414 |
+
#: gateway/stripe/card-payments.php:174
|
415 |
+
msgid "Default"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: admin/admin-controller.php:1463
|
419 |
+
msgid "Book"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: admin/admin-controller.php:1464
|
423 |
+
msgid "Buy"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: admin/admin-controller.php:1465
|
427 |
+
msgid "Donate"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: admin/admin-controller.php:1470
|
431 |
+
msgid "Button theme"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: admin/admin-controller.php:1473
|
435 |
+
msgid "Select theme for Express Checkout button."
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: admin/admin-controller.php:1476
|
439 |
+
msgid "Dark"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: admin/admin-controller.php:1477
|
443 |
+
msgid "Light"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: admin/admin-controller.php:1478
|
447 |
+
msgid "Light Outline"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: admin/admin-controller.php:1483
|
451 |
+
msgid "Button height"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: admin/admin-controller.php:1486
|
455 |
+
msgid "Select height for Express Checkout button (in px). Button height can be between 35px to 60px. Default height 40px."
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: admin/admin-controller.php:1491
|
459 |
+
#: admin/admin-controller.php:1621
|
460 |
+
msgid "Separator text"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: admin/admin-controller.php:1494
|
464 |
+
msgid "Add separator text for the Express Checkout button. This will help to distinguish between Express Checkout and other buttons."
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: admin/admin-controller.php:1499
|
468 |
+
msgid "Button Preview"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: admin/admin-controller.php:1508
|
472 |
+
msgid "Product page options"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: admin/admin-controller.php:1510
|
476 |
+
msgid "Advanced customization options for product page."
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: admin/admin-controller.php:1514
|
480 |
+
#: admin/admin-controller.php:1561
|
481 |
+
msgid "Advanced options"
|
482 |
+
msgstr ""
|
483 |
+
|
484 |
+
#: admin/admin-controller.php:1520
|
485 |
+
#: admin/admin-controller.php:1567
|
486 |
+
msgid "Button position"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: admin/admin-controller.php:1524
|
490 |
+
msgid "Select the position of Express Checkout button. This option will work only for Product page."
|
491 |
+
msgstr ""
|
492 |
+
|
493 |
+
#: admin/admin-controller.php:1527
|
494 |
+
msgid "Above Add to Cart"
|
495 |
+
msgstr ""
|
496 |
+
|
497 |
+
#: admin/admin-controller.php:1528
|
498 |
+
msgid "Below Add to Cart"
|
499 |
+
msgstr ""
|
500 |
+
|
501 |
+
#: admin/admin-controller.php:1533
|
502 |
+
#: admin/admin-controller.php:1598
|
503 |
+
msgid "Button width"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: admin/admin-controller.php:1537
|
507 |
+
#: admin/admin-controller.php:1602
|
508 |
+
msgid "Select width for button (in px). Minimum width should be 150px, Default width 100%"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: admin/admin-controller.php:1542
|
512 |
+
msgid "Responsive behaviour"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#. translators: HTML Markup
|
516 |
+
#: admin/admin-controller.php:1544
|
517 |
+
msgid "If checked the Express Checkout button will stick%1$1sat bottom of screen on responsive devices."
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: admin/admin-controller.php:1555
|
521 |
+
msgid "Checkout page options"
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: admin/admin-controller.php:1557
|
525 |
+
msgid "Advanced customization options for Checkout page."
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: admin/admin-controller.php:1571
|
529 |
+
msgid "Select the position of Express Checkout button. This option will work only for Checkout page."
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: admin/admin-controller.php:1574
|
533 |
+
msgid "Above checkout form"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: admin/admin-controller.php:1575
|
537 |
+
msgid "Above billing details"
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: admin/admin-controller.php:1580
|
541 |
+
#: gateway/local-gateway.php:121
|
542 |
+
#: gateway/stripe/card-payments.php:105
|
543 |
+
msgid "Title"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: admin/admin-controller.php:1584
|
547 |
+
msgid "Add a title above Express Checkout button on Checkout page."
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: admin/admin-controller.php:1589
|
551 |
+
msgid "Tagline"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: admin/admin-controller.php:1593
|
555 |
+
msgid "Add a tagline below the title on Checkout page."
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: admin/admin-controller.php:1607
|
559 |
+
msgid "Alignment"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: admin/admin-controller.php:1611
|
563 |
+
msgid "This setting will align title, tagline and button based on selection on Checkout page."
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: admin/admin-controller.php:1614
|
567 |
+
msgid "Left"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: admin/admin-controller.php:1615
|
571 |
+
msgid "Center"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: admin/admin-controller.php:1616
|
575 |
+
msgid "Right"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: admin/admin-controller.php:1625
|
579 |
+
msgid "Add separator text for Checkout page. If empty will show default separator text."
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: autoloader.php:129
|
583 |
+
msgid "Settings"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: autoloader.php:130
|
587 |
+
msgid "Documentation"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#. translators: 1$-2$: opening and closing <strong> tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin.
|
591 |
+
#: autoloader.php:175
|
592 |
+
msgid "%1$sStripe Gateway for WooCommerce is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for Stripe Gateway for WooCommerce to work. Please %5$sinstall & activate WooCommerce »%6$s"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#. translators: 1 - 4 html entities
|
596 |
+
#: compatibility/apple-pay.php:167
|
597 |
+
msgid "Unable to create domain association folder to domain root due to file permissions. Please create %1$1s.well-known%2$2s directory under domain root and place %3$3sdomain verification file%4$4s under it and refresh."
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: compatibility/apple-pay.php:175
|
601 |
+
msgid "Unable to copy domain association file to domain root."
|
602 |
+
msgstr ""
|
603 |
+
|
604 |
+
#: compatibility/apple-pay.php:243
|
605 |
+
msgid "We cannot find live secret key in database, Live secret key is required for Apple Pay domain verification. "
|
606 |
+
msgstr ""
|
607 |
+
|
608 |
+
#: compatibility/apple-pay.php:252
|
609 |
+
msgid "Apple Pay domain verification successful."
|
610 |
+
msgstr ""
|
611 |
+
|
612 |
+
#: compatibility/apple-pay.php:261
|
613 |
+
msgid "SSL is required for Express Pay Checkout."
|
614 |
+
msgstr ""
|
615 |
+
|
616 |
+
#. translators: %1s - %3s HTML Entities, %4s Error Message
|
617 |
+
#: compatibility/apple-pay.php:271
|
618 |
+
msgid "%1$1sApple Pay domain verification failed! %2$2sReason%3$3s: %4$4s"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: gateway/abstract-payment-gateway.php:71
|
622 |
+
msgid "Order "
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: gateway/abstract-payment-gateway.php:262
|
626 |
+
#: gateway/abstract-payment-gateway.php:263
|
627 |
+
#: gateway/abstract-payment-gateway.php:266
|
628 |
+
#: gateway/stripe/webhook.php:336
|
629 |
+
msgid "Reason : "
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: gateway/abstract-payment-gateway.php:262
|
633 |
+
#: gateway/abstract-payment-gateway.php:263
|
634 |
+
#: gateway/abstract-payment-gateway.php:266
|
635 |
+
#: gateway/stripe/webhook.php:336
|
636 |
+
#: gateway/stripe/webhook.php:337
|
637 |
+
msgid "Amount : "
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: gateway/abstract-payment-gateway.php:262
|
641 |
+
#: gateway/abstract-payment-gateway.php:263
|
642 |
+
msgid "Status : "
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: gateway/abstract-payment-gateway.php:262
|
646 |
+
#: gateway/abstract-payment-gateway.php:263
|
647 |
+
#: gateway/stripe/webhook.php:336
|
648 |
+
msgid "Transaction ID : "
|
649 |
+
msgstr ""
|
650 |
+
|
651 |
+
#: gateway/abstract-payment-gateway.php:263
|
652 |
+
msgid "Refund initiated: "
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: gateway/abstract-payment-gateway.php:266
|
656 |
+
msgid " Status : Failed "
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#. translators: transaction id
|
660 |
+
#: gateway/abstract-payment-gateway.php:310
|
661 |
+
msgid "Stripe charge awaiting payment: %s."
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#. translators: transaction id
|
665 |
+
#: gateway/abstract-payment-gateway.php:317
|
666 |
+
#: gateway/stripe/webhook.php:253
|
667 |
+
msgid "Stripe charge complete (Charge ID: %s)"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: gateway/abstract-payment-gateway.php:323
|
671 |
+
msgid "Payment processing failed. Please retry."
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#. translators: transaction id
|
675 |
+
#: gateway/abstract-payment-gateway.php:335
|
676 |
+
msgid "Stripe charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment."
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: gateway/abstract-payment-gateway.php:387
|
680 |
+
msgid "An error has occurred internally, due to which you are not redirected to the order received page."
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: gateway/abstract-payment-gateway.php:532
|
684 |
+
#: gateway/abstract-payment-gateway.php:533
|
685 |
+
msgid "Uncaptured Amount cannot be refunded"
|
686 |
+
msgstr ""
|
687 |
+
|
688 |
+
#: gateway/abstract-payment-gateway.php:589
|
689 |
+
msgid "Fee charged by stripe for this order."
|
690 |
+
msgstr ""
|
691 |
+
|
692 |
+
#: gateway/abstract-payment-gateway.php:590
|
693 |
+
msgid "Stripe Fee:"
|
694 |
+
msgstr ""
|
695 |
+
|
696 |
+
#: gateway/abstract-payment-gateway.php:599
|
697 |
+
msgid "Net amount that will be credited to your Stripe bank account."
|
698 |
+
msgstr ""
|
699 |
+
|
700 |
+
#: gateway/abstract-payment-gateway.php:600
|
701 |
+
msgid "Stripe Payout:"
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: gateway/abstract-payment-gateway.php:679
|
705 |
+
msgid "Unable to update stripe transaction balance"
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#. translators: %s: except countries.
|
709 |
+
#: gateway/local-gateway.php:93
|
710 |
+
msgid " & billing country is not <strong>%s</strong>"
|
711 |
+
msgstr ""
|
712 |
+
|
713 |
+
#. translators: %s: specificcountries.
|
714 |
+
#: gateway/local-gateway.php:96
|
715 |
+
msgid " & billing country is <strong>%s</strong>"
|
716 |
+
msgstr ""
|
717 |
+
|
718 |
+
#. translators: %s: Method title.
|
719 |
+
#: gateway/local-gateway.php:117
|
720 |
+
msgid "Enable %s"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#. translators: %s: Method title.
|
724 |
+
#: gateway/local-gateway.php:124
|
725 |
+
msgid "Title of the %s gateway."
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#: gateway/local-gateway.php:129
|
729 |
+
#: gateway/stripe/card-payments.php:112
|
730 |
+
msgid "Description"
|
731 |
+
msgstr ""
|
732 |
+
|
733 |
+
#. translators: gateway title
|
734 |
+
#: gateway/local-gateway.php:133
|
735 |
+
msgid "Description of the %1s gateway."
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: gateway/local-gateway.php:137
|
739 |
+
msgid "Order button label"
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: gateway/local-gateway.php:139
|
743 |
+
msgid "Customize label for order button."
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#. translators: %s: Method title.
|
747 |
+
#: gateway/local-gateway.php:141
|
748 |
+
msgid "Pay with %s"
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: gateway/local-gateway.php:145
|
752 |
+
msgid "Selling location(s)"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#. translators: gateway title
|
756 |
+
#: gateway/local-gateway.php:152
|
757 |
+
msgid "Choose the countries where you wish to display the %1$s gateway. The gateway will appear when the customer's billing country is in the chosen countries."
|
758 |
+
msgstr ""
|
759 |
+
|
760 |
+
#: gateway/local-gateway.php:154
|
761 |
+
msgid "Sell to all countries"
|
762 |
+
msgstr ""
|
763 |
+
|
764 |
+
#: gateway/local-gateway.php:155
|
765 |
+
#: gateway/local-gateway.php:160
|
766 |
+
msgid "Sell to all countries, except for…"
|
767 |
+
msgstr ""
|
768 |
+
|
769 |
+
#: gateway/local-gateway.php:156
|
770 |
+
#: gateway/local-gateway.php:173
|
771 |
+
msgid "Sell to specific countries"
|
772 |
+
msgstr ""
|
773 |
+
|
774 |
+
#: gateway/local-gateway.php:166
|
775 |
+
msgid "When the billing country matches one of these values, the payment method will be hidden on the Checkout page."
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: gateway/local-gateway.php:179
|
779 |
+
msgid "When the billing country matches one of these values, the payment method will be shown on the Checkout page."
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
+
#: gateway/local-gateway.php:232
|
783 |
+
msgid "Choose countries / regions…"
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: gateway/local-gateway.php:233
|
787 |
+
msgid "Country / Region"
|
788 |
+
msgstr ""
|
789 |
+
|
790 |
+
#: gateway/local-gateway.php:245
|
791 |
+
msgid "Select all"
|
792 |
+
msgstr ""
|
793 |
+
|
794 |
+
#: gateway/local-gateway.php:246
|
795 |
+
msgid "Select none"
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#. translators: %1$s Webhook secret page link, %3$s Payment method, %4$s Webhook guide page link
|
799 |
+
#: gateway/local-gateway.php:335
|
800 |
+
msgid "Stripe recommends using the %1$swebhook%2$s for %3$s. %4$sWebhook Guide%5$s "
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#. translators: %1$s Payment method, %2$s List of supported currencies
|
804 |
+
#: gateway/local-gateway.php:345
|
805 |
+
msgid "%1$s is enabled - it requires store currency to be set to %2$s."
|
806 |
+
msgstr ""
|
807 |
+
|
808 |
+
#. translators: %s: supported currency.
|
809 |
+
#: gateway/local-gateway.php:370
|
810 |
+
msgid "This gateway will appear when store currency is <strong>%s</strong>."
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#. translators: HTML Entities.
|
814 |
+
#: gateway/local-gateway.php:384
|
815 |
+
msgid "%1$1s%2$2sTest Mode Enabled%3$3s : You will be redirected to an authorization page hosted by Stripe."
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#. translators: %1$1s method title, %2$2s order id, %3$3s order total amount
|
819 |
+
#: gateway/local-gateway.php:429
|
820 |
+
msgid "Begin processing payment with %1$1s for order %2$2s for the amount of %3$3s"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: gateway/local-gateway.php:446
|
824 |
+
msgid "Contact seller. "
|
825 |
+
msgstr ""
|
826 |
+
|
827 |
+
#: gateway/local-gateway.php:449
|
828 |
+
msgid "Store currency doesn't match stripe currency. "
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#. translators: order id
|
832 |
+
#: gateway/local-gateway.php:552
|
833 |
+
#: gateway/stripe/card-payments.php:637
|
834 |
+
msgid "Payment successful Order id - %1s"
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#. translators: transaction id
|
838 |
+
#: gateway/local-gateway.php:556
|
839 |
+
#: gateway/stripe/card-payments.php:641
|
840 |
+
msgid "Charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization. Attempting to refund the order in part or in full will release the authorization and cancel the payment."
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#. translators: transaction id
|
844 |
+
#: gateway/local-gateway.php:558
|
845 |
+
#: gateway/stripe/card-payments.php:643
|
846 |
+
msgid "Charge authorized Order id - %1s"
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: gateway/local-gateway.php:561
|
850 |
+
#: gateway/stripe/card-payments.php:646
|
851 |
+
msgid "Payment Status : "
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: gateway/local-gateway.php:561
|
855 |
+
#: gateway/stripe/card-payments.php:646
|
856 |
+
msgid " Source : "
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
+
#. translators: %s: payment fail message.
|
860 |
+
#: gateway/local-gateway.php:613
|
861 |
+
msgid "Payment failed. %s"
|
862 |
+
msgstr ""
|
863 |
+
|
864 |
+
#. translators: HTML Entities.
|
865 |
+
#: gateway/stripe/alipay.php:69
|
866 |
+
msgid "%1$sEUR%2$s is supported only for billing country %1$sDenmark (DK), Norway (NO), Sweden (SE) & Switzerland (CH)%2$s."
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#. translators: %1$s: Break, %2$s: Gateway appear message, %3$s: Break, %4$s: Gateway appear message currency wise, %4$s: HTML entities
|
870 |
+
#: gateway/stripe/alipay.php:73
|
871 |
+
msgid "Accept payment using Alipay. %1$s %2$s %3$s %4$s"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: gateway/stripe/alipay.php:146
|
875 |
+
#: gateway/stripe/klarna.php:181
|
876 |
+
msgid "Add Payment"
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: gateway/stripe/card-payments.php:48
|
880 |
+
#: wizard/build/app.js:895
|
881 |
+
msgid "Stripe Card Processing"
|
882 |
+
msgstr ""
|
883 |
+
|
884 |
+
#: gateway/stripe/card-payments.php:49
|
885 |
+
msgid "Accepts payments via Credit/Debit Cards"
|
886 |
+
msgstr ""
|
887 |
+
|
888 |
+
#: gateway/stripe/card-payments.php:101
|
889 |
+
msgid "Enable Stripe Gateway"
|
890 |
+
msgstr ""
|
891 |
+
|
892 |
+
#: gateway/stripe/card-payments.php:107
|
893 |
+
msgid "Title of Card Element"
|
894 |
+
msgstr ""
|
895 |
+
|
896 |
+
#: gateway/stripe/card-payments.php:108
|
897 |
+
msgid "Credit Card (Stripe)"
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#: gateway/stripe/card-payments.php:115
|
901 |
+
msgid "Description on Card Elements for Live mode"
|
902 |
+
msgstr ""
|
903 |
+
|
904 |
+
#: gateway/stripe/card-payments.php:116
|
905 |
+
msgid "Pay with your credit card via Stripe"
|
906 |
+
msgstr ""
|
907 |
+
|
908 |
+
#: gateway/stripe/card-payments.php:120
|
909 |
+
msgid "Statement Descriptor"
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#: gateway/stripe/card-payments.php:122
|
913 |
+
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."
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: gateway/stripe/card-payments.php:127
|
917 |
+
#: gateway/stripe/klarna.php:139
|
918 |
+
msgid "Charge Type"
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: gateway/stripe/card-payments.php:129
|
922 |
+
#: gateway/stripe/klarna.php:141
|
923 |
+
msgid "Select how to charge Order"
|
924 |
+
msgstr ""
|
925 |
+
|
926 |
+
#: gateway/stripe/card-payments.php:132
|
927 |
+
#: gateway/stripe/klarna.php:144
|
928 |
+
msgid "Charge"
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: gateway/stripe/card-payments.php:133
|
932 |
+
#: gateway/stripe/klarna.php:145
|
933 |
+
msgid "Authorize"
|
934 |
+
msgstr ""
|
935 |
+
|
936 |
+
#: gateway/stripe/card-payments.php:138
|
937 |
+
msgid "Enable Payment via Saved Cards"
|
938 |
+
msgstr ""
|
939 |
+
|
940 |
+
#: gateway/stripe/card-payments.php:139
|
941 |
+
msgid "Saved Cards"
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: gateway/stripe/card-payments.php:141
|
945 |
+
msgid "Save card details for future orders"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: gateway/stripe/card-payments.php:146
|
949 |
+
msgid "Enable Inline Credit Card Form"
|
950 |
+
msgstr ""
|
951 |
+
|
952 |
+
#: gateway/stripe/card-payments.php:147
|
953 |
+
msgid "Inline Credit Card Form"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: gateway/stripe/card-payments.php:149
|
957 |
+
msgid "Use inline credit card for card payments"
|
958 |
+
msgstr ""
|
959 |
+
|
960 |
+
#: gateway/stripe/card-payments.php:154
|
961 |
+
msgid "Allowed Cards"
|
962 |
+
msgstr ""
|
963 |
+
|
964 |
+
#: gateway/stripe/card-payments.php:157
|
965 |
+
msgid "Accepts payments using selected cards. If empty all stripe cards are accepted."
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: gateway/stripe/card-payments.php:171
|
969 |
+
msgid "Order Status"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: gateway/stripe/card-payments.php:175
|
973 |
+
msgid "Processing"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: gateway/stripe/card-payments.php:176
|
977 |
+
msgid "On Hold"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: gateway/stripe/card-payments.php:177
|
981 |
+
msgid "Completed"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: gateway/stripe/card-payments.php:181
|
985 |
+
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."
|
986 |
+
msgstr ""
|
987 |
+
|
988 |
+
#: gateway/stripe/card-payments.php:184
|
989 |
+
msgid "Order Button Label"
|
990 |
+
msgstr ""
|
991 |
+
|
992 |
+
#: gateway/stripe/card-payments.php:186
|
993 |
+
msgid "Customize label for Order button"
|
994 |
+
msgstr ""
|
995 |
+
|
996 |
+
#: gateway/stripe/card-payments.php:187
|
997 |
+
msgid "Pay via Stripe"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#. translators: %1$1s order id, %2$2s order total amount
|
1001 |
+
#: gateway/stripe/card-payments.php:235
|
1002 |
+
msgid "Begin processing payment with new payment method for order %1$1s for the amount of %2$2s"
|
1003 |
+
msgstr ""
|
1004 |
+
|
1005 |
+
#. translators: %1$1s order id, %2$2s order total amount
|
1006 |
+
#: gateway/stripe/card-payments.php:290
|
1007 |
+
msgid "Begin processing payment with saved payment method for order %1$1s for the amount of %2$2s"
|
1008 |
+
msgstr ""
|
1009 |
+
|
1010 |
+
#: gateway/stripe/card-payments.php:402
|
1011 |
+
msgid "There was a problem adding the payment method."
|
1012 |
+
msgstr ""
|
1013 |
+
|
1014 |
+
#. translators: error msg
|
1015 |
+
#: gateway/stripe/card-payments.php:404
|
1016 |
+
#: gateway/stripe/card-payments.php:420
|
1017 |
+
#: gateway/stripe/card-payments.php:437
|
1018 |
+
msgid "Add payment method Error: %1$1s"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: gateway/stripe/card-payments.php:417
|
1022 |
+
msgid "Invalid stripe source"
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: gateway/stripe/card-payments.php:434
|
1026 |
+
msgid "Unble to attach payment method to customer"
|
1027 |
+
msgstr ""
|
1028 |
+
|
1029 |
+
#: gateway/stripe/card-payments.php:443
|
1030 |
+
msgid "New payment method added successfully"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#. translators: %1$1s order id, %2$2s token id
|
1034 |
+
#: gateway/stripe/card-payments.php:553
|
1035 |
+
msgid "Payment method tokenized for Order id - %1$1s with token id - %2$2s"
|
1036 |
+
msgstr ""
|
1037 |
+
|
1038 |
+
#. translators: %1$1s, %2$2s: HTML Markup
|
1039 |
+
#: gateway/stripe/card-payments.php:732
|
1040 |
+
msgid "Live Stripe.js integrations must use HTTPS. %1$1s For more information:%2$2s"
|
1041 |
+
msgstr ""
|
1042 |
+
|
1043 |
+
#: gateway/stripe/card-payments.php:762
|
1044 |
+
msgid "Enter Card Details"
|
1045 |
+
msgstr ""
|
1046 |
+
|
1047 |
+
#: gateway/stripe/card-payments.php:765
|
1048 |
+
msgid "Expiry Date"
|
1049 |
+
msgstr ""
|
1050 |
+
|
1051 |
+
#: gateway/stripe/card-payments.php:769
|
1052 |
+
msgid "CVC"
|
1053 |
+
msgstr ""
|
1054 |
+
|
1055 |
+
#: gateway/stripe/card-payments.php:774
|
1056 |
+
msgid "Save Card for Future Payments"
|
1057 |
+
msgstr ""
|
1058 |
+
|
1059 |
+
#. translators: %1$1s - %6$6s: HTML Markup
|
1060 |
+
#: gateway/stripe/card-payments.php:780
|
1061 |
+
msgid "%1$1s Test Mode Enabled %2$2s : Use demo card 4242424242424242 with any future date and CVV. %3$3s Check more %4$4sDemo Cards%5$5s"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: gateway/stripe/frontend-scripts.php:103
|
1065 |
+
msgid "MasterCard"
|
1066 |
+
msgstr ""
|
1067 |
+
|
1068 |
+
#: gateway/stripe/frontend-scripts.php:104
|
1069 |
+
msgid "Visa"
|
1070 |
+
msgstr ""
|
1071 |
+
|
1072 |
+
#: gateway/stripe/frontend-scripts.php:105
|
1073 |
+
msgid "American Express"
|
1074 |
+
msgstr ""
|
1075 |
+
|
1076 |
+
#: gateway/stripe/frontend-scripts.php:106
|
1077 |
+
msgid "Discover"
|
1078 |
+
msgstr ""
|
1079 |
+
|
1080 |
+
#: gateway/stripe/frontend-scripts.php:107
|
1081 |
+
msgid "JCB"
|
1082 |
+
msgstr ""
|
1083 |
+
|
1084 |
+
#: gateway/stripe/frontend-scripts.php:108
|
1085 |
+
msgid "Diners Club"
|
1086 |
+
msgstr ""
|
1087 |
+
|
1088 |
+
#: gateway/stripe/frontend-scripts.php:109
|
1089 |
+
msgid "UnionPay"
|
1090 |
+
msgstr ""
|
1091 |
+
|
1092 |
+
#: gateway/stripe/frontend-scripts.php:111
|
1093 |
+
msgid "is not allowed"
|
1094 |
+
msgstr ""
|
1095 |
+
|
1096 |
+
#: gateway/stripe/frontend-scripts.php:113
|
1097 |
+
msgid "Please select a bank to proceed."
|
1098 |
+
msgstr ""
|
1099 |
+
|
1100 |
+
#. translators: %1$s: Break, %2$s: HTML entities
|
1101 |
+
#: gateway/stripe/ideal.php:70
|
1102 |
+
msgid "Accept payment using iDEAL. %1$s %2$s"
|
1103 |
+
msgstr ""
|
1104 |
+
|
1105 |
+
#. translators: HTML Entities.
|
1106 |
+
#: gateway/stripe/klarna.php:77
|
1107 |
+
msgid "Klarna is supported only for billing country %1$sUnited States (US), Austria (AT), Finland (FI), Germany (DE), Netherlands (NL), Denmark (DK), Norway (NO), Sweden (SE), United Kingdom (UK) (GB), Belgium (BE), Spain (ES), Italy (IT)%2$s."
|
1108 |
+
msgstr ""
|
1109 |
+
|
1110 |
+
#. translators: %1$s: Break, %2$s: Gateway appear message, %3$s: Break, %4$s: Gateway appear message currency wise, %4$s: HTML entities
|
1111 |
+
#: gateway/stripe/klarna.php:81
|
1112 |
+
msgid "Accept payment using Klarna. %1$s %2$s %3$s %4$s"
|
1113 |
+
msgstr ""
|
1114 |
+
|
1115 |
+
#: gateway/stripe/klarna.php:207
|
1116 |
+
msgid "Test mode sms:"
|
1117 |
+
msgstr ""
|
1118 |
+
|
1119 |
+
#. translators: %1$s: Break, %2$s: HTML entities
|
1120 |
+
#: gateway/stripe/p24.php:70
|
1121 |
+
msgid "Accept payment using Przelewy24. %1$s %2$s"
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: gateway/stripe/payment-request-api.php:268
|
1125 |
+
msgid "Empty cart"
|
1126 |
+
msgstr ""
|
1127 |
+
|
1128 |
+
#: gateway/stripe/payment-request-api.php:363
|
1129 |
+
msgid "Sign up Fee"
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: gateway/stripe/payment-request-api.php:375
|
1133 |
+
#: gateway/stripe/payment-request-api.php:476
|
1134 |
+
#: gateway/stripe/payment-request-api.php:649
|
1135 |
+
msgid "Tax"
|
1136 |
+
msgstr ""
|
1137 |
+
|
1138 |
+
#: gateway/stripe/payment-request-api.php:383
|
1139 |
+
#: gateway/stripe/payment-request-api.php:483
|
1140 |
+
#: gateway/stripe/payment-request-api.php:657
|
1141 |
+
msgid "Shipping"
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: gateway/stripe/payment-request-api.php:390
|
1145 |
+
#: gateway/stripe/payment-request-api.php:664
|
1146 |
+
msgid "Pending"
|
1147 |
+
msgstr ""
|
1148 |
+
|
1149 |
+
#: gateway/stripe/payment-request-api.php:490
|
1150 |
+
msgid "Discount"
|
1151 |
+
msgstr ""
|
1152 |
+
|
1153 |
+
#. translators: %d is the product Id
|
1154 |
+
#: gateway/stripe/payment-request-api.php:611
|
1155 |
+
msgid "Product with the ID (%d) cannot be found."
|
1156 |
+
msgstr ""
|
1157 |
+
|
1158 |
+
#. translators: 1: product name 2: quantity in stock
|
1159 |
+
#: gateway/stripe/payment-request-api.php:632
|
1160 |
+
msgid "You cannot add that amount of \"%1$s\"; to the cart because there is not enough stock (%2$s remaining)."
|
1161 |
+
msgstr ""
|
1162 |
+
|
1163 |
+
#: gateway/stripe/payment-request-api.php:761
|
1164 |
+
#: gateway/stripe/payment-request-api.php:778
|
1165 |
+
msgid "Unable to find shipping method for address."
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: gateway/stripe/payment-request-api.php:766
|
1169 |
+
msgid "Unable to provide shipping options for Payment Requests."
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: gateway/stripe/stripe-api.php:61
|
1173 |
+
msgid "Stripe not initialized"
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#. translators: time, status
|
1177 |
+
#: gateway/stripe/webhook.php:75
|
1178 |
+
msgid "Last webhook call was %1$1s. Status : %2$2s"
|
1179 |
+
msgstr ""
|
1180 |
+
|
1181 |
+
#. translators: error message
|
1182 |
+
#: gateway/stripe/webhook.php:81
|
1183 |
+
msgid "Reason : %1s"
|
1184 |
+
msgstr ""
|
1185 |
+
|
1186 |
+
#. translators: time, status, reason
|
1187 |
+
#: gateway/stripe/webhook.php:83
|
1188 |
+
msgid "Last webhook call was %1$1s. Status : %2$2s. %3$3s"
|
1189 |
+
msgstr ""
|
1190 |
+
|
1191 |
+
#. translators: timestamp
|
1192 |
+
#: gateway/stripe/webhook.php:87
|
1193 |
+
#: gateway/stripe/webhook.php:99
|
1194 |
+
msgid "No webhook call since %1s."
|
1195 |
+
msgstr ""
|
1196 |
+
|
1197 |
+
#. translators: order id
|
1198 |
+
#: gateway/stripe/webhook.php:245
|
1199 |
+
msgid "Stripe charge partially captured with amount %1$1s Order id - %2$2s"
|
1200 |
+
msgstr ""
|
1201 |
+
|
1202 |
+
#. translators: partial captured amount
|
1203 |
+
#: gateway/stripe/webhook.php:247
|
1204 |
+
msgid "This charge was partially captured via Stripe Dashboard with the amount : %s"
|
1205 |
+
msgstr ""
|
1206 |
+
|
1207 |
+
#. translators: order id
|
1208 |
+
#: gateway/stripe/webhook.php:251
|
1209 |
+
msgid "Stripe charge completely captured Order id - %1s"
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#. translators: amount (including currency symbol)
|
1213 |
+
#: gateway/stripe/webhook.php:300
|
1214 |
+
msgid "Pre-Authorization for %s voided from the Stripe Dashboard."
|
1215 |
+
msgstr ""
|
1216 |
+
|
1217 |
+
#: gateway/stripe/webhook.php:313
|
1218 |
+
msgid "Refunded via stripe dashboard"
|
1219 |
+
msgstr ""
|
1220 |
+
|
1221 |
+
#: gateway/stripe/webhook.php:336
|
1222 |
+
msgid "Status : Success"
|
1223 |
+
msgstr ""
|
1224 |
+
|
1225 |
+
#: gateway/stripe/webhook.php:337
|
1226 |
+
msgid " Transaction ID : "
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
+
#: gateway/stripe/webhook.php:358
|
1230 |
+
msgid "This order is under dispute. Please respond via stripe dashboard."
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#: gateway/stripe/webhook.php:382
|
1234 |
+
msgid "The disputed order lost or accepted."
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#: gateway/stripe/webhook.php:386
|
1238 |
+
msgid "The disputed order resolved in your favour."
|
1239 |
+
msgstr ""
|
1240 |
+
|
1241 |
+
#: gateway/stripe/webhook.php:390
|
1242 |
+
msgid "The inquiry or retrieval closed."
|
1243 |
+
msgstr ""
|
1244 |
+
|
1245 |
+
#. translators: transaction id, order id
|
1246 |
+
#: gateway/stripe/webhook.php:423
|
1247 |
+
msgid "Stripe PaymentIntent %1$1s succeeded for order %2$2s"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#. translators: The error message that was received from Stripe.
|
1251 |
+
#: gateway/stripe/webhook.php:444
|
1252 |
+
msgid "Reason: %s"
|
1253 |
+
msgstr ""
|
1254 |
+
|
1255 |
+
#. translators: The error message that was received from Stripe.
|
1256 |
+
#: gateway/stripe/webhook.php:446
|
1257 |
+
msgid "Stripe SCA authentication failed. %s"
|
1258 |
+
msgstr ""
|
1259 |
+
|
1260 |
+
#: gateway/stripe/webhook.php:468
|
1261 |
+
msgid "This order is under review. Please respond via stripe dashboard."
|
1262 |
+
msgstr ""
|
1263 |
+
|
1264 |
+
#. translators: Review reson from stripe
|
1265 |
+
#: gateway/stripe/webhook.php:490
|
1266 |
+
msgid "Review for this order has been resolved. Reason: %s"
|
1267 |
+
msgstr ""
|
1268 |
+
|
1269 |
+
#: inc/traits/subscriptions.php:61
|
1270 |
+
msgid "Update the Payment Method used for all of my active subscriptions."
|
1271 |
+
msgstr ""
|
1272 |
+
|
1273 |
+
#: inc/traits/subscriptions.php:217
|
1274 |
+
msgid "Customer not found"
|
1275 |
+
msgstr ""
|
1276 |
+
|
1277 |
+
#: inc/traits/subscriptions.php:241
|
1278 |
+
msgid "Sorry, we are unable to process your payment at this time. Please retry later."
|
1279 |
+
msgstr ""
|
1280 |
+
|
1281 |
+
#: inc/traits/subscriptions.php:260
|
1282 |
+
msgid "This transaction requires authentication."
|
1283 |
+
msgstr ""
|
1284 |
+
|
1285 |
+
#. translators: %s is the charge Id
|
1286 |
+
#. translators: %s is the stripe charge Id
|
1287 |
+
#: inc/traits/subscriptions.php:269
|
1288 |
+
#: inc/traits/subscriptions.php:650
|
1289 |
+
msgid "Stripe charge awaiting authentication by user: %s."
|
1290 |
+
msgstr ""
|
1291 |
+
|
1292 |
+
#: inc/traits/subscriptions.php:579
|
1293 |
+
msgid "A \"Stripe Customer ID\" value is required."
|
1294 |
+
msgstr ""
|
1295 |
+
|
1296 |
+
#: inc/traits/subscriptions.php:582
|
1297 |
+
msgid "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with \"cus_\"."
|
1298 |
+
msgstr ""
|
1299 |
+
|
1300 |
+
#: inc/traits/subscriptions.php:592
|
1301 |
+
msgid "Invalid source ID. A valid source \"Stripe Source ID\" must begin with \"src_\", \"pm_\", or \"card_\"."
|
1302 |
+
msgstr ""
|
1303 |
+
|
1304 |
+
#: inc/traits/subscriptions.php:769
|
1305 |
+
msgid "Invalid payment method. Please input a new card number."
|
1306 |
+
msgstr ""
|
1307 |
+
|
1308 |
+
#: wizard/build/app.js:891
|
1309 |
+
msgid "Wooho!!"
|
1310 |
+
msgstr ""
|
1311 |
+
|
1312 |
+
#: wizard/build/app.js:892
|
1313 |
+
msgid "You are almost done."
|
1314 |
+
msgstr ""
|
1315 |
+
|
1316 |
+
#: wizard/build/app.js:895
|
1317 |
+
msgid "Since you have enabled"
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: wizard/build/app.js:895
|
1321 |
+
msgid " We recommend you to enable"
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: wizard/build/app.js:895
|
1325 |
+
msgid "feature"
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: wizard/build/app.js:896
|
1329 |
+
msgid "Express Checkout generates more conversions!!"
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#: wizard/build/app.js:906
|
1333 |
+
#: wizard/build/app.js:1128
|
1334 |
+
msgid "Enabling…"
|
1335 |
+
msgstr ""
|
1336 |
+
|
1337 |
+
#: wizard/build/app.js:918
|
1338 |
+
msgid "Skip Express Checkout"
|
1339 |
+
msgstr ""
|
1340 |
+
|
1341 |
+
#: wizard/build/app.js:937
|
1342 |
+
msgid "Failed!!"
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: wizard/build/app.js:940
|
1346 |
+
msgid "Unfortunately Connection to Stripe failed."
|
1347 |
+
msgstr ""
|
1348 |
+
|
1349 |
+
#: wizard/build/app.js:945
|
1350 |
+
msgid "Try Again"
|
1351 |
+
msgstr ""
|
1352 |
+
|
1353 |
+
#: wizard/build/app.js:979
|
1354 |
+
msgid "Let's Connect"
|
1355 |
+
msgstr ""
|
1356 |
+
|
1357 |
+
#: wizard/build/app.js:980
|
1358 |
+
msgid "with Stripe"
|
1359 |
+
msgstr ""
|
1360 |
+
|
1361 |
+
#: wizard/build/app.js:983
|
1362 |
+
msgid "Checkout Plugins"
|
1363 |
+
msgstr ""
|
1364 |
+
|
1365 |
+
#: wizard/build/app.js:983
|
1366 |
+
msgid "recommends to connect with"
|
1367 |
+
msgstr ""
|
1368 |
+
|
1369 |
+
#: wizard/build/app.js:983
|
1370 |
+
msgid "Stripe connect."
|
1371 |
+
msgstr ""
|
1372 |
+
|
1373 |
+
#: wizard/build/app.js:984
|
1374 |
+
msgid "One click onboarding solution provided by"
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: wizard/build/app.js:984
|
1378 |
+
msgid "Stripe."
|
1379 |
+
msgstr ""
|
1380 |
+
|
1381 |
+
#: wizard/build/app.js:991
|
1382 |
+
msgid "Connecting…"
|
1383 |
+
msgstr ""
|
1384 |
+
|
1385 |
+
#: wizard/build/app.js:1002
|
1386 |
+
msgid "Leave onboarding process"
|
1387 |
+
msgstr ""
|
1388 |
+
|
1389 |
+
#: wizard/build/app.js:1069
|
1390 |
+
msgid "Congratulations!!"
|
1391 |
+
msgstr ""
|
1392 |
+
|
1393 |
+
#: wizard/build/app.js:1069
|
1394 |
+
msgid "You are connected to Stripe successfully."
|
1395 |
+
msgstr ""
|
1396 |
+
|
1397 |
+
#: wizard/build/app.js:1070
|
1398 |
+
msgid "Let's enable gateways"
|
1399 |
+
msgstr ""
|
1400 |
+
|
1401 |
+
#: wizard/build/app.js:1085
|
1402 |
+
msgid "Recommended"
|
1403 |
+
msgstr ""
|
1404 |
+
|
1405 |
+
#: wizard/build/app.js:1090
|
1406 |
+
msgid "Works with all currencies"
|
1407 |
+
msgstr ""
|
1408 |
+
|
1409 |
+
#: wizard/build/app.js:1090
|
1410 |
+
msgid "Works with "
|
1411 |
+
msgstr ""
|
1412 |
+
|
1413 |
+
#: wizard/build/app.js:1133
|
1414 |
+
msgid "Enable Gateways"
|
1415 |
+
msgstr ""
|
1416 |
+
|
1417 |
+
#: wizard/build/app.js:1164
|
1418 |
+
msgid "Great!!"
|
1419 |
+
msgstr ""
|
1420 |
+
|
1421 |
+
#: wizard/build/app.js:1167
|
1422 |
+
msgid "Your store is all set to accept payment."
|
1423 |
+
msgstr ""
|
1424 |
+
|
1425 |
+
#: wizard/build/app.js:1168
|
1426 |
+
msgid "We provide lots of customization options to match your needs, don't forget to explore them."
|
1427 |
+
msgstr ""
|
1428 |
+
|
1429 |
+
#: wizard/build/app.js:1174
|
1430 |
+
msgid "Let's Customize…"
|
1431 |
+
msgstr ""
|
1432 |
+
|
1433 |
+
#: wizard/build/app.js:1179
|
1434 |
+
msgid "Let's Customize"
|
1435 |
+
msgstr ""
|
1436 |
+
|
1437 |
+
#: wizard/build/app.js:1245
|
1438 |
+
msgid "Missing"
|
1439 |
+
msgstr ""
|
1440 |
+
|
1441 |
+
#: wizard/build/app.js:1246
|
1442 |
+
msgid "WooCoomerce"
|
1443 |
+
msgstr ""
|
1444 |
+
|
1445 |
+
#: wizard/build/app.js:1249
|
1446 |
+
msgid "Checkout Plugins - Stripe for WooCoomerce"
|
1447 |
+
msgstr ""
|
1448 |
+
|
1449 |
+
#: wizard/build/app.js:1249
|
1450 |
+
msgid "requires"
|
1451 |
+
msgstr ""
|
1452 |
+
|
1453 |
+
#: wizard/build/app.js:1249
|
1454 |
+
msgid "WooCommerce"
|
1455 |
+
msgstr ""
|
1456 |
+
|
1457 |
+
#: wizard/build/app.js:1249
|
1458 |
+
msgid "to be active on your store."
|
1459 |
+
msgstr ""
|
1460 |
+
|
1461 |
+
#: wizard/build/app.js:1257
|
1462 |
+
msgid "Installing…"
|
1463 |
+
msgstr ""
|
1464 |
+
|
1465 |
+
#: wizard/build/app.js:1264
|
1466 |
+
msgid "Activating…"
|
1467 |
+
msgstr ""
|
1468 |
+
|
1469 |
+
#: wizard/build/app.js:1271
|
1470 |
+
msgid "Install and continue"
|
1471 |
+
msgstr ""
|
postcss.config.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
plugins: {
|
3 |
+
tailwindcss: {},
|
4 |
+
autoprefixer: {},
|
5 |
+
},
|
6 |
+
};
|
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.8
|
6 |
-
Stable tag: 1.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -22,7 +22,7 @@ With Stripe you can accept payments from several card brands, from large global
|
|
22 |
|
23 |
= Live Demo =
|
24 |
|
25 |
-
Visit [our site](https://stripe-demo.checkoutplugins.com) to see how this plugin works.
|
26 |
|
27 |
## OFFER ONE CLICK CHECKOUT WITH EXPRESS PAY ##
|
28 |
|
@@ -108,6 +108,15 @@ We understand the need for a quality product backed by dedicated support that ca
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
= 1.2.1 - THURSDAY, 20TH JANUARY 2022 =
|
112 |
* Fix: Add payment method was not working.
|
113 |
|
3 |
Tags: stripe, credit card
|
4 |
Requires at least: 5.4
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 1.3.0
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
22 |
|
23 |
= Live Demo =
|
24 |
|
25 |
+
Visit [our demo site](https://stripe-demo.checkoutplugins.com) to see how this plugin works.
|
26 |
|
27 |
## OFFER ONE CLICK CHECKOUT WITH EXPRESS PAY ##
|
28 |
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.3.0 - TUESDAY, 1ST FEBRUARY 2022 =
|
112 |
+
* New: Supports Klarna payment method.
|
113 |
+
* New: Supports Przelewy24 (P24) payment method.
|
114 |
+
* New: Supports Bancontact payment method.
|
115 |
+
* New: Added onboarding wizard.
|
116 |
+
* New: Display stripe fees on edit order page.
|
117 |
+
* Improvement: Added localization support.
|
118 |
+
* Improvement: Customizable Express Checkout buttons.
|
119 |
+
|
120 |
= 1.2.1 - THURSDAY, 20TH JANUARY 2022 =
|
121 |
* Fix: Add payment method was not working.
|
122 |
|
tailwind.config.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
content: [ './wizard/src/**/*.@(js|jsx)' ],
|
3 |
+
theme: {
|
4 |
+
extend: {
|
5 |
+
colors: {
|
6 |
+
stripe: {
|
7 |
+
500: '#635bff',
|
8 |
+
700: '#7A73FF',
|
9 |
+
},
|
10 |
+
cart: {
|
11 |
+
50: '#f3eaff',
|
12 |
+
500: '#673A9E',
|
13 |
+
700: '#7a47b7',
|
14 |
+
},
|
15 |
+
},
|
16 |
+
maxWidth: {
|
17 |
+
80: '80px',
|
18 |
+
},
|
19 |
+
},
|
20 |
+
},
|
21 |
+
variants: {
|
22 |
+
extend: {},
|
23 |
+
},
|
24 |
+
plugins: [],
|
25 |
+
};
|
wizard/build/app.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '31cbbb6e361aaa09d6237b07c0f6c0f9');
|
wizard/build/app.css
ADDED
@@ -0,0 +1,1032 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!********************************************************************************************************************************************************************************************************************************************!*\
|
2 |
+
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./wizard/src/App.scss ***!
|
3 |
+
\********************************************************************************************************************************************************************************************************************************************/
|
4 |
+
/*
|
5 |
+
! tailwindcss v3.0.12 | MIT License | https://tailwindcss.com
|
6 |
+
*//*
|
7 |
+
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
8 |
+
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
9 |
+
*/
|
10 |
+
|
11 |
+
*,
|
12 |
+
::before,
|
13 |
+
::after {
|
14 |
+
box-sizing: border-box; /* 1 */
|
15 |
+
border-width: 0; /* 2 */
|
16 |
+
border-style: solid; /* 2 */
|
17 |
+
border-color: #e5e7eb; /* 2 */
|
18 |
+
}
|
19 |
+
|
20 |
+
::before,
|
21 |
+
::after {
|
22 |
+
--tw-content: '';
|
23 |
+
}
|
24 |
+
|
25 |
+
/*
|
26 |
+
1. Use a consistent sensible line-height in all browsers.
|
27 |
+
2. Prevent adjustments of font size after orientation changes in iOS.
|
28 |
+
3. Use a more readable tab size.
|
29 |
+
4. Use the user's configured `sans` font-family by default.
|
30 |
+
*/
|
31 |
+
|
32 |
+
html {
|
33 |
+
line-height: 1.5; /* 1 */
|
34 |
+
-webkit-text-size-adjust: 100%; /* 2 */
|
35 |
+
-moz-tab-size: 4; /* 3 */
|
36 |
+
-o-tab-size: 4;
|
37 |
+
tab-size: 4; /* 3 */
|
38 |
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
|
39 |
+
}
|
40 |
+
|
41 |
+
/*
|
42 |
+
1. Remove the margin in all browsers.
|
43 |
+
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
44 |
+
*/
|
45 |
+
|
46 |
+
body {
|
47 |
+
margin: 0; /* 1 */
|
48 |
+
line-height: inherit; /* 2 */
|
49 |
+
}
|
50 |
+
|
51 |
+
/*
|
52 |
+
1. Add the correct height in Firefox.
|
53 |
+
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
54 |
+
3. Ensure horizontal rules are visible by default.
|
55 |
+
*/
|
56 |
+
|
57 |
+
hr {
|
58 |
+
height: 0; /* 1 */
|
59 |
+
color: inherit; /* 2 */
|
60 |
+
border-top-width: 1px; /* 3 */
|
61 |
+
}
|
62 |
+
|
63 |
+
/*
|
64 |
+
Add the correct text decoration in Chrome, Edge, and Safari.
|
65 |
+
*/
|
66 |
+
|
67 |
+
abbr:where([title]) {
|
68 |
+
-webkit-text-decoration: underline dotted;
|
69 |
+
text-decoration: underline dotted;
|
70 |
+
}
|
71 |
+
|
72 |
+
/*
|
73 |
+
Remove the default font size and weight for headings.
|
74 |
+
*/
|
75 |
+
|
76 |
+
h1,
|
77 |
+
h2,
|
78 |
+
h3,
|
79 |
+
h4,
|
80 |
+
h5,
|
81 |
+
h6 {
|
82 |
+
font-size: inherit;
|
83 |
+
font-weight: inherit;
|
84 |
+
}
|
85 |
+
|
86 |
+
/*
|
87 |
+
Reset links to optimize for opt-in styling instead of opt-out.
|
88 |
+
*/
|
89 |
+
|
90 |
+
a {
|
91 |
+
color: inherit;
|
92 |
+
text-decoration: inherit;
|
93 |
+
}
|
94 |
+
|
95 |
+
/*
|
96 |
+
Add the correct font weight in Edge and Safari.
|
97 |
+
*/
|
98 |
+
|
99 |
+
b,
|
100 |
+
strong {
|
101 |
+
font-weight: bolder;
|
102 |
+
}
|
103 |
+
|
104 |
+
/*
|
105 |
+
1. Use the user's configured `mono` font family by default.
|
106 |
+
2. Correct the odd `em` font sizing in all browsers.
|
107 |
+
*/
|
108 |
+
|
109 |
+
code,
|
110 |
+
kbd,
|
111 |
+
samp,
|
112 |
+
pre {
|
113 |
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
|
114 |
+
font-size: 1em; /* 2 */
|
115 |
+
}
|
116 |
+
|
117 |
+
/*
|
118 |
+
Add the correct font size in all browsers.
|
119 |
+
*/
|
120 |
+
|
121 |
+
small {
|
122 |
+
font-size: 80%;
|
123 |
+
}
|
124 |
+
|
125 |
+
/*
|
126 |
+
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
127 |
+
*/
|
128 |
+
|
129 |
+
sub,
|
130 |
+
sup {
|
131 |
+
font-size: 75%;
|
132 |
+
line-height: 0;
|
133 |
+
position: relative;
|
134 |
+
vertical-align: baseline;
|
135 |
+
}
|
136 |
+
|
137 |
+
sub {
|
138 |
+
bottom: -0.25em;
|
139 |
+
}
|
140 |
+
|
141 |
+
sup {
|
142 |
+
top: -0.5em;
|
143 |
+
}
|
144 |
+
|
145 |
+
/*
|
146 |
+
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
147 |
+
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
148 |
+
3. Remove gaps between table borders by default.
|
149 |
+
*/
|
150 |
+
|
151 |
+
table {
|
152 |
+
text-indent: 0; /* 1 */
|
153 |
+
border-color: inherit; /* 2 */
|
154 |
+
border-collapse: collapse; /* 3 */
|
155 |
+
}
|
156 |
+
|
157 |
+
/*
|
158 |
+
1. Change the font styles in all browsers.
|
159 |
+
2. Remove the margin in Firefox and Safari.
|
160 |
+
3. Remove default padding in all browsers.
|
161 |
+
*/
|
162 |
+
|
163 |
+
button,
|
164 |
+
input,
|
165 |
+
optgroup,
|
166 |
+
select,
|
167 |
+
textarea {
|
168 |
+
font-family: inherit; /* 1 */
|
169 |
+
font-size: 100%; /* 1 */
|
170 |
+
line-height: inherit; /* 1 */
|
171 |
+
color: inherit; /* 1 */
|
172 |
+
margin: 0; /* 2 */
|
173 |
+
padding: 0; /* 3 */
|
174 |
+
}
|
175 |
+
|
176 |
+
/*
|
177 |
+
Remove the inheritance of text transform in Edge and Firefox.
|
178 |
+
*/
|
179 |
+
|
180 |
+
button,
|
181 |
+
select {
|
182 |
+
text-transform: none;
|
183 |
+
}
|
184 |
+
|
185 |
+
/*
|
186 |
+
1. Correct the inability to style clickable types in iOS and Safari.
|
187 |
+
2. Remove default button styles.
|
188 |
+
*/
|
189 |
+
|
190 |
+
button,
|
191 |
+
[type='button'],
|
192 |
+
[type='reset'],
|
193 |
+
[type='submit'] {
|
194 |
+
-webkit-appearance: button; /* 1 */
|
195 |
+
background-color: transparent; /* 2 */
|
196 |
+
background-image: none; /* 2 */
|
197 |
+
}
|
198 |
+
|
199 |
+
/*
|
200 |
+
Use the modern Firefox focus style for all focusable elements.
|
201 |
+
*/
|
202 |
+
|
203 |
+
:-moz-focusring {
|
204 |
+
outline: auto;
|
205 |
+
}
|
206 |
+
|
207 |
+
/*
|
208 |
+
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
209 |
+
*/
|
210 |
+
|
211 |
+
:-moz-ui-invalid {
|
212 |
+
box-shadow: none;
|
213 |
+
}
|
214 |
+
|
215 |
+
/*
|
216 |
+
Add the correct vertical alignment in Chrome and Firefox.
|
217 |
+
*/
|
218 |
+
|
219 |
+
progress {
|
220 |
+
vertical-align: baseline;
|
221 |
+
}
|
222 |
+
|
223 |
+
/*
|
224 |
+
Correct the cursor style of increment and decrement buttons in Safari.
|
225 |
+
*/
|
226 |
+
|
227 |
+
::-webkit-inner-spin-button,
|
228 |
+
::-webkit-outer-spin-button {
|
229 |
+
height: auto;
|
230 |
+
}
|
231 |
+
|
232 |
+
/*
|
233 |
+
1. Correct the odd appearance in Chrome and Safari.
|
234 |
+
2. Correct the outline style in Safari.
|
235 |
+
*/
|
236 |
+
|
237 |
+
[type='search'] {
|
238 |
+
-webkit-appearance: textfield; /* 1 */
|
239 |
+
outline-offset: -2px; /* 2 */
|
240 |
+
}
|
241 |
+
|
242 |
+
/*
|
243 |
+
Remove the inner padding in Chrome and Safari on macOS.
|
244 |
+
*/
|
245 |
+
|
246 |
+
::-webkit-search-decoration {
|
247 |
+
-webkit-appearance: none;
|
248 |
+
}
|
249 |
+
|
250 |
+
/*
|
251 |
+
1. Correct the inability to style clickable types in iOS and Safari.
|
252 |
+
2. Change font properties to `inherit` in Safari.
|
253 |
+
*/
|
254 |
+
|
255 |
+
::-webkit-file-upload-button {
|
256 |
+
-webkit-appearance: button; /* 1 */
|
257 |
+
font: inherit; /* 2 */
|
258 |
+
}
|
259 |
+
|
260 |
+
/*
|
261 |
+
Add the correct display in Chrome and Safari.
|
262 |
+
*/
|
263 |
+
|
264 |
+
summary {
|
265 |
+
display: list-item;
|
266 |
+
}
|
267 |
+
|
268 |
+
/*
|
269 |
+
Removes the default spacing and border for appropriate elements.
|
270 |
+
*/
|
271 |
+
|
272 |
+
blockquote,
|
273 |
+
dl,
|
274 |
+
dd,
|
275 |
+
h1,
|
276 |
+
h2,
|
277 |
+
h3,
|
278 |
+
h4,
|
279 |
+
h5,
|
280 |
+
h6,
|
281 |
+
hr,
|
282 |
+
figure,
|
283 |
+
p,
|
284 |
+
pre {
|
285 |
+
margin: 0;
|
286 |
+
}
|
287 |
+
|
288 |
+
fieldset {
|
289 |
+
margin: 0;
|
290 |
+
padding: 0;
|
291 |
+
}
|
292 |
+
|
293 |
+
legend {
|
294 |
+
padding: 0;
|
295 |
+
}
|
296 |
+
|
297 |
+
ol,
|
298 |
+
ul,
|
299 |
+
menu {
|
300 |
+
list-style: none;
|
301 |
+
margin: 0;
|
302 |
+
padding: 0;
|
303 |
+
}
|
304 |
+
|
305 |
+
/*
|
306 |
+
Prevent resizing textareas horizontally by default.
|
307 |
+
*/
|
308 |
+
|
309 |
+
textarea {
|
310 |
+
resize: vertical;
|
311 |
+
}
|
312 |
+
|
313 |
+
/*
|
314 |
+
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
315 |
+
2. Set the default placeholder color to the user's configured gray 400 color.
|
316 |
+
*/
|
317 |
+
|
318 |
+
input::-moz-placeholder, textarea::-moz-placeholder {
|
319 |
+
opacity: 1; /* 1 */
|
320 |
+
color: #9ca3af; /* 2 */
|
321 |
+
}
|
322 |
+
|
323 |
+
input:-ms-input-placeholder, textarea:-ms-input-placeholder {
|
324 |
+
opacity: 1; /* 1 */
|
325 |
+
color: #9ca3af; /* 2 */
|
326 |
+
}
|
327 |
+
|
328 |
+
input::placeholder,
|
329 |
+
textarea::placeholder {
|
330 |
+
opacity: 1; /* 1 */
|
331 |
+
color: #9ca3af; /* 2 */
|
332 |
+
}
|
333 |
+
|
334 |
+
/*
|
335 |
+
Set the default cursor for buttons.
|
336 |
+
*/
|
337 |
+
|
338 |
+
button,
|
339 |
+
[role="button"] {
|
340 |
+
cursor: pointer;
|
341 |
+
}
|
342 |
+
|
343 |
+
/*
|
344 |
+
Make sure disabled buttons don't get the pointer cursor.
|
345 |
+
*/
|
346 |
+
:disabled {
|
347 |
+
cursor: default;
|
348 |
+
}
|
349 |
+
|
350 |
+
/*
|
351 |
+
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
352 |
+
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
353 |
+
This can trigger a poorly considered lint error in some tools but is included by design.
|
354 |
+
*/
|
355 |
+
|
356 |
+
img,
|
357 |
+
svg,
|
358 |
+
video,
|
359 |
+
canvas,
|
360 |
+
audio,
|
361 |
+
iframe,
|
362 |
+
embed,
|
363 |
+
object {
|
364 |
+
display: block; /* 1 */
|
365 |
+
vertical-align: middle; /* 2 */
|
366 |
+
}
|
367 |
+
|
368 |
+
/*
|
369 |
+
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
370 |
+
*/
|
371 |
+
|
372 |
+
img,
|
373 |
+
video {
|
374 |
+
max-width: 100%;
|
375 |
+
height: auto;
|
376 |
+
}
|
377 |
+
|
378 |
+
/*
|
379 |
+
Ensure the default browser behavior of the `hidden` attribute.
|
380 |
+
*/
|
381 |
+
|
382 |
+
[hidden] {
|
383 |
+
display: none;
|
384 |
+
}
|
385 |
+
|
386 |
+
*, ::before, ::after {
|
387 |
+
--tw-translate-x: 0;
|
388 |
+
--tw-translate-y: 0;
|
389 |
+
--tw-rotate: 0;
|
390 |
+
--tw-skew-x: 0;
|
391 |
+
--tw-skew-y: 0;
|
392 |
+
--tw-scale-x: 1;
|
393 |
+
--tw-scale-y: 1;
|
394 |
+
--tw-pan-x: ;
|
395 |
+
--tw-pan-y: ;
|
396 |
+
--tw-pinch-zoom: ;
|
397 |
+
--tw-scroll-snap-strictness: proximity;
|
398 |
+
--tw-ordinal: ;
|
399 |
+
--tw-slashed-zero: ;
|
400 |
+
--tw-numeric-figure: ;
|
401 |
+
--tw-numeric-spacing: ;
|
402 |
+
--tw-numeric-fraction: ;
|
403 |
+
--tw-ring-inset: ;
|
404 |
+
--tw-ring-offset-width: 0px;
|
405 |
+
--tw-ring-offset-color: #fff;
|
406 |
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
407 |
+
--tw-ring-offset-shadow: 0 0 #0000;
|
408 |
+
--tw-ring-shadow: 0 0 #0000;
|
409 |
+
--tw-shadow: 0 0 #0000;
|
410 |
+
--tw-shadow-colored: 0 0 #0000;
|
411 |
+
--tw-blur: ;
|
412 |
+
--tw-brightness: ;
|
413 |
+
--tw-contrast: ;
|
414 |
+
--tw-grayscale: ;
|
415 |
+
--tw-hue-rotate: ;
|
416 |
+
--tw-invert: ;
|
417 |
+
--tw-saturate: ;
|
418 |
+
--tw-sepia: ;
|
419 |
+
--tw-drop-shadow: ;
|
420 |
+
--tw-backdrop-blur: ;
|
421 |
+
--tw-backdrop-brightness: ;
|
422 |
+
--tw-backdrop-contrast: ;
|
423 |
+
--tw-backdrop-grayscale: ;
|
424 |
+
--tw-backdrop-hue-rotate: ;
|
425 |
+
--tw-backdrop-invert: ;
|
426 |
+
--tw-backdrop-opacity: ;
|
427 |
+
--tw-backdrop-saturate: ;
|
428 |
+
--tw-backdrop-sepia: ;
|
429 |
+
}
|
430 |
+
.sr-only {
|
431 |
+
position: absolute;
|
432 |
+
width: 1px;
|
433 |
+
height: 1px;
|
434 |
+
padding: 0;
|
435 |
+
margin: -1px;
|
436 |
+
overflow: hidden;
|
437 |
+
clip: rect(0, 0, 0, 0);
|
438 |
+
white-space: nowrap;
|
439 |
+
border-width: 0;
|
440 |
+
}
|
441 |
+
.pointer-events-none {
|
442 |
+
pointer-events: none;
|
443 |
+
}
|
444 |
+
.fixed {
|
445 |
+
position: fixed;
|
446 |
+
}
|
447 |
+
.relative {
|
448 |
+
position: relative;
|
449 |
+
}
|
450 |
+
.left-0 {
|
451 |
+
left: 0px;
|
452 |
+
}
|
453 |
+
.top-0 {
|
454 |
+
top: 0px;
|
455 |
+
}
|
456 |
+
.right-0 {
|
457 |
+
right: 0px;
|
458 |
+
}
|
459 |
+
.z-10 {
|
460 |
+
z-index: 10;
|
461 |
+
}
|
462 |
+
.mx-auto {
|
463 |
+
margin-left: auto;
|
464 |
+
margin-right: auto;
|
465 |
+
}
|
466 |
+
.my-0 {
|
467 |
+
margin-top: 0px;
|
468 |
+
margin-bottom: 0px;
|
469 |
+
}
|
470 |
+
.mx-6 {
|
471 |
+
margin-left: 1.5rem;
|
472 |
+
margin-right: 1.5rem;
|
473 |
+
}
|
474 |
+
.mx-2 {
|
475 |
+
margin-left: 0.5rem;
|
476 |
+
margin-right: 0.5rem;
|
477 |
+
}
|
478 |
+
.mx-4 {
|
479 |
+
margin-left: 1rem;
|
480 |
+
margin-right: 1rem;
|
481 |
+
}
|
482 |
+
.mx-3 {
|
483 |
+
margin-left: 0.75rem;
|
484 |
+
margin-right: 0.75rem;
|
485 |
+
}
|
486 |
+
.mt-12 {
|
487 |
+
margin-top: 3rem;
|
488 |
+
}
|
489 |
+
.ml-2 {
|
490 |
+
margin-left: 0.5rem;
|
491 |
+
}
|
492 |
+
.mr-3 {
|
493 |
+
margin-right: 0.75rem;
|
494 |
+
}
|
495 |
+
.mt-10 {
|
496 |
+
margin-top: 2.5rem;
|
497 |
+
}
|
498 |
+
.mt-3 {
|
499 |
+
margin-top: 0.75rem;
|
500 |
+
}
|
501 |
+
.mt-1 {
|
502 |
+
margin-top: 0.25rem;
|
503 |
+
}
|
504 |
+
.mb-1 {
|
505 |
+
margin-bottom: 0.25rem;
|
506 |
+
}
|
507 |
+
.ml-6 {
|
508 |
+
margin-left: 1.5rem;
|
509 |
+
}
|
510 |
+
.mt-5 {
|
511 |
+
margin-top: 1.25rem;
|
512 |
+
}
|
513 |
+
.mt-4 {
|
514 |
+
margin-top: 1rem;
|
515 |
+
}
|
516 |
+
.mb-4 {
|
517 |
+
margin-bottom: 1rem;
|
518 |
+
}
|
519 |
+
.mt-6 {
|
520 |
+
margin-top: 1.5rem;
|
521 |
+
}
|
522 |
+
.block {
|
523 |
+
display: block;
|
524 |
+
}
|
525 |
+
.inline-block {
|
526 |
+
display: inline-block;
|
527 |
+
}
|
528 |
+
.inline {
|
529 |
+
display: inline;
|
530 |
+
}
|
531 |
+
.flex {
|
532 |
+
display: flex;
|
533 |
+
}
|
534 |
+
.inline-flex {
|
535 |
+
display: inline-flex;
|
536 |
+
}
|
537 |
+
.h-16 {
|
538 |
+
height: 4rem;
|
539 |
+
}
|
540 |
+
.h-5 {
|
541 |
+
height: 1.25rem;
|
542 |
+
}
|
543 |
+
.h-28 {
|
544 |
+
height: 7rem;
|
545 |
+
}
|
546 |
+
.h-12 {
|
547 |
+
height: 3rem;
|
548 |
+
}
|
549 |
+
.h-6 {
|
550 |
+
height: 1.5rem;
|
551 |
+
}
|
552 |
+
.h-20 {
|
553 |
+
height: 5rem;
|
554 |
+
}
|
555 |
+
.h-24 {
|
556 |
+
height: 6rem;
|
557 |
+
}
|
558 |
+
.w-10\/12 {
|
559 |
+
width: 83.333333%;
|
560 |
+
}
|
561 |
+
.w-auto {
|
562 |
+
width: auto;
|
563 |
+
}
|
564 |
+
.w-full {
|
565 |
+
width: 100%;
|
566 |
+
}
|
567 |
+
.w-5 {
|
568 |
+
width: 1.25rem;
|
569 |
+
}
|
570 |
+
.w-32 {
|
571 |
+
width: 8rem;
|
572 |
+
}
|
573 |
+
.w-11 {
|
574 |
+
width: 2.75rem;
|
575 |
+
}
|
576 |
+
.min-w-0 {
|
577 |
+
min-width: 0px;
|
578 |
+
}
|
579 |
+
.max-w-7xl {
|
580 |
+
max-width: 80rem;
|
581 |
+
}
|
582 |
+
.max-w-screen-md {
|
583 |
+
max-width: 768px;
|
584 |
+
}
|
585 |
+
.max-w-80 {
|
586 |
+
max-width: 80px;
|
587 |
+
}
|
588 |
+
.flex-1 {
|
589 |
+
flex: 1 1 0%;
|
590 |
+
}
|
591 |
+
.flex-shrink-0 {
|
592 |
+
flex-shrink: 0;
|
593 |
+
}
|
594 |
+
.flex-grow {
|
595 |
+
flex-grow: 1;
|
596 |
+
}
|
597 |
+
.translate-x-5 {
|
598 |
+
--tw-translate-x: 1.25rem;
|
599 |
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
600 |
+
}
|
601 |
+
.translate-x-0 {
|
602 |
+
--tw-translate-x: 0px;
|
603 |
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
604 |
+
}
|
605 |
+
.transform {
|
606 |
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
607 |
+
}
|
608 |
+
@-webkit-keyframes spin {
|
609 |
+
|
610 |
+
to {
|
611 |
+
transform: rotate(360deg);
|
612 |
+
}
|
613 |
+
}
|
614 |
+
@keyframes spin {
|
615 |
+
|
616 |
+
to {
|
617 |
+
transform: rotate(360deg);
|
618 |
+
}
|
619 |
+
}
|
620 |
+
.animate-spin {
|
621 |
+
-webkit-animation: spin 1s linear infinite;
|
622 |
+
animation: spin 1s linear infinite;
|
623 |
+
}
|
624 |
+
.cursor-wait {
|
625 |
+
cursor: wait;
|
626 |
+
}
|
627 |
+
.cursor-pointer {
|
628 |
+
cursor: pointer;
|
629 |
+
}
|
630 |
+
.items-center {
|
631 |
+
align-items: center;
|
632 |
+
}
|
633 |
+
.justify-center {
|
634 |
+
justify-content: center;
|
635 |
+
}
|
636 |
+
.divide-y > :not([hidden]) ~ :not([hidden]) {
|
637 |
+
--tw-divide-y-reverse: 0;
|
638 |
+
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
|
639 |
+
border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
|
640 |
+
}
|
641 |
+
.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
|
642 |
+
--tw-divide-opacity: 1;
|
643 |
+
border-color: rgb(229 231 235 / var(--tw-divide-opacity));
|
644 |
+
}
|
645 |
+
.overflow-hidden {
|
646 |
+
overflow: hidden;
|
647 |
+
}
|
648 |
+
.overflow-x-hidden {
|
649 |
+
overflow-x: hidden;
|
650 |
+
}
|
651 |
+
.truncate {
|
652 |
+
overflow: hidden;
|
653 |
+
text-overflow: ellipsis;
|
654 |
+
white-space: nowrap;
|
655 |
+
}
|
656 |
+
.rounded-xl {
|
657 |
+
border-radius: 0.75rem;
|
658 |
+
}
|
659 |
+
.rounded-md {
|
660 |
+
border-radius: 0.375rem;
|
661 |
+
}
|
662 |
+
.rounded-full {
|
663 |
+
border-radius: 9999px;
|
664 |
+
}
|
665 |
+
.border {
|
666 |
+
border-width: 1px;
|
667 |
+
}
|
668 |
+
.border-2 {
|
669 |
+
border-width: 2px;
|
670 |
+
}
|
671 |
+
.border-transparent {
|
672 |
+
border-color: transparent;
|
673 |
+
}
|
674 |
+
.bg-white {
|
675 |
+
--tw-bg-opacity: 1;
|
676 |
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
677 |
+
}
|
678 |
+
.bg-cart-500 {
|
679 |
+
--tw-bg-opacity: 1;
|
680 |
+
background-color: rgb(103 58 158 / var(--tw-bg-opacity));
|
681 |
+
}
|
682 |
+
.bg-green-100 {
|
683 |
+
--tw-bg-opacity: 1;
|
684 |
+
background-color: rgb(220 252 231 / var(--tw-bg-opacity));
|
685 |
+
}
|
686 |
+
.bg-gray-200 {
|
687 |
+
--tw-bg-opacity: 1;
|
688 |
+
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
689 |
+
}
|
690 |
+
.bg-cart-50 {
|
691 |
+
--tw-bg-opacity: 1;
|
692 |
+
background-color: rgb(243 234 255 / var(--tw-bg-opacity));
|
693 |
+
}
|
694 |
+
.p-4 {
|
695 |
+
padding: 1rem;
|
696 |
+
}
|
697 |
+
.px-4 {
|
698 |
+
padding-left: 1rem;
|
699 |
+
padding-right: 1rem;
|
700 |
+
}
|
701 |
+
.py-5 {
|
702 |
+
padding-top: 1.25rem;
|
703 |
+
padding-bottom: 1.25rem;
|
704 |
+
}
|
705 |
+
.px-8 {
|
706 |
+
padding-left: 2rem;
|
707 |
+
padding-right: 2rem;
|
708 |
+
}
|
709 |
+
.py-3 {
|
710 |
+
padding-top: 0.75rem;
|
711 |
+
padding-bottom: 0.75rem;
|
712 |
+
}
|
713 |
+
.py-4 {
|
714 |
+
padding-top: 1rem;
|
715 |
+
padding-bottom: 1rem;
|
716 |
+
}
|
717 |
+
.px-2 {
|
718 |
+
padding-left: 0.5rem;
|
719 |
+
padding-right: 0.5rem;
|
720 |
+
}
|
721 |
+
.py-1 {
|
722 |
+
padding-top: 0.25rem;
|
723 |
+
padding-bottom: 0.25rem;
|
724 |
+
}
|
725 |
+
.pt-6 {
|
726 |
+
padding-top: 1.5rem;
|
727 |
+
}
|
728 |
+
.text-left {
|
729 |
+
text-align: left;
|
730 |
+
}
|
731 |
+
.text-center {
|
732 |
+
text-align: center;
|
733 |
+
}
|
734 |
+
.text-4xl {
|
735 |
+
font-size: 2.25rem;
|
736 |
+
line-height: 2.5rem;
|
737 |
+
}
|
738 |
+
.text-base {
|
739 |
+
font-size: 1rem;
|
740 |
+
line-height: 1.5rem;
|
741 |
+
}
|
742 |
+
.text-sm {
|
743 |
+
font-size: 0.875rem;
|
744 |
+
line-height: 1.25rem;
|
745 |
+
}
|
746 |
+
.text-xs {
|
747 |
+
font-size: 0.75rem;
|
748 |
+
line-height: 1rem;
|
749 |
+
}
|
750 |
+
.font-extrabold {
|
751 |
+
font-weight: 800;
|
752 |
+
}
|
753 |
+
.font-bold {
|
754 |
+
font-weight: 700;
|
755 |
+
}
|
756 |
+
.font-medium {
|
757 |
+
font-weight: 500;
|
758 |
+
}
|
759 |
+
.tracking-tight {
|
760 |
+
letter-spacing: -0.025em;
|
761 |
+
}
|
762 |
+
.text-white {
|
763 |
+
--tw-text-opacity: 1;
|
764 |
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
765 |
+
}
|
766 |
+
.text-gray-900 {
|
767 |
+
--tw-text-opacity: 1;
|
768 |
+
color: rgb(17 24 39 / var(--tw-text-opacity));
|
769 |
+
}
|
770 |
+
.text-cart-500 {
|
771 |
+
--tw-text-opacity: 1;
|
772 |
+
color: rgb(103 58 158 / var(--tw-text-opacity));
|
773 |
+
}
|
774 |
+
.text-gray-500 {
|
775 |
+
--tw-text-opacity: 1;
|
776 |
+
color: rgb(107 114 128 / var(--tw-text-opacity));
|
777 |
+
}
|
778 |
+
.text-gray-700 {
|
779 |
+
--tw-text-opacity: 1;
|
780 |
+
color: rgb(55 65 81 / var(--tw-text-opacity));
|
781 |
+
}
|
782 |
+
.text-slate-300 {
|
783 |
+
--tw-text-opacity: 1;
|
784 |
+
color: rgb(203 213 225 / var(--tw-text-opacity));
|
785 |
+
}
|
786 |
+
.text-red-600 {
|
787 |
+
--tw-text-opacity: 1;
|
788 |
+
color: rgb(220 38 38 / var(--tw-text-opacity));
|
789 |
+
}
|
790 |
+
.text-green-800 {
|
791 |
+
--tw-text-opacity: 1;
|
792 |
+
color: rgb(22 101 52 / var(--tw-text-opacity));
|
793 |
+
}
|
794 |
+
.text-gray-400 {
|
795 |
+
--tw-text-opacity: 1;
|
796 |
+
color: rgb(156 163 175 / var(--tw-text-opacity));
|
797 |
+
}
|
798 |
+
.opacity-25 {
|
799 |
+
opacity: 0.25;
|
800 |
+
}
|
801 |
+
.opacity-75 {
|
802 |
+
opacity: 0.75;
|
803 |
+
}
|
804 |
+
.shadow {
|
805 |
+
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
806 |
+
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
807 |
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
808 |
+
}
|
809 |
+
.ring-0 {
|
810 |
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
811 |
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
812 |
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
813 |
+
}
|
814 |
+
.filter {
|
815 |
+
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);
|
816 |
+
}
|
817 |
+
.transition-colors {
|
818 |
+
transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;
|
819 |
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
820 |
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;
|
821 |
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
822 |
+
transition-duration: 150ms;
|
823 |
+
}
|
824 |
+
.transition {
|
825 |
+
transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
|
826 |
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
827 |
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
|
828 |
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
829 |
+
transition-duration: 150ms;
|
830 |
+
}
|
831 |
+
.delay-150 {
|
832 |
+
transition-delay: 150ms;
|
833 |
+
}
|
834 |
+
.duration-200 {
|
835 |
+
transition-duration: 200ms;
|
836 |
+
}
|
837 |
+
.ease-in-out {
|
838 |
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
839 |
+
}
|
840 |
+
.hover\:bg-cart-700:hover {
|
841 |
+
--tw-bg-opacity: 1;
|
842 |
+
background-color: rgb(122 71 183 / var(--tw-bg-opacity));
|
843 |
+
}
|
844 |
+
.hover\:bg-gray-50:hover {
|
845 |
+
--tw-bg-opacity: 1;
|
846 |
+
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
847 |
+
}
|
848 |
+
.focus\:outline-none:focus {
|
849 |
+
outline: 2px solid transparent;
|
850 |
+
outline-offset: 2px;
|
851 |
+
}
|
852 |
+
.focus\:ring-2:focus {
|
853 |
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
854 |
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
855 |
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
856 |
+
}
|
857 |
+
.focus\:ring-cart-500:focus {
|
858 |
+
--tw-ring-opacity: 1;
|
859 |
+
--tw-ring-color: rgb(103 58 158 / var(--tw-ring-opacity));
|
860 |
+
}
|
861 |
+
.focus\:ring-offset-2:focus {
|
862 |
+
--tw-ring-offset-width: 2px;
|
863 |
+
}
|
864 |
+
@media (min-width: 640px) {
|
865 |
+
|
866 |
+
.sm\:mx-auto {
|
867 |
+
margin-left: auto;
|
868 |
+
margin-right: auto;
|
869 |
+
}
|
870 |
+
|
871 |
+
.sm\:mt-12 {
|
872 |
+
margin-top: 3rem;
|
873 |
+
}
|
874 |
+
|
875 |
+
.sm\:mt-5 {
|
876 |
+
margin-top: 1.25rem;
|
877 |
+
}
|
878 |
+
|
879 |
+
.sm\:mt-0 {
|
880 |
+
margin-top: 0px;
|
881 |
+
}
|
882 |
+
|
883 |
+
.sm\:ml-3 {
|
884 |
+
margin-left: 0.75rem;
|
885 |
+
}
|
886 |
+
|
887 |
+
.sm\:mt-8 {
|
888 |
+
margin-top: 2rem;
|
889 |
+
}
|
890 |
+
|
891 |
+
.sm\:mt-6 {
|
892 |
+
margin-top: 1.5rem;
|
893 |
+
}
|
894 |
+
|
895 |
+
.sm\:inline-block {
|
896 |
+
display: inline-block;
|
897 |
+
}
|
898 |
+
|
899 |
+
.sm\:flex {
|
900 |
+
display: flex;
|
901 |
+
}
|
902 |
+
|
903 |
+
.sm\:h-10 {
|
904 |
+
height: 2.5rem;
|
905 |
+
}
|
906 |
+
|
907 |
+
.sm\:w-full {
|
908 |
+
width: 100%;
|
909 |
+
}
|
910 |
+
|
911 |
+
.sm\:justify-center {
|
912 |
+
justify-content: center;
|
913 |
+
}
|
914 |
+
|
915 |
+
.sm\:rounded-md {
|
916 |
+
border-radius: 0.375rem;
|
917 |
+
}
|
918 |
+
|
919 |
+
.sm\:px-6 {
|
920 |
+
padding-left: 1.5rem;
|
921 |
+
padding-right: 1.5rem;
|
922 |
+
}
|
923 |
+
|
924 |
+
.sm\:text-5xl {
|
925 |
+
font-size: 3rem;
|
926 |
+
line-height: 1;
|
927 |
+
}
|
928 |
+
|
929 |
+
.sm\:text-lg {
|
930 |
+
font-size: 1.125rem;
|
931 |
+
line-height: 1.75rem;
|
932 |
+
}
|
933 |
+
}
|
934 |
+
@media (min-width: 768px) {
|
935 |
+
|
936 |
+
.md\:mt-16 {
|
937 |
+
margin-top: 4rem;
|
938 |
+
}
|
939 |
+
|
940 |
+
.md\:mt-5 {
|
941 |
+
margin-top: 1.25rem;
|
942 |
+
}
|
943 |
+
|
944 |
+
.md\:mt-14 {
|
945 |
+
margin-top: 3.5rem;
|
946 |
+
}
|
947 |
+
|
948 |
+
.md\:mt-8 {
|
949 |
+
margin-top: 2rem;
|
950 |
+
}
|
951 |
+
|
952 |
+
.md\:gap-4 {
|
953 |
+
gap: 1rem;
|
954 |
+
}
|
955 |
+
|
956 |
+
.md\:py-4 {
|
957 |
+
padding-top: 1rem;
|
958 |
+
padding-bottom: 1rem;
|
959 |
+
}
|
960 |
+
|
961 |
+
.md\:px-10 {
|
962 |
+
padding-left: 2.5rem;
|
963 |
+
padding-right: 2.5rem;
|
964 |
+
}
|
965 |
+
|
966 |
+
.md\:text-6xl {
|
967 |
+
font-size: 3.75rem;
|
968 |
+
line-height: 1;
|
969 |
+
}
|
970 |
+
|
971 |
+
.md\:text-xl {
|
972 |
+
font-size: 1.25rem;
|
973 |
+
line-height: 1.75rem;
|
974 |
+
}
|
975 |
+
|
976 |
+
.md\:text-lg {
|
977 |
+
font-size: 1.125rem;
|
978 |
+
line-height: 1.75rem;
|
979 |
+
}
|
980 |
+
}
|
981 |
+
@media (min-width: 1024px) {
|
982 |
+
|
983 |
+
.lg\:mx-0 {
|
984 |
+
margin-left: 0px;
|
985 |
+
margin-right: 0px;
|
986 |
+
}
|
987 |
+
|
988 |
+
.lg\:mt-20 {
|
989 |
+
margin-top: 5rem;
|
990 |
+
}
|
991 |
+
|
992 |
+
.lg\:mt-16 {
|
993 |
+
margin-top: 4rem;
|
994 |
+
}
|
995 |
+
|
996 |
+
.lg\:mt-10 {
|
997 |
+
margin-top: 2.5rem;
|
998 |
+
}
|
999 |
+
|
1000 |
+
.lg\:inline-block {
|
1001 |
+
display: inline-block;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
.lg\:w-full {
|
1005 |
+
width: 100%;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
.lg\:justify-center {
|
1009 |
+
justify-content: center;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
.lg\:px-8 {
|
1013 |
+
padding-left: 2rem;
|
1014 |
+
padding-right: 2rem;
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
@media (min-width: 1280px) {
|
1018 |
+
|
1019 |
+
.xl\:mt-28 {
|
1020 |
+
margin-top: 7rem;
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
.xl\:mt-16 {
|
1024 |
+
margin-top: 4rem;
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
.xl\:inline {
|
1028 |
+
display: inline;
|
1029 |
+
}
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
/*# sourceMappingURL=app.css.map*/
|
wizard/build/app.js
ADDED
@@ -0,0 +1,3304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function() { // webpackBootstrap
|
2 |
+
/******/ "use strict";
|
3 |
+
/******/ var __webpack_modules__ = ({
|
4 |
+
|
5 |
+
/***/ "./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js":
|
6 |
+
/*!***********************************************************************************!*\
|
7 |
+
!*** ./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js ***!
|
8 |
+
\***********************************************************************************/
|
9 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10 |
+
|
11 |
+
__webpack_require__.r(__webpack_exports__);
|
12 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
13 |
+
/* harmony export */ "arrayLikeToArray": function() { return /* binding */ _arrayLikeToArray; },
|
14 |
+
/* harmony export */ "createForOfIteratorHelperLoose": function() { return /* binding */ _createForOfIteratorHelperLoose; },
|
15 |
+
/* harmony export */ "extends": function() { return /* binding */ _extends; },
|
16 |
+
/* harmony export */ "objectWithoutPropertiesLoose": function() { return /* binding */ _objectWithoutPropertiesLoose; },
|
17 |
+
/* harmony export */ "unsupportedIterableToArray": function() { return /* binding */ _unsupportedIterableToArray; }
|
18 |
+
/* harmony export */ });
|
19 |
+
function _extends() {
|
20 |
+
_extends = Object.assign || function (target) {
|
21 |
+
for (var i = 1; i < arguments.length; i++) {
|
22 |
+
var source = arguments[i];
|
23 |
+
|
24 |
+
for (var key in source) {
|
25 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
26 |
+
target[key] = source[key];
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
return target;
|
32 |
+
};
|
33 |
+
|
34 |
+
return _extends.apply(this, arguments);
|
35 |
+
}
|
36 |
+
|
37 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
38 |
+
if (source == null) return {};
|
39 |
+
var target = {};
|
40 |
+
var sourceKeys = Object.keys(source);
|
41 |
+
var key, i;
|
42 |
+
|
43 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
44 |
+
key = sourceKeys[i];
|
45 |
+
if (excluded.indexOf(key) >= 0) continue;
|
46 |
+
target[key] = source[key];
|
47 |
+
}
|
48 |
+
|
49 |
+
return target;
|
50 |
+
}
|
51 |
+
|
52 |
+
function _unsupportedIterableToArray(o, minLen) {
|
53 |
+
if (!o) return;
|
54 |
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
55 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
56 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
57 |
+
if (n === "Map" || n === "Set") return Array.from(o);
|
58 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
59 |
+
}
|
60 |
+
|
61 |
+
function _arrayLikeToArray(arr, len) {
|
62 |
+
if (len == null || len > arr.length) len = arr.length;
|
63 |
+
|
64 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
65 |
+
|
66 |
+
return arr2;
|
67 |
+
}
|
68 |
+
|
69 |
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
70 |
+
var it;
|
71 |
+
|
72 |
+
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
|
73 |
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
74 |
+
if (it) o = it;
|
75 |
+
var i = 0;
|
76 |
+
return function () {
|
77 |
+
if (i >= o.length) return {
|
78 |
+
done: true
|
79 |
+
};
|
80 |
+
return {
|
81 |
+
done: false,
|
82 |
+
value: o[i++]
|
83 |
+
};
|
84 |
+
};
|
85 |
+
}
|
86 |
+
|
87 |
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
88 |
+
}
|
89 |
+
|
90 |
+
it = o[Symbol.iterator]();
|
91 |
+
return it.next.bind(it);
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map
|
96 |
+
|
97 |
+
|
98 |
+
/***/ }),
|
99 |
+
|
100 |
+
/***/ "./node_modules/@headlessui/react/dist/components/description/description.esm.js":
|
101 |
+
/*!***************************************************************************************!*\
|
102 |
+
!*** ./node_modules/@headlessui/react/dist/components/description/description.esm.js ***!
|
103 |
+
\***************************************************************************************/
|
104 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
105 |
+
|
106 |
+
__webpack_require__.r(__webpack_exports__);
|
107 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
108 |
+
/* harmony export */ "Description": function() { return /* binding */ Description; },
|
109 |
+
/* harmony export */ "useDescriptions": function() { return /* binding */ useDescriptions; }
|
110 |
+
/* harmony export */ });
|
111 |
+
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js");
|
112 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
113 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
114 |
+
/* harmony import */ var _utils_render_esm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/render.esm.js */ "./node_modules/@headlessui/react/dist/utils/render.esm.js");
|
115 |
+
/* harmony import */ var _hooks_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hooks/use-iso-morphic-effect.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js");
|
116 |
+
/* harmony import */ var _hooks_use_id_esm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../hooks/use-id.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-id.esm.js");
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
|
122 |
+
|
123 |
+
var DescriptionContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
124 |
+
|
125 |
+
function useDescriptionContext() {
|
126 |
+
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(DescriptionContext);
|
127 |
+
|
128 |
+
if (context === null) {
|
129 |
+
var err = new Error('You used a <Description /> component, but it is not inside a relevant parent.');
|
130 |
+
if (Error.captureStackTrace) Error.captureStackTrace(err, useDescriptionContext);
|
131 |
+
throw err;
|
132 |
+
}
|
133 |
+
|
134 |
+
return context;
|
135 |
+
}
|
136 |
+
|
137 |
+
function useDescriptions() {
|
138 |
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
139 |
+
descriptionIds = _useState[0],
|
140 |
+
setDescriptionIds = _useState[1];
|
141 |
+
|
142 |
+
return [// The actual id's as string or undefined
|
143 |
+
descriptionIds.length > 0 ? descriptionIds.join(' ') : undefined, // The provider component
|
144 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
145 |
+
return function DescriptionProvider(props) {
|
146 |
+
var register = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (value) {
|
147 |
+
setDescriptionIds(function (existing) {
|
148 |
+
return [].concat(existing, [value]);
|
149 |
+
});
|
150 |
+
return function () {
|
151 |
+
return setDescriptionIds(function (existing) {
|
152 |
+
var clone = existing.slice();
|
153 |
+
var idx = clone.indexOf(value);
|
154 |
+
if (idx !== -1) clone.splice(idx, 1);
|
155 |
+
return clone;
|
156 |
+
});
|
157 |
+
};
|
158 |
+
}, []);
|
159 |
+
var contextBag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
160 |
+
return {
|
161 |
+
register: register,
|
162 |
+
slot: props.slot,
|
163 |
+
name: props.name,
|
164 |
+
props: props.props
|
165 |
+
};
|
166 |
+
}, [register, props.slot, props.name, props.props]);
|
167 |
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DescriptionContext.Provider, {
|
168 |
+
value: contextBag
|
169 |
+
}, props.children);
|
170 |
+
};
|
171 |
+
}, [setDescriptionIds])];
|
172 |
+
} // ---
|
173 |
+
|
174 |
+
var DEFAULT_DESCRIPTION_TAG = 'p';
|
175 |
+
function Description(props) {
|
176 |
+
var context = useDescriptionContext();
|
177 |
+
var id = "headlessui-description-" + (0,_hooks_use_id_esm_js__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
178 |
+
(0,_hooks_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_2__.useIsoMorphicEffect)(function () {
|
179 |
+
return context.register(id);
|
180 |
+
}, [id, context.register]);
|
181 |
+
var passThroughProps = props;
|
182 |
+
|
183 |
+
var propsWeControl = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_3__["extends"])({}, context.props, {
|
184 |
+
id: id
|
185 |
+
});
|
186 |
+
|
187 |
+
return (0,_utils_render_esm_js__WEBPACK_IMPORTED_MODULE_4__.render)({
|
188 |
+
props: (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_3__["extends"])({}, passThroughProps, propsWeControl),
|
189 |
+
slot: context.slot || {},
|
190 |
+
defaultTag: DEFAULT_DESCRIPTION_TAG,
|
191 |
+
name: context.name || 'Description'
|
192 |
+
});
|
193 |
+
}
|
194 |
+
|
195 |
+
|
196 |
+
//# sourceMappingURL=description.esm.js.map
|
197 |
+
|
198 |
+
|
199 |
+
/***/ }),
|
200 |
+
|
201 |
+
/***/ "./node_modules/@headlessui/react/dist/components/keyboard.esm.js":
|
202 |
+
/*!************************************************************************!*\
|
203 |
+
!*** ./node_modules/@headlessui/react/dist/components/keyboard.esm.js ***!
|
204 |
+
\************************************************************************/
|
205 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
206 |
+
|
207 |
+
__webpack_require__.r(__webpack_exports__);
|
208 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
209 |
+
/* harmony export */ "Keys": function() { return /* binding */ Keys; }
|
210 |
+
/* harmony export */ });
|
211 |
+
// TODO: This must already exist somewhere, right? 🤔
|
212 |
+
// Ref: https://www.w3.org/TR/uievents-key/#named-key-attribute-values
|
213 |
+
var Keys;
|
214 |
+
|
215 |
+
(function (Keys) {
|
216 |
+
Keys["Space"] = " ";
|
217 |
+
Keys["Enter"] = "Enter";
|
218 |
+
Keys["Escape"] = "Escape";
|
219 |
+
Keys["Backspace"] = "Backspace";
|
220 |
+
Keys["ArrowLeft"] = "ArrowLeft";
|
221 |
+
Keys["ArrowUp"] = "ArrowUp";
|
222 |
+
Keys["ArrowRight"] = "ArrowRight";
|
223 |
+
Keys["ArrowDown"] = "ArrowDown";
|
224 |
+
Keys["Home"] = "Home";
|
225 |
+
Keys["End"] = "End";
|
226 |
+
Keys["PageUp"] = "PageUp";
|
227 |
+
Keys["PageDown"] = "PageDown";
|
228 |
+
Keys["Tab"] = "Tab";
|
229 |
+
})(Keys || (Keys = {}));
|
230 |
+
|
231 |
+
|
232 |
+
//# sourceMappingURL=keyboard.esm.js.map
|
233 |
+
|
234 |
+
|
235 |
+
/***/ }),
|
236 |
+
|
237 |
+
/***/ "./node_modules/@headlessui/react/dist/components/label/label.esm.js":
|
238 |
+
/*!***************************************************************************!*\
|
239 |
+
!*** ./node_modules/@headlessui/react/dist/components/label/label.esm.js ***!
|
240 |
+
\***************************************************************************/
|
241 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
242 |
+
|
243 |
+
__webpack_require__.r(__webpack_exports__);
|
244 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
245 |
+
/* harmony export */ "Label": function() { return /* binding */ Label; },
|
246 |
+
/* harmony export */ "useLabels": function() { return /* binding */ useLabels; }
|
247 |
+
/* harmony export */ });
|
248 |
+
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js");
|
249 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
250 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
251 |
+
/* harmony import */ var _utils_render_esm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/render.esm.js */ "./node_modules/@headlessui/react/dist/utils/render.esm.js");
|
252 |
+
/* harmony import */ var _hooks_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hooks/use-iso-morphic-effect.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js");
|
253 |
+
/* harmony import */ var _hooks_use_id_esm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hooks/use-id.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-id.esm.js");
|
254 |
+
|
255 |
+
|
256 |
+
|
257 |
+
|
258 |
+
|
259 |
+
|
260 |
+
var LabelContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
261 |
+
|
262 |
+
function useLabelContext() {
|
263 |
+
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(LabelContext);
|
264 |
+
|
265 |
+
if (context === null) {
|
266 |
+
var err = new Error('You used a <Label /> component, but it is not inside a relevant parent.');
|
267 |
+
if (Error.captureStackTrace) Error.captureStackTrace(err, useLabelContext);
|
268 |
+
throw err;
|
269 |
+
}
|
270 |
+
|
271 |
+
return context;
|
272 |
+
}
|
273 |
+
|
274 |
+
function useLabels() {
|
275 |
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
276 |
+
labelIds = _useState[0],
|
277 |
+
setLabelIds = _useState[1];
|
278 |
+
|
279 |
+
return [// The actual id's as string or undefined.
|
280 |
+
labelIds.length > 0 ? labelIds.join(' ') : undefined, // The provider component
|
281 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
282 |
+
return function LabelProvider(props) {
|
283 |
+
var register = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (value) {
|
284 |
+
setLabelIds(function (existing) {
|
285 |
+
return [].concat(existing, [value]);
|
286 |
+
});
|
287 |
+
return function () {
|
288 |
+
return setLabelIds(function (existing) {
|
289 |
+
var clone = existing.slice();
|
290 |
+
var idx = clone.indexOf(value);
|
291 |
+
if (idx !== -1) clone.splice(idx, 1);
|
292 |
+
return clone;
|
293 |
+
});
|
294 |
+
};
|
295 |
+
}, []);
|
296 |
+
var contextBag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
297 |
+
return {
|
298 |
+
register: register,
|
299 |
+
slot: props.slot,
|
300 |
+
name: props.name,
|
301 |
+
props: props.props
|
302 |
+
};
|
303 |
+
}, [register, props.slot, props.name, props.props]);
|
304 |
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LabelContext.Provider, {
|
305 |
+
value: contextBag
|
306 |
+
}, props.children);
|
307 |
+
};
|
308 |
+
}, [setLabelIds])];
|
309 |
+
} // ---
|
310 |
+
|
311 |
+
var DEFAULT_LABEL_TAG = 'label';
|
312 |
+
function Label(props) {
|
313 |
+
var _props$passive = props.passive,
|
314 |
+
passive = _props$passive === void 0 ? false : _props$passive,
|
315 |
+
passThroughProps = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.objectWithoutPropertiesLoose)(props, ["passive"]);
|
316 |
+
|
317 |
+
var context = useLabelContext();
|
318 |
+
var id = "headlessui-label-" + (0,_hooks_use_id_esm_js__WEBPACK_IMPORTED_MODULE_2__.useId)();
|
319 |
+
(0,_hooks_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_3__.useIsoMorphicEffect)(function () {
|
320 |
+
return context.register(id);
|
321 |
+
}, [id, context.register]);
|
322 |
+
|
323 |
+
var propsWeControl = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__["extends"])({}, context.props, {
|
324 |
+
id: id
|
325 |
+
});
|
326 |
+
|
327 |
+
var allProps = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__["extends"])({}, passThroughProps, propsWeControl); // @ts-expect-error props are dynamic via context, some components will
|
328 |
+
// provide an onClick then we can delete it.
|
329 |
+
|
330 |
+
|
331 |
+
if (passive) delete allProps['onClick'];
|
332 |
+
return (0,_utils_render_esm_js__WEBPACK_IMPORTED_MODULE_4__.render)({
|
333 |
+
props: allProps,
|
334 |
+
slot: context.slot || {},
|
335 |
+
defaultTag: DEFAULT_LABEL_TAG,
|
336 |
+
name: context.name || 'Label'
|
337 |
+
});
|
338 |
+
}
|
339 |
+
|
340 |
+
|
341 |
+
//# sourceMappingURL=label.esm.js.map
|
342 |
+
|
343 |
+
|
344 |
+
/***/ }),
|
345 |
+
|
346 |
+
/***/ "./node_modules/@headlessui/react/dist/components/switch/switch.esm.js":
|
347 |
+
/*!*****************************************************************************!*\
|
348 |
+
!*** ./node_modules/@headlessui/react/dist/components/switch/switch.esm.js ***!
|
349 |
+
\*****************************************************************************/
|
350 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
351 |
+
|
352 |
+
__webpack_require__.r(__webpack_exports__);
|
353 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
354 |
+
/* harmony export */ "Switch": function() { return /* binding */ Switch; }
|
355 |
+
/* harmony export */ });
|
356 |
+
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js");
|
357 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
358 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
359 |
+
/* harmony import */ var _utils_render_esm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/render.esm.js */ "./node_modules/@headlessui/react/dist/utils/render.esm.js");
|
360 |
+
/* harmony import */ var _hooks_use_sync_refs_esm_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../hooks/use-sync-refs.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-sync-refs.esm.js");
|
361 |
+
/* harmony import */ var _keyboard_esm_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../keyboard.esm.js */ "./node_modules/@headlessui/react/dist/components/keyboard.esm.js");
|
362 |
+
/* harmony import */ var _utils_bugs_esm_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/bugs.esm.js */ "./node_modules/@headlessui/react/dist/utils/bugs.esm.js");
|
363 |
+
/* harmony import */ var _hooks_use_id_esm_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../hooks/use-id.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-id.esm.js");
|
364 |
+
/* harmony import */ var _description_description_esm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../description/description.esm.js */ "./node_modules/@headlessui/react/dist/components/description/description.esm.js");
|
365 |
+
/* harmony import */ var _hooks_use_resolve_button_type_esm_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../hooks/use-resolve-button-type.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.esm.js");
|
366 |
+
/* harmony import */ var _label_label_esm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../label/label.esm.js */ "./node_modules/@headlessui/react/dist/components/label/label.esm.js");
|
367 |
+
|
368 |
+
|
369 |
+
|
370 |
+
|
371 |
+
|
372 |
+
|
373 |
+
|
374 |
+
|
375 |
+
|
376 |
+
|
377 |
+
|
378 |
+
var GroupContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
379 |
+
GroupContext.displayName = 'GroupContext'; // ---
|
380 |
+
|
381 |
+
var DEFAULT_GROUP_TAG = react__WEBPACK_IMPORTED_MODULE_0__.Fragment;
|
382 |
+
|
383 |
+
function Group(props) {
|
384 |
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
385 |
+
switchElement = _useState[0],
|
386 |
+
setSwitchElement = _useState[1];
|
387 |
+
|
388 |
+
var _useLabels = (0,_label_label_esm_js__WEBPACK_IMPORTED_MODULE_1__.useLabels)(),
|
389 |
+
labelledby = _useLabels[0],
|
390 |
+
LabelProvider = _useLabels[1];
|
391 |
+
|
392 |
+
var _useDescriptions = (0,_description_description_esm_js__WEBPACK_IMPORTED_MODULE_2__.useDescriptions)(),
|
393 |
+
describedby = _useDescriptions[0],
|
394 |
+
DescriptionProvider = _useDescriptions[1];
|
395 |
+
|
396 |
+
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
397 |
+
return {
|
398 |
+
"switch": switchElement,
|
399 |
+
setSwitch: setSwitchElement,
|
400 |
+
labelledby: labelledby,
|
401 |
+
describedby: describedby
|
402 |
+
};
|
403 |
+
}, [switchElement, setSwitchElement, labelledby, describedby]);
|
404 |
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DescriptionProvider, {
|
405 |
+
name: "Switch.Description"
|
406 |
+
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LabelProvider, {
|
407 |
+
name: "Switch.Label",
|
408 |
+
props: {
|
409 |
+
onClick: function onClick() {
|
410 |
+
if (!switchElement) return;
|
411 |
+
switchElement.click();
|
412 |
+
switchElement.focus({
|
413 |
+
preventScroll: true
|
414 |
+
});
|
415 |
+
}
|
416 |
+
}
|
417 |
+
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(GroupContext.Provider, {
|
418 |
+
value: context
|
419 |
+
}, (0,_utils_render_esm_js__WEBPACK_IMPORTED_MODULE_3__.render)({
|
420 |
+
props: props,
|
421 |
+
defaultTag: DEFAULT_GROUP_TAG,
|
422 |
+
name: 'Switch.Group'
|
423 |
+
}))));
|
424 |
+
} // ---
|
425 |
+
|
426 |
+
|
427 |
+
var DEFAULT_SWITCH_TAG = 'button';
|
428 |
+
function Switch(props) {
|
429 |
+
var checked = props.checked,
|
430 |
+
onChange = props.onChange,
|
431 |
+
passThroughProps = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.objectWithoutPropertiesLoose)(props, ["checked", "onChange"]);
|
432 |
+
|
433 |
+
var id = "headlessui-switch-" + (0,_hooks_use_id_esm_js__WEBPACK_IMPORTED_MODULE_5__.useId)();
|
434 |
+
var groupContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(GroupContext);
|
435 |
+
var internalSwitchRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
436 |
+
var switchRef = (0,_hooks_use_sync_refs_esm_js__WEBPACK_IMPORTED_MODULE_6__.useSyncRefs)(internalSwitchRef, groupContext === null ? null : groupContext.setSwitch);
|
437 |
+
var toggle = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
438 |
+
return onChange(!checked);
|
439 |
+
}, [onChange, checked]);
|
440 |
+
var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {
|
441 |
+
if ((0,_utils_bugs_esm_js__WEBPACK_IMPORTED_MODULE_7__.isDisabledReactIssue7711)(event.currentTarget)) return event.preventDefault();
|
442 |
+
event.preventDefault();
|
443 |
+
toggle();
|
444 |
+
}, [toggle]);
|
445 |
+
var handleKeyUp = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {
|
446 |
+
if (event.key !== _keyboard_esm_js__WEBPACK_IMPORTED_MODULE_8__.Keys.Tab) event.preventDefault();
|
447 |
+
if (event.key === _keyboard_esm_js__WEBPACK_IMPORTED_MODULE_8__.Keys.Space) toggle();
|
448 |
+
}, [toggle]); // This is needed so that we can "cancel" the click event when we use the `Enter` key on a button.
|
449 |
+
|
450 |
+
var handleKeyPress = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {
|
451 |
+
return event.preventDefault();
|
452 |
+
}, []);
|
453 |
+
var slot = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
454 |
+
return {
|
455 |
+
checked: checked
|
456 |
+
};
|
457 |
+
}, [checked]);
|
458 |
+
var propsWeControl = {
|
459 |
+
id: id,
|
460 |
+
ref: switchRef,
|
461 |
+
role: 'switch',
|
462 |
+
type: (0,_hooks_use_resolve_button_type_esm_js__WEBPACK_IMPORTED_MODULE_9__.useResolveButtonType)(props, internalSwitchRef),
|
463 |
+
tabIndex: 0,
|
464 |
+
'aria-checked': checked,
|
465 |
+
'aria-labelledby': groupContext == null ? void 0 : groupContext.labelledby,
|
466 |
+
'aria-describedby': groupContext == null ? void 0 : groupContext.describedby,
|
467 |
+
onClick: handleClick,
|
468 |
+
onKeyUp: handleKeyUp,
|
469 |
+
onKeyPress: handleKeyPress
|
470 |
+
};
|
471 |
+
return (0,_utils_render_esm_js__WEBPACK_IMPORTED_MODULE_3__.render)({
|
472 |
+
props: (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__["extends"])({}, passThroughProps, propsWeControl),
|
473 |
+
slot: slot,
|
474 |
+
defaultTag: DEFAULT_SWITCH_TAG,
|
475 |
+
name: 'Switch'
|
476 |
+
});
|
477 |
+
} // ---
|
478 |
+
|
479 |
+
Switch.Group = Group;
|
480 |
+
Switch.Label = _label_label_esm_js__WEBPACK_IMPORTED_MODULE_1__.Label;
|
481 |
+
Switch.Description = _description_description_esm_js__WEBPACK_IMPORTED_MODULE_2__.Description;
|
482 |
+
|
483 |
+
|
484 |
+
//# sourceMappingURL=switch.esm.js.map
|
485 |
+
|
486 |
+
|
487 |
+
/***/ }),
|
488 |
+
|
489 |
+
/***/ "./node_modules/@headlessui/react/dist/hooks/use-id.esm.js":
|
490 |
+
/*!*****************************************************************!*\
|
491 |
+
!*** ./node_modules/@headlessui/react/dist/hooks/use-id.esm.js ***!
|
492 |
+
\*****************************************************************/
|
493 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
494 |
+
|
495 |
+
__webpack_require__.r(__webpack_exports__);
|
496 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
497 |
+
/* harmony export */ "useId": function() { return /* binding */ useId; }
|
498 |
+
/* harmony export */ });
|
499 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
500 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
501 |
+
/* harmony import */ var _use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-iso-morphic-effect.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js");
|
502 |
+
/* harmony import */ var _use_server_handoff_complete_esm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-server-handoff-complete.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.esm.js");
|
503 |
+
|
504 |
+
|
505 |
+
|
506 |
+
|
507 |
+
// didn't take care of the Suspense case. To fix this we used the approach the @reach-ui/auto-id
|
508 |
+
// uses.
|
509 |
+
//
|
510 |
+
// Credits: https://github.com/reach/reach-ui/blob/develop/packages/auto-id/src/index.tsx
|
511 |
+
|
512 |
+
var id = 0;
|
513 |
+
|
514 |
+
function generateId() {
|
515 |
+
return ++id;
|
516 |
+
}
|
517 |
+
|
518 |
+
function useId() {
|
519 |
+
var ready = (0,_use_server_handoff_complete_esm_js__WEBPACK_IMPORTED_MODULE_1__.useServerHandoffComplete)();
|
520 |
+
|
521 |
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(ready ? generateId : null),
|
522 |
+
id = _useState[0],
|
523 |
+
setId = _useState[1];
|
524 |
+
|
525 |
+
(0,_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_2__.useIsoMorphicEffect)(function () {
|
526 |
+
if (id === null) setId(generateId());
|
527 |
+
}, [id]);
|
528 |
+
return id != null ? '' + id : undefined;
|
529 |
+
}
|
530 |
+
|
531 |
+
|
532 |
+
//# sourceMappingURL=use-id.esm.js.map
|
533 |
+
|
534 |
+
|
535 |
+
/***/ }),
|
536 |
+
|
537 |
+
/***/ "./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js":
|
538 |
+
/*!*********************************************************************************!*\
|
539 |
+
!*** ./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js ***!
|
540 |
+
\*********************************************************************************/
|
541 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
542 |
+
|
543 |
+
__webpack_require__.r(__webpack_exports__);
|
544 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
545 |
+
/* harmony export */ "useIsoMorphicEffect": function() { return /* binding */ useIsoMorphicEffect; }
|
546 |
+
/* harmony export */ });
|
547 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
548 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
549 |
+
|
550 |
+
|
551 |
+
var useIsoMorphicEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
|
552 |
+
|
553 |
+
|
554 |
+
//# sourceMappingURL=use-iso-morphic-effect.esm.js.map
|
555 |
+
|
556 |
+
|
557 |
+
/***/ }),
|
558 |
+
|
559 |
+
/***/ "./node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.esm.js":
|
560 |
+
/*!**********************************************************************************!*\
|
561 |
+
!*** ./node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.esm.js ***!
|
562 |
+
\**********************************************************************************/
|
563 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
564 |
+
|
565 |
+
__webpack_require__.r(__webpack_exports__);
|
566 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
567 |
+
/* harmony export */ "useResolveButtonType": function() { return /* binding */ useResolveButtonType; }
|
568 |
+
/* harmony export */ });
|
569 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
570 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
571 |
+
/* harmony import */ var _use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-iso-morphic-effect.esm.js */ "./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.esm.js");
|
572 |
+
|
573 |
+
|
574 |
+
|
575 |
+
function resolveType(props) {
|
576 |
+
var _props$as;
|
577 |
+
|
578 |
+
if (props.type) return props.type;
|
579 |
+
var tag = (_props$as = props.as) != null ? _props$as : 'button';
|
580 |
+
if (typeof tag === 'string' && tag.toLowerCase() === 'button') return 'button';
|
581 |
+
return undefined;
|
582 |
+
}
|
583 |
+
|
584 |
+
function useResolveButtonType(props, ref) {
|
585 |
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(function () {
|
586 |
+
return resolveType(props);
|
587 |
+
}),
|
588 |
+
type = _useState[0],
|
589 |
+
setType = _useState[1];
|
590 |
+
|
591 |
+
(0,_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_1__.useIsoMorphicEffect)(function () {
|
592 |
+
setType(resolveType(props));
|
593 |
+
}, [props.type, props.as]);
|
594 |
+
(0,_use_iso_morphic_effect_esm_js__WEBPACK_IMPORTED_MODULE_1__.useIsoMorphicEffect)(function () {
|
595 |
+
if (type) return;
|
596 |
+
if (!ref.current) return;
|
597 |
+
|
598 |
+
if (ref.current instanceof HTMLButtonElement && !ref.current.hasAttribute('type')) {
|
599 |
+
setType('button');
|
600 |
+
}
|
601 |
+
}, [type, ref]);
|
602 |
+
return type;
|
603 |
+
}
|
604 |
+
|
605 |
+
|
606 |
+
//# sourceMappingURL=use-resolve-button-type.esm.js.map
|
607 |
+
|
608 |
+
|
609 |
+
/***/ }),
|
610 |
+
|
611 |
+
/***/ "./node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.esm.js":
|
612 |
+
/*!**************************************************************************************!*\
|
613 |
+
!*** ./node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.esm.js ***!
|
614 |
+
\**************************************************************************************/
|
615 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
616 |
+
|
617 |
+
__webpack_require__.r(__webpack_exports__);
|
618 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
619 |
+
/* harmony export */ "useServerHandoffComplete": function() { return /* binding */ useServerHandoffComplete; }
|
620 |
+
/* harmony export */ });
|
621 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
622 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
623 |
+
|
624 |
+
|
625 |
+
var state = {
|
626 |
+
serverHandoffComplete: false
|
627 |
+
};
|
628 |
+
function useServerHandoffComplete() {
|
629 |
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(state.serverHandoffComplete),
|
630 |
+
serverHandoffComplete = _useState[0],
|
631 |
+
setServerHandoffComplete = _useState[1];
|
632 |
+
|
633 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
634 |
+
if (serverHandoffComplete === true) return;
|
635 |
+
setServerHandoffComplete(true);
|
636 |
+
}, [serverHandoffComplete]);
|
637 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
638 |
+
if (state.serverHandoffComplete === false) state.serverHandoffComplete = true;
|
639 |
+
}, []);
|
640 |
+
return serverHandoffComplete;
|
641 |
+
}
|
642 |
+
|
643 |
+
|
644 |
+
//# sourceMappingURL=use-server-handoff-complete.esm.js.map
|
645 |
+
|
646 |
+
|
647 |
+
/***/ }),
|
648 |
+
|
649 |
+
/***/ "./node_modules/@headlessui/react/dist/hooks/use-sync-refs.esm.js":
|
650 |
+
/*!************************************************************************!*\
|
651 |
+
!*** ./node_modules/@headlessui/react/dist/hooks/use-sync-refs.esm.js ***!
|
652 |
+
\************************************************************************/
|
653 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
654 |
+
|
655 |
+
__webpack_require__.r(__webpack_exports__);
|
656 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
657 |
+
/* harmony export */ "useSyncRefs": function() { return /* binding */ useSyncRefs; }
|
658 |
+
/* harmony export */ });
|
659 |
+
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js");
|
660 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
661 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
662 |
+
|
663 |
+
|
664 |
+
|
665 |
+
function useSyncRefs() {
|
666 |
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
667 |
+
refs[_key] = arguments[_key];
|
668 |
+
}
|
669 |
+
|
670 |
+
var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(refs);
|
671 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
672 |
+
cache.current = refs;
|
673 |
+
}, [refs]);
|
674 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (value) {
|
675 |
+
for (var _iterator = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.createForOfIteratorHelperLoose)(cache.current), _step; !(_step = _iterator()).done;) {
|
676 |
+
var ref = _step.value;
|
677 |
+
if (ref == null) continue;
|
678 |
+
if (typeof ref === 'function') ref(value);else ref.current = value;
|
679 |
+
}
|
680 |
+
}, [cache]);
|
681 |
+
}
|
682 |
+
|
683 |
+
|
684 |
+
//# sourceMappingURL=use-sync-refs.esm.js.map
|
685 |
+
|
686 |
+
|
687 |
+
/***/ }),
|
688 |
+
|
689 |
+
/***/ "./node_modules/@headlessui/react/dist/utils/bugs.esm.js":
|
690 |
+
/*!***************************************************************!*\
|
691 |
+
!*** ./node_modules/@headlessui/react/dist/utils/bugs.esm.js ***!
|
692 |
+
\***************************************************************/
|
693 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
694 |
+
|
695 |
+
__webpack_require__.r(__webpack_exports__);
|
696 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
697 |
+
/* harmony export */ "isDisabledReactIssue7711": function() { return /* binding */ isDisabledReactIssue7711; }
|
698 |
+
/* harmony export */ });
|
699 |
+
// See: https://github.com/facebook/react/issues/7711
|
700 |
+
// See: https://github.com/facebook/react/pull/20612
|
701 |
+
// See: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-disabled (2.)
|
702 |
+
function isDisabledReactIssue7711(element) {
|
703 |
+
var _ref, _parent;
|
704 |
+
|
705 |
+
var parent = element.parentElement;
|
706 |
+
var legend = null;
|
707 |
+
|
708 |
+
while (parent && !(parent instanceof HTMLFieldSetElement)) {
|
709 |
+
if (parent instanceof HTMLLegendElement) legend = parent;
|
710 |
+
parent = parent.parentElement;
|
711 |
+
}
|
712 |
+
|
713 |
+
var isParentDisabled = (_ref = ((_parent = parent) == null ? void 0 : _parent.getAttribute('disabled')) === '') != null ? _ref : false;
|
714 |
+
if (isParentDisabled && isFirstLegend(legend)) return false;
|
715 |
+
return isParentDisabled;
|
716 |
+
}
|
717 |
+
|
718 |
+
function isFirstLegend(element) {
|
719 |
+
if (!element) return false;
|
720 |
+
var previous = element.previousElementSibling;
|
721 |
+
|
722 |
+
while (previous !== null) {
|
723 |
+
if (previous instanceof HTMLLegendElement) return false;
|
724 |
+
previous = previous.previousElementSibling;
|
725 |
+
}
|
726 |
+
|
727 |
+
return true;
|
728 |
+
}
|
729 |
+
|
730 |
+
|
731 |
+
//# sourceMappingURL=bugs.esm.js.map
|
732 |
+
|
733 |
+
|
734 |
+
/***/ }),
|
735 |
+
|
736 |
+
/***/ "./node_modules/@headlessui/react/dist/utils/match.esm.js":
|
737 |
+
/*!****************************************************************!*\
|
738 |
+
!*** ./node_modules/@headlessui/react/dist/utils/match.esm.js ***!
|
739 |
+
\****************************************************************/
|
740 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
741 |
+
|
742 |
+
__webpack_require__.r(__webpack_exports__);
|
743 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
744 |
+
/* harmony export */ "match": function() { return /* binding */ match; }
|
745 |
+
/* harmony export */ });
|
746 |
+
function match(value, lookup) {
|
747 |
+
if (value in lookup) {
|
748 |
+
var returnValue = lookup[value];
|
749 |
+
|
750 |
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
751 |
+
args[_key - 2] = arguments[_key];
|
752 |
+
}
|
753 |
+
|
754 |
+
return typeof returnValue === 'function' ? returnValue.apply(void 0, args) : returnValue;
|
755 |
+
}
|
756 |
+
|
757 |
+
var error = new Error("Tried to handle \"" + value + "\" but there is no handler defined. Only defined handlers are: " + Object.keys(lookup).map(function (key) {
|
758 |
+
return "\"" + key + "\"";
|
759 |
+
}).join(', ') + ".");
|
760 |
+
if (Error.captureStackTrace) Error.captureStackTrace(error, match);
|
761 |
+
throw error;
|
762 |
+
}
|
763 |
+
|
764 |
+
|
765 |
+
//# sourceMappingURL=match.esm.js.map
|
766 |
+
|
767 |
+
|
768 |
+
/***/ }),
|
769 |
+
|
770 |
+
/***/ "./node_modules/@headlessui/react/dist/utils/render.esm.js":
|
771 |
+
/*!*****************************************************************!*\
|
772 |
+
!*** ./node_modules/@headlessui/react/dist/utils/render.esm.js ***!
|
773 |
+
\*****************************************************************/
|
774 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
775 |
+
|
776 |
+
__webpack_require__.r(__webpack_exports__);
|
777 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
778 |
+
/* harmony export */ "Features": function() { return /* binding */ Features; },
|
779 |
+
/* harmony export */ "RenderStrategy": function() { return /* binding */ RenderStrategy; },
|
780 |
+
/* harmony export */ "forwardRefWithAs": function() { return /* binding */ forwardRefWithAs; },
|
781 |
+
/* harmony export */ "render": function() { return /* binding */ render; }
|
782 |
+
/* harmony export */ });
|
783 |
+
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@headlessui/react/dist/_virtual/_rollupPluginBabelHelpers.js");
|
784 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
785 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
786 |
+
/* harmony import */ var _match_esm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./match.esm.js */ "./node_modules/@headlessui/react/dist/utils/match.esm.js");
|
787 |
+
|
788 |
+
|
789 |
+
|
790 |
+
|
791 |
+
var Features;
|
792 |
+
|
793 |
+
(function (Features) {
|
794 |
+
/** No features at all */
|
795 |
+
Features[Features["None"] = 0] = "None";
|
796 |
+
/**
|
797 |
+
* When used, this will allow us to use one of the render strategies.
|
798 |
+
*
|
799 |
+
* **The render strategies are:**
|
800 |
+
* - **Unmount** _(Will unmount the component.)_
|
801 |
+
* - **Hidden** _(Will hide the component using the [hidden] attribute.)_
|
802 |
+
*/
|
803 |
+
|
804 |
+
Features[Features["RenderStrategy"] = 1] = "RenderStrategy";
|
805 |
+
/**
|
806 |
+
* When used, this will allow the user of our component to be in control. This can be used when
|
807 |
+
* you want to transition based on some state.
|
808 |
+
*/
|
809 |
+
|
810 |
+
Features[Features["Static"] = 2] = "Static";
|
811 |
+
})(Features || (Features = {}));
|
812 |
+
|
813 |
+
var RenderStrategy;
|
814 |
+
|
815 |
+
(function (RenderStrategy) {
|
816 |
+
RenderStrategy[RenderStrategy["Unmount"] = 0] = "Unmount";
|
817 |
+
RenderStrategy[RenderStrategy["Hidden"] = 1] = "Hidden";
|
818 |
+
})(RenderStrategy || (RenderStrategy = {}));
|
819 |
+
|
820 |
+
function render(_ref) {
|
821 |
+
var props = _ref.props,
|
822 |
+
slot = _ref.slot,
|
823 |
+
defaultTag = _ref.defaultTag,
|
824 |
+
features = _ref.features,
|
825 |
+
_ref$visible = _ref.visible,
|
826 |
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
827 |
+
name = _ref.name;
|
828 |
+
// Visible always render
|
829 |
+
if (visible) return _render(props, slot, defaultTag, name);
|
830 |
+
var featureFlags = features != null ? features : Features.None;
|
831 |
+
|
832 |
+
if (featureFlags & Features.Static) {
|
833 |
+
var _props$static = props["static"],
|
834 |
+
isStatic = _props$static === void 0 ? false : _props$static,
|
835 |
+
rest = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.objectWithoutPropertiesLoose)(props, ["static"]); // When the `static` prop is passed as `true`, then the user is in control, thus we don't care about anything else
|
836 |
+
|
837 |
+
|
838 |
+
if (isStatic) return _render(rest, slot, defaultTag, name);
|
839 |
+
}
|
840 |
+
|
841 |
+
if (featureFlags & Features.RenderStrategy) {
|
842 |
+
var _match;
|
843 |
+
|
844 |
+
var _props$unmount = props.unmount,
|
845 |
+
unmount = _props$unmount === void 0 ? true : _props$unmount,
|
846 |
+
_rest = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.objectWithoutPropertiesLoose)(props, ["unmount"]);
|
847 |
+
|
848 |
+
var strategy = unmount ? RenderStrategy.Unmount : RenderStrategy.Hidden;
|
849 |
+
return (0,_match_esm_js__WEBPACK_IMPORTED_MODULE_2__.match)(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
850 |
+
return null;
|
851 |
+
}, _match[RenderStrategy.Hidden] = function () {
|
852 |
+
return _render((0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__["extends"])({}, _rest, {
|
853 |
+
hidden: true,
|
854 |
+
style: {
|
855 |
+
display: 'none'
|
856 |
+
}
|
857 |
+
}), slot, defaultTag, name);
|
858 |
+
}, _match));
|
859 |
+
} // No features enabled, just render
|
860 |
+
|
861 |
+
|
862 |
+
return _render(props, slot, defaultTag, name);
|
863 |
+
}
|
864 |
+
|
865 |
+
function _render(props, slot, tag, name) {
|
866 |
+
var _ref2;
|
867 |
+
|
868 |
+
if (slot === void 0) {
|
869 |
+
slot = {};
|
870 |
+
}
|
871 |
+
|
872 |
+
var _omit = omit(props, ['unmount', 'static']),
|
873 |
+
_omit$as = _omit.as,
|
874 |
+
Component = _omit$as === void 0 ? tag : _omit$as,
|
875 |
+
children = _omit.children,
|
876 |
+
_omit$refName = _omit.refName,
|
877 |
+
refName = _omit$refName === void 0 ? 'ref' : _omit$refName,
|
878 |
+
passThroughProps = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.objectWithoutPropertiesLoose)(_omit, ["as", "children", "refName"]); // This allows us to use `<HeadlessUIComponent as={MyComponent} refName="innerRef" />`
|
879 |
+
|
880 |
+
|
881 |
+
var refRelatedProps = props.ref !== undefined ? (_ref2 = {}, _ref2[refName] = props.ref, _ref2) : {};
|
882 |
+
var resolvedChildren = typeof children === 'function' ? children(slot) : children; // Allow for className to be a function with the slot as the contents
|
883 |
+
|
884 |
+
if (passThroughProps.className && typeof passThroughProps.className === 'function') {
|
885 |
+
passThroughProps.className = passThroughProps.className(slot);
|
886 |
+
}
|
887 |
+
|
888 |
+
if (Component === react__WEBPACK_IMPORTED_MODULE_0__.Fragment) {
|
889 |
+
if (Object.keys(passThroughProps).length > 0) {
|
890 |
+
if (!(0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(resolvedChildren) || Array.isArray(resolvedChildren) && resolvedChildren.length > 1) {
|
891 |
+
throw new Error(['Passing props on "Fragment"!', '', "The current component <" + name + " /> is rendering a \"Fragment\".", "However we need to passthrough the following props:", Object.keys(passThroughProps).map(function (line) {
|
892 |
+
return " - " + line;
|
893 |
+
}).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 (line) {
|
894 |
+
return " - " + line;
|
895 |
+
}).join('\n')].join('\n'));
|
896 |
+
}
|
897 |
+
|
898 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(resolvedChildren, Object.assign({}, // Filter out undefined values so that they don't override the existing values
|
899 |
+
mergeEventFunctions(compact(omit(passThroughProps, ['ref'])), resolvedChildren.props, ['onClick']), refRelatedProps));
|
900 |
+
}
|
901 |
+
}
|
902 |
+
|
903 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component, Object.assign({}, omit(passThroughProps, ['ref']), Component !== react__WEBPACK_IMPORTED_MODULE_0__.Fragment && refRelatedProps), resolvedChildren);
|
904 |
+
}
|
905 |
+
/**
|
906 |
+
* We can use this function for the following useCase:
|
907 |
+
*
|
908 |
+
* <Menu.Item> <button onClick={console.log} /> </Menu.Item>
|
909 |
+
*
|
910 |
+
* Our `Menu.Item` will have an internal `onClick`, if you passthrough an `onClick` to the actual
|
911 |
+
* `Menu.Item` component we will call it correctly. However, when we have an `onClick` on the actual
|
912 |
+
* first child, that one should _also_ be called (but before this implementation, it was just
|
913 |
+
* overriding the `onClick`). But it is only when we *render* that we have access to the existing
|
914 |
+
* props of this component.
|
915 |
+
*
|
916 |
+
* It's a bit hacky, and not that clean, but it is something internal and we have tests to rely on
|
917 |
+
* so that we can refactor this later (if needed).
|
918 |
+
*/
|
919 |
+
|
920 |
+
|
921 |
+
function mergeEventFunctions(passThroughProps, existingProps, functionsToMerge) {
|
922 |
+
var clone = Object.assign({}, passThroughProps);
|
923 |
+
|
924 |
+
var _loop = function _loop() {
|
925 |
+
var func = _step.value;
|
926 |
+
|
927 |
+
if (passThroughProps[func] !== undefined && existingProps[func] !== undefined) {
|
928 |
+
var _Object$assign;
|
929 |
+
|
930 |
+
Object.assign(clone, (_Object$assign = {}, _Object$assign[func] = function (event) {
|
931 |
+
// Props we control
|
932 |
+
if (!event.defaultPrevented) passThroughProps[func](event); // Existing props on the component
|
933 |
+
|
934 |
+
if (!event.defaultPrevented) existingProps[func](event);
|
935 |
+
}, _Object$assign));
|
936 |
+
}
|
937 |
+
};
|
938 |
+
|
939 |
+
for (var _iterator = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.createForOfIteratorHelperLoose)(functionsToMerge), _step; !(_step = _iterator()).done;) {
|
940 |
+
_loop();
|
941 |
+
}
|
942 |
+
|
943 |
+
return clone;
|
944 |
+
}
|
945 |
+
/**
|
946 |
+
* This is a hack, but basically we want to keep the full 'API' of the component, but we do want to
|
947 |
+
* wrap it in a forwardRef so that we _can_ passthrough the ref
|
948 |
+
*/
|
949 |
+
|
950 |
+
|
951 |
+
function forwardRefWithAs(component) {
|
952 |
+
var _component$displayNam;
|
953 |
+
|
954 |
+
return Object.assign((0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(component), {
|
955 |
+
displayName: (_component$displayNam = component.displayName) != null ? _component$displayNam : component.name
|
956 |
+
});
|
957 |
+
}
|
958 |
+
|
959 |
+
function compact(object) {
|
960 |
+
var clone = Object.assign({}, object);
|
961 |
+
|
962 |
+
for (var key in clone) {
|
963 |
+
if (clone[key] === undefined) delete clone[key];
|
964 |
+
}
|
965 |
+
|
966 |
+
return clone;
|
967 |
+
}
|
968 |
+
|
969 |
+
function omit(object, keysToOmit) {
|
970 |
+
if (keysToOmit === void 0) {
|
971 |
+
keysToOmit = [];
|
972 |
+
}
|
973 |
+
|
974 |
+
var clone = Object.assign({}, object);
|
975 |
+
|
976 |
+
for (var _iterator2 = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_1__.createForOfIteratorHelperLoose)(keysToOmit), _step2; !(_step2 = _iterator2()).done;) {
|
977 |
+
var key = _step2.value;
|
978 |
+
if (key in clone) delete clone[key];
|
979 |
+
}
|
980 |
+
|
981 |
+
return clone;
|
982 |
+
}
|
983 |
+
|
984 |
+
|
985 |
+
//# sourceMappingURL=render.esm.js.map
|
986 |
+
|
987 |
+
|
988 |
+
/***/ }),
|
989 |
+
|
990 |
+
/***/ "./wizard/src/Settings.js":
|
991 |
+
/*!********************************!*\
|
992 |
+
!*** ./wizard/src/Settings.js ***!
|
993 |
+
\********************************/
|
994 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
995 |
+
|
996 |
+
__webpack_require__.r(__webpack_exports__);
|
997 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
998 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
999 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1000 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1001 |
+
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js");
|
1002 |
+
/* harmony import */ var _Admin_pages_HomePage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @Admin/pages/HomePage */ "./wizard/src/pages/HomePage.js");
|
1003 |
+
/* harmony import */ var _Admin_pages_Success__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @Admin/pages/Success */ "./wizard/src/pages/Success.js");
|
1004 |
+
/* harmony import */ var _Admin_pages_ExpressCheckout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @Admin/pages/ExpressCheckout */ "./wizard/src/pages/ExpressCheckout.js");
|
1005 |
+
/* harmony import */ var _Admin_pages_Failed__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @Admin/pages/Failed */ "./wizard/src/pages/Failed.js");
|
1006 |
+
/* harmony import */ var _Admin_pages_ThankYou__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @Admin/pages/ThankYou */ "./wizard/src/pages/ThankYou.js");
|
1007 |
+
/* harmony import */ var _Admin_pages_WooCommerce__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @Admin/pages/WooCommerce */ "./wizard/src/pages/WooCommerce.js");
|
1008 |
+
/* harmony import */ var _Admin_components_Logo__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @Admin/components/Logo */ "./wizard/src/components/Logo.js");
|
1009 |
+
|
1010 |
+
|
1011 |
+
|
1012 |
+
|
1013 |
+
|
1014 |
+
|
1015 |
+
|
1016 |
+
|
1017 |
+
|
1018 |
+
|
1019 |
+
|
1020 |
+
function Settings() {
|
1021 |
+
const query = new URLSearchParams((0,react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useLocation)().search);
|
1022 |
+
const status = query.get('cpsw_call');
|
1023 |
+
let routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null);
|
1024 |
+
|
1025 |
+
switch (status) {
|
1026 |
+
case 'success':
|
1027 |
+
routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_pages_Success__WEBPACK_IMPORTED_MODULE_3__["default"], null);
|
1028 |
+
break;
|
1029 |
+
|
1030 |
+
case 'failed':
|
1031 |
+
routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_pages_Failed__WEBPACK_IMPORTED_MODULE_5__["default"], null);
|
1032 |
+
break;
|
1033 |
+
|
1034 |
+
case 'express-checkout':
|
1035 |
+
routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_pages_ExpressCheckout__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
1036 |
+
break;
|
1037 |
+
|
1038 |
+
case 'thank-you':
|
1039 |
+
routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_pages_ThankYou__WEBPACK_IMPORTED_MODULE_6__["default"], null);
|
1040 |
+
break;
|
1041 |
+
|
1042 |
+
case 'setup-woocommerce':
|
1043 |
+
routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_pages_WooCommerce__WEBPACK_IMPORTED_MODULE_7__["default"], null);
|
1044 |
+
break;
|
1045 |
+
|
1046 |
+
default:
|
1047 |
+
routePage = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_pages_HomePage__WEBPACK_IMPORTED_MODULE_2__["default"], null);
|
1048 |
+
break;
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1052 |
+
className: "relative bg-white overflow-hidden w-10/12 mx-auto my-0 rounded-xl mt-12"
|
1053 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1054 |
+
className: "max-w-7xl mx-auto overflow-x-hidden"
|
1055 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1056 |
+
className: "relative z-10 bg-white lg:w-full"
|
1057 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Logo__WEBPACK_IMPORTED_MODULE_8__["default"], null), routePage)));
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
/* harmony default export */ __webpack_exports__["default"] = (Settings);
|
1061 |
+
|
1062 |
+
/***/ }),
|
1063 |
+
|
1064 |
+
/***/ "./wizard/src/components/Logo.js":
|
1065 |
+
/*!***************************************!*\
|
1066 |
+
!*** ./wizard/src/components/Logo.js ***!
|
1067 |
+
\***************************************/
|
1068 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1069 |
+
|
1070 |
+
__webpack_require__.r(__webpack_exports__);
|
1071 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1072 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1073 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1074 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1075 |
+
|
1076 |
+
|
1077 |
+
|
1078 |
+
function Logo() {
|
1079 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1080 |
+
className: "relative pt-6 px-4 sm:px-6 lg:px-8"
|
1081 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("nav", {
|
1082 |
+
className: "relative flex items-center justify-center sm:h-10",
|
1083 |
+
"aria-label": "Logo"
|
1084 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1085 |
+
className: "flex items-center justify-center flex-grow"
|
1086 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1087 |
+
className: "flex items-center w-auto"
|
1088 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
1089 |
+
className: "h-16 w-full",
|
1090 |
+
src: onboarding_vars.assets_url + 'images/cpsw-logo.svg',
|
1091 |
+
alt: "Checkout Plugins - Stripe for WooCommerce"
|
1092 |
+
}))))));
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
/* harmony default export */ __webpack_exports__["default"] = (Logo);
|
1096 |
+
|
1097 |
+
/***/ }),
|
1098 |
+
|
1099 |
+
/***/ "./wizard/src/components/Spinner.js":
|
1100 |
+
/*!******************************************!*\
|
1101 |
+
!*** ./wizard/src/components/Spinner.js ***!
|
1102 |
+
\******************************************/
|
1103 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1104 |
+
|
1105 |
+
__webpack_require__.r(__webpack_exports__);
|
1106 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1107 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1108 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1109 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1110 |
+
|
1111 |
+
|
1112 |
+
|
1113 |
+
function Spinner() {
|
1114 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
|
1115 |
+
className: "animate-spin ml-2 mr-3 h-5 w-5 text-white",
|
1116 |
+
xmlns: "http://www.w3.org/2000/svg",
|
1117 |
+
fill: "none",
|
1118 |
+
viewBox: "0 0 24 24"
|
1119 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", {
|
1120 |
+
className: "opacity-25",
|
1121 |
+
cx: "12",
|
1122 |
+
cy: "12",
|
1123 |
+
r: "10",
|
1124 |
+
stroke: "currentColor",
|
1125 |
+
strokeWidth: "4"
|
1126 |
+
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
1127 |
+
className: "opacity-75",
|
1128 |
+
fill: "currentColor",
|
1129 |
+
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"
|
1130 |
+
}));
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
/* harmony default export */ __webpack_exports__["default"] = (Spinner);
|
1134 |
+
|
1135 |
+
/***/ }),
|
1136 |
+
|
1137 |
+
/***/ "./wizard/src/pages/ExpressCheckout.js":
|
1138 |
+
/*!*********************************************!*\
|
1139 |
+
!*** ./wizard/src/pages/ExpressCheckout.js ***!
|
1140 |
+
\*********************************************/
|
1141 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1142 |
+
|
1143 |
+
__webpack_require__.r(__webpack_exports__);
|
1144 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1145 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1146 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1147 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1148 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
|
1149 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
1150 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1151 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
1152 |
+
/* harmony import */ var _Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @Admin/components/Spinner */ "./wizard/src/components/Spinner.js");
|
1153 |
+
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js");
|
1154 |
+
|
1155 |
+
|
1156 |
+
|
1157 |
+
|
1158 |
+
|
1159 |
+
|
1160 |
+
|
1161 |
+
function ExpressCheckout() {
|
1162 |
+
const [clicked, setClicked] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
1163 |
+
const navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_5__.useNavigate)();
|
1164 |
+
|
1165 |
+
function enableExpressCheckout() {
|
1166 |
+
setClicked(true);
|
1167 |
+
const formData = new window.FormData();
|
1168 |
+
formData.append('action', 'cpsw_onboarding_enable_express_checkout');
|
1169 |
+
formData.append('security', onboarding_vars.cpsw_onboarding_enable_express_checkout);
|
1170 |
+
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({
|
1171 |
+
url: onboarding_vars.ajax_url,
|
1172 |
+
method: 'POST',
|
1173 |
+
body: formData
|
1174 |
+
}).then(res => {
|
1175 |
+
if (res.success) {
|
1176 |
+
navigate(onboarding_vars.navigator_base + `&cpsw_call=thank-you`);
|
1177 |
+
}
|
1178 |
+
});
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("main", {
|
1182 |
+
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"
|
1183 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1184 |
+
className: "text-center"
|
1185 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", {
|
1186 |
+
className: "text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"
|
1187 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1188 |
+
className: "block xl"
|
1189 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Wooho!!', 'checkout-plugins-stripe-woo')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1190 |
+
className: "block text-cart-500 xl:inline"
|
1191 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('You are almost done.', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1192 |
+
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"
|
1193 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1194 |
+
className: "block"
|
1195 |
+
}, " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Since you have enabled', 'checkout-plugins-stripe-woo'), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1196 |
+
className: "block text-gray-700 xl:inline font-bold"
|
1197 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Stripe Card Processing', 'checkout-plugins-stripe-woo'), ","), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)(' We recommend you to enable', 'checkout-plugins-stripe-woo'), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1198 |
+
className: "block text-gray-700 xl:inline font-bold"
|
1199 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Express Checkout', 'checkout-plugins-stripe-woo')), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('feature', 'checkout-plugins-stripe-woo'), "."), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Express Checkout generates more conversions!!', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1200 |
+
className: "block mx-auto mt-1 mb-1"
|
1201 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
1202 |
+
className: "inline mx-4 py-5 h-24",
|
1203 |
+
src: onboarding_vars.assets_url + 'images/apple-pay.svg',
|
1204 |
+
alt: "Express Checkout"
|
1205 |
+
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
1206 |
+
className: "inline mx-4 py-5 h-24",
|
1207 |
+
src: onboarding_vars.assets_url + 'images/gpay.svg',
|
1208 |
+
alt: "Express Checkout"
|
1209 |
+
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1210 |
+
className: "sm:inline-block lg:inline-block sm:justify-center lg:justify-center"
|
1211 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1212 |
+
className: "rounded-md shadow"
|
1213 |
+
}, clicked ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1214 |
+
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"
|
1215 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enabling…', 'checkout-plugins-stripe-woo'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__["default"], null)) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1216 |
+
onClick: enableExpressCheckout,
|
1217 |
+
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"
|
1218 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enable Express Checkout', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1219 |
+
className: "mt-3 sm:mt-0 sm:ml-3"
|
1220 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
|
1221 |
+
href: onboarding_vars.base_url + `&cpsw_call=thank-you`,
|
1222 |
+
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"
|
1223 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Skip Express Checkout', 'checkout-plugins-stripe-woo'))))));
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
/* harmony default export */ __webpack_exports__["default"] = (ExpressCheckout);
|
1227 |
+
|
1228 |
+
/***/ }),
|
1229 |
+
|
1230 |
+
/***/ "./wizard/src/pages/Failed.js":
|
1231 |
+
/*!************************************!*\
|
1232 |
+
!*** ./wizard/src/pages/Failed.js ***!
|
1233 |
+
\************************************/
|
1234 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1235 |
+
|
1236 |
+
__webpack_require__.r(__webpack_exports__);
|
1237 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1238 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1239 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1240 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1241 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1242 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
1243 |
+
|
1244 |
+
|
1245 |
+
|
1246 |
+
|
1247 |
+
function Failed() {
|
1248 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("main", {
|
1249 |
+
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"
|
1250 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1251 |
+
className: "text-center"
|
1252 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", {
|
1253 |
+
className: "text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"
|
1254 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1255 |
+
className: "block text-red-600 xl:inline"
|
1256 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed!!', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1257 |
+
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"
|
1258 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1259 |
+
className: "block"
|
1260 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Unfortunately Connection to Stripe failed.', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1261 |
+
className: "mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"
|
1262 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1263 |
+
className: "rounded-md shadow"
|
1264 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
|
1265 |
+
href: onboarding_vars.authorization_url,
|
1266 |
+
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"
|
1267 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Try Again', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1268 |
+
className: "mt-3 sm:mt-0 sm:ml-3"
|
1269 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
|
1270 |
+
href: onboarding_vars.manual_connect_url,
|
1271 |
+
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"
|
1272 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Manage API keys manually', 'checkout-plugins-stripe-woo'))))));
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
/* harmony default export */ __webpack_exports__["default"] = (Failed);
|
1276 |
+
|
1277 |
+
/***/ }),
|
1278 |
+
|
1279 |
+
/***/ "./wizard/src/pages/HomePage.js":
|
1280 |
+
/*!**************************************!*\
|
1281 |
+
!*** ./wizard/src/pages/HomePage.js ***!
|
1282 |
+
\**************************************/
|
1283 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1284 |
+
|
1285 |
+
__webpack_require__.r(__webpack_exports__);
|
1286 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1287 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1288 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1289 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1290 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1291 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
1292 |
+
/* harmony import */ var _Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @Admin/components/Spinner */ "./wizard/src/components/Spinner.js");
|
1293 |
+
|
1294 |
+
|
1295 |
+
|
1296 |
+
|
1297 |
+
|
1298 |
+
function HomePage() {
|
1299 |
+
const [clicked, setClicked] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
1300 |
+
|
1301 |
+
function connectWithStripe() {
|
1302 |
+
setClicked(true);
|
1303 |
+
window.location.replace(onboarding_vars.authorization_url);
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("main", {
|
1307 |
+
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"
|
1308 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1309 |
+
className: "text-center"
|
1310 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", {
|
1311 |
+
className: "text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"
|
1312 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1313 |
+
className: "block xl"
|
1314 |
+
}, " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Let\'s Connect', 'checkout-plugins-stripe-woo')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1315 |
+
className: "block text-cart-500 xl:inline"
|
1316 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('with Stripe', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1317 |
+
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"
|
1318 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1319 |
+
className: "block"
|
1320 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1321 |
+
className: "block text-gray-700 inline font-bold"
|
1322 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Checkout Plugins', 'checkout-plugins-stripe-woo')), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('recommends to connect with', 'checkout-plugins-stripe-woo'), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1323 |
+
className: "block text-gray-700 xl:inline font-bold"
|
1324 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Stripe connect.', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('One click onboarding solution provided by', 'checkout-plugins-stripe-woo'), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1325 |
+
className: "block text-gray-700 xl:inline font-bold"
|
1326 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Stripe.', 'checkout-plugins-stripe-woo')))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1327 |
+
className: "mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"
|
1328 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1329 |
+
className: "rounded-md shadow"
|
1330 |
+
}, clicked ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1331 |
+
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"
|
1332 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Connecting…', 'checkout-plugins-stripe-woo'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_3__["default"], null)) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1333 |
+
onClick: connectWithStripe,
|
1334 |
+
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"
|
1335 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Connect with Stripe', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1336 |
+
className: "mt-3 sm:mt-0 sm:ml-3"
|
1337 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
|
1338 |
+
href: onboarding_vars.settings_url,
|
1339 |
+
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"
|
1340 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Leave onboarding process', 'checkout-plugins-stripe-woo'))))));
|
1341 |
+
}
|
1342 |
+
|
1343 |
+
/* harmony default export */ __webpack_exports__["default"] = (HomePage);
|
1344 |
+
|
1345 |
+
/***/ }),
|
1346 |
+
|
1347 |
+
/***/ "./wizard/src/pages/Success.js":
|
1348 |
+
/*!*************************************!*\
|
1349 |
+
!*** ./wizard/src/pages/Success.js ***!
|
1350 |
+
\*************************************/
|
1351 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1352 |
+
|
1353 |
+
__webpack_require__.r(__webpack_exports__);
|
1354 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1355 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1356 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1357 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1358 |
+
/* harmony import */ var _headlessui_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @headlessui/react */ "./node_modules/@headlessui/react/dist/components/switch/switch.esm.js");
|
1359 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
|
1360 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
1361 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1362 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
1363 |
+
/* harmony import */ var _Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @Admin/components/Spinner */ "./wizard/src/components/Spinner.js");
|
1364 |
+
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js");
|
1365 |
+
|
1366 |
+
|
1367 |
+
|
1368 |
+
|
1369 |
+
|
1370 |
+
|
1371 |
+
|
1372 |
+
|
1373 |
+
function classNames() {
|
1374 |
+
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
|
1375 |
+
classes[_key] = arguments[_key];
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
return classes.filter(Boolean).join(' ');
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
function Success() {
|
1382 |
+
const [clicked, setClicked] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
1383 |
+
const [gateways, setGateways] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(onboarding_vars.available_gateways);
|
1384 |
+
const navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_5__.useNavigate)();
|
1385 |
+
|
1386 |
+
function enableGateways(e) {
|
1387 |
+
e.preventDefault();
|
1388 |
+
setClicked(true);
|
1389 |
+
const formData = new window.FormData();
|
1390 |
+
const object = {};
|
1391 |
+
gateways.forEach(function (value) {
|
1392 |
+
object[value.id] = document.getElementsByName(value.id)[0].value;
|
1393 |
+
});
|
1394 |
+
const json = JSON.stringify(object);
|
1395 |
+
formData.append('formdata', json);
|
1396 |
+
formData.append('action', 'cpsw_onboarding_enable_gateway');
|
1397 |
+
formData.append('security', onboarding_vars.cpsw_onboarding_enable_gateway);
|
1398 |
+
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({
|
1399 |
+
url: onboarding_vars.ajax_url,
|
1400 |
+
method: 'POST',
|
1401 |
+
body: formData
|
1402 |
+
}).then(res => {
|
1403 |
+
if (res.success) {
|
1404 |
+
if (true === res.data.activated_gateways.cpsw_stripe) {
|
1405 |
+
navigate(onboarding_vars.navigator_base + `&cpsw_call=express-checkout`);
|
1406 |
+
} else {
|
1407 |
+
navigate(onboarding_vars.navigator_base + `&cpsw_call=thank-you`);
|
1408 |
+
}
|
1409 |
+
}
|
1410 |
+
});
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("main", {
|
1414 |
+
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"
|
1415 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1416 |
+
className: "text-center"
|
1417 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1418 |
+
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"
|
1419 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1420 |
+
className: "block"
|
1421 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1422 |
+
className: "text-gray-700 inline font-bold"
|
1423 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Congratulations!!', 'checkout-plugins-stripe-woo'), " "), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('You are connected to Stripe successfully.', 'checkout-plugins-stripe-woo')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1424 |
+
className: "block"
|
1425 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Let\'s enable gateways', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
|
1426 |
+
role: "list",
|
1427 |
+
className: "divide-y divide-gray-200 bg-white overflow-hidden sm:rounded-md mt-10 max-w-screen-md mx-auto"
|
1428 |
+
}, gateways.map(gateway => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
|
1429 |
+
key: gateway.id
|
1430 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1431 |
+
href: "#",
|
1432 |
+
className: "block hover:bg-gray-50"
|
1433 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1434 |
+
className: "flex items-center px-4 py-4 sm:px-6"
|
1435 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1436 |
+
className: "min-w-0 flex-1 flex items-center"
|
1437 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1438 |
+
className: "flex-shrink-0"
|
1439 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
1440 |
+
className: "h-12 w-32 max-w-80",
|
1441 |
+
src: gateway.icon,
|
1442 |
+
alt: gateway.name
|
1443 |
+
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1444 |
+
className: "min-w-0 flex-1 px-4 md:gap-4"
|
1445 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1446 |
+
className: "text-sm font-medium text-cart-500 flex truncate"
|
1447 |
+
}, gateway.name, " ", gateway.recommended ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1448 |
+
className: "ml-2 px-2 py-1 text-green-800 text-xs font-medium bg-green-100 rounded-full"
|
1449 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Recommended', 'checkout-plugins-stripe-woo')) : ''), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1450 |
+
className: "text-sm font-medium text-gray-400 flex"
|
1451 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1452 |
+
className: "text-left text-sm"
|
1453 |
+
}, 'all' === gateway.currencies ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Works with all currencies', 'checkout-plugins-stripe-woo') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Works with ', 'checkout-plugins-stripe-woo') + gateway.currencies))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_headlessui_react__WEBPACK_IMPORTED_MODULE_6__.Switch, {
|
1454 |
+
checked: gateway.enabled,
|
1455 |
+
value: gateway.enabled,
|
1456 |
+
name: gateway.id,
|
1457 |
+
onChange: () => {
|
1458 |
+
gateway.enabled = !gateway.enabled;
|
1459 |
+
setGateways([...gateways]);
|
1460 |
+
},
|
1461 |
+
className: classNames(gateway.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')
|
1462 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1463 |
+
className: "sr-only"
|
1464 |
+
}, gateway.id), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1465 |
+
"aria-hidden": "true",
|
1466 |
+
className: classNames(gateway.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')
|
1467 |
+
})))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1468 |
+
className: "mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"
|
1469 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1470 |
+
className: "rounded-md shadow"
|
1471 |
+
}, clicked ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1472 |
+
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"
|
1473 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enabling…', 'checkout-plugins-stripe-woo'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__["default"], null)) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1474 |
+
onClick: enableGateways,
|
1475 |
+
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"
|
1476 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Enable Gateways', 'checkout-plugins-stripe-woo'))))));
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
/* harmony default export */ __webpack_exports__["default"] = (Success);
|
1480 |
+
|
1481 |
+
/***/ }),
|
1482 |
+
|
1483 |
+
/***/ "./wizard/src/pages/ThankYou.js":
|
1484 |
+
/*!**************************************!*\
|
1485 |
+
!*** ./wizard/src/pages/ThankYou.js ***!
|
1486 |
+
\**************************************/
|
1487 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1488 |
+
|
1489 |
+
__webpack_require__.r(__webpack_exports__);
|
1490 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1491 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1492 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1493 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1494 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1495 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
1496 |
+
/* harmony import */ var _Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @Admin/components/Spinner */ "./wizard/src/components/Spinner.js");
|
1497 |
+
|
1498 |
+
|
1499 |
+
|
1500 |
+
|
1501 |
+
|
1502 |
+
function ThankYou() {
|
1503 |
+
const [clicked, setClicked] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
1504 |
+
|
1505 |
+
function letsCustomize() {
|
1506 |
+
setClicked(true);
|
1507 |
+
window.location.replace(onboarding_vars.gateways_url);
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("main", {
|
1511 |
+
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"
|
1512 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1513 |
+
className: "text-center"
|
1514 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", {
|
1515 |
+
className: "text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"
|
1516 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1517 |
+
className: "block text-cart-500 xl:inline"
|
1518 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Great!!', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1519 |
+
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"
|
1520 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1521 |
+
className: "block"
|
1522 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Your store is all set to accept payment.', 'checkout-plugins-stripe-woo')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('We provide lots of customization options to match your needs, don\'t forget to explore them.', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1523 |
+
className: "mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center"
|
1524 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1525 |
+
className: "rounded-md shadow"
|
1526 |
+
}, clicked ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1527 |
+
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"
|
1528 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Let\'s Customize…', 'checkout-plugins-stripe-woo'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_3__["default"], null)) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1529 |
+
onClick: letsCustomize,
|
1530 |
+
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"
|
1531 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Let\'s Customize', 'checkout-plugins-stripe-woo'))))));
|
1532 |
+
}
|
1533 |
+
|
1534 |
+
/* harmony default export */ __webpack_exports__["default"] = (ThankYou);
|
1535 |
+
|
1536 |
+
/***/ }),
|
1537 |
+
|
1538 |
+
/***/ "./wizard/src/pages/WooCommerce.js":
|
1539 |
+
/*!*****************************************!*\
|
1540 |
+
!*** ./wizard/src/pages/WooCommerce.js ***!
|
1541 |
+
\*****************************************/
|
1542 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1543 |
+
|
1544 |
+
__webpack_require__.r(__webpack_exports__);
|
1545 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1546 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1547 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
1548 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
1549 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
|
1550 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
1551 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1552 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
1553 |
+
/* harmony import */ var _Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @Admin/components/Spinner */ "./wizard/src/components/Spinner.js");
|
1554 |
+
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js");
|
1555 |
+
|
1556 |
+
|
1557 |
+
|
1558 |
+
|
1559 |
+
|
1560 |
+
|
1561 |
+
|
1562 |
+
function WooCommerce() {
|
1563 |
+
const [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');
|
1564 |
+
const [notification, setNotification] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
1565 |
+
const navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_5__.useNavigate)();
|
1566 |
+
|
1567 |
+
function installWooCommerce() {
|
1568 |
+
if ('' === onboarding_vars.woocommerce_installed) {
|
1569 |
+
setState('installing');
|
1570 |
+
setTimeout(() => {
|
1571 |
+
setNotification(true);
|
1572 |
+
}, 10000);
|
1573 |
+
wp.updates.queue.push({
|
1574 |
+
action: 'install-plugin',
|
1575 |
+
// Required action.
|
1576 |
+
data: {
|
1577 |
+
slug: 'woocommerce'
|
1578 |
+
}
|
1579 |
+
}); // Required to set queue.
|
1580 |
+
|
1581 |
+
wp.updates.queueChecker();
|
1582 |
+
} else {
|
1583 |
+
setState('activating');
|
1584 |
+
const formData = new window.FormData();
|
1585 |
+
formData.append('action', 'cpsw_onboarding_install_woocommerce');
|
1586 |
+
formData.append('security', onboarding_vars.cpsw_onboarding_install_woocommerce);
|
1587 |
+
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({
|
1588 |
+
url: onboarding_vars.ajax_url,
|
1589 |
+
method: 'POST',
|
1590 |
+
body: formData
|
1591 |
+
}).then(res => {
|
1592 |
+
if (res.success) {
|
1593 |
+
navigate(onboarding_vars.navigator_base);
|
1594 |
+
}
|
1595 |
+
});
|
1596 |
+
}
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("main", {
|
1600 |
+
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"
|
1601 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1602 |
+
className: "text-center"
|
1603 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", {
|
1604 |
+
className: "text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl"
|
1605 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1606 |
+
className: "block xl"
|
1607 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Missing', 'checkout-plugins-stripe-woo')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1608 |
+
className: "block text-cart-500 xl:inline"
|
1609 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('WooCoomerce', 'checkout-plugins-stripe-woo'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1610 |
+
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"
|
1611 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1612 |
+
className: "block text-gray-700 xl:inline font-bold"
|
1613 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Checkout Plugins - Stripe for WooCoomerce', 'checkout-plugins-stripe-woo')), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('requires', 'checkout-plugins-stripe-woo'), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
1614 |
+
className: "block text-gray-700 xl:inline font-bold"
|
1615 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('WooCommerce', 'checkout-plugins-stripe-woo')), " ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('to be active on your store.', 'checkout-plugins-stripe-woo')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1616 |
+
className: "mt-5 sm:mt-8 sm:flex justify-center"
|
1617 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1618 |
+
className: "rounded-md shadow"
|
1619 |
+
}, (() => {
|
1620 |
+
if ('installing' === state) {
|
1621 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1622 |
+
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"
|
1623 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Installing…', 'checkout-plugins-stripe-woo'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__["default"], null));
|
1624 |
+
} else if ('activating' === state) {
|
1625 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1626 |
+
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"
|
1627 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Activating…', 'checkout-plugins-stripe-woo'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_components_Spinner__WEBPACK_IMPORTED_MODULE_4__["default"], null));
|
1628 |
+
}
|
1629 |
+
|
1630 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
1631 |
+
onClick: installWooCommerce,
|
1632 |
+
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"
|
1633 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Install and continue', 'checkout-plugins-stripe-woo'));
|
1634 |
+
})()))), notification ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1635 |
+
className: "bg-cart-50 p-4 fixed left-0 top-0 right-0 transition ease-in-out delay-150"
|
1636 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1637 |
+
className: "block"
|
1638 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
1639 |
+
className: "text-center justify-center"
|
1640 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
1641 |
+
className: "text-sm mx-auto w-full text-cart-500 text-center"
|
1642 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Installing WooCommerce will take time. Please be patient.'))))) : '');
|
1643 |
+
}
|
1644 |
+
|
1645 |
+
/* harmony default export */ __webpack_exports__["default"] = (WooCommerce);
|
1646 |
+
|
1647 |
+
/***/ }),
|
1648 |
+
|
1649 |
+
/***/ "./node_modules/history/index.js":
|
1650 |
+
/*!***************************************!*\
|
1651 |
+
!*** ./node_modules/history/index.js ***!
|
1652 |
+
\***************************************/
|
1653 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1654 |
+
|
1655 |
+
__webpack_require__.r(__webpack_exports__);
|
1656 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1657 |
+
/* harmony export */ "Action": function() { return /* binding */ r; },
|
1658 |
+
/* harmony export */ "createBrowserHistory": function() { return /* binding */ createBrowserHistory; },
|
1659 |
+
/* harmony export */ "createHashHistory": function() { return /* binding */ createHashHistory; },
|
1660 |
+
/* harmony export */ "createMemoryHistory": function() { return /* binding */ createMemoryHistory; },
|
1661 |
+
/* harmony export */ "createPath": function() { return /* binding */ I; },
|
1662 |
+
/* harmony export */ "parsePath": function() { return /* binding */ J; }
|
1663 |
+
/* harmony export */ });
|
1664 |
+
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
|
1665 |
+
var r,B=r||(r={});B.Pop="POP";B.Push="PUSH";B.Replace="REPLACE";var C= true?function(b){return Object.freeze(b)}:0;function D(b,h){if(!b){"undefined"!==typeof console&&console.warn(h);try{throw Error(h);}catch(e){}}}function E(b){b.preventDefault();b.returnValue=""}
|
1666 |
+
function F(){var b=[];return{get length(){return b.length},push:function(h){b.push(h);return function(){b=b.filter(function(e){return e!==h})}},call:function(h){b.forEach(function(e){return e&&e(h)})}}}function H(){return Math.random().toString(36).substr(2,8)}function I(b){var h=b.pathname;h=void 0===h?"/":h;var e=b.search;e=void 0===e?"":e;b=b.hash;b=void 0===b?"":b;e&&"?"!==e&&(h+="?"===e.charAt(0)?e:"?"+e);b&&"#"!==b&&(h+="#"===b.charAt(0)?b:"#"+b);return h}
|
1667 |
+
function J(b){var h={};if(b){var e=b.indexOf("#");0<=e&&(h.hash=b.substr(e),b=b.substr(0,e));e=b.indexOf("?");0<=e&&(h.search=b.substr(e),b=b.substr(0,e));b&&(h.pathname=b)}return h}
|
1668 |
+
function createBrowserHistory(b){function h(){var c=p.location,a=m.state||{};return[a.idx,C({pathname:c.pathname,search:c.search,hash:c.hash,state:a.usr||null,key:a.key||"default"})]}function e(c){return"string"===typeof c?c:I(c)}function x(c,a){void 0===a&&(a=null);return C((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({pathname:q.pathname,hash:"",search:""},"string"===typeof c?J(c):c,{state:a,key:H()}))}function z(c){t=c;c=h();v=c[0];q=c[1];d.call({action:t,location:q})}function A(c,a){function f(){A(c,a)}var l=r.Push,k=x(c,
|
1669 |
+
a);if(!g.length||(g.call({action:l,location:k,retry:f}),!1)){var n=[{usr:k.state,key:k.key,idx:v+1},e(k)];k=n[0];n=n[1];try{m.pushState(k,"",n)}catch(G){p.location.assign(n)}z(l)}}function y(c,a){function f(){y(c,a)}var l=r.Replace,k=x(c,a);g.length&&(g.call({action:l,location:k,retry:f}),1)||(k=[{usr:k.state,key:k.key,idx:v},e(k)],m.replaceState(k[0],"",k[1]),z(l))}function w(c){m.go(c)}void 0===b&&(b={});b=b.window;var p=void 0===b?document.defaultView:b,m=p.history,u=null;p.addEventListener("popstate",
|
1670 |
+
function(){if(u)g.call(u),u=null;else{var c=r.Pop,a=h(),f=a[0];a=a[1];if(g.length)if(null!=f){var l=v-f;l&&(u={action:c,location:a,retry:function(){w(-1*l)}},w(l))}else true?D(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."):
|
1671 |
+
0;else z(c)}});var t=r.Pop;b=h();var v=b[0],q=b[1],d=F(),g=F();null==v&&(v=0,m.replaceState((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({},m.state,{idx:v}),""));return{get action(){return t},get location(){return q},createHref:e,push:A,replace:y,go:w,back:function(){w(-1)},forward:function(){w(1)},listen:function(c){return d.push(c)},block:function(c){var a=g.push(c);1===g.length&&p.addEventListener("beforeunload",E);return function(){a();g.length||p.removeEventListener("beforeunload",E)}}}};
|
1672 |
+
function createHashHistory(b){function h(){var a=J(m.location.hash.substr(1)),f=a.pathname,l=a.search;a=a.hash;var k=u.state||{};return[k.idx,C({pathname:void 0===f?"/":f,search:void 0===l?"":l,hash:void 0===a?"":a,state:k.usr||null,key:k.key||"default"})]}function e(){if(t)c.call(t),t=null;else{var a=r.Pop,f=h(),l=f[0];f=f[1];if(c.length)if(null!=l){var k=q-l;k&&(t={action:a,location:f,retry:function(){p(-1*k)}},p(k))}else true?D(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."):
|
1673 |
+
0;else A(a)}}function x(a){var f=document.querySelector("base"),l="";f&&f.getAttribute("href")&&(f=m.location.href,l=f.indexOf("#"),l=-1===l?f:f.slice(0,l));return l+"#"+("string"===typeof a?a:I(a))}function z(a,f){void 0===f&&(f=null);return C((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({pathname:d.pathname,hash:"",search:""},"string"===typeof a?J(a):a,{state:f,key:H()}))}function A(a){v=a;a=h();q=a[0];d=a[1];g.call({action:v,location:d})}function y(a,f){function l(){y(a,f)}var k=r.Push,n=z(a,f); true?
|
1674 |
+
D("/"===n.pathname.charAt(0),"Relative pathnames are not supported in hash history.push("+JSON.stringify(a)+")"):0;if(!c.length||(c.call({action:k,location:n,retry:l}),!1)){var G=[{usr:n.state,key:n.key,idx:q+1},x(n)];n=G[0];G=G[1];try{u.pushState(n,"",G)}catch(K){m.location.assign(G)}A(k)}}function w(a,f){function l(){w(a,f)}var k=r.Replace,n=z(a,f); true?D("/"===n.pathname.charAt(0),"Relative pathnames are not supported in hash history.replace("+JSON.stringify(a)+
|
1675 |
+
")"):0;c.length&&(c.call({action:k,location:n,retry:l}),1)||(n=[{usr:n.state,key:n.key,idx:q},x(n)],u.replaceState(n[0],"",n[1]),A(k))}function p(a){u.go(a)}void 0===b&&(b={});b=b.window;var m=void 0===b?document.defaultView:b,u=m.history,t=null;m.addEventListener("popstate",e);m.addEventListener("hashchange",function(){var a=h()[1];I(a)!==I(d)&&e()});var v=r.Pop;b=h();var q=b[0],d=b[1],g=F(),c=F();null==q&&(q=0,u.replaceState((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({},u.state,{idx:q}),""));return{get action(){return v},get location(){return d},
|
1676 |
+
createHref:x,push:y,replace:w,go:p,back:function(){p(-1)},forward:function(){p(1)},listen:function(a){return g.push(a)},block:function(a){var f=c.push(a);1===c.length&&m.addEventListener("beforeunload",E);return function(){f();c.length||m.removeEventListener("beforeunload",E)}}}};
|
1677 |
+
function createMemoryHistory(b){function h(d,g){void 0===g&&(g=null);return C((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({pathname:t.pathname,search:"",hash:""},"string"===typeof d?J(d):d,{state:g,key:H()}))}function e(d,g,c){return!q.length||(q.call({action:d,location:g,retry:c}),!1)}function x(d,g){u=d;t=g;v.call({action:u,location:t})}function z(d,g){var c=r.Push,a=h(d,g); true?D("/"===t.pathname.charAt(0),"Relative pathnames are not supported in memory history.push("+JSON.stringify(d)+")"):
|
1678 |
+
0;e(c,a,function(){z(d,g)})&&(m+=1,p.splice(m,p.length,a),x(c,a))}function A(d,g){var c=r.Replace,a=h(d,g); true?D("/"===t.pathname.charAt(0),"Relative pathnames are not supported in memory history.replace("+JSON.stringify(d)+")"):0;e(c,a,function(){A(d,g)})&&(p[m]=a,x(c,a))}function y(d){var g=Math.min(Math.max(m+d,0),p.length-1),c=r.Pop,a=p[g];e(c,a,function(){y(d)})&&(m=g,x(c,a))}void 0===b&&(b={});var w=b;b=w.initialEntries;w=w.initialIndex;var p=(void 0===
|
1679 |
+
b?["/"]:b).map(function(d){var g=C((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({pathname:"/",search:"",hash:"",state:null,key:H()},"string"===typeof d?J(d):d)); true?D("/"===g.pathname.charAt(0),"Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(d)+")"):0;return g}),m=Math.min(Math.max(null==w?p.length-1:w,0),p.length-1),u=r.Pop,t=p[m],v=F(),q=F();return{get index(){return m},get action(){return u},get location(){return t},createHref:function(d){return"string"===
|
1680 |
+
typeof d?d:I(d)},push:z,replace:A,go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(d){return v.push(d)},block:function(d){return q.push(d)}}};
|
1681 |
+
//# sourceMappingURL=index.js.map
|
1682 |
+
|
1683 |
+
|
1684 |
+
/***/ }),
|
1685 |
+
|
1686 |
+
/***/ "./wizard/src/App.scss":
|
1687 |
+
/*!*****************************!*\
|
1688 |
+
!*** ./wizard/src/App.scss ***!
|
1689 |
+
\*****************************/
|
1690 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1691 |
+
|
1692 |
+
__webpack_require__.r(__webpack_exports__);
|
1693 |
+
// extracted by mini-css-extract-plugin
|
1694 |
+
|
1695 |
+
|
1696 |
+
/***/ }),
|
1697 |
+
|
1698 |
+
/***/ "./node_modules/react-router-dom/index.js":
|
1699 |
+
/*!************************************************!*\
|
1700 |
+
!*** ./node_modules/react-router-dom/index.js ***!
|
1701 |
+
\************************************************/
|
1702 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1703 |
+
|
1704 |
+
__webpack_require__.r(__webpack_exports__);
|
1705 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1706 |
+
/* harmony export */ "MemoryRouter": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.MemoryRouter; },
|
1707 |
+
/* harmony export */ "Navigate": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.Navigate; },
|
1708 |
+
/* harmony export */ "Outlet": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.Outlet; },
|
1709 |
+
/* harmony export */ "Route": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.Route; },
|
1710 |
+
/* harmony export */ "Router": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.Router; },
|
1711 |
+
/* harmony export */ "Routes": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.Routes; },
|
1712 |
+
/* harmony export */ "UNSAFE_LocationContext": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_LocationContext; },
|
1713 |
+
/* harmony export */ "UNSAFE_NavigationContext": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_NavigationContext; },
|
1714 |
+
/* harmony export */ "UNSAFE_RouteContext": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_RouteContext; },
|
1715 |
+
/* harmony export */ "createRoutesFromChildren": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.createRoutesFromChildren; },
|
1716 |
+
/* harmony export */ "generatePath": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.generatePath; },
|
1717 |
+
/* harmony export */ "matchPath": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.matchPath; },
|
1718 |
+
/* harmony export */ "matchRoutes": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.matchRoutes; },
|
1719 |
+
/* harmony export */ "renderMatches": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.renderMatches; },
|
1720 |
+
/* harmony export */ "resolvePath": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.resolvePath; },
|
1721 |
+
/* harmony export */ "useHref": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useHref; },
|
1722 |
+
/* harmony export */ "useInRouterContext": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useInRouterContext; },
|
1723 |
+
/* harmony export */ "useLocation": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useLocation; },
|
1724 |
+
/* harmony export */ "useMatch": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useMatch; },
|
1725 |
+
/* harmony export */ "useNavigate": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useNavigate; },
|
1726 |
+
/* harmony export */ "useNavigationType": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useNavigationType; },
|
1727 |
+
/* harmony export */ "useOutlet": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useOutlet; },
|
1728 |
+
/* harmony export */ "useOutletContext": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useOutletContext; },
|
1729 |
+
/* harmony export */ "useParams": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useParams; },
|
1730 |
+
/* harmony export */ "useResolvedPath": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useResolvedPath; },
|
1731 |
+
/* harmony export */ "useRoutes": function() { return /* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.useRoutes; },
|
1732 |
+
/* harmony export */ "BrowserRouter": function() { return /* binding */ BrowserRouter; },
|
1733 |
+
/* harmony export */ "HashRouter": function() { return /* binding */ HashRouter; },
|
1734 |
+
/* harmony export */ "Link": function() { return /* binding */ Link; },
|
1735 |
+
/* harmony export */ "NavLink": function() { return /* binding */ NavLink; },
|
1736 |
+
/* harmony export */ "createSearchParams": function() { return /* binding */ createSearchParams; },
|
1737 |
+
/* harmony export */ "unstable_HistoryRouter": function() { return /* binding */ HistoryRouter; },
|
1738 |
+
/* harmony export */ "useLinkClickHandler": function() { return /* binding */ useLinkClickHandler; },
|
1739 |
+
/* harmony export */ "useSearchParams": function() { return /* binding */ useSearchParams; }
|
1740 |
+
/* harmony export */ });
|
1741 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
1742 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
1743 |
+
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! history */ "./node_modules/history/index.js");
|
1744 |
+
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router */ "./node_modules/react-router/index.js");
|
1745 |
+
/**
|
1746 |
+
* React Router DOM v6.2.1
|
1747 |
+
*
|
1748 |
+
* Copyright (c) Remix Software Inc.
|
1749 |
+
*
|
1750 |
+
* This source code is licensed under the MIT license found in the
|
1751 |
+
* LICENSE.md file in the root directory of this source tree.
|
1752 |
+
*
|
1753 |
+
* @license MIT
|
1754 |
+
*/
|
1755 |
+
|
1756 |
+
|
1757 |
+
|
1758 |
+
|
1759 |
+
|
1760 |
+
function _extends() {
|
1761 |
+
_extends = Object.assign || function (target) {
|
1762 |
+
for (var i = 1; i < arguments.length; i++) {
|
1763 |
+
var source = arguments[i];
|
1764 |
+
|
1765 |
+
for (var key in source) {
|
1766 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1767 |
+
target[key] = source[key];
|
1768 |
+
}
|
1769 |
+
}
|
1770 |
+
}
|
1771 |
+
|
1772 |
+
return target;
|
1773 |
+
};
|
1774 |
+
|
1775 |
+
return _extends.apply(this, arguments);
|
1776 |
+
}
|
1777 |
+
|
1778 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
1779 |
+
if (source == null) return {};
|
1780 |
+
var target = {};
|
1781 |
+
var sourceKeys = Object.keys(source);
|
1782 |
+
var key, i;
|
1783 |
+
|
1784 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
1785 |
+
key = sourceKeys[i];
|
1786 |
+
if (excluded.indexOf(key) >= 0) continue;
|
1787 |
+
target[key] = source[key];
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
return target;
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
const _excluded = ["onClick", "reloadDocument", "replace", "state", "target", "to"],
|
1794 |
+
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"];
|
1795 |
+
|
1796 |
+
function warning(cond, message) {
|
1797 |
+
if (!cond) {
|
1798 |
+
// eslint-disable-next-line no-console
|
1799 |
+
if (typeof console !== "undefined") console.warn(message);
|
1800 |
+
|
1801 |
+
try {
|
1802 |
+
// Welcome to debugging React Router!
|
1803 |
+
//
|
1804 |
+
// This error is thrown as a convenience so you can more easily
|
1805 |
+
// find the source for a warning that appears in the console by
|
1806 |
+
// enabling "pause on exceptions" in your JavaScript debugger.
|
1807 |
+
throw new Error(message); // eslint-disable-next-line no-empty
|
1808 |
+
} catch (e) {}
|
1809 |
+
}
|
1810 |
+
} ////////////////////////////////////////////////////////////////////////////////
|
1811 |
+
// COMPONENTS
|
1812 |
+
////////////////////////////////////////////////////////////////////////////////
|
1813 |
+
|
1814 |
+
/**
|
1815 |
+
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
|
1816 |
+
*/
|
1817 |
+
function BrowserRouter(_ref) {
|
1818 |
+
let {
|
1819 |
+
basename,
|
1820 |
+
children,
|
1821 |
+
window
|
1822 |
+
} = _ref;
|
1823 |
+
let historyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
1824 |
+
|
1825 |
+
if (historyRef.current == null) {
|
1826 |
+
historyRef.current = (0,history__WEBPACK_IMPORTED_MODULE_2__.createBrowserHistory)({
|
1827 |
+
window
|
1828 |
+
});
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
let history = historyRef.current;
|
1832 |
+
let [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
1833 |
+
action: history.action,
|
1834 |
+
location: history.location
|
1835 |
+
});
|
1836 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(() => history.listen(setState), [history]);
|
1837 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_router__WEBPACK_IMPORTED_MODULE_1__.Router, {
|
1838 |
+
basename: basename,
|
1839 |
+
children: children,
|
1840 |
+
location: state.location,
|
1841 |
+
navigationType: state.action,
|
1842 |
+
navigator: history
|
1843 |
+
});
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
/**
|
1847 |
+
* A `<Router>` for use in web browsers. Stores the location in the hash
|
1848 |
+
* portion of the URL so it is not sent to the server.
|
1849 |
+
*/
|
1850 |
+
function HashRouter(_ref2) {
|
1851 |
+
let {
|
1852 |
+
basename,
|
1853 |
+
children,
|
1854 |
+
window
|
1855 |
+
} = _ref2;
|
1856 |
+
let historyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
1857 |
+
|
1858 |
+
if (historyRef.current == null) {
|
1859 |
+
historyRef.current = (0,history__WEBPACK_IMPORTED_MODULE_2__.createHashHistory)({
|
1860 |
+
window
|
1861 |
+
});
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
let history = historyRef.current;
|
1865 |
+
let [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
1866 |
+
action: history.action,
|
1867 |
+
location: history.location
|
1868 |
+
});
|
1869 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(() => history.listen(setState), [history]);
|
1870 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_router__WEBPACK_IMPORTED_MODULE_1__.Router, {
|
1871 |
+
basename: basename,
|
1872 |
+
children: children,
|
1873 |
+
location: state.location,
|
1874 |
+
navigationType: state.action,
|
1875 |
+
navigator: history
|
1876 |
+
});
|
1877 |
+
}
|
1878 |
+
|
1879 |
+
/**
|
1880 |
+
* A `<Router>` that accepts a pre-instantiated history object. It's important
|
1881 |
+
* to note that using your own history object is highly discouraged and may add
|
1882 |
+
* two versions of the history library to your bundles unless you use the same
|
1883 |
+
* version of the history library that React Router uses internally.
|
1884 |
+
*/
|
1885 |
+
function HistoryRouter(_ref3) {
|
1886 |
+
let {
|
1887 |
+
basename,
|
1888 |
+
children,
|
1889 |
+
history
|
1890 |
+
} = _ref3;
|
1891 |
+
const [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
1892 |
+
action: history.action,
|
1893 |
+
location: history.location
|
1894 |
+
});
|
1895 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(() => history.listen(setState), [history]);
|
1896 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_router__WEBPACK_IMPORTED_MODULE_1__.Router, {
|
1897 |
+
basename: basename,
|
1898 |
+
children: children,
|
1899 |
+
location: state.location,
|
1900 |
+
navigationType: state.action,
|
1901 |
+
navigator: history
|
1902 |
+
});
|
1903 |
+
}
|
1904 |
+
|
1905 |
+
if (true) {
|
1906 |
+
HistoryRouter.displayName = "unstable_HistoryRouter";
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
function isModifiedEvent(event) {
|
1910 |
+
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
1911 |
+
}
|
1912 |
+
|
1913 |
+
/**
|
1914 |
+
* The public API for rendering a history-aware <a>.
|
1915 |
+
*/
|
1916 |
+
const Link = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function LinkWithRef(_ref4, ref) {
|
1917 |
+
let {
|
1918 |
+
onClick,
|
1919 |
+
reloadDocument,
|
1920 |
+
replace = false,
|
1921 |
+
state,
|
1922 |
+
target,
|
1923 |
+
to
|
1924 |
+
} = _ref4,
|
1925 |
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded);
|
1926 |
+
|
1927 |
+
let href = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useHref)(to);
|
1928 |
+
let internalOnClick = useLinkClickHandler(to, {
|
1929 |
+
replace,
|
1930 |
+
state,
|
1931 |
+
target
|
1932 |
+
});
|
1933 |
+
|
1934 |
+
function handleClick(event) {
|
1935 |
+
if (onClick) onClick(event);
|
1936 |
+
|
1937 |
+
if (!event.defaultPrevented && !reloadDocument) {
|
1938 |
+
internalOnClick(event);
|
1939 |
+
}
|
1940 |
+
}
|
1941 |
+
|
1942 |
+
return (
|
1943 |
+
/*#__PURE__*/
|
1944 |
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
1945 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", _extends({}, rest, {
|
1946 |
+
href: href,
|
1947 |
+
onClick: handleClick,
|
1948 |
+
ref: ref,
|
1949 |
+
target: target
|
1950 |
+
}))
|
1951 |
+
);
|
1952 |
+
});
|
1953 |
+
|
1954 |
+
if (true) {
|
1955 |
+
Link.displayName = "Link";
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
/**
|
1959 |
+
* A <Link> wrapper that knows if it's "active" or not.
|
1960 |
+
*/
|
1961 |
+
const NavLink = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function NavLinkWithRef(_ref5, ref) {
|
1962 |
+
let {
|
1963 |
+
"aria-current": ariaCurrentProp = "page",
|
1964 |
+
caseSensitive = false,
|
1965 |
+
className: classNameProp = "",
|
1966 |
+
end = false,
|
1967 |
+
style: styleProp,
|
1968 |
+
to,
|
1969 |
+
children
|
1970 |
+
} = _ref5,
|
1971 |
+
rest = _objectWithoutPropertiesLoose(_ref5, _excluded2);
|
1972 |
+
|
1973 |
+
let location = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useLocation)();
|
1974 |
+
let path = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useResolvedPath)(to);
|
1975 |
+
let locationPathname = location.pathname;
|
1976 |
+
let toPathname = path.pathname;
|
1977 |
+
|
1978 |
+
if (!caseSensitive) {
|
1979 |
+
locationPathname = locationPathname.toLowerCase();
|
1980 |
+
toPathname = toPathname.toLowerCase();
|
1981 |
+
}
|
1982 |
+
|
1983 |
+
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === "/";
|
1984 |
+
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
|
1985 |
+
let className;
|
1986 |
+
|
1987 |
+
if (typeof classNameProp === "function") {
|
1988 |
+
className = classNameProp({
|
1989 |
+
isActive
|
1990 |
+
});
|
1991 |
+
} else {
|
1992 |
+
// If the className prop is not a function, we use a default `active`
|
1993 |
+
// class for <NavLink />s that are active. In v5 `active` was the default
|
1994 |
+
// value for `activeClassName`, but we are removing that API and can still
|
1995 |
+
// use the old default behavior for a cleaner upgrade path and keep the
|
1996 |
+
// simple styling rules working as they currently do.
|
1997 |
+
className = [classNameProp, isActive ? "active" : null].filter(Boolean).join(" ");
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
let style = typeof styleProp === "function" ? styleProp({
|
2001 |
+
isActive
|
2002 |
+
}) : styleProp;
|
2003 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Link, _extends({}, rest, {
|
2004 |
+
"aria-current": ariaCurrent,
|
2005 |
+
className: className,
|
2006 |
+
ref: ref,
|
2007 |
+
style: style,
|
2008 |
+
to: to
|
2009 |
+
}), typeof children === "function" ? children({
|
2010 |
+
isActive
|
2011 |
+
}) : children);
|
2012 |
+
});
|
2013 |
+
|
2014 |
+
if (true) {
|
2015 |
+
NavLink.displayName = "NavLink";
|
2016 |
+
} ////////////////////////////////////////////////////////////////////////////////
|
2017 |
+
// HOOKS
|
2018 |
+
////////////////////////////////////////////////////////////////////////////////
|
2019 |
+
|
2020 |
+
/**
|
2021 |
+
* Handles the click behavior for router `<Link>` components. This is useful if
|
2022 |
+
* you need to create custom `<Link>` components with the same click behavior we
|
2023 |
+
* use in our exported `<Link>`.
|
2024 |
+
*/
|
2025 |
+
|
2026 |
+
|
2027 |
+
function useLinkClickHandler(to, _temp) {
|
2028 |
+
let {
|
2029 |
+
target,
|
2030 |
+
replace: replaceProp,
|
2031 |
+
state
|
2032 |
+
} = _temp === void 0 ? {} : _temp;
|
2033 |
+
let navigate = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useNavigate)();
|
2034 |
+
let location = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useLocation)();
|
2035 |
+
let path = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useResolvedPath)(to);
|
2036 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(event => {
|
2037 |
+
if (event.button === 0 && ( // Ignore everything but left clicks
|
2038 |
+
!target || target === "_self") && // Let browser handle "target=_blank" etc.
|
2039 |
+
!isModifiedEvent(event) // Ignore clicks with modifier keys
|
2040 |
+
) {
|
2041 |
+
event.preventDefault(); // If the URL hasn't changed, a regular <a> will do a replace instead of
|
2042 |
+
// a push, so do the same here.
|
2043 |
+
|
2044 |
+
let replace = !!replaceProp || (0,history__WEBPACK_IMPORTED_MODULE_2__.createPath)(location) === (0,history__WEBPACK_IMPORTED_MODULE_2__.createPath)(path);
|
2045 |
+
navigate(to, {
|
2046 |
+
replace,
|
2047 |
+
state
|
2048 |
+
});
|
2049 |
+
}
|
2050 |
+
}, [location, navigate, path, replaceProp, state, target, to]);
|
2051 |
+
}
|
2052 |
+
/**
|
2053 |
+
* A convenient wrapper for reading and writing search parameters via the
|
2054 |
+
* URLSearchParams interface.
|
2055 |
+
*/
|
2056 |
+
|
2057 |
+
function useSearchParams(defaultInit) {
|
2058 |
+
true ? warning(typeof URLSearchParams !== "undefined", "You cannot use the `useSearchParams` hook in a browser that does not " + "support the URLSearchParams API. If you need to support Internet " + "Explorer 11, we recommend you load a polyfill such as " + "https://github.com/ungap/url-search-params\n\n" + "If you're unsure how to load polyfills, we recommend you check out " + "https://polyfill.io/v3/ which provides some recommendations about how " + "to load polyfills only for users that need them, instead of for every " + "user.") : 0;
|
2059 |
+
let defaultSearchParamsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(createSearchParams(defaultInit));
|
2060 |
+
let location = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useLocation)();
|
2061 |
+
let searchParams = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
|
2062 |
+
let searchParams = createSearchParams(location.search);
|
2063 |
+
|
2064 |
+
for (let key of defaultSearchParamsRef.current.keys()) {
|
2065 |
+
if (!searchParams.has(key)) {
|
2066 |
+
defaultSearchParamsRef.current.getAll(key).forEach(value => {
|
2067 |
+
searchParams.append(key, value);
|
2068 |
+
});
|
2069 |
+
}
|
2070 |
+
}
|
2071 |
+
|
2072 |
+
return searchParams;
|
2073 |
+
}, [location.search]);
|
2074 |
+
let navigate = (0,react_router__WEBPACK_IMPORTED_MODULE_1__.useNavigate)();
|
2075 |
+
let setSearchParams = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((nextInit, navigateOptions) => {
|
2076 |
+
navigate("?" + createSearchParams(nextInit), navigateOptions);
|
2077 |
+
}, [navigate]);
|
2078 |
+
return [searchParams, setSearchParams];
|
2079 |
+
}
|
2080 |
+
|
2081 |
+
/**
|
2082 |
+
* Creates a URLSearchParams object using the given initializer.
|
2083 |
+
*
|
2084 |
+
* This is identical to `new URLSearchParams(init)` except it also
|
2085 |
+
* supports arrays as values in the object form of the initializer
|
2086 |
+
* instead of just strings. This is convenient when you need multiple
|
2087 |
+
* values for a given key, but don't want to use an array initializer.
|
2088 |
+
*
|
2089 |
+
* For example, instead of:
|
2090 |
+
*
|
2091 |
+
* let searchParams = new URLSearchParams([
|
2092 |
+
* ['sort', 'name'],
|
2093 |
+
* ['sort', 'price']
|
2094 |
+
* ]);
|
2095 |
+
*
|
2096 |
+
* you can do:
|
2097 |
+
*
|
2098 |
+
* let searchParams = createSearchParams({
|
2099 |
+
* sort: ['name', 'price']
|
2100 |
+
* });
|
2101 |
+
*/
|
2102 |
+
function createSearchParams(init) {
|
2103 |
+
if (init === void 0) {
|
2104 |
+
init = "";
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {
|
2108 |
+
let value = init[key];
|
2109 |
+
return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);
|
2110 |
+
}, []));
|
2111 |
+
}
|
2112 |
+
|
2113 |
+
|
2114 |
+
//# sourceMappingURL=index.js.map
|
2115 |
+
|
2116 |
+
|
2117 |
+
/***/ }),
|
2118 |
+
|
2119 |
+
/***/ "./node_modules/react-router/index.js":
|
2120 |
+
/*!********************************************!*\
|
2121 |
+
!*** ./node_modules/react-router/index.js ***!
|
2122 |
+
\********************************************/
|
2123 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
2124 |
+
|
2125 |
+
__webpack_require__.r(__webpack_exports__);
|
2126 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
2127 |
+
/* harmony export */ "MemoryRouter": function() { return /* binding */ MemoryRouter; },
|
2128 |
+
/* harmony export */ "Navigate": function() { return /* binding */ Navigate; },
|
2129 |
+
/* harmony export */ "Outlet": function() { return /* binding */ Outlet; },
|
2130 |
+
/* harmony export */ "Route": function() { return /* binding */ Route; },
|
2131 |
+
/* harmony export */ "Router": function() { return /* binding */ Router; },
|
2132 |
+
/* harmony export */ "Routes": function() { return /* binding */ Routes; },
|
2133 |
+
/* harmony export */ "UNSAFE_LocationContext": function() { return /* binding */ LocationContext; },
|
2134 |
+
/* harmony export */ "UNSAFE_NavigationContext": function() { return /* binding */ NavigationContext; },
|
2135 |
+
/* harmony export */ "UNSAFE_RouteContext": function() { return /* binding */ RouteContext; },
|
2136 |
+
/* harmony export */ "createRoutesFromChildren": function() { return /* binding */ createRoutesFromChildren; },
|
2137 |
+
/* harmony export */ "generatePath": function() { return /* binding */ generatePath; },
|
2138 |
+
/* harmony export */ "matchPath": function() { return /* binding */ matchPath; },
|
2139 |
+
/* harmony export */ "matchRoutes": function() { return /* binding */ matchRoutes; },
|
2140 |
+
/* harmony export */ "renderMatches": function() { return /* binding */ renderMatches; },
|
2141 |
+
/* harmony export */ "resolvePath": function() { return /* binding */ resolvePath; },
|
2142 |
+
/* harmony export */ "useHref": function() { return /* binding */ useHref; },
|
2143 |
+
/* harmony export */ "useInRouterContext": function() { return /* binding */ useInRouterContext; },
|
2144 |
+
/* harmony export */ "useLocation": function() { return /* binding */ useLocation; },
|
2145 |
+
/* harmony export */ "useMatch": function() { return /* binding */ useMatch; },
|
2146 |
+
/* harmony export */ "useNavigate": function() { return /* binding */ useNavigate; },
|
2147 |
+
/* harmony export */ "useNavigationType": function() { return /* binding */ useNavigationType; },
|
2148 |
+
/* harmony export */ "useOutlet": function() { return /* binding */ useOutlet; },
|
2149 |
+
/* harmony export */ "useOutletContext": function() { return /* binding */ useOutletContext; },
|
2150 |
+
/* harmony export */ "useParams": function() { return /* binding */ useParams; },
|
2151 |
+
/* harmony export */ "useResolvedPath": function() { return /* binding */ useResolvedPath; },
|
2152 |
+
/* harmony export */ "useRoutes": function() { return /* binding */ useRoutes; }
|
2153 |
+
/* harmony export */ });
|
2154 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
2155 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
2156 |
+
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! history */ "./node_modules/history/index.js");
|
2157 |
+
/**
|
2158 |
+
* React Router v6.2.1
|
2159 |
+
*
|
2160 |
+
* Copyright (c) Remix Software Inc.
|
2161 |
+
*
|
2162 |
+
* This source code is licensed under the MIT license found in the
|
2163 |
+
* LICENSE.md file in the root directory of this source tree.
|
2164 |
+
*
|
2165 |
+
* @license MIT
|
2166 |
+
*/
|
2167 |
+
|
2168 |
+
|
2169 |
+
|
2170 |
+
function invariant(cond, message) {
|
2171 |
+
if (!cond) throw new Error(message);
|
2172 |
+
}
|
2173 |
+
|
2174 |
+
function warning(cond, message) {
|
2175 |
+
if (!cond) {
|
2176 |
+
// eslint-disable-next-line no-console
|
2177 |
+
if (typeof console !== "undefined") console.warn(message);
|
2178 |
+
|
2179 |
+
try {
|
2180 |
+
// Welcome to debugging React Router!
|
2181 |
+
//
|
2182 |
+
// This error is thrown as a convenience so you can more easily
|
2183 |
+
// find the source for a warning that appears in the console by
|
2184 |
+
// enabling "pause on exceptions" in your JavaScript debugger.
|
2185 |
+
throw new Error(message); // eslint-disable-next-line no-empty
|
2186 |
+
} catch (e) {}
|
2187 |
+
}
|
2188 |
+
}
|
2189 |
+
|
2190 |
+
const alreadyWarned = {};
|
2191 |
+
|
2192 |
+
function warningOnce(key, cond, message) {
|
2193 |
+
if (!cond && !alreadyWarned[key]) {
|
2194 |
+
alreadyWarned[key] = true;
|
2195 |
+
true ? warning(false, message) : 0;
|
2196 |
+
}
|
2197 |
+
} ///////////////////////////////////////////////////////////////////////////////
|
2198 |
+
// CONTEXT
|
2199 |
+
///////////////////////////////////////////////////////////////////////////////
|
2200 |
+
|
2201 |
+
/**
|
2202 |
+
* A Navigator is a "location changer"; it's how you get to different locations.
|
2203 |
+
*
|
2204 |
+
* Every history instance conforms to the Navigator interface, but the
|
2205 |
+
* distinction is useful primarily when it comes to the low-level <Router> API
|
2206 |
+
* where both the location and a navigator must be provided separately in order
|
2207 |
+
* to avoid "tearing" that may occur in a suspense-enabled app if the action
|
2208 |
+
* and/or location were to be read directly from the history instance.
|
2209 |
+
*/
|
2210 |
+
|
2211 |
+
|
2212 |
+
const NavigationContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
2213 |
+
|
2214 |
+
if (true) {
|
2215 |
+
NavigationContext.displayName = "Navigation";
|
2216 |
+
}
|
2217 |
+
|
2218 |
+
const LocationContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
2219 |
+
|
2220 |
+
if (true) {
|
2221 |
+
LocationContext.displayName = "Location";
|
2222 |
+
}
|
2223 |
+
|
2224 |
+
const RouteContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({
|
2225 |
+
outlet: null,
|
2226 |
+
matches: []
|
2227 |
+
});
|
2228 |
+
|
2229 |
+
if (true) {
|
2230 |
+
RouteContext.displayName = "Route";
|
2231 |
+
} ///////////////////////////////////////////////////////////////////////////////
|
2232 |
+
// COMPONENTS
|
2233 |
+
///////////////////////////////////////////////////////////////////////////////
|
2234 |
+
|
2235 |
+
|
2236 |
+
/**
|
2237 |
+
* A <Router> that stores all entries in memory.
|
2238 |
+
*
|
2239 |
+
* @see https://reactrouter.com/docs/en/v6/api#memoryrouter
|
2240 |
+
*/
|
2241 |
+
function MemoryRouter(_ref) {
|
2242 |
+
let {
|
2243 |
+
basename,
|
2244 |
+
children,
|
2245 |
+
initialEntries,
|
2246 |
+
initialIndex
|
2247 |
+
} = _ref;
|
2248 |
+
let historyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
2249 |
+
|
2250 |
+
if (historyRef.current == null) {
|
2251 |
+
historyRef.current = (0,history__WEBPACK_IMPORTED_MODULE_1__.createMemoryHistory)({
|
2252 |
+
initialEntries,
|
2253 |
+
initialIndex
|
2254 |
+
});
|
2255 |
+
}
|
2256 |
+
|
2257 |
+
let history = historyRef.current;
|
2258 |
+
let [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
2259 |
+
action: history.action,
|
2260 |
+
location: history.location
|
2261 |
+
});
|
2262 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(() => history.listen(setState), [history]);
|
2263 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Router, {
|
2264 |
+
basename: basename,
|
2265 |
+
children: children,
|
2266 |
+
location: state.location,
|
2267 |
+
navigationType: state.action,
|
2268 |
+
navigator: history
|
2269 |
+
});
|
2270 |
+
}
|
2271 |
+
|
2272 |
+
/**
|
2273 |
+
* Changes the current location.
|
2274 |
+
*
|
2275 |
+
* Note: This API is mostly useful in React.Component subclasses that are not
|
2276 |
+
* able to use hooks. In functional components, we recommend you use the
|
2277 |
+
* `useNavigate` hook instead.
|
2278 |
+
*
|
2279 |
+
* @see https://reactrouter.com/docs/en/v6/api#navigate
|
2280 |
+
*/
|
2281 |
+
function Navigate(_ref2) {
|
2282 |
+
let {
|
2283 |
+
to,
|
2284 |
+
replace,
|
2285 |
+
state
|
2286 |
+
} = _ref2;
|
2287 |
+
!useInRouterContext() ? true ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of
|
2288 |
+
// the router loaded. We can help them understand how to avoid that.
|
2289 |
+
"<Navigate> may be used only in the context of a <Router> component.") : 0 : void 0;
|
2290 |
+
true ? warning(!(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(NavigationContext).static, "<Navigate> must not be used on the initial render in a <StaticRouter>. " + "This is a no-op, but you should modify your code so the <Navigate> is " + "only ever rendered in response to some user interaction or state change.") : 0;
|
2291 |
+
let navigate = useNavigate();
|
2292 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
2293 |
+
navigate(to, {
|
2294 |
+
replace,
|
2295 |
+
state
|
2296 |
+
});
|
2297 |
+
});
|
2298 |
+
return null;
|
2299 |
+
}
|
2300 |
+
|
2301 |
+
/**
|
2302 |
+
* Renders the child route's element, if there is one.
|
2303 |
+
*
|
2304 |
+
* @see https://reactrouter.com/docs/en/v6/api#outlet
|
2305 |
+
*/
|
2306 |
+
function Outlet(props) {
|
2307 |
+
return useOutlet(props.context);
|
2308 |
+
}
|
2309 |
+
|
2310 |
+
/**
|
2311 |
+
* Declares an element that should be rendered at a certain URL path.
|
2312 |
+
*
|
2313 |
+
* @see https://reactrouter.com/docs/en/v6/api#route
|
2314 |
+
*/
|
2315 |
+
function Route(_props) {
|
2316 |
+
true ? invariant(false, "A <Route> is only ever to be used as the child of <Routes> element, " + "never rendered directly. Please wrap your <Route> in a <Routes>.") : 0 ;
|
2317 |
+
}
|
2318 |
+
|
2319 |
+
/**
|
2320 |
+
* Provides location context for the rest of the app.
|
2321 |
+
*
|
2322 |
+
* Note: You usually won't render a <Router> directly. Instead, you'll render a
|
2323 |
+
* router that is more specific to your environment such as a <BrowserRouter>
|
2324 |
+
* in web browsers or a <StaticRouter> for server rendering.
|
2325 |
+
*
|
2326 |
+
* @see https://reactrouter.com/docs/en/v6/api#router
|
2327 |
+
*/
|
2328 |
+
function Router(_ref3) {
|
2329 |
+
let {
|
2330 |
+
basename: basenameProp = "/",
|
2331 |
+
children = null,
|
2332 |
+
location: locationProp,
|
2333 |
+
navigationType = history__WEBPACK_IMPORTED_MODULE_1__.Action.Pop,
|
2334 |
+
navigator,
|
2335 |
+
static: staticProp = false
|
2336 |
+
} = _ref3;
|
2337 |
+
!!useInRouterContext() ? true ? invariant(false, "You cannot render a <Router> inside another <Router>." + " You should never have more than one in your app.") : 0 : void 0;
|
2338 |
+
let basename = normalizePathname(basenameProp);
|
2339 |
+
let navigationContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => ({
|
2340 |
+
basename,
|
2341 |
+
navigator,
|
2342 |
+
static: staticProp
|
2343 |
+
}), [basename, navigator, staticProp]);
|
2344 |
+
|
2345 |
+
if (typeof locationProp === "string") {
|
2346 |
+
locationProp = (0,history__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationProp);
|
2347 |
+
}
|
2348 |
+
|
2349 |
+
let {
|
2350 |
+
pathname = "/",
|
2351 |
+
search = "",
|
2352 |
+
hash = "",
|
2353 |
+
state = null,
|
2354 |
+
key = "default"
|
2355 |
+
} = locationProp;
|
2356 |
+
let location = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
|
2357 |
+
let trailingPathname = stripBasename(pathname, basename);
|
2358 |
+
|
2359 |
+
if (trailingPathname == null) {
|
2360 |
+
return null;
|
2361 |
+
}
|
2362 |
+
|
2363 |
+
return {
|
2364 |
+
pathname: trailingPathname,
|
2365 |
+
search,
|
2366 |
+
hash,
|
2367 |
+
state,
|
2368 |
+
key
|
2369 |
+
};
|
2370 |
+
}, [basename, pathname, search, hash, state, key]);
|
2371 |
+
true ? warning(location != null, "<Router basename=\"" + basename + "\"> is not able to match the URL " + ("\"" + pathname + search + hash + "\" because it does not start with the ") + "basename, so the <Router> won't render anything.") : 0;
|
2372 |
+
|
2373 |
+
if (location == null) {
|
2374 |
+
return null;
|
2375 |
+
}
|
2376 |
+
|
2377 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(NavigationContext.Provider, {
|
2378 |
+
value: navigationContext
|
2379 |
+
}, /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(LocationContext.Provider, {
|
2380 |
+
children: children,
|
2381 |
+
value: {
|
2382 |
+
location,
|
2383 |
+
navigationType
|
2384 |
+
}
|
2385 |
+
}));
|
2386 |
+
}
|
2387 |
+
|
2388 |
+
/**
|
2389 |
+
* A container for a nested tree of <Route> elements that renders the branch
|
2390 |
+
* that best matches the current location.
|
2391 |
+
*
|
2392 |
+
* @see https://reactrouter.com/docs/en/v6/api#routes
|
2393 |
+
*/
|
2394 |
+
function Routes(_ref4) {
|
2395 |
+
let {
|
2396 |
+
children,
|
2397 |
+
location
|
2398 |
+
} = _ref4;
|
2399 |
+
return useRoutes(createRoutesFromChildren(children), location);
|
2400 |
+
} ///////////////////////////////////////////////////////////////////////////////
|
2401 |
+
// HOOKS
|
2402 |
+
///////////////////////////////////////////////////////////////////////////////
|
2403 |
+
|
2404 |
+
/**
|
2405 |
+
* Returns the full href for the given "to" value. This is useful for building
|
2406 |
+
* custom links that are also accessible and preserve right-click behavior.
|
2407 |
+
*
|
2408 |
+
* @see https://reactrouter.com/docs/en/v6/api#usehref
|
2409 |
+
*/
|
2410 |
+
|
2411 |
+
function useHref(to) {
|
2412 |
+
!useInRouterContext() ? true ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
2413 |
+
// router loaded. We can help them understand how to avoid that.
|
2414 |
+
"useHref() may be used only in the context of a <Router> component.") : 0 : void 0;
|
2415 |
+
let {
|
2416 |
+
basename,
|
2417 |
+
navigator
|
2418 |
+
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(NavigationContext);
|
2419 |
+
let {
|
2420 |
+
hash,
|
2421 |
+
pathname,
|
2422 |
+
search
|
2423 |
+
} = useResolvedPath(to);
|
2424 |
+
let joinedPathname = pathname;
|
2425 |
+
|
2426 |
+
if (basename !== "/") {
|
2427 |
+
let toPathname = getToPathname(to);
|
2428 |
+
let endsWithSlash = toPathname != null && toPathname.endsWith("/");
|
2429 |
+
joinedPathname = pathname === "/" ? basename + (endsWithSlash ? "/" : "") : joinPaths([basename, pathname]);
|
2430 |
+
}
|
2431 |
+
|
2432 |
+
return navigator.createHref({
|
2433 |
+
pathname: joinedPathname,
|
2434 |
+
search,
|
2435 |
+
hash
|
2436 |
+
});
|
2437 |
+
}
|
2438 |
+
/**
|
2439 |
+
* Returns true if this component is a descendant of a <Router>.
|
2440 |
+
*
|
2441 |
+
* @see https://reactrouter.com/docs/en/v6/api#useinroutercontext
|
2442 |
+
*/
|
2443 |
+
|
2444 |
+
function useInRouterContext() {
|
2445 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(LocationContext) != null;
|
2446 |
+
}
|
2447 |
+
/**
|
2448 |
+
* Returns the current location object, which represents the current URL in web
|
2449 |
+
* browsers.
|
2450 |
+
*
|
2451 |
+
* Note: If you're using this it may mean you're doing some of your own
|
2452 |
+
* "routing" in your app, and we'd like to know what your use case is. We may
|
2453 |
+
* be able to provide something higher-level to better suit your needs.
|
2454 |
+
*
|
2455 |
+
* @see https://reactrouter.com/docs/en/v6/api#uselocation
|
2456 |
+
*/
|
2457 |
+
|
2458 |
+
function useLocation() {
|
2459 |
+
!useInRouterContext() ? true ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
2460 |
+
// router loaded. We can help them understand how to avoid that.
|
2461 |
+
"useLocation() may be used only in the context of a <Router> component.") : 0 : void 0;
|
2462 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(LocationContext).location;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
/**
|
2466 |
+
* Returns the current navigation action which describes how the router came to
|
2467 |
+
* the current location, either by a pop, push, or replace on the history stack.
|
2468 |
+
*
|
2469 |
+
* @see https://reactrouter.com/docs/en/v6/api#usenavigationtype
|
2470 |
+
*/
|
2471 |
+
function useNavigationType() {
|
2472 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(LocationContext).navigationType;
|
2473 |
+
}
|
2474 |
+
/**
|
2475 |
+
* Returns true if the URL for the given "to" value matches the current URL.
|
2476 |
+
* This is useful for components that need to know "active" state, e.g.
|
2477 |
+
* <NavLink>.
|
2478 |
+
*
|
2479 |
+
* @see https://reactrouter.com/docs/en/v6/api#usematch
|
2480 |
+
*/
|
2481 |
+
|
2482 |
+
function useMatch(pattern) {
|
2483 |
+
!useInRouterContext() ? true ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
2484 |
+
// router loaded. We can help them understand how to avoid that.
|
2485 |
+
"useMatch() may be used only in the context of a <Router> component.") : 0 : void 0;
|
2486 |
+
let {
|
2487 |
+
pathname
|
2488 |
+
} = useLocation();
|
2489 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => matchPath(pattern, pathname), [pathname, pattern]);
|
2490 |
+
}
|
2491 |
+
/**
|
2492 |
+
* The interface for the navigate() function returned from useNavigate().
|
2493 |
+
*/
|
2494 |
+
|
2495 |
+
/**
|
2496 |
+
* Returns an imperative method for changing the location. Used by <Link>s, but
|
2497 |
+
* may also be used by other elements to change the location.
|
2498 |
+
*
|
2499 |
+
* @see https://reactrouter.com/docs/en/v6/api#usenavigate
|
2500 |
+
*/
|
2501 |
+
function useNavigate() {
|
2502 |
+
!useInRouterContext() ? true ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
2503 |
+
// router loaded. We can help them understand how to avoid that.
|
2504 |
+
"useNavigate() may be used only in the context of a <Router> component.") : 0 : void 0;
|
2505 |
+
let {
|
2506 |
+
basename,
|
2507 |
+
navigator
|
2508 |
+
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(NavigationContext);
|
2509 |
+
let {
|
2510 |
+
matches
|
2511 |
+
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(RouteContext);
|
2512 |
+
let {
|
2513 |
+
pathname: locationPathname
|
2514 |
+
} = useLocation();
|
2515 |
+
let routePathnamesJson = JSON.stringify(matches.map(match => match.pathnameBase));
|
2516 |
+
let activeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
|
2517 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
2518 |
+
activeRef.current = true;
|
2519 |
+
});
|
2520 |
+
let navigate = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (to, options) {
|
2521 |
+
if (options === void 0) {
|
2522 |
+
options = {};
|
2523 |
+
}
|
2524 |
+
|
2525 |
+
true ? warning(activeRef.current, "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.") : 0;
|
2526 |
+
if (!activeRef.current) return;
|
2527 |
+
|
2528 |
+
if (typeof to === "number") {
|
2529 |
+
navigator.go(to);
|
2530 |
+
return;
|
2531 |
+
}
|
2532 |
+
|
2533 |
+
let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname);
|
2534 |
+
|
2535 |
+
if (basename !== "/") {
|
2536 |
+
path.pathname = joinPaths([basename, path.pathname]);
|
2537 |
+
}
|
2538 |
+
|
2539 |
+
(!!options.replace ? navigator.replace : navigator.push)(path, options.state);
|
2540 |
+
}, [basename, navigator, routePathnamesJson, locationPathname]);
|
2541 |
+
return navigate;
|
2542 |
+
}
|
2543 |
+
const OutletContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
2544 |
+
/**
|
2545 |
+
* Returns the context (if provided) for the child route at this level of the route
|
2546 |
+
* hierarchy.
|
2547 |
+
* @see https://reactrouter.com/docs/en/v6/api#useoutletcontext
|
2548 |
+
*/
|
2549 |
+
|
2550 |
+
function useOutletContext() {
|
2551 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(OutletContext);
|
2552 |
+
}
|
2553 |
+
/**
|
2554 |
+
* Returns the element for the child route at this level of the route
|
2555 |
+
* hierarchy. Used internally by <Outlet> to render child routes.
|
2556 |
+
*
|
2557 |
+
* @see https://reactrouter.com/docs/en/v6/api#useoutlet
|
2558 |
+
*/
|
2559 |
+
|
2560 |
+
function useOutlet(context) {
|
2561 |
+
let outlet = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(RouteContext).outlet;
|
2562 |
+
|
2563 |
+
if (outlet) {
|
2564 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(OutletContext.Provider, {
|
2565 |
+
value: context
|
2566 |
+
}, outlet);
|
2567 |
+
}
|
2568 |
+
|
2569 |
+
return outlet;
|
2570 |
+
}
|
2571 |
+
/**
|
2572 |
+
* Returns an object of key/value pairs of the dynamic params from the current
|
2573 |
+
* URL that were matched by the route path.
|
2574 |
+
*
|
2575 |
+
* @see https://reactrouter.com/docs/en/v6/api#useparams
|
2576 |
+
*/
|
2577 |
+
|
2578 |
+
function useParams() {
|
2579 |
+
let {
|
2580 |
+
matches
|
2581 |
+
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(RouteContext);
|
2582 |
+
let routeMatch = matches[matches.length - 1];
|
2583 |
+
return routeMatch ? routeMatch.params : {};
|
2584 |
+
}
|
2585 |
+
/**
|
2586 |
+
* Resolves the pathname of the given `to` value against the current location.
|
2587 |
+
*
|
2588 |
+
* @see https://reactrouter.com/docs/en/v6/api#useresolvedpath
|
2589 |
+
*/
|
2590 |
+
|
2591 |
+
function useResolvedPath(to) {
|
2592 |
+
let {
|
2593 |
+
matches
|
2594 |
+
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(RouteContext);
|
2595 |
+
let {
|
2596 |
+
pathname: locationPathname
|
2597 |
+
} = useLocation();
|
2598 |
+
let routePathnamesJson = JSON.stringify(matches.map(match => match.pathnameBase));
|
2599 |
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname), [to, routePathnamesJson, locationPathname]);
|
2600 |
+
}
|
2601 |
+
/**
|
2602 |
+
* Returns the element of the route that matched the current location, prepared
|
2603 |
+
* with the correct context to render the remainder of the route tree. Route
|
2604 |
+
* elements in the tree must render an <Outlet> to render their child route's
|
2605 |
+
* element.
|
2606 |
+
*
|
2607 |
+
* @see https://reactrouter.com/docs/en/v6/api#useroutes
|
2608 |
+
*/
|
2609 |
+
|
2610 |
+
function useRoutes(routes, locationArg) {
|
2611 |
+
!useInRouterContext() ? true ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
2612 |
+
// router loaded. We can help them understand how to avoid that.
|
2613 |
+
"useRoutes() may be used only in the context of a <Router> component.") : 0 : void 0;
|
2614 |
+
let {
|
2615 |
+
matches: parentMatches
|
2616 |
+
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(RouteContext);
|
2617 |
+
let routeMatch = parentMatches[parentMatches.length - 1];
|
2618 |
+
let parentParams = routeMatch ? routeMatch.params : {};
|
2619 |
+
let parentPathname = routeMatch ? routeMatch.pathname : "/";
|
2620 |
+
let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";
|
2621 |
+
let parentRoute = routeMatch && routeMatch.route;
|
2622 |
+
|
2623 |
+
if (true) {
|
2624 |
+
// You won't get a warning about 2 different <Routes> under a <Route>
|
2625 |
+
// without a trailing *, but this is a best-effort warning anyway since we
|
2626 |
+
// cannot even give the warning unless they land at the parent route.
|
2627 |
+
//
|
2628 |
+
// Example:
|
2629 |
+
//
|
2630 |
+
// <Routes>
|
2631 |
+
// {/* This route path MUST end with /* because otherwise
|
2632 |
+
// it will never match /blog/post/123 */}
|
2633 |
+
// <Route path="blog" element={<Blog />} />
|
2634 |
+
// <Route path="blog/feed" element={<BlogFeed />} />
|
2635 |
+
// </Routes>
|
2636 |
+
//
|
2637 |
+
// function Blog() {
|
2638 |
+
// return (
|
2639 |
+
// <Routes>
|
2640 |
+
// <Route path="post/:id" element={<Post />} />
|
2641 |
+
// </Routes>
|
2642 |
+
// );
|
2643 |
+
// }
|
2644 |
+
let parentPath = parentRoute && parentRoute.path || "";
|
2645 |
+
warningOnce(parentPathname, !parentRoute || parentPath.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ("\"" + parentPathname + "\" (under <Route path=\"" + parentPath + "\">) but the ") + "parent route path has no trailing \"*\". This means if you navigate " + "deeper, the parent won't match anymore and therefore the child " + "routes will never render.\n\n" + ("Please change the parent <Route path=\"" + parentPath + "\"> to <Route ") + ("path=\"" + (parentPath === "/" ? "*" : parentPath + "/*") + "\">."));
|
2646 |
+
}
|
2647 |
+
|
2648 |
+
let locationFromContext = useLocation();
|
2649 |
+
let location;
|
2650 |
+
|
2651 |
+
if (locationArg) {
|
2652 |
+
var _parsedLocationArg$pa;
|
2653 |
+
|
2654 |
+
let parsedLocationArg = typeof locationArg === "string" ? (0,history__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationArg) : locationArg;
|
2655 |
+
!(parentPathnameBase === "/" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? true ? invariant(false, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, " + "the location pathname must begin with the portion of the URL pathname that was " + ("matched by all parent routes. The current pathname base is \"" + parentPathnameBase + "\" ") + ("but pathname \"" + parsedLocationArg.pathname + "\" was given in the `location` prop.")) : 0 : void 0;
|
2656 |
+
location = parsedLocationArg;
|
2657 |
+
} else {
|
2658 |
+
location = locationFromContext;
|
2659 |
+
}
|
2660 |
+
|
2661 |
+
let pathname = location.pathname || "/";
|
2662 |
+
let remainingPathname = parentPathnameBase === "/" ? pathname : pathname.slice(parentPathnameBase.length) || "/";
|
2663 |
+
let matches = matchRoutes(routes, {
|
2664 |
+
pathname: remainingPathname
|
2665 |
+
});
|
2666 |
+
|
2667 |
+
if (true) {
|
2668 |
+
true ? warning(parentRoute || matches != null, "No routes matched location \"" + location.pathname + location.search + location.hash + "\" ") : 0;
|
2669 |
+
true ? warning(matches == null || matches[matches.length - 1].route.element !== undefined, "Matched leaf route at location \"" + location.pathname + location.search + location.hash + "\" does not have an element. " + "This means it will render an <Outlet /> with a null value by default resulting in an \"empty\" page.") : 0;
|
2670 |
+
}
|
2671 |
+
|
2672 |
+
return _renderMatches(matches && matches.map(match => Object.assign({}, match, {
|
2673 |
+
params: Object.assign({}, parentParams, match.params),
|
2674 |
+
pathname: joinPaths([parentPathnameBase, match.pathname]),
|
2675 |
+
pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([parentPathnameBase, match.pathnameBase])
|
2676 |
+
})), parentMatches);
|
2677 |
+
} ///////////////////////////////////////////////////////////////////////////////
|
2678 |
+
// UTILS
|
2679 |
+
///////////////////////////////////////////////////////////////////////////////
|
2680 |
+
|
2681 |
+
/**
|
2682 |
+
* Creates a route config from a React "children" object, which is usually
|
2683 |
+
* either a `<Route>` element or an array of them. Used internally by
|
2684 |
+
* `<Routes>` to create a route config from its children.
|
2685 |
+
*
|
2686 |
+
* @see https://reactrouter.com/docs/en/v6/api#createroutesfromchildren
|
2687 |
+
*/
|
2688 |
+
|
2689 |
+
function createRoutesFromChildren(children) {
|
2690 |
+
let routes = [];
|
2691 |
+
react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, element => {
|
2692 |
+
if (! /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(element)) {
|
2693 |
+
// Ignore non-elements. This allows people to more easily inline
|
2694 |
+
// conditionals in their route config.
|
2695 |
+
return;
|
2696 |
+
}
|
2697 |
+
|
2698 |
+
if (element.type === react__WEBPACK_IMPORTED_MODULE_0__.Fragment) {
|
2699 |
+
// Transparently support React.Fragment and its children.
|
2700 |
+
routes.push.apply(routes, createRoutesFromChildren(element.props.children));
|
2701 |
+
return;
|
2702 |
+
}
|
2703 |
+
|
2704 |
+
!(element.type === Route) ? true ? invariant(false, "[" + (typeof element.type === "string" ? element.type : element.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : 0 : void 0;
|
2705 |
+
let route = {
|
2706 |
+
caseSensitive: element.props.caseSensitive,
|
2707 |
+
element: element.props.element,
|
2708 |
+
index: element.props.index,
|
2709 |
+
path: element.props.path
|
2710 |
+
};
|
2711 |
+
|
2712 |
+
if (element.props.children) {
|
2713 |
+
route.children = createRoutesFromChildren(element.props.children);
|
2714 |
+
}
|
2715 |
+
|
2716 |
+
routes.push(route);
|
2717 |
+
});
|
2718 |
+
return routes;
|
2719 |
+
}
|
2720 |
+
/**
|
2721 |
+
* The parameters that were parsed from the URL path.
|
2722 |
+
*/
|
2723 |
+
|
2724 |
+
/**
|
2725 |
+
* Returns a path with params interpolated.
|
2726 |
+
*
|
2727 |
+
* @see https://reactrouter.com/docs/en/v6/api#generatepath
|
2728 |
+
*/
|
2729 |
+
function generatePath(path, params) {
|
2730 |
+
if (params === void 0) {
|
2731 |
+
params = {};
|
2732 |
+
}
|
2733 |
+
|
2734 |
+
return path.replace(/:(\w+)/g, (_, key) => {
|
2735 |
+
!(params[key] != null) ? true ? invariant(false, "Missing \":" + key + "\" param") : 0 : void 0;
|
2736 |
+
return params[key];
|
2737 |
+
}).replace(/\/*\*$/, _ => params["*"] == null ? "" : params["*"].replace(/^\/*/, "/"));
|
2738 |
+
}
|
2739 |
+
/**
|
2740 |
+
* A RouteMatch contains info about how a route matched a URL.
|
2741 |
+
*/
|
2742 |
+
|
2743 |
+
/**
|
2744 |
+
* Matches the given routes to a location and returns the match data.
|
2745 |
+
*
|
2746 |
+
* @see https://reactrouter.com/docs/en/v6/api#matchroutes
|
2747 |
+
*/
|
2748 |
+
function matchRoutes(routes, locationArg, basename) {
|
2749 |
+
if (basename === void 0) {
|
2750 |
+
basename = "/";
|
2751 |
+
}
|
2752 |
+
|
2753 |
+
let location = typeof locationArg === "string" ? (0,history__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationArg) : locationArg;
|
2754 |
+
let pathname = stripBasename(location.pathname || "/", basename);
|
2755 |
+
|
2756 |
+
if (pathname == null) {
|
2757 |
+
return null;
|
2758 |
+
}
|
2759 |
+
|
2760 |
+
let branches = flattenRoutes(routes);
|
2761 |
+
rankRouteBranches(branches);
|
2762 |
+
let matches = null;
|
2763 |
+
|
2764 |
+
for (let i = 0; matches == null && i < branches.length; ++i) {
|
2765 |
+
matches = matchRouteBranch(branches[i], pathname);
|
2766 |
+
}
|
2767 |
+
|
2768 |
+
return matches;
|
2769 |
+
}
|
2770 |
+
|
2771 |
+
function flattenRoutes(routes, branches, parentsMeta, parentPath) {
|
2772 |
+
if (branches === void 0) {
|
2773 |
+
branches = [];
|
2774 |
+
}
|
2775 |
+
|
2776 |
+
if (parentsMeta === void 0) {
|
2777 |
+
parentsMeta = [];
|
2778 |
+
}
|
2779 |
+
|
2780 |
+
if (parentPath === void 0) {
|
2781 |
+
parentPath = "";
|
2782 |
+
}
|
2783 |
+
|
2784 |
+
routes.forEach((route, index) => {
|
2785 |
+
let meta = {
|
2786 |
+
relativePath: route.path || "",
|
2787 |
+
caseSensitive: route.caseSensitive === true,
|
2788 |
+
childrenIndex: index,
|
2789 |
+
route
|
2790 |
+
};
|
2791 |
+
|
2792 |
+
if (meta.relativePath.startsWith("/")) {
|
2793 |
+
!meta.relativePath.startsWith(parentPath) ? true ? invariant(false, "Absolute route path \"" + meta.relativePath + "\" nested under path " + ("\"" + parentPath + "\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes.") : 0 : void 0;
|
2794 |
+
meta.relativePath = meta.relativePath.slice(parentPath.length);
|
2795 |
+
}
|
2796 |
+
|
2797 |
+
let path = joinPaths([parentPath, meta.relativePath]);
|
2798 |
+
let routesMeta = parentsMeta.concat(meta); // Add the children before adding this route to the array so we traverse the
|
2799 |
+
// route tree depth-first and child routes appear before their parents in
|
2800 |
+
// the "flattened" version.
|
2801 |
+
|
2802 |
+
if (route.children && route.children.length > 0) {
|
2803 |
+
!(route.index !== true) ? true ? invariant(false, "Index routes must not have child routes. Please remove " + ("all child routes from route path \"" + path + "\".")) : 0 : void 0;
|
2804 |
+
flattenRoutes(route.children, branches, routesMeta, path);
|
2805 |
+
} // Routes without a path shouldn't ever match by themselves unless they are
|
2806 |
+
// index routes, so don't add them to the list of possible branches.
|
2807 |
+
|
2808 |
+
|
2809 |
+
if (route.path == null && !route.index) {
|
2810 |
+
return;
|
2811 |
+
}
|
2812 |
+
|
2813 |
+
branches.push({
|
2814 |
+
path,
|
2815 |
+
score: computeScore(path, route.index),
|
2816 |
+
routesMeta
|
2817 |
+
});
|
2818 |
+
});
|
2819 |
+
return branches;
|
2820 |
+
}
|
2821 |
+
|
2822 |
+
function rankRouteBranches(branches) {
|
2823 |
+
branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first
|
2824 |
+
: compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));
|
2825 |
+
}
|
2826 |
+
|
2827 |
+
const paramRe = /^:\w+$/;
|
2828 |
+
const dynamicSegmentValue = 3;
|
2829 |
+
const indexRouteValue = 2;
|
2830 |
+
const emptySegmentValue = 1;
|
2831 |
+
const staticSegmentValue = 10;
|
2832 |
+
const splatPenalty = -2;
|
2833 |
+
|
2834 |
+
const isSplat = s => s === "*";
|
2835 |
+
|
2836 |
+
function computeScore(path, index) {
|
2837 |
+
let segments = path.split("/");
|
2838 |
+
let initialScore = segments.length;
|
2839 |
+
|
2840 |
+
if (segments.some(isSplat)) {
|
2841 |
+
initialScore += splatPenalty;
|
2842 |
+
}
|
2843 |
+
|
2844 |
+
if (index) {
|
2845 |
+
initialScore += indexRouteValue;
|
2846 |
+
}
|
2847 |
+
|
2848 |
+
return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
|
2849 |
+
}
|
2850 |
+
|
2851 |
+
function compareIndexes(a, b) {
|
2852 |
+
let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
|
2853 |
+
return siblings ? // If two routes are siblings, we should try to match the earlier sibling
|
2854 |
+
// first. This allows people to have fine-grained control over the matching
|
2855 |
+
// behavior by simply putting routes with identical paths in the order they
|
2856 |
+
// want them tried.
|
2857 |
+
a[a.length - 1] - b[b.length - 1] : // Otherwise, it doesn't really make sense to rank non-siblings by index,
|
2858 |
+
// so they sort equally.
|
2859 |
+
0;
|
2860 |
+
}
|
2861 |
+
|
2862 |
+
function matchRouteBranch(branch, pathname) {
|
2863 |
+
let {
|
2864 |
+
routesMeta
|
2865 |
+
} = branch;
|
2866 |
+
let matchedParams = {};
|
2867 |
+
let matchedPathname = "/";
|
2868 |
+
let matches = [];
|
2869 |
+
|
2870 |
+
for (let i = 0; i < routesMeta.length; ++i) {
|
2871 |
+
let meta = routesMeta[i];
|
2872 |
+
let end = i === routesMeta.length - 1;
|
2873 |
+
let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
|
2874 |
+
let match = matchPath({
|
2875 |
+
path: meta.relativePath,
|
2876 |
+
caseSensitive: meta.caseSensitive,
|
2877 |
+
end
|
2878 |
+
}, remainingPathname);
|
2879 |
+
if (!match) return null;
|
2880 |
+
Object.assign(matchedParams, match.params);
|
2881 |
+
let route = meta.route;
|
2882 |
+
matches.push({
|
2883 |
+
params: matchedParams,
|
2884 |
+
pathname: joinPaths([matchedPathname, match.pathname]),
|
2885 |
+
pathnameBase: joinPaths([matchedPathname, match.pathnameBase]),
|
2886 |
+
route
|
2887 |
+
});
|
2888 |
+
|
2889 |
+
if (match.pathnameBase !== "/") {
|
2890 |
+
matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
|
2891 |
+
}
|
2892 |
+
}
|
2893 |
+
|
2894 |
+
return matches;
|
2895 |
+
}
|
2896 |
+
/**
|
2897 |
+
* Renders the result of `matchRoutes()` into a React element.
|
2898 |
+
*/
|
2899 |
+
|
2900 |
+
|
2901 |
+
function renderMatches(matches) {
|
2902 |
+
return _renderMatches(matches);
|
2903 |
+
}
|
2904 |
+
|
2905 |
+
function _renderMatches(matches, parentMatches) {
|
2906 |
+
if (parentMatches === void 0) {
|
2907 |
+
parentMatches = [];
|
2908 |
+
}
|
2909 |
+
|
2910 |
+
if (matches == null) return null;
|
2911 |
+
return matches.reduceRight((outlet, match, index) => {
|
2912 |
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RouteContext.Provider, {
|
2913 |
+
children: match.route.element !== undefined ? match.route.element : /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Outlet, null),
|
2914 |
+
value: {
|
2915 |
+
outlet,
|
2916 |
+
matches: parentMatches.concat(matches.slice(0, index + 1))
|
2917 |
+
}
|
2918 |
+
});
|
2919 |
+
}, null);
|
2920 |
+
}
|
2921 |
+
/**
|
2922 |
+
* A PathPattern is used to match on some portion of a URL pathname.
|
2923 |
+
*/
|
2924 |
+
|
2925 |
+
|
2926 |
+
/**
|
2927 |
+
* Performs pattern matching on a URL pathname and returns information about
|
2928 |
+
* the match.
|
2929 |
+
*
|
2930 |
+
* @see https://reactrouter.com/docs/en/v6/api#matchpath
|
2931 |
+
*/
|
2932 |
+
function matchPath(pattern, pathname) {
|
2933 |
+
if (typeof pattern === "string") {
|
2934 |
+
pattern = {
|
2935 |
+
path: pattern,
|
2936 |
+
caseSensitive: false,
|
2937 |
+
end: true
|
2938 |
+
};
|
2939 |
+
}
|
2940 |
+
|
2941 |
+
let [matcher, paramNames] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
|
2942 |
+
let match = pathname.match(matcher);
|
2943 |
+
if (!match) return null;
|
2944 |
+
let matchedPathname = match[0];
|
2945 |
+
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
2946 |
+
let captureGroups = match.slice(1);
|
2947 |
+
let params = paramNames.reduce((memo, paramName, index) => {
|
2948 |
+
// We need to compute the pathnameBase here using the raw splat value
|
2949 |
+
// instead of using params["*"] later because it will be decoded then
|
2950 |
+
if (paramName === "*") {
|
2951 |
+
let splatValue = captureGroups[index] || "";
|
2952 |
+
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
|
2953 |
+
}
|
2954 |
+
|
2955 |
+
memo[paramName] = safelyDecodeURIComponent(captureGroups[index] || "", paramName);
|
2956 |
+
return memo;
|
2957 |
+
}, {});
|
2958 |
+
return {
|
2959 |
+
params,
|
2960 |
+
pathname: matchedPathname,
|
2961 |
+
pathnameBase,
|
2962 |
+
pattern
|
2963 |
+
};
|
2964 |
+
}
|
2965 |
+
|
2966 |
+
function compilePath(path, caseSensitive, end) {
|
2967 |
+
if (caseSensitive === void 0) {
|
2968 |
+
caseSensitive = false;
|
2969 |
+
}
|
2970 |
+
|
2971 |
+
if (end === void 0) {
|
2972 |
+
end = true;
|
2973 |
+
}
|
2974 |
+
|
2975 |
+
true ? warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\".")) : 0;
|
2976 |
+
let paramNames = [];
|
2977 |
+
let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
|
2978 |
+
.replace(/^\/*/, "/") // Make sure it has a leading /
|
2979 |
+
.replace(/[\\.*+^$?{}|()[\]]/g, "\\$&") // Escape special regex chars
|
2980 |
+
.replace(/:(\w+)/g, (_, paramName) => {
|
2981 |
+
paramNames.push(paramName);
|
2982 |
+
return "([^\\/]+)";
|
2983 |
+
});
|
2984 |
+
|
2985 |
+
if (path.endsWith("*")) {
|
2986 |
+
paramNames.push("*");
|
2987 |
+
regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
|
2988 |
+
: "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
|
2989 |
+
} else {
|
2990 |
+
regexpSource += end ? "\\/*$" // When matching to the end, ignore trailing slashes
|
2991 |
+
: // Otherwise, match a word boundary or a proceeding /. The word boundary restricts
|
2992 |
+
// parent routes to matching only their own words and nothing more, e.g. parent
|
2993 |
+
// route "/home" should not match "/home2".
|
2994 |
+
"(?:\\b|\\/|$)";
|
2995 |
+
}
|
2996 |
+
|
2997 |
+
let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
|
2998 |
+
return [matcher, paramNames];
|
2999 |
+
}
|
3000 |
+
|
3001 |
+
function safelyDecodeURIComponent(value, paramName) {
|
3002 |
+
try {
|
3003 |
+
return decodeURIComponent(value);
|
3004 |
+
} catch (error) {
|
3005 |
+
true ? warning(false, "The value for the URL param \"" + paramName + "\" will not be decoded because" + (" the string \"" + value + "\" is a malformed URL segment. This is probably") + (" due to a bad percent encoding (" + error + ").")) : 0;
|
3006 |
+
return value;
|
3007 |
+
}
|
3008 |
+
}
|
3009 |
+
/**
|
3010 |
+
* Returns a resolved path object relative to the given pathname.
|
3011 |
+
*
|
3012 |
+
* @see https://reactrouter.com/docs/en/v6/api#resolvepath
|
3013 |
+
*/
|
3014 |
+
|
3015 |
+
|
3016 |
+
function resolvePath(to, fromPathname) {
|
3017 |
+
if (fromPathname === void 0) {
|
3018 |
+
fromPathname = "/";
|
3019 |
+
}
|
3020 |
+
|
3021 |
+
let {
|
3022 |
+
pathname: toPathname,
|
3023 |
+
search = "",
|
3024 |
+
hash = ""
|
3025 |
+
} = typeof to === "string" ? (0,history__WEBPACK_IMPORTED_MODULE_1__.parsePath)(to) : to;
|
3026 |
+
let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
|
3027 |
+
return {
|
3028 |
+
pathname,
|
3029 |
+
search: normalizeSearch(search),
|
3030 |
+
hash: normalizeHash(hash)
|
3031 |
+
};
|
3032 |
+
}
|
3033 |
+
|
3034 |
+
function resolvePathname(relativePath, fromPathname) {
|
3035 |
+
let segments = fromPathname.replace(/\/+$/, "").split("/");
|
3036 |
+
let relativeSegments = relativePath.split("/");
|
3037 |
+
relativeSegments.forEach(segment => {
|
3038 |
+
if (segment === "..") {
|
3039 |
+
// Keep the root "" segment so the pathname starts at /
|
3040 |
+
if (segments.length > 1) segments.pop();
|
3041 |
+
} else if (segment !== ".") {
|
3042 |
+
segments.push(segment);
|
3043 |
+
}
|
3044 |
+
});
|
3045 |
+
return segments.length > 1 ? segments.join("/") : "/";
|
3046 |
+
}
|
3047 |
+
|
3048 |
+
function resolveTo(toArg, routePathnames, locationPathname) {
|
3049 |
+
let to = typeof toArg === "string" ? (0,history__WEBPACK_IMPORTED_MODULE_1__.parsePath)(toArg) : toArg;
|
3050 |
+
let toPathname = toArg === "" || to.pathname === "" ? "/" : to.pathname; // If a pathname is explicitly provided in `to`, it should be relative to the
|
3051 |
+
// route context. This is explained in `Note on `<Link to>` values` in our
|
3052 |
+
// migration guide from v5 as a means of disambiguation between `to` values
|
3053 |
+
// that begin with `/` and those that do not. However, this is problematic for
|
3054 |
+
// `to` values that do not provide a pathname. `to` can simply be a search or
|
3055 |
+
// hash string, in which case we should assume that the navigation is relative
|
3056 |
+
// to the current location's pathname and *not* the route pathname.
|
3057 |
+
|
3058 |
+
let from;
|
3059 |
+
|
3060 |
+
if (toPathname == null) {
|
3061 |
+
from = locationPathname;
|
3062 |
+
} else {
|
3063 |
+
let routePathnameIndex = routePathnames.length - 1;
|
3064 |
+
|
3065 |
+
if (toPathname.startsWith("..")) {
|
3066 |
+
let toSegments = toPathname.split("/"); // Each leading .. segment means "go up one route" instead of "go up one
|
3067 |
+
// URL segment". This is a key difference from how <a href> works and a
|
3068 |
+
// major reason we call this a "to" value instead of a "href".
|
3069 |
+
|
3070 |
+
while (toSegments[0] === "..") {
|
3071 |
+
toSegments.shift();
|
3072 |
+
routePathnameIndex -= 1;
|
3073 |
+
}
|
3074 |
+
|
3075 |
+
to.pathname = toSegments.join("/");
|
3076 |
+
} // If there are more ".." segments than parent routes, resolve relative to
|
3077 |
+
// the root / URL.
|
3078 |
+
|
3079 |
+
|
3080 |
+
from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
|
3081 |
+
}
|
3082 |
+
|
3083 |
+
let path = resolvePath(to, from); // Ensure the pathname has a trailing slash if the original to value had one.
|
3084 |
+
|
3085 |
+
if (toPathname && toPathname !== "/" && toPathname.endsWith("/") && !path.pathname.endsWith("/")) {
|
3086 |
+
path.pathname += "/";
|
3087 |
+
}
|
3088 |
+
|
3089 |
+
return path;
|
3090 |
+
}
|
3091 |
+
|
3092 |
+
function getToPathname(to) {
|
3093 |
+
// Empty strings should be treated the same as / paths
|
3094 |
+
return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? (0,history__WEBPACK_IMPORTED_MODULE_1__.parsePath)(to).pathname : to.pathname;
|
3095 |
+
}
|
3096 |
+
|
3097 |
+
function stripBasename(pathname, basename) {
|
3098 |
+
if (basename === "/") return pathname;
|
3099 |
+
|
3100 |
+
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
3101 |
+
return null;
|
3102 |
+
}
|
3103 |
+
|
3104 |
+
let nextChar = pathname.charAt(basename.length);
|
3105 |
+
|
3106 |
+
if (nextChar && nextChar !== "/") {
|
3107 |
+
// pathname does not start with basename/
|
3108 |
+
return null;
|
3109 |
+
}
|
3110 |
+
|
3111 |
+
return pathname.slice(basename.length) || "/";
|
3112 |
+
}
|
3113 |
+
|
3114 |
+
const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
|
3115 |
+
|
3116 |
+
const normalizePathname = pathname => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
|
3117 |
+
|
3118 |
+
const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
3119 |
+
|
3120 |
+
const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash; ///////////////////////////////////////////////////////////////////////////////
|
3121 |
+
|
3122 |
+
|
3123 |
+
//# sourceMappingURL=index.js.map
|
3124 |
+
|
3125 |
+
|
3126 |
+
/***/ }),
|
3127 |
+
|
3128 |
+
/***/ "react":
|
3129 |
+
/*!************************!*\
|
3130 |
+
!*** external "React" ***!
|
3131 |
+
\************************/
|
3132 |
+
/***/ (function(module) {
|
3133 |
+
|
3134 |
+
module.exports = window["React"];
|
3135 |
+
|
3136 |
+
/***/ }),
|
3137 |
+
|
3138 |
+
/***/ "react-dom":
|
3139 |
+
/*!***************************!*\
|
3140 |
+
!*** external "ReactDOM" ***!
|
3141 |
+
\***************************/
|
3142 |
+
/***/ (function(module) {
|
3143 |
+
|
3144 |
+
module.exports = window["ReactDOM"];
|
3145 |
+
|
3146 |
+
/***/ }),
|
3147 |
+
|
3148 |
+
/***/ "@wordpress/api-fetch":
|
3149 |
+
/*!**********************************!*\
|
3150 |
+
!*** external ["wp","apiFetch"] ***!
|
3151 |
+
\**********************************/
|
3152 |
+
/***/ (function(module) {
|
3153 |
+
|
3154 |
+
module.exports = window["wp"]["apiFetch"];
|
3155 |
+
|
3156 |
+
/***/ }),
|
3157 |
+
|
3158 |
+
/***/ "@wordpress/element":
|
3159 |
+
/*!*********************************!*\
|
3160 |
+
!*** external ["wp","element"] ***!
|
3161 |
+
\*********************************/
|
3162 |
+
/***/ (function(module) {
|
3163 |
+
|
3164 |
+
module.exports = window["wp"]["element"];
|
3165 |
+
|
3166 |
+
/***/ }),
|
3167 |
+
|
3168 |
+
/***/ "@wordpress/i18n":
|
3169 |
+
/*!******************************!*\
|
3170 |
+
!*** external ["wp","i18n"] ***!
|
3171 |
+
\******************************/
|
3172 |
+
/***/ (function(module) {
|
3173 |
+
|
3174 |
+
module.exports = window["wp"]["i18n"];
|
3175 |
+
|
3176 |
+
/***/ }),
|
3177 |
+
|
3178 |
+
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
|
3179 |
+
/*!************************************************************!*\
|
3180 |
+
!*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
|
3181 |
+
\************************************************************/
|
3182 |
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
3183 |
+
|
3184 |
+
__webpack_require__.r(__webpack_exports__);
|
3185 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
3186 |
+
/* harmony export */ "default": function() { return /* binding */ _extends; }
|
3187 |
+
/* harmony export */ });
|
3188 |
+
function _extends() {
|
3189 |
+
_extends = Object.assign || function (target) {
|
3190 |
+
for (var i = 1; i < arguments.length; i++) {
|
3191 |
+
var source = arguments[i];
|
3192 |
+
|
3193 |
+
for (var key in source) {
|
3194 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
3195 |
+
target[key] = source[key];
|
3196 |
+
}
|
3197 |
+
}
|
3198 |
+
}
|
3199 |
+
|
3200 |
+
return target;
|
3201 |
+
};
|
3202 |
+
|
3203 |
+
return _extends.apply(this, arguments);
|
3204 |
+
}
|
3205 |
+
|
3206 |
+
/***/ })
|
3207 |
+
|
3208 |
+
/******/ });
|
3209 |
+
/************************************************************************/
|
3210 |
+
/******/ // The module cache
|
3211 |
+
/******/ var __webpack_module_cache__ = {};
|
3212 |
+
/******/
|
3213 |
+
/******/ // The require function
|
3214 |
+
/******/ function __webpack_require__(moduleId) {
|
3215 |
+
/******/ // Check if module is in cache
|
3216 |
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
3217 |
+
/******/ if (cachedModule !== undefined) {
|
3218 |
+
/******/ return cachedModule.exports;
|
3219 |
+
/******/ }
|
3220 |
+
/******/ // Create a new module (and put it into the cache)
|
3221 |
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
3222 |
+
/******/ // no module.id needed
|
3223 |
+
/******/ // no module.loaded needed
|
3224 |
+
/******/ exports: {}
|
3225 |
+
/******/ };
|
3226 |
+
/******/
|
3227 |
+
/******/ // Execute the module function
|
3228 |
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
3229 |
+
/******/
|
3230 |
+
/******/ // Return the exports of the module
|
3231 |
+
/******/ return module.exports;
|
3232 |
+
/******/ }
|
3233 |
+
/******/
|
3234 |
+
/************************************************************************/
|
3235 |
+
/******/ /* webpack/runtime/compat get default export */
|
3236 |
+
/******/ !function() {
|
3237 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
3238 |
+
/******/ __webpack_require__.n = function(module) {
|
3239 |
+
/******/ var getter = module && module.__esModule ?
|
3240 |
+
/******/ function() { return module['default']; } :
|
3241 |
+
/******/ function() { return module; };
|
3242 |
+
/******/ __webpack_require__.d(getter, { a: getter });
|
3243 |
+
/******/ return getter;
|
3244 |
+
/******/ };
|
3245 |
+
/******/ }();
|
3246 |
+
/******/
|
3247 |
+
/******/ /* webpack/runtime/define property getters */
|
3248 |
+
/******/ !function() {
|
3249 |
+
/******/ // define getter functions for harmony exports
|
3250 |
+
/******/ __webpack_require__.d = function(exports, definition) {
|
3251 |
+
/******/ for(var key in definition) {
|
3252 |
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
3253 |
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
3254 |
+
/******/ }
|
3255 |
+
/******/ }
|
3256 |
+
/******/ };
|
3257 |
+
/******/ }();
|
3258 |
+
/******/
|
3259 |
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
3260 |
+
/******/ !function() {
|
3261 |
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
3262 |
+
/******/ }();
|
3263 |
+
/******/
|
3264 |
+
/******/ /* webpack/runtime/make namespace object */
|
3265 |
+
/******/ !function() {
|
3266 |
+
/******/ // define __esModule on exports
|
3267 |
+
/******/ __webpack_require__.r = function(exports) {
|
3268 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
3269 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
3270 |
+
/******/ }
|
3271 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
3272 |
+
/******/ };
|
3273 |
+
/******/ }();
|
3274 |
+
/******/
|
3275 |
+
/************************************************************************/
|
3276 |
+
var __webpack_exports__ = {};
|
3277 |
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
3278 |
+
!function() {
|
3279 |
+
/*!***************************!*\
|
3280 |
+
!*** ./wizard/src/App.js ***!
|
3281 |
+
\***************************/
|
3282 |
+
__webpack_require__.r(__webpack_exports__);
|
3283 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
3284 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
3285 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
3286 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
3287 |
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
|
3288 |
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
|
3289 |
+
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/index.js");
|
3290 |
+
/* harmony import */ var _Admin_App_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @Admin/App.scss */ "./wizard/src/App.scss");
|
3291 |
+
/* harmony import */ var _Admin_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @Admin/Settings */ "./wizard/src/Settings.js");
|
3292 |
+
|
3293 |
+
|
3294 |
+
|
3295 |
+
|
3296 |
+
/* Main Compnent */
|
3297 |
+
|
3298 |
+
|
3299 |
+
|
3300 |
+
react_dom__WEBPACK_IMPORTED_MODULE_2___default().render((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_router_dom__WEBPACK_IMPORTED_MODULE_5__.BrowserRouter, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Admin_Settings__WEBPACK_IMPORTED_MODULE_4__["default"], null)), document.getElementById('cpsw-onboarding-content'));
|
3301 |
+
}();
|
3302 |
+
/******/ })()
|
3303 |
+
;
|
3304 |
+
//# sourceMappingURL=app.js.map
|
wizard/images/apple-pay.svg
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
4 |
+
x="0px" y="0px" viewBox="0 0 512 210.2" xml:space="preserve">
|
5 |
+
<path id="XMLID_34_" d="M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9
|
6 |
+
C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2
|
7 |
+
c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7
|
8 |
+
c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2
|
9 |
+
C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z
|
10 |
+
M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2
|
11 |
+
c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8
|
12 |
+
c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4
|
13 |
+
l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5
|
14 |
+
l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z
|
15 |
+
"/>
|
16 |
+
<g>
|
17 |
+
</g>
|
18 |
+
<g>
|
19 |
+
</g>
|
20 |
+
<g>
|
21 |
+
</g>
|
22 |
+
<g>
|
23 |
+
</g>
|
24 |
+
<g>
|
25 |
+
</g>
|
26 |
+
<g>
|
27 |
+
</g>
|
28 |
+
</svg>
|
wizard/images/cpsw-logo-light.svg
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 33.6 40" style="enable-background:new 0 0 33.6 40;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#FFFFFF;}
|
7 |
+
.st1{fill:#FF6D00;}
|
8 |
+
</style>
|
9 |
+
<g>
|
10 |
+
<g>
|
11 |
+
<path class="st0" d="M0.9,3C2.4,3,4,3,5.5,3c0.7,0,1.1,0.3,1.3,1c0.6,2.2,1.2,4.4,1.7,6.7c0.1,0.2,0.2,0.3,0.4,0.4
|
12 |
+
c0.7,0.1,1.5,0.2,2.2,0.3c0.2,0,0.3,0.1,0.4,0.3c0.1,0.3,0,0.8,0,1.1c0.1,2.6,1.4,4.9,3.5,6.4c0.5,0.3,1,0.7,1.5,0.9
|
13 |
+
c1.5,0.7,3.1,0.8,4.6,0.6c1.2-0.2,2.4-0.6,3.4-1.3c1.5-1,2.7-2.5,3.2-4.2c0-0.1,0.3-1.2,0.2-1.2c1.2,0.2,1.8,0.3,3,0.5
|
14 |
+
c0.4,0.1,0.5,0.2,0.5,0.6c-0.1,4-0.1,8-0.2,12c0,0.4-0.2,0.6-0.7,0.6c-6.1,0-12.2,0-18.2,0c-0.3,0-0.6,0.1-0.8,0.3
|
15 |
+
c-1.8,1.5-3.6,3.1-5.3,4.6c-0.1,0.1-0.2,0.1-0.2,0.2c-0.1,0.2-0.2,0.4-0.1,0.5c0,0.1,0.3,0.2,0.4,0.2c0.1,0,0.2,0,0.4,0
|
16 |
+
c8.6,0,17.1,0,25.7,0c0.2,0,0.3,0,0.5,0c0,0.8,0,1.5,0,2.3c-1.4,0-2.8,0-4.3,0c0.4,0.8,0.5,1.5,0.2,2.3c-0.2,0.5-0.5,0.9-1,1.1
|
17 |
+
c-0.9,0.5-2.1,0.4-2.9-0.3c-0.9-0.7-1-1.8-0.5-3.1c-3.1,0-6.2,0-9.3,0c0.4,0.7,0.5,1.4,0.2,2.1c-0.2,0.5-0.5,0.9-0.9,1.2
|
18 |
+
c-0.9,0.6-2,0.6-2.9-0.1c-1-0.7-1.1-1.7-0.6-3.2c-0.1,0-0.3,0-0.4,0c-1.3,0-2.7,0-4,0c-1.2,0-2.2-0.7-2.6-1.8
|
19 |
+
c-0.4-1.1-0.1-2.2,0.8-3.1c1.7-1.5,3.4-3,5.1-4.4c0.2-0.2,0.2-0.3,0.2-0.5C8.1,19.2,6.5,12.4,4.9,5.7C4.8,5.3,4.7,5.3,4.4,5.3
|
20 |
+
c-1,0-2.1,0-3.1,0c-0.1,0-0.3,0-0.4,0C0.9,4.5,0.9,3.8,0.9,3z"/>
|
21 |
+
</g>
|
22 |
+
<circle class="st1" cx="20.7" cy="11.3" r="10.8"/>
|
23 |
+
<g>
|
24 |
+
<path class="st0" d="M18.3,17.5L14.1,13c-0.4-0.4-0.4-1.1,0-1.4c0.4-0.4,1.1-0.4,1.4,0l2.8,3L26.2,7c0.4-0.4,1.1-0.4,1.4,0
|
25 |
+
C28,7.4,28,8,27.6,8.4L18.3,17.5z"/>
|
26 |
+
</g>
|
27 |
+
</g>
|
28 |
+
</svg>
|
wizard/images/cpsw-logo.svg
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 33.6 40" style="enable-background:new 0 0 33.6 40;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#683BA0;}
|
7 |
+
.st1{fill:#FF6D00;}
|
8 |
+
.st2{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.1-0.1-2.2,0.8-3.1c1.7-1.5,3.4-3,5.1-4.4c0.2-0.2,0.2-0.3,0.2-0.5C8.1,19.2,6.5,12.4,4.9,5.7C4.8,5.3,4.7,5.3,4.4,5.3
|
21 |
+
c-1,0-2.1,0-3.1,0c-0.1,0-0.3,0-0.4,0C0.9,4.5,0.9,3.8,0.9,3z"/>
|
22 |
+
</g>
|
23 |
+
<circle class="st1" cx="20.7" cy="11.3" r="10.8"/>
|
24 |
+
<g>
|
25 |
+
<path class="st2" d="M18.3,17.5L14.1,13c-0.4-0.4-0.4-1.1,0-1.4c0.4-0.4,1.1-0.4,1.4,0l2.8,3L26.2,7c0.4-0.4,1.1-0.4,1.4,0
|
26 |
+
C28,7.4,28,8,27.6,8.4L18.3,17.5z"/>
|
27 |
+
</g>
|
28 |
+
</g>
|
29 |
+
</svg>
|
wizard/images/gpay.svg
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<svg role="presentation" fill="#A1A1A1" class="main-header__logo-image" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 435.97 173.13">
|
2 |
+
<path d="M206.2,84.58v50.75H190.1V10h42.7a38.61,38.61,0,0,1,27.65,10.85A34.88,34.88,0,0,1,272,47.3a34.72,34.72,0,0,1-11.55,26.6q-11.2,10.68-27.65,10.67H206.2Zm0-59.15V69.18h27a21.28,21.28,0,0,0,15.93-6.48,21.36,21.36,0,0,0,0-30.63,21,21,0,0,0-15.93-6.65h-27Z" fill="#5f6368"></path><path d="M309.1,46.78q17.85,0,28.18,9.54T347.6,82.48v52.85H332.2v-11.9h-.7q-10,14.7-26.6,14.7-14.17,0-23.71-8.4a26.82,26.82,0,0,1-9.54-21q0-13.31,10.06-21.17t26.86-7.88q14.34,0,23.62,5.25V81.25A18.33,18.33,0,0,0,325.54,67,22.8,22.8,0,0,0,310,61.13q-13.49,0-21.35,11.38l-14.18-8.93Q286.17,46.78,309.1,46.78Zm-20.83,62.3a12.86,12.86,0,0,0,5.34,10.5,19.64,19.64,0,0,0,12.51,4.2,25.67,25.67,0,0,0,18.11-7.52q8-7.53,8-17.67-7.53-6-21-6-9.81,0-16.36,4.73C290.46,100.52,288.27,104.41,288.27,109.08Z" fill="#5f6368"></path><path d="M436,49.58,382.24,173.13H365.62l19.95-43.23L350.22,49.58h17.5l25.55,61.6h.35l24.85-61.6Z" fill="#5f6368"></path><path d="M141.14,73.64A85.79,85.79,0,0,0,139.9,59H72V86.73h38.89a33.33,33.33,0,0,1-14.38,21.88v18h23.21C133.31,114.08,141.14,95.55,141.14,73.64Z" fill="#4285f4"></path><path d="M72,144c19.43,0,35.79-6.38,47.72-17.38l-23.21-18C90.05,113,81.73,115.5,72,115.5c-18.78,0-34.72-12.66-40.42-29.72H7.67v18.55A72,72,0,0,0,72,144Z" fill="#34a853"></path><path d="M31.58,85.78a43.14,43.14,0,0,1,0-27.56V39.67H7.67a72,72,0,0,0,0,64.66Z" fill="#fbbc04"></path><path d="M72,28.5A39.09,39.09,0,0,1,99.62,39.3h0l20.55-20.55A69.18,69.18,0,0,0,72,0,72,72,0,0,0,7.67,39.67L31.58,58.22C37.28,41.16,53.22,28.5,72,28.5Z" fill="#ea4335"></path>
|
3 |
+
</svg>
|
wizard/js/helper.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
function installError() {
|
3 |
+
$( window ).off( 'beforeunload' );
|
4 |
+
alert( 'Failed to install WooCommerce. Try Again' );
|
5 |
+
location.reload();
|
6 |
+
}
|
7 |
+
|
8 |
+
function installSuccess( ) {
|
9 |
+
activatePlugin();
|
10 |
+
}
|
11 |
+
|
12 |
+
function activatePlugin() {
|
13 |
+
$.ajax( {
|
14 |
+
type: 'POST',
|
15 |
+
dataType: 'json',
|
16 |
+
url: onboarding_vars.ajax_url,
|
17 |
+
data: { action: 'cpsw_onboarding_install_woocommerce', security: onboarding_vars.cpsw_onboarding_install_woocommerce },
|
18 |
+
success( response ) {
|
19 |
+
if ( response.success === true ) {
|
20 |
+
window.location.replace(
|
21 |
+
onboarding_vars.base_url,
|
22 |
+
);
|
23 |
+
}
|
24 |
+
},
|
25 |
+
error() {
|
26 |
+
$( 'body' ).css( 'cursor', 'default' );
|
27 |
+
alert( 'Something went wrong!' );
|
28 |
+
},
|
29 |
+
} );
|
30 |
+
}
|
31 |
+
|
32 |
+
$( document ).on( 'wp-plugin-install-error', installError )
|
33 |
+
.on( 'wp-plugin-install-success', installSuccess );
|
34 |
+
}( jQuery ) );
|
wizard/onboarding.php
ADDED
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Wizard Class
|
4 |
+
*
|
5 |
+
* @package checkout-plugins-stripe-woo
|
6 |
+
* @since 1.3.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace CPSW\Wizard;
|
10 |
+
|
11 |
+
use CPSW\Inc\Traits\Get_Instance;
|
12 |
+
use CPSW\Admin\Admin_Controller;
|
13 |
+
use CPSW\Inc\Helper;
|
14 |
+
/**
|
15 |
+
* Onboardin Class - Handles Onboarding Process
|
16 |
+
*
|
17 |
+
* @since 1.3.0
|
18 |
+
*/
|
19 |
+
class Onboarding {
|
20 |
+
use Get_Instance;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Stores slug for WooCommerce plugin
|
24 |
+
*
|
25 |
+
* @var string
|
26 |
+
* @since 1.3.0
|
27 |
+
*/
|
28 |
+
public $woocommerce_slug = 'woocommerce/woocommerce.php';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Constructor
|
32 |
+
*
|
33 |
+
* @since 1.3.0
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
+
add_action( 'admin_menu', [ $this, 'admin_menus' ] );
|
41 |
+
add_action( 'admin_init', [ $this, 'setup_wizard' ] );
|
42 |
+
add_action( 'admin_notices', [ $this, 'show_onboarding_wizard_notice' ] );
|
43 |
+
add_filter( 'cpsw_stripe_connect_redirect_url', [ $this, 'redirect_to_onboarding' ], 5 );
|
44 |
+
add_action( 'cpsw_after_connect_with_stripe', [ $this, 'update_connect_with_stripe_status' ] );
|
45 |
+
add_action( 'wp_ajax_cpsw_onboarding_install_woocommerce', [ $this, 'cpsw_onboarding_install_woocommerce' ] );
|
46 |
+
add_action( 'wp_ajax_cpsw_onboarding_enable_gateway', [ $this, 'cpsw_onboarding_enable_gateway' ] );
|
47 |
+
add_action( 'wp_ajax_cpsw_onboarding_enable_express_checkout', [ $this, 'cpsw_onboarding_enable_express_checkout' ] );
|
48 |
+
add_action( 'admin_init', [ $this, 'hide_notices' ] );
|
49 |
+
add_action( 'admin_bar_menu', [ $this, 'admin_bar_icon' ], 999 );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Adding dashboard page for onboarding wizard
|
54 |
+
*
|
55 |
+
* @return void
|
56 |
+
* @since 1.3.0
|
57 |
+
*/
|
58 |
+
public function admin_menus() {
|
59 |
+
if ( empty( $_GET['page'] ) || 'cpsw-onboarding' !== $_GET['page'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
|
63 |
+
add_dashboard_page( '', '', 'manage_options', 'cpsw-onboarding', '' );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Enqueue resource for onboarding wizard
|
68 |
+
*
|
69 |
+
* @return void
|
70 |
+
* @since 1.3.0
|
71 |
+
*/
|
72 |
+
public function setup_wizard() {
|
73 |
+
if ( empty( $_GET['page'] ) || 'cpsw-onboarding' !== $_GET['page'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
74 |
+
return;
|
75 |
+
}
|
76 |
+
|
77 |
+
$this->enqueue_scripts_styles();
|
78 |
+
|
79 |
+
ob_start();
|
80 |
+
$this->setup_wizard_html();
|
81 |
+
exit;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Enqueues scripts and styles required for onboarding wizard
|
86 |
+
*
|
87 |
+
* @return void
|
88 |
+
* @since 1.3.0
|
89 |
+
*/
|
90 |
+
public function enqueue_scripts_styles() {
|
91 |
+
// adding tailwindcss scripts and styles.
|
92 |
+
wp_register_style( 'cpsw-onboarding', CPSW_URL . 'wizard/build/app.css', [], CPSW_VERSION );
|
93 |
+
wp_enqueue_style( 'cpsw-onboarding' );
|
94 |
+
wp_style_add_data( 'cpsw-onboarding', 'rtl', 'replace' );
|
95 |
+
|
96 |
+
$script_asset_path = CPSW_DIR . 'wizard/build/app.asset.php';
|
97 |
+
$script_info = file_exists( $script_asset_path )
|
98 |
+
? include $script_asset_path
|
99 |
+
: [
|
100 |
+
'dependencies' => [],
|
101 |
+
'version' => CPSW_VERSION,
|
102 |
+
];
|
103 |
+
|
104 |
+
$script_dep = array_merge( $script_info['dependencies'], [ 'updates' ] );
|
105 |
+
|
106 |
+
wp_register_script( 'cpsw-onboarding', CPSW_URL . 'wizard/build/app.js', $script_dep, CPSW_VERSION, true );
|
107 |
+
wp_enqueue_script( 'cpsw-onboarding' );
|
108 |
+
wp_localize_script( 'cpsw-onboarding', 'onboarding_vars', $this->localize_vars() );
|
109 |
+
|
110 |
+
wp_register_script( 'cpsw-onboarding-helper', CPSW_URL . 'wizard/js/helper.js', [ 'jquery', 'updates' ], CPSW_VERSION, true );
|
111 |
+
wp_enqueue_script( 'cpsw-onboarding-helper' );
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Creates HTML for onboarding wizard
|
116 |
+
*
|
117 |
+
* @return void
|
118 |
+
* @since 1.3.0
|
119 |
+
*/
|
120 |
+
public function setup_wizard_html() {
|
121 |
+
set_current_screen();
|
122 |
+
?>
|
123 |
+
<html <?php language_attributes(); ?>>
|
124 |
+
<head>
|
125 |
+
<meta name="viewport" content="width=device-width" />
|
126 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
127 |
+
<title><?php esc_html_e( 'Stripe for WooCommerce - Onboarding', 'checkout-plugins-stripe-woo' ); ?></title>
|
128 |
+
|
129 |
+
<script type="text/javascript">
|
130 |
+
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
131 |
+
var ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ); ?>';
|
132 |
+
var pagenow = '';
|
133 |
+
</script>
|
134 |
+
<?php do_action( 'admin_print_styles' ); ?>
|
135 |
+
<?php do_action( 'admin_head' ); ?>
|
136 |
+
</head>
|
137 |
+
<body class="cpsw-setup wp-core-ui">
|
138 |
+
<div class="cpsw-onboarding-content" id="cpsw-onboarding-content"></div>
|
139 |
+
</body>
|
140 |
+
<?php wp_print_scripts( [ 'cpsw-onboarding' ] ); ?>
|
141 |
+
<?php wp_print_scripts( [ 'cpsw-onboarding-helper' ] ); ?>
|
142 |
+
</html>
|
143 |
+
<?php
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Shows admin notice to initiate onboarding process
|
148 |
+
*
|
149 |
+
* @return void
|
150 |
+
* @since 1.3.0
|
151 |
+
*/
|
152 |
+
public function show_onboarding_wizard_notice() {
|
153 |
+
$screen = get_current_screen();
|
154 |
+
$screen_id = $screen ? $screen->id : '';
|
155 |
+
$allowed_screens = [
|
156 |
+
'woocommerce_page_wc-settings',
|
157 |
+
'dashboard',
|
158 |
+
'plugins',
|
159 |
+
];
|
160 |
+
|
161 |
+
if ( ! in_array( $screen_id, $allowed_screens, true ) ) {
|
162 |
+
return;
|
163 |
+
}
|
164 |
+
|
165 |
+
$status = get_option( 'cpsw_setup_status', false );
|
166 |
+
$onboarding_url = admin_url( 'index.php?page=cpsw-onboarding' );
|
167 |
+
|
168 |
+
if ( ! class_exists( 'woocommerce' ) ) {
|
169 |
+
$onboarding_url = add_query_arg( 'cpsw_call', 'setup-woocommerce', $onboarding_url );
|
170 |
+
}
|
171 |
+
|
172 |
+
if ( false === $status ) {
|
173 |
+
?>
|
174 |
+
<div class="notice notice-info wcf-notice">
|
175 |
+
<p><b><?php esc_html_e( 'Thanks for installing Checkout Plugins - Stripe for WooCommerce!', 'checkout-plugins-stripe-woo' ); ?></b></p>
|
176 |
+
<p><?php esc_html_e( 'Follow Onboarding process to connect your Stripe account', 'checkout-plugins-stripe-woo' ); ?></p>
|
177 |
+
<p>
|
178 |
+
<a href="<?php echo esc_url( $onboarding_url ); ?>" class="button button-primary"> <?php esc_html_e( 'Configure Stripe', 'checkout-plugins-stripe-woo' ); ?></a>
|
179 |
+
<a class="button-secondary" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'cpsw-hide-notice', 'install' ), 'cpsw_hide_notices_nonce', '_cpsw_notice_nonce' ) ); ?>"><?php esc_html_e( 'Skip Setup', 'checkout-plugins-stripe-woo' ); ?></a>
|
180 |
+
</p>
|
181 |
+
</div>
|
182 |
+
<?php
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Return url for stripe connect success
|
188 |
+
*
|
189 |
+
* @param string $return_url default return url to admin page.
|
190 |
+
* @return string
|
191 |
+
* @since 1.3.0
|
192 |
+
*/
|
193 |
+
public function redirect_to_onboarding( $return_url ) {
|
194 |
+
return admin_url( 'index.php?page=cpsw-onboarding' );
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Update onboarding setup status
|
199 |
+
*
|
200 |
+
* @return void
|
201 |
+
* @since 1.3.0
|
202 |
+
*/
|
203 |
+
public function update_connect_with_stripe_status() {
|
204 |
+
update_option( 'cpsw_setup_status', true );
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Localized variables for onboarding wizard
|
209 |
+
*
|
210 |
+
* @return array
|
211 |
+
* @since 1.3.0
|
212 |
+
*/
|
213 |
+
public function localize_vars() {
|
214 |
+
$admin_controller = Admin_Controller::get_instance();
|
215 |
+
$redirect_url = admin_url( 'index.php?page=cpsw-onboarding' );
|
216 |
+
$available_gateways = $this->available_gateways();
|
217 |
+
return [
|
218 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
219 |
+
'base_url' => $redirect_url,
|
220 |
+
'assets_url' => CPSW_URL . 'wizard/',
|
221 |
+
'authorization_url' => $admin_controller->get_stripe_connect_url( $redirect_url ),
|
222 |
+
'settings_url' => admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings' ),
|
223 |
+
'gateways_url' => admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=cpsw_stripe' ),
|
224 |
+
'manual_connect_url' => admin_url( 'admin.php?page=wc-settings&tab=cpsw_api_settings&connect=manually' ),
|
225 |
+
'available_gateways' => $available_gateways,
|
226 |
+
'woocommerce_setup_url' => admin_url( 'plugin-install.php?s=woocommerce&tab=search' ),
|
227 |
+
'cpsw_onboarding_enable_gateway' => wp_create_nonce( 'cpsw_onboarding_enable_gateway' ),
|
228 |
+
'cpsw_onboarding_enable_express_checkout' => wp_create_nonce( 'cpsw_onboarding_enable_express_checkout' ),
|
229 |
+
'cpsw_onboarding_install_woocommerce' => wp_create_nonce( 'cpsw_onboarding_install_woocommerce' ),
|
230 |
+
'woocommerce_installed' => $this->is_woocommerce_installed(),
|
231 |
+
'navigator_base' => '/wp-admin/index.php?page=cpsw-onboarding',
|
232 |
+
];
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Returns available gateways as per woocommerce store setup
|
237 |
+
*
|
238 |
+
* @return array
|
239 |
+
* @since 1.3.0
|
240 |
+
*/
|
241 |
+
public function available_gateways() {
|
242 |
+
if ( empty( $_GET['cpsw_call'] ) || 'success' !== $_GET['cpsw_call'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
|
246 |
+
$gateways = WC()->payment_gateways->payment_gateways();
|
247 |
+
if ( empty( $gateways ) ) {
|
248 |
+
return false;
|
249 |
+
}
|
250 |
+
|
251 |
+
$available_gateways = [
|
252 |
+
[
|
253 |
+
'id' => 'cpsw_stripe',
|
254 |
+
'name' => 'Stripe Card Processing',
|
255 |
+
'icon' => CPSW_URL . 'assets/icon/credit-card.svg',
|
256 |
+
'recommended' => true,
|
257 |
+
'currencies' => 'all',
|
258 |
+
'enabled' => true,
|
259 |
+
],
|
260 |
+
];
|
261 |
+
|
262 |
+
$currency = get_woocommerce_currency();
|
263 |
+
foreach ( $gateways as $id => $class ) {
|
264 |
+
if (
|
265 |
+
0 === strpos( $id, 'cpsw_' ) &&
|
266 |
+
method_exists( $class, 'get_supported_currency' ) &&
|
267 |
+
in_array( $currency, $class->get_supported_currency(), true )
|
268 |
+
) {
|
269 |
+
$temp = [];
|
270 |
+
$icon = str_replace( 'cpsw_', '', $id );
|
271 |
+
$temp['id'] = $id;
|
272 |
+
$temp['name'] = $class->method_title;
|
273 |
+
$temp['icon'] = CPSW_URL . 'assets/icon/' . $icon . '.svg';
|
274 |
+
$temp['recommended'] = false;
|
275 |
+
$temp['currencies'] = implode( ', ', $class->get_supported_currency() );
|
276 |
+
$temp['enabled'] = false;
|
277 |
+
$available_gateways[] = $temp;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
return $available_gateways;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Installs WooCommerce if reuired
|
286 |
+
*
|
287 |
+
* @return void
|
288 |
+
* @since 1.3.0
|
289 |
+
*/
|
290 |
+
public function cpsw_onboarding_install_woocommerce() {
|
291 |
+
check_ajax_referer( 'cpsw_onboarding_install_woocommerce', 'security' );
|
292 |
+
|
293 |
+
$activate = activate_plugin( $this->woocommerce_slug, '', false, true );
|
294 |
+
|
295 |
+
if ( is_wp_error( $activate ) ) {
|
296 |
+
wp_send_json_error(
|
297 |
+
array(
|
298 |
+
'success' => false,
|
299 |
+
'message' => $activate->get_error_message(),
|
300 |
+
)
|
301 |
+
);
|
302 |
+
}
|
303 |
+
|
304 |
+
wp_send_json_success();
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Handles enabling gateways from onboarding wizard
|
309 |
+
* Returns success / failure in form of json
|
310 |
+
*
|
311 |
+
* @return void
|
312 |
+
* @since 1.3.0
|
313 |
+
*/
|
314 |
+
public function cpsw_onboarding_enable_gateway() {
|
315 |
+
check_ajax_referer( 'cpsw_onboarding_enable_gateway', 'security' );
|
316 |
+
$gateway_status = json_decode( wp_unslash( $_POST['formdata'] ), true );
|
317 |
+
|
318 |
+
if ( empty( $gateway_status ) ) {
|
319 |
+
wp_send_json_success( [ 'message' => 'no gateway selected' ] );
|
320 |
+
}
|
321 |
+
|
322 |
+
$gateways = WC()->payment_gateways->payment_gateways();
|
323 |
+
|
324 |
+
$response = [];
|
325 |
+
foreach ( $gateway_status as $id => $status ) {
|
326 |
+
$status = wc_clean( $status );
|
327 |
+
$id = sanitize_text_field( $id );
|
328 |
+
if ( 'true' === $status && isset( $gateways[ $id ] ) ) {
|
329 |
+
if ( ( 'yes' !== $gateways[ $id ]->enabled && $gateways[ $id ]->update_option( 'enabled', 'yes' ) ) || 'yes' === $gateways[ $id ]->enabled ) {
|
330 |
+
$response[ $id ] = true;
|
331 |
+
} else {
|
332 |
+
$response[ $id ] = false;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
wp_send_json_success( [ 'activated_gateways' => $response ] );
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Handles Express Checkout enabling call from onboarding wizard
|
342 |
+
*
|
343 |
+
* @return void
|
344 |
+
* @since 1.3.0
|
345 |
+
*/
|
346 |
+
public function cpsw_onboarding_enable_express_checkout() {
|
347 |
+
check_ajax_referer( 'cpsw_onboarding_enable_express_checkout', 'security' );
|
348 |
+
$cpsw_stripe = Helper::get_gateway_settings();
|
349 |
+
if ( 'yes' === $cpsw_stripe['express_checkout_enabled'] ) {
|
350 |
+
wp_send_json_success( [ 'express_checkout' => true ] );
|
351 |
+
}
|
352 |
+
$cpsw_stripe = array_merge( $cpsw_stripe, [ 'express_checkout_enabled' => 'yes' ] );
|
353 |
+
if ( update_option( 'woocommerce_cpsw_stripe_settings', $cpsw_stripe ) ) {
|
354 |
+
wp_send_json_success( [ 'express_checkout' => true ] );
|
355 |
+
}
|
356 |
+
|
357 |
+
wp_send_json_error( [ 'express_checkout' => false ] );
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* Checks if woocommerce is installed
|
362 |
+
*
|
363 |
+
* @return boolean
|
364 |
+
* @since 1.3.0
|
365 |
+
*/
|
366 |
+
public function is_woocommerce_installed() {
|
367 |
+
$plugins = get_plugins();
|
368 |
+
if ( isset( $plugins[ $this->woocommerce_slug ] ) ) {
|
369 |
+
return true;
|
370 |
+
}
|
371 |
+
return false;
|
372 |
+
}
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Hide onboarding notice on clck of skip setup button
|
376 |
+
*
|
377 |
+
* @return void
|
378 |
+
* @since 1.3.0
|
379 |
+
*/
|
380 |
+
public function hide_notices() {
|
381 |
+
if ( ! isset( $_GET['cpsw-hide-notice'] ) ) {
|
382 |
+
return;
|
383 |
+
}
|
384 |
+
|
385 |
+
$cpsw_hide_notice = filter_input( INPUT_GET, 'cpsw-hide-notice', FILTER_SANITIZE_STRING );
|
386 |
+
$_cpsw_notice_nonce = filter_input( INPUT_GET, '_cpsw_notice_nonce', FILTER_SANITIZE_STRING );
|
387 |
+
|
388 |
+
if ( $cpsw_hide_notice && $_cpsw_notice_nonce && wp_verify_nonce( sanitize_text_field( wp_unslash( $_cpsw_notice_nonce ) ), 'cpsw_hide_notices_nonce' ) ) {
|
389 |
+
$this->update_connect_with_stripe_status();
|
390 |
+
|
391 |
+
unset( $_GET['cpsw-hide-notice'] );
|
392 |
+
unset( $_GET['_cpsw_notice_nonce'] );
|
393 |
+
|
394 |
+
$params = array_map( 'sanitize_text_field', $_GET );
|
395 |
+
|
396 |
+
wp_safe_redirect( add_query_arg( $params, admin_url( 'admin.php' ) ) );
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Adds admin bar icon for onboarding wizard
|
402 |
+
*
|
403 |
+
* @param object $admin_bar object of WP_Admin_Bar.
|
404 |
+
* @return void
|
405 |
+
* @since 1.3.0
|
406 |
+
*/
|
407 |
+
public function admin_bar_icon( $admin_bar ) {
|
408 |
+
if ( ! current_user_can( 'manage_options' ) || ! is_admin() ) {
|
409 |
+
return;
|
410 |
+
}
|
411 |
+
|
412 |
+
if (
|
413 |
+
! empty( get_option( 'cpsw_setup_status' ) ) &&
|
414 |
+
! empty( Helper::get_setting( 'cpsw_test_pub_key' ) ) &&
|
415 |
+
! empty( Helper::get_setting( 'cpsw_test_secret_key' ) ) &&
|
416 |
+
! empty( Helper::get_setting( 'cpsw_pub_key' ) ) &&
|
417 |
+
! empty( Helper::get_setting( 'cpsw_secret_key' ) )
|
418 |
+
) {
|
419 |
+
return;
|
420 |
+
}
|
421 |
+
|
422 |
+
$iconurl = CPSW_URL . 'wizard/images/cpsw-logo-light.svg';
|
423 |
+
|
424 |
+
$iconspan = '<span class="cpsw-logo-icon" style="float: left;
|
425 |
+
width: 22px !important;
|
426 |
+
height: 22px !important;
|
427 |
+
margin-left: 5px !important;
|
428 |
+
margin-top: 5px !important;
|
429 |
+
background-size: 22px 22px;
|
430 |
+
background-image:url(\'' . $iconurl . '\');"></span>';
|
431 |
+
|
432 |
+
$title = $iconspan . '';
|
433 |
+
|
434 |
+
$onboarding_url = admin_url( 'index.php?page=cpsw-onboarding' );
|
435 |
+
|
436 |
+
if ( ! class_exists( 'woocommerce' ) ) {
|
437 |
+
$onboarding_url = add_query_arg( 'cpsw_call', 'setup-woocommerce', $onboarding_url );
|
438 |
+
}
|
439 |
+
$args = [
|
440 |
+
'id' => 'cpsw-onboarding-link',
|
441 |
+
'title' => $title,
|
442 |
+
'href' => $onboarding_url,
|
443 |
+
];
|
444 |
+
$admin_bar->add_node( $args );
|
445 |
+
}
|
446 |
+
|
447 |
+
}
|
wizard/src/App.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
import ReactDOM from 'react-dom';
|
3 |
+
import { BrowserRouter } from 'react-router-dom';
|
4 |
+
|
5 |
+
/* Main Compnent */
|
6 |
+
import '@Admin/App.scss';
|
7 |
+
import Settings from '@Admin/Settings';
|
8 |
+
|
9 |
+
ReactDOM.render(
|
10 |
+
<BrowserRouter>
|
11 |
+
<Settings />
|
12 |
+
</BrowserRouter>,
|
13 |
+
document.getElementById( 'cpsw-onboarding-content' ),
|
14 |
+
);
|
wizard/src/App.scss
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
@tailwind base;
|
2 |
+
@tailwind components;
|
3 |
+
@tailwind utilities;
|
wizard/src/Settings.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
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';
|
9 |
+
import WooCommerce from '@Admin/pages/WooCommerce';
|
10 |
+
import Logo from '@Admin/components/Logo';
|
11 |
+
|
12 |
+
function Settings() {
|
13 |
+
const query = new URLSearchParams( useLocation().search );
|
14 |
+
const status = query.get( 'cpsw_call' );
|
15 |
+
|
16 |
+
let routePage = <p></p>;
|
17 |
+
switch ( status ) {
|
18 |
+
case 'success':
|
19 |
+
routePage = <Success />;
|
20 |
+
break;
|
21 |
+
case 'failed':
|
22 |
+
routePage = <Failed />;
|
23 |
+
break;
|
24 |
+
case 'express-checkout':
|
25 |
+
routePage = <ExpressCheckout />;
|
26 |
+
break;
|
27 |
+
case 'thank-you':
|
28 |
+
routePage = <ThankYou />;
|
29 |
+
break;
|
30 |
+
case 'setup-woocommerce':
|
31 |
+
routePage = <WooCommerce />;
|
32 |
+
break;
|
33 |
+
default:
|
34 |
+
routePage = <HomePage />;
|
35 |
+
break;
|
36 |
+
}
|
37 |
+
|
38 |
+
return (
|
39 |
+
<div className="relative bg-white overflow-hidden w-10/12 mx-auto my-0 rounded-xl mt-12">
|
40 |
+
<div className="max-w-7xl mx-auto overflow-x-hidden">
|
41 |
+
<div className="relative z-10 bg-white lg:w-full">
|
42 |
+
<Logo />
|
43 |
+
{ routePage }
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
);
|
48 |
+
}
|
49 |
+
|
50 |
+
export default Settings;
|
wizard/src/components/Logo.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
|
3 |
+
function Logo() {
|
4 |
+
return (
|
5 |
+
<div>
|
6 |
+
<div className="relative pt-6 px-4 sm:px-6 lg:px-8">
|
7 |
+
<nav className="relative flex items-center justify-center sm:h-10" aria-label="Logo">
|
8 |
+
<div className="flex items-center justify-center flex-grow">
|
9 |
+
<div className="flex items-center w-auto">
|
10 |
+
<img className="h-16 w-full" src={ onboarding_vars.assets_url + 'images/cpsw-logo.svg' } alt="Checkout Plugins - Stripe for WooCommerce" />
|
11 |
+
</div>
|
12 |
+
</div>
|
13 |
+
</nav>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
export default Logo;
|
wizard/src/components/Spinner.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
|
3 |
+
function Spinner() {
|
4 |
+
return (
|
5 |
+
<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">
|
6 |
+
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
|
7 |
+
<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"></path>
|
8 |
+
</svg>
|
9 |
+
);
|
10 |
+
}
|
11 |
+
|
12 |
+
export default Spinner;
|
wizard/src/pages/ExpressCheckout.js
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { useState } from 'react';
|
2 |
+
import apiFetch from '@wordpress/api-fetch';
|
3 |
+
import { __ } from '@wordpress/i18n';
|
4 |
+
import Spinner from '@Admin/components/Spinner';
|
5 |
+
import { useNavigate } from 'react-router-dom';
|
6 |
+
|
7 |
+
function ExpressCheckout() {
|
8 |
+
const [ clicked, setClicked ] = useState( false );
|
9 |
+
const navigate = useNavigate();
|
10 |
+
|
11 |
+
function enableExpressCheckout() {
|
12 |
+
setClicked( true );
|
13 |
+
const formData = new window.FormData();
|
14 |
+
|
15 |
+
formData.append(
|
16 |
+
'action',
|
17 |
+
'cpsw_onboarding_enable_express_checkout',
|
18 |
+
);
|
19 |
+
formData.append(
|
20 |
+
'security',
|
21 |
+
onboarding_vars.cpsw_onboarding_enable_express_checkout,
|
22 |
+
);
|
23 |
+
|
24 |
+
apiFetch( {
|
25 |
+
url: onboarding_vars.ajax_url,
|
26 |
+
method: 'POST',
|
27 |
+
body: formData,
|
28 |
+
} ).then( ( res ) => {
|
29 |
+
if ( res.success ) {
|
30 |
+
navigate(
|
31 |
+
onboarding_vars.navigator_base + `&cpsw_call=thank-you`,
|
32 |
+
);
|
33 |
+
}
|
34 |
+
} );
|
35 |
+
}
|
36 |
+
|
37 |
+
return (
|
38 |
+
<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">
|
39 |
+
<div className="text-center">
|
40 |
+
<h1 className="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
|
41 |
+
<span className="block xl">{ __( 'Wooho!!', 'checkout-plugins-stripe-woo' ) }</span>
|
42 |
+
<span className="block text-cart-500 xl:inline">{ __( 'You are almost done.', 'checkout-plugins-stripe-woo' ) }</span>
|
43 |
+
</h1>
|
44 |
+
<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">
|
45 |
+
<span className="block"> { __( 'Since you have enabled', 'checkout-plugins-stripe-woo' ) } <span className="block text-gray-700 xl:inline font-bold">{ __( 'Stripe Card Processing', 'checkout-plugins-stripe-woo' ) },</span>{ __( ' We recommend you to enable', 'checkout-plugins-stripe-woo' ) } <span className="block text-gray-700 xl:inline font-bold">{ __( 'Express Checkout', 'checkout-plugins-stripe-woo' ) }</span> { __( 'feature', 'checkout-plugins-stripe-woo' ) }.</span>
|
46 |
+
<span>{ __( 'Express Checkout generates more conversions!!', 'checkout-plugins-stripe-woo' ) }</span>
|
47 |
+
</p>
|
48 |
+
<div className="block mx-auto mt-1 mb-1">
|
49 |
+
<img className="inline mx-4 py-5 h-24" src={ onboarding_vars.assets_url + 'images/apple-pay.svg' } alt="Express Checkout" />
|
50 |
+
<img className="inline mx-4 py-5 h-24" src={ onboarding_vars.assets_url + 'images/gpay.svg' } alt="Express Checkout" />
|
51 |
+
</div>
|
52 |
+
<div className="sm:inline-block lg:inline-block sm:justify-center lg:justify-center">
|
53 |
+
<div className="rounded-md shadow">
|
54 |
+
{ clicked ? (
|
55 |
+
<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">
|
56 |
+
{ __( 'Enabling…', 'checkout-plugins-stripe-woo' ) }
|
57 |
+
<Spinner />
|
58 |
+
</button>
|
59 |
+
) : (
|
60 |
+
<button onClick={ enableExpressCheckout } 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">
|
61 |
+
{ __( 'Enable Express Checkout', 'checkout-plugins-stripe-woo' ) }
|
62 |
+
</button> )
|
63 |
+
}
|
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>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</main>
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
export default ExpressCheckout;
|
wizard/src/pages/Failed.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
import { __ } from '@wordpress/i18n';
|
3 |
+
|
4 |
+
function Failed() {
|
5 |
+
return (
|
6 |
+
<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">
|
7 |
+
<div className="text-center">
|
8 |
+
<h1 className="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
|
9 |
+
<span className="block text-red-600 xl:inline">{ __( 'Failed!!', 'checkout-plugins-stripe-woo' ) }</span>
|
10 |
+
</h1>
|
11 |
+
<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">
|
12 |
+
<span className="block">{ __( 'Unfortunately Connection to Stripe failed.', 'checkout-plugins-stripe-woo' ) }</span>
|
13 |
+
</p>
|
14 |
+
<div className="mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center">
|
15 |
+
<div className="rounded-md shadow">
|
16 |
+
<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">
|
17 |
+
{ __( 'Try Again', 'checkout-plugins-stripe-woo' ) }
|
18 |
+
</a>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
<div className="mt-3 sm:mt-0 sm:ml-3">
|
22 |
+
<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">
|
23 |
+
{ __( 'Manage API keys manually', 'checkout-plugins-stripe-woo' ) }
|
24 |
+
</a>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
</main>
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
export default Failed;
|
wizard/src/pages/HomePage.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { useState } from 'react';
|
2 |
+
import { __ } from '@wordpress/i18n';
|
3 |
+
import Spinner from '@Admin/components/Spinner';
|
4 |
+
|
5 |
+
function HomePage() {
|
6 |
+
const [ clicked, setClicked ] = useState( false );
|
7 |
+
function connectWithStripe() {
|
8 |
+
setClicked( true );
|
9 |
+
window.location.replace(
|
10 |
+
onboarding_vars.authorization_url,
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
return (
|
15 |
+
<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">
|
16 |
+
<div className="text-center">
|
17 |
+
<h1 className="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
|
18 |
+
<span className="block xl"> { __( 'Let\'s Connect', 'checkout-plugins-stripe-woo' ) }</span>
|
19 |
+
<span className="block text-cart-500 xl:inline">{ __( 'with Stripe', 'checkout-plugins-stripe-woo' ) }</span>
|
20 |
+
</h1>
|
21 |
+
<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">
|
22 |
+
<span className="block"><span className="block text-gray-700 inline font-bold">{ __( 'Checkout Plugins', 'checkout-plugins-stripe-woo' ) }</span> { __( 'recommends to connect with', 'checkout-plugins-stripe-woo' ) } <span className="block text-gray-700 xl:inline font-bold">{ __( 'Stripe connect.', 'checkout-plugins-stripe-woo' ) }</span></span>
|
23 |
+
<span>{ __( 'One click onboarding solution provided by', 'checkout-plugins-stripe-woo' ) } <span className="block text-gray-700 xl:inline font-bold">{ __( 'Stripe.', 'checkout-plugins-stripe-woo' ) }</span></span>
|
24 |
+
</p>
|
25 |
+
<div className="mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center">
|
26 |
+
<div className="rounded-md shadow">
|
27 |
+
|
28 |
+
{ clicked ? (
|
29 |
+
<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">
|
30 |
+
{ __( 'Connecting…', 'checkout-plugins-stripe-woo' ) }
|
31 |
+
<Spinner />
|
32 |
+
</button>
|
33 |
+
) : (
|
34 |
+
<button onClick={ connectWithStripe } 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">
|
35 |
+
{ __( 'Connect with Stripe', 'checkout-plugins-stripe-woo' ) }
|
36 |
+
</button> )
|
37 |
+
}
|
38 |
+
</div>
|
39 |
+
<div className="mt-3 sm:mt-0 sm:ml-3">
|
40 |
+
<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">
|
41 |
+
{ __( 'Leave onboarding process', 'checkout-plugins-stripe-woo' ) }
|
42 |
+
</a>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</main>
|
47 |
+
);
|
48 |
+
}
|
49 |
+
|
50 |
+
export default HomePage;
|
wizard/src/pages/Success.js
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useState } from 'react';
|
2 |
+
import { Switch } from '@headlessui/react';
|
3 |
+
import apiFetch from '@wordpress/api-fetch';
|
4 |
+
import { __ } from '@wordpress/i18n';
|
5 |
+
import Spinner from '@Admin/components/Spinner';
|
6 |
+
import { useNavigate } from 'react-router-dom';
|
7 |
+
|
8 |
+
function classNames( ...classes ) {
|
9 |
+
return classes.filter( Boolean ).join( ' ' );
|
10 |
+
}
|
11 |
+
|
12 |
+
function Success() {
|
13 |
+
const [ clicked, setClicked ] = useState( false );
|
14 |
+
const [ gateways, setGateways ] = useState( onboarding_vars.available_gateways );
|
15 |
+
const navigate = useNavigate();
|
16 |
+
|
17 |
+
function enableGateways( e ) {
|
18 |
+
e.preventDefault();
|
19 |
+
setClicked( true );
|
20 |
+
const formData = new window.FormData();
|
21 |
+
|
22 |
+
const object = {};
|
23 |
+
gateways.forEach( function( value ) {
|
24 |
+
object[ value.id ] = document.getElementsByName( value.id )[ 0 ].value;
|
25 |
+
} );
|
26 |
+
const json = JSON.stringify( object );
|
27 |
+
|
28 |
+
formData.append( 'formdata', json );
|
29 |
+
formData.append(
|
30 |
+
'action',
|
31 |
+
'cpsw_onboarding_enable_gateway',
|
32 |
+
);
|
33 |
+
formData.append(
|
34 |
+
'security',
|
35 |
+
onboarding_vars.cpsw_onboarding_enable_gateway,
|
36 |
+
);
|
37 |
+
|
38 |
+
apiFetch( {
|
39 |
+
url: onboarding_vars.ajax_url,
|
40 |
+
method: 'POST',
|
41 |
+
body: formData,
|
42 |
+
} ).then( ( res ) => {
|
43 |
+
if ( res.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 |
+
} );
|
51 |
+
}
|
52 |
+
|
53 |
+
return (
|
54 |
+
<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">
|
55 |
+
<div className="text-center">
|
56 |
+
<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">
|
57 |
+
<span className="block"><span className="text-gray-700 inline font-bold">{ __( 'Congratulations!!', 'checkout-plugins-stripe-woo' ) } </span>{ __( 'You are connected to Stripe successfully.', 'checkout-plugins-stripe-woo' ) }</span>
|
58 |
+
<span className="block">{ __( 'Let\'s enable gateways', 'checkout-plugins-stripe-woo' ) }</span>
|
59 |
+
</p>
|
60 |
+
<ul role="list" className="divide-y divide-gray-200 bg-white overflow-hidden sm:rounded-md mt-10 max-w-screen-md mx-auto">
|
61 |
+
{ gateways.map( ( gateway ) => (
|
62 |
+
<li key={ gateway.id }>
|
63 |
+
<span href="#" className="block hover:bg-gray-50">
|
64 |
+
<div className="flex items-center px-4 py-4 sm:px-6">
|
65 |
+
<div className="min-w-0 flex-1 flex items-center">
|
66 |
+
<div className="flex-shrink-0">
|
67 |
+
<img className="h-12 w-32 max-w-80" src={ gateway.icon } alt={ gateway.name } />
|
68 |
+
</div>
|
69 |
+
<div className="min-w-0 flex-1 px-4 md:gap-4">
|
70 |
+
<div>
|
71 |
+
<p className="text-sm font-medium text-cart-500 flex truncate">{ gateway.name } { gateway.recommended ? (
|
72 |
+
<span className="ml-2 px-2 py-1 text-green-800 text-xs font-medium bg-green-100 rounded-full">
|
73 |
+
{ __( 'Recommended', 'checkout-plugins-stripe-woo' ) }
|
74 |
+
</span>
|
75 |
+
) : ( '' ) }
|
76 |
+
</p>
|
77 |
+
<p className="text-sm font-medium text-gray-400 flex">
|
78 |
+
<span className="text-left text-sm" >{ 'all' === gateway.currencies ? ( __( 'Works with all currencies', 'checkout-plugins-stripe-woo' ) ) : ( __( 'Works with ', 'checkout-plugins-stripe-woo' ) + gateway.currencies ) }</span>
|
79 |
+
</p>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
<div>
|
84 |
+
<Switch
|
85 |
+
checked={ gateway.enabled }
|
86 |
+
value={ gateway.enabled }
|
87 |
+
name={ gateway.id }
|
88 |
+
onChange={ () => {
|
89 |
+
gateway.enabled = ! gateway.enabled;
|
90 |
+
setGateways( [ ...gateways ] );
|
91 |
+
} }
|
92 |
+
className={ classNames(
|
93 |
+
gateway.enabled ? 'bg-cart-500 ' : 'bg-gray-200',
|
94 |
+
'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',
|
95 |
+
) }
|
96 |
+
>
|
97 |
+
<span className="sr-only">{ gateway.id }</span>
|
98 |
+
<span
|
99 |
+
aria-hidden="true"
|
100 |
+
className={ classNames(
|
101 |
+
gateway.enabled ? 'translate-x-5' : 'translate-x-0',
|
102 |
+
'pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200',
|
103 |
+
) }
|
104 |
+
/>
|
105 |
+
</Switch>
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
</span>
|
109 |
+
</li>
|
110 |
+
) ) }
|
111 |
+
</ul>
|
112 |
+
<div className="mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center">
|
113 |
+
<div className="rounded-md shadow">
|
114 |
+
{ clicked ? (
|
115 |
+
<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">
|
116 |
+
{ __( 'Enabling…', 'checkout-plugins-stripe-woo' ) }
|
117 |
+
<Spinner />
|
118 |
+
</button>
|
119 |
+
) : (
|
120 |
+
<button onClick={ enableGateways } 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">
|
121 |
+
{ __( 'Enable Gateways', 'checkout-plugins-stripe-woo' ) }
|
122 |
+
</button> )
|
123 |
+
}
|
124 |
+
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
</main>
|
129 |
+
);
|
130 |
+
}
|
131 |
+
|
132 |
+
export default Success;
|
wizard/src/pages/ThankYou.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { useState } from 'react';
|
2 |
+
import { __ } from '@wordpress/i18n';
|
3 |
+
import Spinner from '@Admin/components/Spinner';
|
4 |
+
|
5 |
+
function ThankYou() {
|
6 |
+
const [ clicked, setClicked ] = useState( false );
|
7 |
+
|
8 |
+
function letsCustomize() {
|
9 |
+
setClicked( true );
|
10 |
+
window.location.replace(
|
11 |
+
onboarding_vars.gateways_url,
|
12 |
+
);
|
13 |
+
}
|
14 |
+
|
15 |
+
return (
|
16 |
+
<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">
|
17 |
+
<div className="text-center">
|
18 |
+
<h1 className="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
|
19 |
+
<span className="block text-cart-500 xl:inline">{ __( 'Great!!', 'checkout-plugins-stripe-woo' ) }</span>
|
20 |
+
</h1>
|
21 |
+
<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">
|
22 |
+
<span className="block">{ __( 'Your store is all set to accept payment.', 'checkout-plugins-stripe-woo' ) }</span>
|
23 |
+
<span>{ __( 'We provide lots of customization options to match your needs, don\'t forget to explore them.', 'checkout-plugins-stripe-woo' ) }</span>
|
24 |
+
</p>
|
25 |
+
<div className="mt-5 sm:mt-8 sm:inline-block lg:inline-block sm:justify-center lg:justify-center">
|
26 |
+
<div className="rounded-md shadow">
|
27 |
+
{ clicked ? (
|
28 |
+
<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">
|
29 |
+
{ __( 'Let\'s Customize…', 'checkout-plugins-stripe-woo' ) }
|
30 |
+
<Spinner />
|
31 |
+
</button>
|
32 |
+
) : (
|
33 |
+
<button onClick={ letsCustomize } 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">
|
34 |
+
{ __( 'Let\'s Customize', 'checkout-plugins-stripe-woo' ) }
|
35 |
+
</button> )
|
36 |
+
}
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</main>
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
export default ThankYou;
|
wizard/src/pages/WooCommerce.js
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { useState } from 'react';
|
2 |
+
import apiFetch from '@wordpress/api-fetch';
|
3 |
+
import { __ } from '@wordpress/i18n';
|
4 |
+
import Spinner from '@Admin/components/Spinner';
|
5 |
+
import { useNavigate } from 'react-router-dom';
|
6 |
+
|
7 |
+
function WooCommerce() {
|
8 |
+
const [ state, setState ] = useState( '' );
|
9 |
+
const [ notification, setNotification ] = useState( false );
|
10 |
+
const navigate = useNavigate();
|
11 |
+
function installWooCommerce() {
|
12 |
+
if ( '' === onboarding_vars.woocommerce_installed ) {
|
13 |
+
setState( 'installing' );
|
14 |
+
setTimeout( () => {
|
15 |
+
setNotification( true );
|
16 |
+
}, 10000 );
|
17 |
+
wp.updates.queue.push( {
|
18 |
+
action: 'install-plugin', // Required action.
|
19 |
+
data: {
|
20 |
+
slug: 'woocommerce',
|
21 |
+
},
|
22 |
+
} );
|
23 |
+
|
24 |
+
// Required to set queue.
|
25 |
+
wp.updates.queueChecker();
|
26 |
+
} else {
|
27 |
+
setState( 'activating' );
|
28 |
+
const formData = new window.FormData();
|
29 |
+
|
30 |
+
formData.append(
|
31 |
+
'action',
|
32 |
+
'cpsw_onboarding_install_woocommerce',
|
33 |
+
);
|
34 |
+
formData.append(
|
35 |
+
'security',
|
36 |
+
onboarding_vars.cpsw_onboarding_install_woocommerce,
|
37 |
+
);
|
38 |
+
|
39 |
+
apiFetch( {
|
40 |
+
url: onboarding_vars.ajax_url,
|
41 |
+
method: 'POST',
|
42 |
+
body: formData,
|
43 |
+
} ).then( ( res ) => {
|
44 |
+
if ( res.success ) {
|
45 |
+
navigate( onboarding_vars.navigator_base );
|
46 |
+
}
|
47 |
+
} );
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
return (
|
52 |
+
<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">
|
53 |
+
<div className="text-center">
|
54 |
+
<h1 className="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
|
55 |
+
<span className="block xl">{ __( 'Missing', 'checkout-plugins-stripe-woo' ) }</span>
|
56 |
+
<span className="block text-cart-500 xl:inline">{ __( 'WooCoomerce', 'checkout-plugins-stripe-woo' ) }</span>
|
57 |
+
</h1>
|
58 |
+
<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">
|
59 |
+
<span className="block text-gray-700 xl:inline font-bold">{ __( 'Checkout Plugins - Stripe for WooCoomerce', 'checkout-plugins-stripe-woo' ) }</span> { __( 'requires', 'checkout-plugins-stripe-woo' ) } <span className="block text-gray-700 xl:inline font-bold">{ __( 'WooCommerce', 'checkout-plugins-stripe-woo' ) }</span> { __( 'to be active on your store.', 'checkout-plugins-stripe-woo' ) }
|
60 |
+
</p>
|
61 |
+
<div className="mt-5 sm:mt-8 sm:flex justify-center">
|
62 |
+
<div className="rounded-md shadow">
|
63 |
+
{ ( () => {
|
64 |
+
if ( 'installing' === state ) {
|
65 |
+
return (
|
66 |
+
<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">
|
67 |
+
{ __( 'Installing…', 'checkout-plugins-stripe-woo' ) }
|
68 |
+
<Spinner />
|
69 |
+
</button>
|
70 |
+
);
|
71 |
+
} else if ( 'activating' === state ) {
|
72 |
+
return (
|
73 |
+
<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">
|
74 |
+
{ __( 'Activating…', 'checkout-plugins-stripe-woo' ) }
|
75 |
+
<Spinner />
|
76 |
+
</button>
|
77 |
+
);
|
78 |
+
}
|
79 |
+
return (
|
80 |
+
<button onClick={ installWooCommerce } 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">
|
81 |
+
{ __( 'Install and continue', 'checkout-plugins-stripe-woo' ) }
|
82 |
+
</button>
|
83 |
+
);
|
84 |
+
} )() }
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
{ notification ? (
|
89 |
+
<div className="bg-cart-50 p-4 fixed left-0 top-0 right-0 transition ease-in-out delay-150">
|
90 |
+
<div className="block">
|
91 |
+
<div className="text-center justify-center">
|
92 |
+
<p className="text-sm mx-auto w-full text-cart-500 text-center">{ __( 'Installing WooCommerce will take time. Please be patient.' ) }</p>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
) : ( '' ) }
|
97 |
+
|
98 |
+
</main>
|
99 |
+
);
|
100 |
+
}
|
101 |
+
|
102 |
+
export default WooCommerce;
|