Plugin Directory

Changeset 3158216


Ignore:
Timestamp:
09/26/2024 12:05:08 PM (18 months ago)
Author:
stancer
Message:

Merge branch 'sd/CMS-68_reactTest' into 'main'

Location:
stancer/trunk
Files:
17 added
20 edited

Legend:

Unmodified
Added
Removed
  • stancer/trunk/README.txt

    r3132257 r3158216  
    8787
    8888= Version 1.2.6 =
     89* Add support for WooCommerce blocks
     90
     91= Version 1.2.6 =
    8992* Fix subscription description warning showing even when no subscription
    9093
  • stancer/trunk/includes/class-stancer-exception.php

    r3033292 r3158216  
    1313 */
    1414
     15 // phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
     16
    1517/**
    1618 * Generic exception for the module.
     
    2325class WC_Stancer_Exception extends Exception {
    2426}
     27
     28/**
     29 * Bad request exception, for stancer controllers
     30 */
     31class WC_Stancer_Request_Exception extends WC_Stancer_Exception{}
  • stancer/trunk/includes/class-stancer-gateway.php

    r3132243 r3158216  
    7777        $this->supports = [
    7878            'payments',
     79            'products',
    7980            'refunds',
    8081        ];
     
    299300    public function form_fields_scripts() {
    300301        wp_enqueue_script(
    301             'stancer-admin-ts',
     302            'stancer-admin',
    302303            plugin_dir_url( STANCER_FILE ) . 'public/js/admin.min.js',
    303304            [ 'jquery' ],
     
    307308
    308309        wp_enqueue_style(
    309             'stancer-admin',
     310            'stancer-admin-style',
    310311            plugin_dir_url( STANCER_FILE ) . 'public/css/admin.min.css',
    311312            [],
     
    313314        );
    314315        wp_localize_script(
    315             'stancer-admin-ts',
     316            'stancer-admin',
    316317            'stancer_admin',
    317318            [
     
    428429
    429430        return implode( ' ', $default_classes );
     431    }
     432
     433    /**
     434     * Get the payment Data to be send to our frontEnd.
     435     *
     436     * @param string $page_type the page type chosen by the user.
     437     * @return array
     438     */
     439    public function get_payment_data( string $page_type ): array {
     440        $data = [
     441            'initiate' => WC_AJAX::get_endpoint( 'checkout' ),
     442        ];
     443
     444        if ( isset( $_GET['change_payment_method'] ) && isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'] ) ) {
     445            $page_type = 'pip'; // Picture in picture is forced for payment method change.
     446            $data['changePaymentMethod'] = [
     447                'nonce' => wp_create_nonce( 'change-method-' . $_GET['change_payment_method'] ),
     448                'url' => plugins_url( $this->id . '/subscription/change-payment-method.php' ),
     449            ];
     450
     451            $message = esc_html( $this->settings['subscription_payment_change_description'] );
     452        } else {
     453            $message = esc_html( $this->settings['payment_option_description'] );
     454        }
     455        return [
     456            'data' => $data,
     457            'page_type' => $page_type,
     458            'message' => $message,
     459        ];
    430460    }
    431461
     
    598628                [
    599629                    'type' => 'text',
    600                 ]
     630                ],
    601631            );
    602632        }
     
    708738        if ( 'no-logo' !== $logo ) {
    709739            wp_enqueue_style(
    710                 'stancer-option',
     740                'stancer-option-style',
    711741                plugin_dir_url( STANCER_FILE ) . 'public/css/option.min.css',
    712742                [],
     
    725755
    726756        $page_type = $this->settings['page_type'];
    727         $data = [
    728             'initiate' => WC_AJAX::get_endpoint( 'checkout' ),
    729         ];
    730 
    731         if ( isset( $_GET['change_payment_method'] ) && isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'] ) ) {
    732             $page_type = 'pip'; // Picture in picture is forced for payment method change.
    733             $data['changePaymentMethod'] = [
    734                 'nonce' => wp_create_nonce( 'change-method-' . $_GET['change_payment_method'] ),
    735                 'url' => plugins_url( $this->id . '/subscription/change-payment-method.php' ),
    736             ];
    737 
    738             echo esc_html( $this->settings['subscription_payment_change_description'] );
    739         } else {
    740             echo esc_html( $this->settings['payment_option_description'] );
    741         }
     757        $payment_data = $this->get_payment_data( $page_type );
     758        $page_type = $payment_data['page_type'];
     759        $data = $payment_data['data'];
    742760
    743761        $script_path = fn( string $name ) => plugin_dir_url( STANCER_FILE ) . 'public/js/' . $name . '.min.js';
    744762        $style_path = fn( string $name ) => plugin_dir_url( STANCER_FILE ) . 'public/css/' . $name . '.min.css';
    745763
    746         $add_script = function ( string $script ) use ( $data, $script_path ) {
     764        $add_script = function ( string $script, bool $localize = true, array $dependancy = [] ) use ( $data, $script_path ) {
    747765            $name = 'stancer-' . $script;
    748766
    749             wp_register_script( $name, $script_path( $script ), [ 'jquery' ], STANCER_ASSETS_VERSION, true );
    750             wp_localize_script( $name, 'stancer', $data );
     767            wp_register_script(
     768                $name,
     769                $script_path( $script ),
     770                array_merge( [ 'jquery' ], $dependancy ),
     771                STANCER_ASSETS_VERSION,
     772                true
     773            );
     774            if ( $localize ) {
     775                wp_localize_script( $name, 'stancer_data', $data );
     776            }
    751777            wp_enqueue_script( $name );
     778            return $name;
    752779        };
    753 
     780        echo esc_html( $payment_data['message'] );
    754781        switch ( $page_type ) {
    755782            case 'iframe':
     
    758785
    759786            case 'pip':
    760                 $add_script( 'iframe' );
    761                 wp_enqueue_style( 'stancer-iframe', $style_path( 'iframe' ), [], STANCER_ASSETS_VERSION );
     787                $dependancy[] = $add_script( 'api', false );
     788                $dependancy[] = $add_script( 'change_payment_method', false );
     789                $dependancy[] = $add_script( 'iframe', false );
     790                $dependancy[] = 'wp-api-fetch';
     791                $dependancy[] = 'wp-html-entities';
     792
     793                $add_script( 'shortcode', false, $dependancy );
     794                wp_enqueue_style( 'stancer-iframe-style', $style_path( 'iframe' ), [], STANCER_ASSETS_VERSION );
    762795
    763796                break;
  • stancer/trunk/includes/class-stancer.php

    r3127996 r3158216  
    1212 * @subpackage stancer/includes
    1313 */
     14
     15use Automattic\WooCommerce\Blocks\Integrations\IntegrationRegistry;
     16use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
    1417
    1518/**
     
    8386
    8487        // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
    85 
    8688        if ( version_compare( '1.0.0', $version, '>' ) ) {
    8789            $sql = 'CREATE TABLE ' . $wpdb->prefix . 'wc_stancer_card (
     
    172174        add_action( 'wc_ajax_create_order', [ $this, 'create_order' ] );
    173175        add_action( 'wp_enqueue_scripts', [ $this, 'load_public_hooks' ] );
     176        add_action( 'woocommerce_blocks_loaded', [ $this, 'gateway_block_support' ] );
     177        add_action(
     178            'rest_api_init',
     179            function () {
     180                $payment_change_controller = new WCS_Stancer_Change_Payment_Method();
     181                $payment_change_controller->register_routes();
     182            }
     183        );
    174184        add_action( 'admin_notices', [ $this, 'display_depreciation' ] );
    175185    }
     
    247257        $this->load_gateway();
    248258    }
     259    /**
     260     * Register the Gateway Block support to the approriate action hooks
     261     *
     262     * @since 1.2.6
     263     *
     264     * @return void
     265     */
     266    public function gateway_block_support() {
     267        if ( class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) {
     268            add_action(
     269                'woocommerce_blocks_payment_method_type_registration',
     270                function ( PaymentMethodRegistry $payment_method_registry ) {
     271                    $payment_method_registry->register( new WC_Stancer_Gateway_Block_Support() );
     272                }
     273            );
     274        }
     275    }
     276    /**
     277     * Get the plugin absolute path
     278     *
     279     * @since 1.2.6
     280     *
     281     * @return string
     282     */
     283    public function plugin_abspath() {
     284        return plugin_dir_path( dirname( ( __FILE__ ) ) );
     285    }
    249286
    250287    /**
  • stancer/trunk/languages/readme-fr_FR.po

    r3132257 r3158216  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: 1.2.6 - 18be6370e5bca0a1da4adb3bef82ff3a19e181fb\n"
     5"Project-Id-Version: 1.2.6 - ffd9b1b03b8900288feac0e106d8ae78a56d9193\n"
    66"Report-Msgid-Bugs-To: https://gitlab.com/wearestancer/cms/woocommerce/-/"
    77"issues\n"
    88"POT-Creation-Date: 2024-07-31 12:09+0200\n"
    9 "PO-Revision-Date: 2024-08-05 08:49+0000\n"
     9"PO-Revision-Date: 2024-06-27 14:57+0200\n"
    1010"Last-Translator: Sebastien <sderen@stancer.com>\n"
    1111"Language-Team: \n"
     
    276276"CHANGELOG.md\">Voir les changements complet sur GitLab</a>."
    277277
    278 #. Found in changelog paragraph.
     278#. Found in changelog list item.
     279msgid "Add support for WooCommerce blocks"
     280msgstr "Ajout du support pour les blocs WooCommerce"
     281
     282#. Found in changelog list item.
    279283msgid "Fix subscription description warning showing even when no subscription"
    280 msgstr "Correction d'un avertissement de description d'abonnement"
    281 "qui apparaissait même sans module d'abonnement"
     284msgstr ""
     285"Correction d'un avertissement de description d'abonnement qui apparaissait "
     286"même sans module d'abonnement"
    282287
    283288#. Found in changelog list item.
  • stancer/trunk/languages/stancer-fr_FR.po

    r3132730 r3158216  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: 1.2.6 - 88dc5f3cd3e1b2a946d9e2b3d0bd28488131044c\n"
     5"Project-Id-Version: 1.2.6 - ffd9b1b03b8900288feac0e106d8ae78a56d9193\n"
    66"Report-Msgid-Bugs-To: https://gitlab.com/wearestancer/cms/woocommerce/-/"
    77"issues\n"
    8 "POT-Creation-Date: 2024-02-02 13:30+0100\n"
    9 "PO-Revision-Date: 2024-07-30 15:07+0200\n"
    10 "Last-Translator: Joel <jdasilva@stancer.com>\n"
     8"POT-Creation-Date: 2024-06-19 14:25+0000\n"
     9"PO-Revision-Date: 2024-06-27 14:57+0200\n"
     10"Last-Translator: Sebastien <sderen@stancer.com>\n"
    1111"Language-Team: \n"
    1212"Language: fr_FR\n"
     
    5454"est de %2$.02f %3$s"
    5555
     56#: includes/class-stancer-gateway-block-support.php
     57msgid "Pay by card"
     58msgstr "Payer par carte"
     59
    5660#. translators: "%1$s": the mode in which our API is (test mode or Live mode).
    5761#: includes/class-stancer-gateway.php
     
    7074
    7175#. translators: $1 Card brand. $2 Last 4. $3 Expiration month. $4 Expiration year.
    72 #: includes/class-stancer-gateway.php subscription/change-payment-method.php
     76#. translators: "%1$s": Card brand. "%2$d" Last 4.
     77#: includes/class-stancer-gateway.php
     78#: includes/Controller/class-stancer-change-payment-method.php
     79#: subscription/change-payment-method.php
    7380msgid "%1$s finishing with %2$s"
    7481msgstr "%1$s finissant par %2$s"
     
    376383msgstr "réglages du module"
    377384
     385#: includes/Controller/class-stancer-change-payment-method.php
     386#: subscription/change-payment-method.php
     387msgid "This method has not been validated. Please try a new one."
     388msgstr ""
     389"Ce moyen de paiement n'a pu être validé. Merci d'essayer avec un autre moyen "
     390"de paiement."
     391
     392#: includes/Controller/class-stancer-change-payment-method.php
     393#: subscription/change-payment-method.php
     394msgid "Payment method changed successfully."
     395msgstr "Moyen de paiement modifié avec succès."
     396
    378397#: includes/subscriptions/class-stancer-renewal-builder.php
    379398msgid "No card found for this subscription."
     
    481500
    482501#: subscription/change-payment-method.php
    483 msgid "This method has not been validated. Please try a new one."
    484 msgstr ""
    485 "Ce moyen de paiement n'a pu être validé. Merci d'essayer avec un autre moyen "
    486 "de paiement."
    487 
    488 #: subscription/change-payment-method.php
    489 msgid "Payment method changed successfully."
    490 msgstr "Moyen de paiement modifié avec succès."
    491 
    492 #: subscription/change-payment-method.php
    493502msgid "Incorrect action method"
    494503msgstr "Action incorrecte"
  • stancer/trunk/public/css/option.css

    r3032165 r3158216  
    139139  display: none;
    140140}
     141
     142.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label .payment_method_stancer img {
     143  margin-top: 8px;
     144  -o-object-fit: inherit;
     145     object-fit: inherit;
     146}
  • stancer/trunk/public/css/option.min.css

    r3032165 r3158216  
    1 .payment_method_stancer .stancer-option__logo{display:block;height:20px}.payment_method_stancer .stancer-option__logo.stancer-option__logo--stancer{aspect-ratio:50/7.648}@supports not (aspect-ratio:50/7.648){.payment_method_stancer .stancer-option__logo.stancer-option__logo--stancer{width:131px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-prefixed{aspect-ratio:4.75}@supports not (aspect-ratio:4.75){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-prefixed{width:95px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc{aspect-ratio:3.25}@supports not (aspect-ratio:3.25){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc{width:65px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-suffixed{aspect-ratio:4.75}@supports not (aspect-ratio:4.75){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-suffixed{width:95px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-stancer{aspect-ratio:176.331/20}@supports not (aspect-ratio:176.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-stancer{width:176px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-all{aspect-ratio:206.331/20}@supports not (aspect-ratio:206.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-all{width:206px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-prefixed{aspect-ratio:8.25}@supports not (aspect-ratio:8.25){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-prefixed{width:165px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet{aspect-ratio:6.75}@supports not (aspect-ratio:6.75){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet{width:135px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-suffixed{aspect-ratio:8.25}@supports not (aspect-ratio:8.25){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-suffixed{width:165px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-stancer{aspect-ratio:246.331/20}@supports not (aspect-ratio:246.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-stancer{width:246px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-all{aspect-ratio:276.331/20}@supports not (aspect-ratio:276.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-all{width:276px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-prefixed{aspect-ratio:6.5}@supports not (aspect-ratio:6.5){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-prefixed{width:130px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes{aspect-ratio:5}@supports not (aspect-ratio:5){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes{width:100px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-suffixed{aspect-ratio:6.5}@supports not (aspect-ratio:6.5){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-suffixed{width:130px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-stancer{aspect-ratio:211.331/20}@supports not (aspect-ratio:211.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-stancer{width:211px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-all{aspect-ratio:241.331/20}@supports not (aspect-ratio:241.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-all{width:241px}}.payment_method_stancer.payment_box{display:grid;gap:1ch}.payment_method_stancer.payment_box:empty{display:none}
     1.payment_method_stancer .stancer-option__logo{display:block;height:20px}.payment_method_stancer .stancer-option__logo.stancer-option__logo--stancer{aspect-ratio:50/7.648}@supports not (aspect-ratio:50/7.648){.payment_method_stancer .stancer-option__logo.stancer-option__logo--stancer{width:131px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-prefixed{aspect-ratio:4.75}@supports not (aspect-ratio:4.75){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-prefixed{width:95px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc{aspect-ratio:3.25}@supports not (aspect-ratio:3.25){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc{width:65px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-suffixed{aspect-ratio:4.75}@supports not (aspect-ratio:4.75){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-suffixed{width:95px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-stancer{aspect-ratio:176.331/20}@supports not (aspect-ratio:176.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-stancer{width:176px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-all{aspect-ratio:206.331/20}@supports not (aspect-ratio:206.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-all{width:206px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-prefixed{aspect-ratio:8.25}@supports not (aspect-ratio:8.25){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-prefixed{width:165px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet{aspect-ratio:6.75}@supports not (aspect-ratio:6.75){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet{width:135px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-suffixed{aspect-ratio:8.25}@supports not (aspect-ratio:8.25){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-suffixed{width:165px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-stancer{aspect-ratio:246.331/20}@supports not (aspect-ratio:246.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-stancer{width:246px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-all{aspect-ratio:276.331/20}@supports not (aspect-ratio:276.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--visa-mc-wallet-all{width:276px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-prefixed{aspect-ratio:6.5}@supports not (aspect-ratio:6.5){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-prefixed{width:130px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes{aspect-ratio:5}@supports not (aspect-ratio:5){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes{width:100px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-suffixed{aspect-ratio:6.5}@supports not (aspect-ratio:6.5){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-suffixed{width:130px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-stancer{aspect-ratio:211.331/20}@supports not (aspect-ratio:211.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-stancer{width:211px}}.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-all{aspect-ratio:241.331/20}@supports not (aspect-ratio:241.331/20){.payment_method_stancer .stancer-option__logo.stancer-option__logo--all-schemes-all{width:241px}}.payment_method_stancer.payment_box{display:grid;gap:1ch}.payment_method_stancer.payment_box:empty{display:none}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label .payment_method_stancer img{margin-top:8px;-o-object-fit:inherit;object-fit:inherit}
  • stancer/trunk/public/js/iframe.js

    r3126050 r3158216  
    11"use strict";
    22(function ($) { return $(function () {
    3     var redirection = { receipt: '' };
    43    var $window = $(window);
    54    var $body = $(document.body);
    6     var $backdrop = $(document.createElement('div')).addClass('stancer-backdrop');
     5    var redirection = { receipt: '' };
    76    // We create the frame, and set some of their attribute before wrapping it in jQuery.
    87    var $frame = $(document.createElement('iframe'))
     
    1615    * We set sandbox = top-navigation; we need it to be able to interact with context outside our iframe, more precisely to get the event.data and use it.
    1716    */
    18     var $cardSelect = $('#stancer-card');
    19     var params = Object.fromEntries(window.location.search.slice(1).split('&').map(function (value) { return value.split('='); }));
    20     var STANCER_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 702.227 106.667"><path d="M31.75 26.656c-9.216 0-17.232 6.135-19.406 14.844L.219 95.344c-1.31 5.818 3.262 11.312 9.406 11.312h69c6.093 0 11.375-4.119 12.688-9.906L95.093 80H40.876c-3.81 0-6.617-3.512-5.719-7.156l11.375-46.188H31.75Z" fill="var(--stancer-back, #7899d6)"/><path d="M68.625 0C59.52 0 51.618 6.135 49.469 14.844L49 16.75h89.438l1.281-5.781C140.981 5.339 136.638 0 130.781 0H68.625Zm67.625 26.563-30.5.03L95.094 80h18.844c6.02 0 11.233-4.12 12.531-9.906l9.781-43.531Z" fill="var(--stancer-accent, #c8e8f9)"/><path d="m95.096 80 10.65-53.43-59.204.098-11.39 46.177C34.253 76.49 37.057 80 40.867 80H94.92" fill="var(--stancer-heart, #f35c6f)"/><g fill="var(--stancer-text, #101a2c)"><path d="M224.32 106.667c21.512 0 37.496-13.037 37.496-30.964 0-40.148-57.812-24.888-57.812-46.518 0-7.703 7.021-12.74 17.627-12.74 11.354 0 18.673 6.814 18.972 16.147h17.926c0-17.48-12.249-32.592-36.3-32.592-20.465 0-35.405 12.296-35.405 29.333 0 38.075 57.664 23.112 57.664 46.37 0 8.74-8.367 14.667-20.168 14.667-12.548 0-21.511-7.555-21.511-18.667H185.48c0 20.297 16.432 34.964 38.84 34.964M315.349 48.445V32.74h-19.121V13.333h-16.731v19.408h-13.893v15.704h13.893v29.48c0 18.372 10.756 28.149 26.89 28.149 2.688 0 6.422-.297 8.962-.889v-15.26c-1.642.445-3.585.593-5.377.593-8.068 0-13.744-3.703-13.744-12.888V48.445h19.121M381.625 32.741v12.74c-5.228-9.036-14.192-14.222-25.844-14.222-19.42 0-34.956 16.741-34.956 37.63 0 20.888 15.536 37.778 34.956 37.778 11.652 0 20.616-5.185 25.844-14.223v12.741h16.731V32.741h-16.731Zm-22.258 58.223c-12.399 0-22.11-9.78-22.11-22.074 0-12.149 9.711-21.927 22.11-21.927 12.698 0 22.258 9.48 22.258 21.927 0 12.592-9.56 22.074-22.258 22.074M451.045 31.259c-9.709 0-17.477 4.741-22.108 12.89V32.74h-16.582v72.444h16.582v-39.26c0-11.407 7.171-18.813 18.076-18.813 10.606 0 17.627 7.406 17.627 18.813v39.26h16.731V63.852c0-20.148-11.652-32.593-30.326-32.593M529.983 106.667c17.777 0 33.162-11.557 35.105-28h-17.029c-1.794 7.258-9.412 12.148-18.076 12.148-12.1 0-21.362-9.482-21.362-21.779 0-12.444 9.262-21.925 21.362-21.925 8.664 0 16.133 4.889 17.925 11.556h17.031c-2.242-15.704-17.328-27.408-34.956-27.408-21.362 0-37.795 16.296-37.795 37.777 0 21.482 16.433 37.631 37.795 37.631M647.085 67.408c0-21.186-15.984-36.15-35.702-36.15-21.064 0-37.646 16.297-37.646 37.334 0 21.63 16.582 38.075 37.944 38.075 17.927 0 31.819-10.075 34.507-25.334h-16.729c-1.495 6.223-8.516 10.37-17.479 10.37-12.4 0-20.019-7.26-21.661-18.813h56.318c.299-1.482.448-3.557.448-5.482Zm-56.169-7.111c2.54-9.334 9.711-15.408 19.569-15.408 10.01 0 17.479 6.37 18.526 15.408h-38.095M695.351 31.259c-8.666 0-15.387 4.149-19.72 11.111v-9.629h-16.58v72.444h16.58V66.518c0-13.036 8.665-20.296 19.272-20.296 2.389 0 4.929.445 7.32 1.037v-15.11c-2.242-.445-4.632-.89-6.872-.89"/></g></svg>';
    21     if ($cardSelect.selectWoo) {
    22         $cardSelect.selectWoo({
    23             minimumResultsForSearch: Infinity,
    24             width: '100%',
    25         });
    26     }
    27     // #region Shared Function
    28     var close = function () {
     17    var $backdrop = $(document.createElement('div')).addClass('stancer-backdrop');
     18    var stancer_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 702.227 106.667"><path d="M31.75 26.656c-9.216 0-17.232 6.135-19.406 14.844L.219 95.344c-1.31 5.818 3.262 11.312 9.406 11.312h69c6.093 0 11.375-4.119 12.688-9.906L95.093 80H40.876c-3.81 0-6.617-3.512-5.719-7.156l11.375-46.188H31.75Z" fill="var(--stancer-back, #7899d6)"/><path d="M68.625 0C59.52 0 51.618 6.135 49.469 14.844L49 16.75h89.438l1.281-5.781C140.981 5.339 136.638 0 130.781 0H68.625Zm67.625 26.563-30.5.03L95.094 80h18.844c6.02 0 11.233-4.12 12.531-9.906l9.781-43.531Z" fill="var(--stancer-accent, #c8e8f9)"/><path d="m95.096 80 10.65-53.43-59.204.098-11.39 46.177C34.253 76.49 37.057 80 40.867 80H94.92" fill="var(--stancer-heart, #f35c6f)"/><g fill="var(--stancer-text, #101a2c)"><path d="M224.32 106.667c21.512 0 37.496-13.037 37.496-30.964 0-40.148-57.812-24.888-57.812-46.518 0-7.703 7.021-12.74 17.627-12.74 11.354 0 18.673 6.814 18.972 16.147h17.926c0-17.48-12.249-32.592-36.3-32.592-20.465 0-35.405 12.296-35.405 29.333 0 38.075 57.664 23.112 57.664 46.37 0 8.74-8.367 14.667-20.168 14.667-12.548 0-21.511-7.555-21.511-18.667H185.48c0 20.297 16.432 34.964 38.84 34.964M315.349 48.445V32.74h-19.121V13.333h-16.731v19.408h-13.893v15.704h13.893v29.48c0 18.372 10.756 28.149 26.89 28.149 2.688 0 6.422-.297 8.962-.889v-15.26c-1.642.445-3.585.593-5.377.593-8.068 0-13.744-3.703-13.744-12.888V48.445h19.121M381.625 32.741v12.74c-5.228-9.036-14.192-14.222-25.844-14.222-19.42 0-34.956 16.741-34.956 37.63 0 20.888 15.536 37.778 34.956 37.778 11.652 0 20.616-5.185 25.844-14.223v12.741h16.731V32.741h-16.731Zm-22.258 58.223c-12.399 0-22.11-9.78-22.11-22.074 0-12.149 9.711-21.927 22.11-21.927 12.698 0 22.258 9.48 22.258 21.927 0 12.592-9.56 22.074-22.258 22.074M451.045 31.259c-9.709 0-17.477 4.741-22.108 12.89V32.74h-16.582v72.444h16.582v-39.26c0-11.407 7.171-18.813 18.076-18.813 10.606 0 17.627 7.406 17.627 18.813v39.26h16.731V63.852c0-20.148-11.652-32.593-30.326-32.593M529.983 106.667c17.777 0 33.162-11.557 35.105-28h-17.029c-1.794 7.258-9.412 12.148-18.076 12.148-12.1 0-21.362-9.482-21.362-21.779 0-12.444 9.262-21.925 21.362-21.925 8.664 0 16.133 4.889 17.925 11.556h17.031c-2.242-15.704-17.328-27.408-34.956-27.408-21.362 0-37.795 16.296-37.795 37.777 0 21.482 16.433 37.631 37.795 37.631M647.085 67.408c0-21.186-15.984-36.15-35.702-36.15-21.064 0-37.646 16.297-37.646 37.334 0 21.63 16.582 38.075 37.944 38.075 17.927 0 31.819-10.075 34.507-25.334h-16.729c-1.495 6.223-8.516 10.37-17.479 10.37-12.4 0-20.019-7.26-21.661-18.813h56.318c.299-1.482.448-3.557.448-5.482Zm-56.169-7.111c2.54-9.334 9.711-15.408 19.569-15.408 10.01 0 17.479 6.37 18.526 15.408h-38.095M695.351 31.259c-8.666 0-15.387 4.149-19.72 11.111v-9.629h-16.58v72.444h16.58V66.518c0-13.036 8.665-20.296 19.272-20.296 2.389 0 4.929.445 7.32 1.037v-15.11c-2.242-.445-4.632-.89-6.872-.89"/></g></svg>';
     19    /**
     20     * Close our Iframe and hide the backdrop.
     21     */
     22    var closeIframe = function () {
    2923        $body.removeClass('stancer-block-scroll');
    3024        $backdrop.detach().addClass('stancer-backdrop--hidden');
     
    3226        $frame.detach();
    3327    };
    34     var isChangePaymentMethod = function () { var _a; return (_a = $('.js-stancer-change-payment-method').length) !== null && _a !== void 0 ? _a : false; };
    35     var onSubmit = function (_a, canSubmit) {
    36         var button = _a.button, url = _a.url, data = _a.data;
    37         if (canSubmit === void 0) { canSubmit = function () { return true; }; }
    38         $body
    39             .on('click', button, function (event) {
    40             if (!canSubmit()) {
    41                 return true;
    42             }
    43             event.preventDefault();
    44             var $button = $(button);
    45             $button.attr('disabled', 'disabled');
    46             $button.block({ message: null });
    47             requestApiPaymentCreation({ $button: $button, url: url, data: data });
    48             return false;
    49         });
    50         $backdrop
    51             .append($(document.createElement('div')).addClass('stancer-logo').append(STANCER_SVG))
    52             .on('click', close);
    53     };
    54     var processResponse = function ($button, result) {
    55         try {
    56             if ('success' === result.result && result.redirect && result.redirect !== '') {
    57                 $body.addClass('stancer-block-scroll');
    58                 $backdrop.appendTo($body).removeClass('stancer-backdrop--hidden');
    59                 $frame.appendTo($body).attr('src', result.redirect);
    60                 redirection.receipt = result.receipt;
    61             }
    62             else if ('failure' === result.result) {
    63                 throw new Error('Result failure');
    64             }
    65             else {
    66                 throw new Error('Invalid response');
    67             }
    68         }
    69         catch (err) {
    70             // Reload page
    71             if (result.reload) {
    72                 window.location.reload();
    73                 return false;
    74             }
    75             // Trigger update in case we need a fresh nonce
    76             if (result.refresh) {
    77                 $body.trigger('update_checkout');
    78             }
    79             // Add new errors
    80             if (result.messages) {
    81                 $('.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message').remove();
    82                 $('form.checkout')
    83                     .prepend("<div class=\"woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout\">".concat(result.messages, "</div>"))
    84                     .removeClass('processing')
    85                     .unblock()
    86                     .find('.input-text, select, input:checkbox')
    87                     .trigger('validate')
    88                     .trigger('blur');
    89                 var $scrollElement = $('.woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout');
    90                 if ($scrollElement.length) {
    91                     $.scroll_to_notices($scrollElement);
    92                 }
    93                 else {
    94                     $.scroll_to_notices($('form.checkout'));
    95                 }
    96                 $body.trigger('checkout_error', [result.messages]);
    97             }
    98         }
    99         finally {
    100             $button.unblock();
    101         }
    102     };
    103     var requestApiPaymentCreation = function (_a) {
    104         var $button = _a.$button, url = _a.url, data = _a.data;
    105         $.ajax({
    106             url: url,
    107             type: 'POST',
    108             data: data,
    109             dataType: 'json',
    110             success: function (result) { return processResponse($button, result); },
    111             error: function (_jqXHR, _textStatus, errorThrown) {
    112                 $body.trigger('checkout_error', [errorThrown]);
    113             }
    114         });
    115     };
    116     $window
    117         .on('message', function (event) {
     28    /**
     29     * Setup the Style of our Iframe with the information send by the PP.
     30     *
     31     * @param event
     32     * @returns void
     33     */
     34    var iframe = function (event) {
    11835        var _a, _b;
     36        //We know our triggered events have a originalEvent of type MessageEvent
    11937        var data = event.originalEvent.data;
    12038        // We use some of the api data structure to test if the message is a stancer payment message.
     
    12240            return;
    12341        }
    124         if (isChangePaymentMethod() && validatePaymentChange(data)) {
    125             close();
     42        if (window.stancer_paymentMethodHasBeenChanged(data)) {
     43            closeIframe();
    12644            return;
    12745        }
     
    12947            window.postMessage({ stopRedirection: true });
    13048            window.location.href = redirection.receipt;
    131             close();
     49            closeIframe();
    13250            return;
    13351        }
    134         var maxHeight = (_a = $window.height()) !== null && _a !== void 0 ? _a : 100;
    135         var maxWidth = (_b = $window.width()) !== null && _b !== void 0 ? _b : 100;
     52        var maxHeight = (_a = window.innerHeight) !== null && _a !== void 0 ? _a : 100;
     53        var maxWidth = (_b = window.innerWidth) !== null && _b !== void 0 ? _b : 100;
    13654        var height = 400;
    13755        var radius = 10;
     
    15674        document.body.style.setProperty('--stancer-iframe-width', "".concat(width, "px"));
    15775        document.body.style.setProperty('--stancer-iframe-border-radius', "".concat(radius, "px"));
    158     })
     76    };
     77    /**
     78     * Create the iframe and it's backdrop.
     79     * @param result
     80     */
     81    var stancer_iframe = function (result) {
     82        var $logo = $(document.createElement('div')).addClass('stancer-logo').append(stancer_SVG);
     83        $backdrop
     84            .removeClass('stancer-backdrop--hidden')
     85            .append($logo)
     86            .on('click', closeIframe);
     87        $frame.attr('src', result.redirect);
     88        $body
     89            .addClass('stancer-block-scroll')
     90            .append($backdrop, $frame);
     91        redirection.receipt = result.receipt;
     92    };
     93    /** Window listeners to open or close our iframe.*/
     94    $window
     95        .on('message', function (e) { return iframe(e); })
    15996        .on('keydown', function (event) {
    16097        if (event.code === 'Escape') {
    161             close();
     98            closeIframe();
    16299        }
    163100    });
    164     // #endregion
    165     // #region place order
    166     var placeOrder = function () {
    167         var button = '.js-stancer-place-order';
    168         var $form = $(button).parents('form');
    169         var canSubmit = function () { return $('#payment_method_stancer').is(':checked'); };
    170         onSubmit({ button: button, url: stancer.initiate, data: $form.serialize() }, canSubmit);
    171     };
    172     // #endregion
    173     // #region Change payment method
    174     var changePaymentMethod = function () {
    175         var _a, _b;
    176         var button = '.js-stancer-change-payment-method';
    177         var data = {
    178             action: 'initiate',
    179             nonce: (_a = stancer.changePaymentMethod) === null || _a === void 0 ? void 0 : _a.nonce,
    180             subscription: params.change_payment_method,
    181         };
    182         // We can cast it as ChangePaymentMethod because we know we are in a change payment situation
    183         informationPaymentChange(stancer.changePaymentMethod, params.change_payment_method);
    184         onSubmit({ button: button, url: (_b = stancer.changePaymentMethod) === null || _b === void 0 ? void 0 : _b.url, data: data });
    185     };
    186     var informationPaymentChange = function (_a, change_payment_method) {
    187         var url = _a.url, nonce = _a.nonce;
    188         $.ajax({
    189             url: url,
    190             type: 'POST',
    191             data: {
    192                 action: 'information',
    193                 nonce: nonce,
    194                 subscription: change_payment_method,
    195             },
    196             dataType: 'json',
    197             success: function (result) {
    198                 if (result.card) {
    199                     $('#payment .payment_method_stancer label[for=payment_method_stancer]').text(result.card);
    200                 }
    201             },
    202             error: function (_jqXHR, _textStatus, errorThrown) { return $body.trigger('checkout_error', [errorThrown]); },
    203         });
    204     };
    205     var validatePaymentChange = function (data) {
    206         var _a, _b;
    207         if (data.status !== 'finished' && data.status !== 'error') {
    208             return false;
    209         }
    210         close();
    211         $.ajax({
    212             url: (_a = stancer.changePaymentMethod) === null || _a === void 0 ? void 0 : _a.url,
    213             type: 'POST',
    214             data: {
    215                 action: 'validate',
    216                 nonce: (_b = stancer.changePaymentMethod) === null || _b === void 0 ? void 0 : _b.nonce,
    217                 subscription: params.change_payment_method,
    218             },
    219             dataType: 'json',
    220             success: function (result) {
    221                 if (result.result === 'success') {
    222                     if (result.card) {
    223                         $('#order_review .shop_table tfoot tr:nth-child(2) td.product-total').text(result.card);
    224                     }
    225                     $('#payment').empty();
    226                 }
    227                 if (result.messages) {
    228                     var $message = $(document.createElement('div')).text(result.messages);
    229                     $('.woocommerce-notices-wrapper')
    230                         .siblings('.wc-block-components-notice-banner, .woocommerce-error, .woocommerce-info')
    231                         .remove()
    232                         .end()
    233                         .after($message);
    234                     if (result.result === 'success') {
    235                         $message.addClass('woocommerce-info');
    236                     }
    237                     else {
    238                         $message.addClass('woocommerce-error');
    239                     }
    240                 }
    241             },
    242         });
    243         return true;
    244     };
    245     // #endregion
    246     isChangePaymentMethod() ? changePaymentMethod() : placeOrder();
     101    //EXPORT
     102    window.stancer_iframe = stancer_iframe;
    247103}); })(jQuery);
  • stancer/trunk/public/js/iframe.min.js

    r3125364 r3158216  
    1 "use strict";!function(e){e((function(){var t={receipt:""},r=e(window),c=e(document.body),o=e(document.createElement("div")).addClass("stancer-backdrop"),a=e(document.createElement("iframe")).addClass("stancer-iframe").attr("allow","payment").attr("sandbox","allow-scripts allow-forms allow-same-origin allow-top-navigation"),n=e("#stancer-card"),s=Object.fromEntries(window.location.search.slice(1).split("&").map((function(e){return e.split("=")})));n.selectWoo&&n.selectWoo({minimumResultsForSearch:1/0,width:"100%"});var i=function(){c.removeClass("stancer-block-scroll"),o.detach().addClass("stancer-backdrop--hidden"),e(".js-stancer-place-order").removeAttr("disabled"),a.detach()},d=function(){var t;return null!==(t=e(".js-stancer-change-payment-method").length)&&void 0!==t&&t},l=function(t,r){var a=t.button,n=t.url,s=t.data;void 0===r&&(r=function(){return!0}),c.on("click",a,(function(t){if(!r())return!0;t.preventDefault();var c=e(a);return c.attr("disabled","disabled"),c.block({message:null}),u({$button:c,url:n,data:s}),!1})),o.append(e(document.createElement("div")).addClass("stancer-logo").append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 702.227 106.667"><path d="M31.75 26.656c-9.216 0-17.232 6.135-19.406 14.844L.219 95.344c-1.31 5.818 3.262 11.312 9.406 11.312h69c6.093 0 11.375-4.119 12.688-9.906L95.093 80H40.876c-3.81 0-6.617-3.512-5.719-7.156l11.375-46.188H31.75Z" fill="var(--stancer-back, #7899d6)"/><path d="M68.625 0C59.52 0 51.618 6.135 49.469 14.844L49 16.75h89.438l1.281-5.781C140.981 5.339 136.638 0 130.781 0H68.625Zm67.625 26.563-30.5.03L95.094 80h18.844c6.02 0 11.233-4.12 12.531-9.906l9.781-43.531Z" fill="var(--stancer-accent, #c8e8f9)"/><path d="m95.096 80 10.65-53.43-59.204.098-11.39 46.177C34.253 76.49 37.057 80 40.867 80H94.92" fill="var(--stancer-heart, #f35c6f)"/><g fill="var(--stancer-text, #101a2c)"><path d="M224.32 106.667c21.512 0 37.496-13.037 37.496-30.964 0-40.148-57.812-24.888-57.812-46.518 0-7.703 7.021-12.74 17.627-12.74 11.354 0 18.673 6.814 18.972 16.147h17.926c0-17.48-12.249-32.592-36.3-32.592-20.465 0-35.405 12.296-35.405 29.333 0 38.075 57.664 23.112 57.664 46.37 0 8.74-8.367 14.667-20.168 14.667-12.548 0-21.511-7.555-21.511-18.667H185.48c0 20.297 16.432 34.964 38.84 34.964M315.349 48.445V32.74h-19.121V13.333h-16.731v19.408h-13.893v15.704h13.893v29.48c0 18.372 10.756 28.149 26.89 28.149 2.688 0 6.422-.297 8.962-.889v-15.26c-1.642.445-3.585.593-5.377.593-8.068 0-13.744-3.703-13.744-12.888V48.445h19.121M381.625 32.741v12.74c-5.228-9.036-14.192-14.222-25.844-14.222-19.42 0-34.956 16.741-34.956 37.63 0 20.888 15.536 37.778 34.956 37.778 11.652 0 20.616-5.185 25.844-14.223v12.741h16.731V32.741h-16.731Zm-22.258 58.223c-12.399 0-22.11-9.78-22.11-22.074 0-12.149 9.711-21.927 22.11-21.927 12.698 0 22.258 9.48 22.258 21.927 0 12.592-9.56 22.074-22.258 22.074M451.045 31.259c-9.709 0-17.477 4.741-22.108 12.89V32.74h-16.582v72.444h16.582v-39.26c0-11.407 7.171-18.813 18.076-18.813 10.606 0 17.627 7.406 17.627 18.813v39.26h16.731V63.852c0-20.148-11.652-32.593-30.326-32.593M529.983 106.667c17.777 0 33.162-11.557 35.105-28h-17.029c-1.794 7.258-9.412 12.148-18.076 12.148-12.1 0-21.362-9.482-21.362-21.779 0-12.444 9.262-21.925 21.362-21.925 8.664 0 16.133 4.889 17.925 11.556h17.031c-2.242-15.704-17.328-27.408-34.956-27.408-21.362 0-37.795 16.296-37.795 37.777 0 21.482 16.433 37.631 37.795 37.631M647.085 67.408c0-21.186-15.984-36.15-35.702-36.15-21.064 0-37.646 16.297-37.646 37.334 0 21.63 16.582 38.075 37.944 38.075 17.927 0 31.819-10.075 34.507-25.334h-16.729c-1.495 6.223-8.516 10.37-17.479 10.37-12.4 0-20.019-7.26-21.661-18.813h56.318c.299-1.482.448-3.557.448-5.482Zm-56.169-7.111c2.54-9.334 9.711-15.408 19.569-15.408 10.01 0 17.479 6.37 18.526 15.408h-38.095M695.351 31.259c-8.666 0-15.387 4.149-19.72 11.111v-9.629h-16.58v72.444h16.58V66.518c0-13.036 8.665-20.296 19.272-20.296 2.389 0 4.929.445 7.32 1.037v-15.11c-2.242-.445-4.632-.89-6.872-.89"/></g></svg>')).on("click",i)},u=function(r){var n=r.$button,s=r.url,i=r.data;e.ajax({url:s,type:"POST",data:i,dataType:"json",success:function(r){return function(r,n){try{if("success"!==n.result||!n.redirect||""===n.redirect)throw"failure"===n.result?new Error("Result failure"):new Error("Invalid response");c.addClass("stancer-block-scroll"),o.appendTo(c).removeClass("stancer-backdrop--hidden"),a.appendTo(c).attr("src",n.redirect),t.receipt=n.receipt}catch(t){if(n.reload)return window.location.reload(),!1;if(n.refresh&&c.trigger("update_checkout"),n.messages){e(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),e("form.checkout").prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'.concat(n.messages,"</div>")).removeClass("processing").unblock().find(".input-text, select, input:checkbox").trigger("validate").trigger("blur");var s=e(".woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout");s.length?e.scroll_to_notices(s):e.scroll_to_notices(e("form.checkout")),c.trigger("checkout_error",[n.messages])}}finally{r.unblock()}}(n,r)},error:function(e,t,r){c.trigger("checkout_error",[r])}})};r.on("message",(function(e){var c,o,a=e.originalEvent.data;if(void 0!==a.status&&void 0!==a.width&&void 0!==a.height)if(d()&&w(a))i();else{if("finished"===a.status&&""!=t.receipt)return window.postMessage({stopRedirection:!0}),window.location.href=t.receipt,void i();var n=null!==(c=r.height())&&void 0!==c?c:100,s=null!==(o=r.width())&&void 0!==o?o:100,l=400,u=10,m=400;"secure-auth-start"===a.status?(l=n,m=s):["error","init","secure-auth-end","secure-auth-error"].includes(a.status)||(l=a.height,m=a.width),l>=n&&(l=n,u=0),m>=s&&(m=s,u=0),document.body.style.setProperty("--stancer-iframe-height","".concat(l,"px")),document.body.style.setProperty("--stancer-iframe-width","".concat(m,"px")),document.body.style.setProperty("--stancer-iframe-border-radius","".concat(u,"px"))}})).on("keydown",(function(e){"Escape"===e.code&&i()}));var m,h,p,v,f,g=function(t,r){var o=t.url,a=t.nonce;e.ajax({url:o,type:"POST",data:{action:"information",nonce:a,subscription:r},dataType:"json",success:function(t){t.card&&e("#payment .payment_method_stancer label[for=payment_method_stancer]").text(t.card)},error:function(e,t,r){return c.trigger("checkout_error",[r])}})},w=function(t){var r,c;return("finished"===t.status||"error"===t.status)&&(i(),e.ajax({url:null===(r=stancer.changePaymentMethod)||void 0===r?void 0:r.url,type:"POST",data:{action:"validate",nonce:null===(c=stancer.changePaymentMethod)||void 0===c?void 0:c.nonce,subscription:s.change_payment_method},dataType:"json",success:function(t){if("success"===t.result&&(t.card&&e("#order_review .shop_table tfoot tr:nth-child(2) td.product-total").text(t.card),e("#payment").empty()),t.messages){var r=e(document.createElement("div")).text(t.messages);e(".woocommerce-notices-wrapper").siblings(".wc-block-components-notice-banner, .woocommerce-error, .woocommerce-info").remove().end().after(r),"success"===t.result?r.addClass("woocommerce-info"):r.addClass("woocommerce-error")}}}),!0)};d()?(f={action:"initiate",nonce:null===(p=stancer.changePaymentMethod)||void 0===p?void 0:p.nonce,subscription:s.change_payment_method},g(stancer.changePaymentMethod,s.change_payment_method),l({button:".js-stancer-change-payment-method",url:null===(v=stancer.changePaymentMethod)||void 0===v?void 0:v.url,data:f})):(h=e(m=".js-stancer-place-order").parents("form"),l({button:m,url:stancer.initiate,data:h.serialize()},(function(){return e("#payment_method_stancer").is(":checked")})))}))}(jQuery);
     1"use strict";!function(e){e((function(){var t=e(window),c=e(document.body),a={receipt:""},r=e(document.createElement("iframe")).addClass("stancer-iframe").attr("allow","payment").attr("sandbox","allow-scripts allow-forms allow-same-origin allow-top-navigation"),n=e(document.createElement("div")).addClass("stancer-backdrop"),o=function(){c.removeClass("stancer-block-scroll"),n.detach().addClass("stancer-backdrop--hidden"),e(".js-stancer-place-order").removeAttr("disabled"),r.detach()};t.on("message",(function(e){return function(e){var t,c,r=e.originalEvent.data;if(void 0!==r.status&&void 0!==r.width&&void 0!==r.height)if(window.stancer_paymentMethodHasBeenChanged(r))o();else{if("finished"===r.status&&""!=a.receipt)return window.postMessage({stopRedirection:!0}),window.location.href=a.receipt,void o();var n=null!==(t=window.innerHeight)&&void 0!==t?t:100,s=null!==(c=window.innerWidth)&&void 0!==c?c:100,d=400,i=10,l=400;"secure-auth-start"===r.status?(d=n,l=s):["error","init","secure-auth-end","secure-auth-error"].includes(r.status)||(d=r.height,l=r.width),d>=n&&(d=n,i=0),l>=s&&(l=s,i=0),document.body.style.setProperty("--stancer-iframe-height","".concat(d,"px")),document.body.style.setProperty("--stancer-iframe-width","".concat(l,"px")),document.body.style.setProperty("--stancer-iframe-border-radius","".concat(i,"px"))}}(e)})).on("keydown",(function(e){"Escape"===e.code&&o()})),window.stancer_iframe=function(t){var s=e(document.createElement("div")).addClass("stancer-logo").append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 702.227 106.667"><path d="M31.75 26.656c-9.216 0-17.232 6.135-19.406 14.844L.219 95.344c-1.31 5.818 3.262 11.312 9.406 11.312h69c6.093 0 11.375-4.119 12.688-9.906L95.093 80H40.876c-3.81 0-6.617-3.512-5.719-7.156l11.375-46.188H31.75Z" fill="var(--stancer-back, #7899d6)"/><path d="M68.625 0C59.52 0 51.618 6.135 49.469 14.844L49 16.75h89.438l1.281-5.781C140.981 5.339 136.638 0 130.781 0H68.625Zm67.625 26.563-30.5.03L95.094 80h18.844c6.02 0 11.233-4.12 12.531-9.906l9.781-43.531Z" fill="var(--stancer-accent, #c8e8f9)"/><path d="m95.096 80 10.65-53.43-59.204.098-11.39 46.177C34.253 76.49 37.057 80 40.867 80H94.92" fill="var(--stancer-heart, #f35c6f)"/><g fill="var(--stancer-text, #101a2c)"><path d="M224.32 106.667c21.512 0 37.496-13.037 37.496-30.964 0-40.148-57.812-24.888-57.812-46.518 0-7.703 7.021-12.74 17.627-12.74 11.354 0 18.673 6.814 18.972 16.147h17.926c0-17.48-12.249-32.592-36.3-32.592-20.465 0-35.405 12.296-35.405 29.333 0 38.075 57.664 23.112 57.664 46.37 0 8.74-8.367 14.667-20.168 14.667-12.548 0-21.511-7.555-21.511-18.667H185.48c0 20.297 16.432 34.964 38.84 34.964M315.349 48.445V32.74h-19.121V13.333h-16.731v19.408h-13.893v15.704h13.893v29.48c0 18.372 10.756 28.149 26.89 28.149 2.688 0 6.422-.297 8.962-.889v-15.26c-1.642.445-3.585.593-5.377.593-8.068 0-13.744-3.703-13.744-12.888V48.445h19.121M381.625 32.741v12.74c-5.228-9.036-14.192-14.222-25.844-14.222-19.42 0-34.956 16.741-34.956 37.63 0 20.888 15.536 37.778 34.956 37.778 11.652 0 20.616-5.185 25.844-14.223v12.741h16.731V32.741h-16.731Zm-22.258 58.223c-12.399 0-22.11-9.78-22.11-22.074 0-12.149 9.711-21.927 22.11-21.927 12.698 0 22.258 9.48 22.258 21.927 0 12.592-9.56 22.074-22.258 22.074M451.045 31.259c-9.709 0-17.477 4.741-22.108 12.89V32.74h-16.582v72.444h16.582v-39.26c0-11.407 7.171-18.813 18.076-18.813 10.606 0 17.627 7.406 17.627 18.813v39.26h16.731V63.852c0-20.148-11.652-32.593-30.326-32.593M529.983 106.667c17.777 0 33.162-11.557 35.105-28h-17.029c-1.794 7.258-9.412 12.148-18.076 12.148-12.1 0-21.362-9.482-21.362-21.779 0-12.444 9.262-21.925 21.362-21.925 8.664 0 16.133 4.889 17.925 11.556h17.031c-2.242-15.704-17.328-27.408-34.956-27.408-21.362 0-37.795 16.296-37.795 37.777 0 21.482 16.433 37.631 37.795 37.631M647.085 67.408c0-21.186-15.984-36.15-35.702-36.15-21.064 0-37.646 16.297-37.646 37.334 0 21.63 16.582 38.075 37.944 38.075 17.927 0 31.819-10.075 34.507-25.334h-16.729c-1.495 6.223-8.516 10.37-17.479 10.37-12.4 0-20.019-7.26-21.661-18.813h56.318c.299-1.482.448-3.557.448-5.482Zm-56.169-7.111c2.54-9.334 9.711-15.408 19.569-15.408 10.01 0 17.479 6.37 18.526 15.408h-38.095M695.351 31.259c-8.666 0-15.387 4.149-19.72 11.111v-9.629h-16.58v72.444h16.58V66.518c0-13.036 8.665-20.296 19.272-20.296 2.389 0 4.929.445 7.32 1.037v-15.11c-2.242-.445-4.632-.89-6.872-.89"/></g></svg>');n.removeClass("stancer-backdrop--hidden").append(s).on("click",o),r.attr("src",t.redirect),c.addClass("stancer-block-scroll").append(n,r),a.receipt=t.receipt}}))}(jQuery);
  • stancer/trunk/public/js/popup.js

    r3126050 r3158216  
    2727        }
    2828        $.ajax({
    29             url: stancer.initiate,
     29            url: stancer_data.initiate,
    3030            type: 'POST',
    3131            data: $form.serialize(),
     
    7777            error: function (_jqXHR, _textStatus, errorThrown) {
    7878                $body.trigger('checkout_error', [errorThrown]);
    79             }
     79            },
    8080        });
    8181    });
  • stancer/trunk/public/js/popup.min.js

    r3125364 r3158216  
    1 "use strict";!function(e){e((function(){var o=e(document.body),r=e("#payment_method_stancer"),c=e("#stancer-card");c.selectWoo&&c.selectWoo({minimumResultsForSearch:1/0,width:"100%"}),o.on("click",".js-stancer-place-order",(function(o){if(!r.is(":checked"))return!0;o.preventDefault();var c=e(this).parents("form"),t=e(document.body),i=(screen.width-550)/2,s=Math.max((screen.height-855)/2,0),n=window.open("about:blank","_blank","popup, width=".concat(550,", height=").concat(855,", top=").concat(s,", left=").concat(i));n&&e.ajax({url:stancer.initiate,type:"POST",data:c.serialize(),dataType:"json",success:function(o){try{if("success"!==o.result||!o.redirect||""===o.redirect)throw"failure"===o.result?new Error("Result failure"):new Error("Invalid response");n.location.href=o.redirect}catch(c){if(n.close(),o.reload)return void window.location.reload();if(o.refresh&&t.trigger("update_checkout"),o.messages){e(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),e("form.checkout").prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'.concat(o.messages,"</div>")).removeClass("processing").unblock().find(".input-text, select, input:checkbox").trigger("validate").trigger("blur");var r=e(".woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout");r.length?e.scroll_to_notices(r):e.scroll_to_notices(e("form.checkout")),t.trigger("checkout_error",[o.messages])}}},error:function(e,o,r){t.trigger("checkout_error",[r])}})}))}))}(jQuery);
     1"use strict";!function(e){e((function(){var o=e(document.body),r=e("#payment_method_stancer"),c=e("#stancer-card");c.selectWoo&&c.selectWoo({minimumResultsForSearch:1/0,width:"100%"}),o.on("click",".js-stancer-place-order",(function(o){if(!r.is(":checked"))return!0;o.preventDefault();var c=e(this).parents("form"),t=e(document.body),i=(screen.width-550)/2,s=Math.max((screen.height-855)/2,0),n=window.open("about:blank","_blank","popup, width=".concat(550,", height=").concat(855,", top=").concat(s,", left=").concat(i));n&&e.ajax({url:stancer_data.initiate,type:"POST",data:c.serialize(),dataType:"json",success:function(o){try{if("success"!==o.result||!o.redirect||""===o.redirect)throw"failure"===o.result?new Error("Result failure"):new Error("Invalid response");n.location.href=o.redirect}catch(c){if(n.close(),o.reload)return void window.location.reload();if(o.refresh&&t.trigger("update_checkout"),o.messages){e(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),e("form.checkout").prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'.concat(o.messages,"</div>")).removeClass("processing").unblock().find(".input-text, select, input:checkbox").trigger("validate").trigger("blur");var r=e(".woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout");r.length?e.scroll_to_notices(r):e.scroll_to_notices(e("form.checkout")),t.trigger("checkout_error",[o.messages])}}},error:function(e,o,r){t.trigger("checkout_error",[r])}})}))}))}(jQuery);
  • stancer/trunk/stancer.php

    r3132730 r3158216  
    2828 */
    2929define( 'STANCER_WC_VERSION', '1.2.6' );
    30 define( 'STANCER_ASSETS_VERSION', '1723122310551' );
     30define( 'STANCER_ASSETS_VERSION', '1727352255649' );
    3131define( 'STANCER_FILE', __FILE__ );
    3232define( 'STANCER_DIRECTORY_PATH', plugin_dir_path( STANCER_FILE ) );
     
    4040    'before_woocommerce_init',
    4141    function () {
    42         if ( class_exists( AutomatticWooCommerceUtilitiesFeaturesUtil::class ) ) {
    43             AutomatticWooCommerceUtilitiesFeaturesUtil::declare_compatibility( 'custom_order_tables', STANCER_FILE, true );
     42        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     43            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', STANCER_FILE, true );
     44            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', STANCER_FILE, true );
    4445        }
    4546    }
    4647);
     48
    4749
    4850// Add links on plugins.
  • stancer/trunk/vendor-prefixer/vendor/composer/autoload_classmap.php

    r3125364 r3158216  
    66$vendorDir = \dirname(__DIR__);
    77$baseDir = \dirname($vendorDir);
    8 return array('Stancer\\Scoped\\Isolated\\Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'WCS_Stancer_Renewal_Builder' => $baseDir . '/includes/subscriptions/class-stancer-renewal-builder.php', 'WC_Stancer' => $baseDir . '/includes/class-stancer.php', 'WC_Stancer_Abstract_Table' => $baseDir . '/includes/class-stancer-abstract-table.php', 'WC_Stancer_Api' => $baseDir . '/includes/class-stancer-api.php', 'WC_Stancer_Card' => $baseDir . '/includes/class-stancer-card.php', 'WC_Stancer_Config' => $baseDir . '/includes/class-stancer-config.php', 'WC_Stancer_Customer' => $baseDir . '/includes/class-stancer-customer.php', 'WC_Stancer_Exception' => $baseDir . '/includes/class-stancer-exception.php', 'WC_Stancer_Gateway' => $baseDir . '/includes/class-stancer-gateway.php', 'WC_Stancer_Payment' => $baseDir . '/includes/class-stancer-payment.php', 'WC_Stancer_Payment_Builder' => $baseDir . '/includes/class-stancer-payment-builder.php', 'WC_Stancer_Payment_Validator_Traits' => $baseDir . '/includes/traits/trait-stancer-payment-validator.php', 'WC_Stancer_Refunds_Traits' => $baseDir . '/includes/traits/trait-stancer-refunds.php', 'WC_Stancer_Subscription' => $baseDir . '/includes/class-stancer-subscription.php', 'WC_Stancer_Subscription_Trait' => $baseDir . '/includes/traits/trait-stancer-subscription.php');
     8return array('Stancer\\Scoped\\Isolated\\Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'WCS_Stancer_Change_Payment_Method' => $baseDir . '/includes/Controller/class-stancer-change-payment-method.php', 'WCS_Stancer_Renewal_Builder' => $baseDir . '/includes/subscriptions/class-stancer-renewal-builder.php', 'WC_Stancer' => $baseDir . '/includes/class-stancer.php', 'WC_Stancer_Abstract_Table' => $baseDir . '/includes/class-stancer-abstract-table.php', 'WC_Stancer_Api' => $baseDir . '/includes/class-stancer-api.php', 'WC_Stancer_Card' => $baseDir . '/includes/class-stancer-card.php', 'WC_Stancer_Config' => $baseDir . '/includes/class-stancer-config.php', 'WC_Stancer_Customer' => $baseDir . '/includes/class-stancer-customer.php', 'WC_Stancer_Exception' => $baseDir . '/includes/class-stancer-exception.php', 'WC_Stancer_Gateway' => $baseDir . '/includes/class-stancer-gateway.php', 'WC_Stancer_Gateway_Block_Support' => $baseDir . '/includes/class-stancer-gateway-block-support.php', 'WC_Stancer_Payment' => $baseDir . '/includes/class-stancer-payment.php', 'WC_Stancer_Payment_Builder' => $baseDir . '/includes/class-stancer-payment-builder.php', 'WC_Stancer_Payment_Validator_Traits' => $baseDir . '/includes/traits/trait-stancer-payment-validator.php', 'WC_Stancer_Refunds_Traits' => $baseDir . '/includes/traits/trait-stancer-refunds.php', 'WC_Stancer_Request_Exception' => $baseDir . '/includes/class-stancer-exception.php', 'WC_Stancer_Subscription' => $baseDir . '/includes/class-stancer-subscription.php', 'WC_Stancer_Subscription_Trait' => $baseDir . '/includes/traits/trait-stancer-subscription.php');
  • stancer/trunk/vendor-prefixer/vendor/composer/autoload_static.php

    r3125364 r3158216  
    99    public static $prefixLengthsPsr4 = array('S' => array('Stancer\\' => 8), 'P' => array('Psr\\Log\\' => 8, 'Psr\\Http\\Message\\' => 17));
    1010    public static $prefixDirsPsr4 = array('Stancer\\' => array(0 => __DIR__ . '/..' . '/stancer/stancer/src'), 'Psr\\Log\\' => array(0 => __DIR__ . '/..' . '/psr/log/Psr/Log'), 'Psr\\Http\\Message\\' => array(0 => __DIR__ . '/..' . '/psr/http-message/src'));
    11     public static $classMap = array('Stancer\\Scoped\\Isolated\\Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'WCS_Stancer_Renewal_Builder' => __DIR__ . '/../..' . '/includes/subscriptions/class-stancer-renewal-builder.php', 'WC_Stancer' => __DIR__ . '/../..' . '/includes/class-stancer.php', 'WC_Stancer_Abstract_Table' => __DIR__ . '/../..' . '/includes/class-stancer-abstract-table.php', 'WC_Stancer_Api' => __DIR__ . '/../..' . '/includes/class-stancer-api.php', 'WC_Stancer_Card' => __DIR__ . '/../..' . '/includes/class-stancer-card.php', 'WC_Stancer_Config' => __DIR__ . '/../..' . '/includes/class-stancer-config.php', 'WC_Stancer_Customer' => __DIR__ . '/../..' . '/includes/class-stancer-customer.php', 'WC_Stancer_Exception' => __DIR__ . '/../..' . '/includes/class-stancer-exception.php', 'WC_Stancer_Gateway' => __DIR__ . '/../..' . '/includes/class-stancer-gateway.php', 'WC_Stancer_Payment' => __DIR__ . '/../..' . '/includes/class-stancer-payment.php', 'WC_Stancer_Payment_Builder' => __DIR__ . '/../..' . '/includes/class-stancer-payment-builder.php', 'WC_Stancer_Payment_Validator_Traits' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-payment-validator.php', 'WC_Stancer_Refunds_Traits' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-refunds.php', 'WC_Stancer_Subscription' => __DIR__ . '/../..' . '/includes/class-stancer-subscription.php', 'WC_Stancer_Subscription_Trait' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-subscription.php');
     11    public static $classMap = array('Stancer\\Scoped\\Isolated\\Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'WCS_Stancer_Change_Payment_Method' => __DIR__ . '/../..' . '/includes/Controller/class-stancer-change-payment-method.php', 'WCS_Stancer_Renewal_Builder' => __DIR__ . '/../..' . '/includes/subscriptions/class-stancer-renewal-builder.php', 'WC_Stancer' => __DIR__ . '/../..' . '/includes/class-stancer.php', 'WC_Stancer_Abstract_Table' => __DIR__ . '/../..' . '/includes/class-stancer-abstract-table.php', 'WC_Stancer_Api' => __DIR__ . '/../..' . '/includes/class-stancer-api.php', 'WC_Stancer_Card' => __DIR__ . '/../..' . '/includes/class-stancer-card.php', 'WC_Stancer_Config' => __DIR__ . '/../..' . '/includes/class-stancer-config.php', 'WC_Stancer_Customer' => __DIR__ . '/../..' . '/includes/class-stancer-customer.php', 'WC_Stancer_Exception' => __DIR__ . '/../..' . '/includes/class-stancer-exception.php', 'WC_Stancer_Gateway' => __DIR__ . '/../..' . '/includes/class-stancer-gateway.php', 'WC_Stancer_Gateway_Block_Support' => __DIR__ . '/../..' . '/includes/class-stancer-gateway-block-support.php', 'WC_Stancer_Payment' => __DIR__ . '/../..' . '/includes/class-stancer-payment.php', 'WC_Stancer_Payment_Builder' => __DIR__ . '/../..' . '/includes/class-stancer-payment-builder.php', 'WC_Stancer_Payment_Validator_Traits' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-payment-validator.php', 'WC_Stancer_Refunds_Traits' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-refunds.php', 'WC_Stancer_Request_Exception' => __DIR__ . '/../..' . '/includes/class-stancer-exception.php', 'WC_Stancer_Subscription' => __DIR__ . '/../..' . '/includes/class-stancer-subscription.php', 'WC_Stancer_Subscription_Trait' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-subscription.php');
    1212    public static function getInitializer(ClassLoader $loader)
    1313    {
  • stancer/trunk/vendor-prefixer/vendor/composer/installed.php

    r3132730 r3158216  
    33namespace Stancer\Scoped\Isolated;
    44
    5 return array('root' => array('name' => 'stancer/cms-woocommerce', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '745ecc2131dfd82b47deb7534617fc99cb7ae49d', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('psr/http-message' => array('pretty_version' => '1.1', 'version' => '1.1.0.0', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'stancer/cms-woocommerce' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '745ecc2131dfd82b47deb7534617fc99cb7ae49d', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'stancer/stancer' => array('pretty_version' => 'v1.1.3', 'version' => '1.1.3.0', 'reference' => 'ebd111ebdce45aedbf9a892d47009098b99a99d0', 'type' => 'library', 'install_path' => __DIR__ . '/../stancer/stancer', 'aliases' => array(), 'dev_requirement' => \false)));
     5return array('root' => array('name' => 'stancer/cms-woocommerce', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '3df4b05fa65d99e68dd273bbf15b17e94c89b804', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('psr/http-message' => array('pretty_version' => '1.1', 'version' => '1.1.0.0', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'stancer/cms-woocommerce' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '3df4b05fa65d99e68dd273bbf15b17e94c89b804', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'stancer/stancer' => array('pretty_version' => 'v1.1.3', 'version' => '1.1.3.0', 'reference' => 'ebd111ebdce45aedbf9a892d47009098b99a99d0', 'type' => 'library', 'install_path' => __DIR__ . '/../stancer/stancer', 'aliases' => array(), 'dev_requirement' => \false)));
  • stancer/trunk/vendor/composer/autoload_classmap.php

    r3125364 r3158216  
    149149    'Stancer\\Scoped\\Isolated\\Stancer\\WillChange\\PHP8_3\\Base' => $baseDir . '/vendor-prefixer/vendor/stancer/stancer/src/WillChange/PHP8_3/Base.php',
    150150    'Stancer\\Scoped\\Isolated\\Stancer\\WillChange\\PHP8_3\\TypedClassConstants' => $baseDir . '/vendor-prefixer/vendor/stancer/stancer/src/WillChange/PHP8_3/TypedClassConstants.php',
     151    'WCS_Stancer_Change_Payment_Method' => $baseDir . '/includes/Controller/class-stancer-change-payment-method.php',
    151152    'WCS_Stancer_Renewal_Builder' => $baseDir . '/includes/subscriptions/class-stancer-renewal-builder.php',
    152153    'WC_Stancer' => $baseDir . '/includes/class-stancer.php',
     
    158159    'WC_Stancer_Exception' => $baseDir . '/includes/class-stancer-exception.php',
    159160    'WC_Stancer_Gateway' => $baseDir . '/includes/class-stancer-gateway.php',
     161    'WC_Stancer_Gateway_Block_Support' => $baseDir . '/includes/class-stancer-gateway-block-support.php',
    160162    'WC_Stancer_Payment' => $baseDir . '/includes/class-stancer-payment.php',
    161163    'WC_Stancer_Payment_Builder' => $baseDir . '/includes/class-stancer-payment-builder.php',
    162164    'WC_Stancer_Payment_Validator_Traits' => $baseDir . '/includes/traits/trait-stancer-payment-validator.php',
    163165    'WC_Stancer_Refunds_Traits' => $baseDir . '/includes/traits/trait-stancer-refunds.php',
     166    'WC_Stancer_Request_Exception' => $baseDir . '/includes/class-stancer-exception.php',
    164167    'WC_Stancer_Subscription' => $baseDir . '/includes/class-stancer-subscription.php',
    165168    'WC_Stancer_Subscription_Trait' => $baseDir . '/includes/traits/trait-stancer-subscription.php',
  • stancer/trunk/vendor/composer/autoload_static.php

    r3125364 r3158216  
    150150        'Stancer\\Scoped\\Isolated\\Stancer\\WillChange\\PHP8_3\\Base' => __DIR__ . '/../..' . '/vendor-prefixer/vendor/stancer/stancer/src/WillChange/PHP8_3/Base.php',
    151151        'Stancer\\Scoped\\Isolated\\Stancer\\WillChange\\PHP8_3\\TypedClassConstants' => __DIR__ . '/../..' . '/vendor-prefixer/vendor/stancer/stancer/src/WillChange/PHP8_3/TypedClassConstants.php',
     152        'WCS_Stancer_Change_Payment_Method' => __DIR__ . '/../..' . '/includes/Controller/class-stancer-change-payment-method.php',
    152153        'WCS_Stancer_Renewal_Builder' => __DIR__ . '/../..' . '/includes/subscriptions/class-stancer-renewal-builder.php',
    153154        'WC_Stancer' => __DIR__ . '/../..' . '/includes/class-stancer.php',
     
    159160        'WC_Stancer_Exception' => __DIR__ . '/../..' . '/includes/class-stancer-exception.php',
    160161        'WC_Stancer_Gateway' => __DIR__ . '/../..' . '/includes/class-stancer-gateway.php',
     162        'WC_Stancer_Gateway_Block_Support' => __DIR__ . '/../..' . '/includes/class-stancer-gateway-block-support.php',
    161163        'WC_Stancer_Payment' => __DIR__ . '/../..' . '/includes/class-stancer-payment.php',
    162164        'WC_Stancer_Payment_Builder' => __DIR__ . '/../..' . '/includes/class-stancer-payment-builder.php',
    163165        'WC_Stancer_Payment_Validator_Traits' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-payment-validator.php',
    164166        'WC_Stancer_Refunds_Traits' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-refunds.php',
     167        'WC_Stancer_Request_Exception' => __DIR__ . '/../..' . '/includes/class-stancer-exception.php',
    165168        'WC_Stancer_Subscription' => __DIR__ . '/../..' . '/includes/class-stancer-subscription.php',
    166169        'WC_Stancer_Subscription_Trait' => __DIR__ . '/../..' . '/includes/traits/trait-stancer-subscription.php',
Note: See TracChangeset for help on using the changeset viewer.