Plugin Directory

Changeset 2981398


Ignore:
Timestamp:
10/19/2023 08:32:35 PM (2 years ago)
Author:
bluempaymentservices
Message:

1.3.17.10: Updated eMandates BIC list in PHP library and webhook improvements.

Location:
bluem
Files:
1356 added
2 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • bluem/trunk/bluem-idin.php

    r2975761 r2981398  
    3232
    3333function bluem_woocommerce_get_idin_options() {
    34     $idinDescriptionTags     = (
     34    $idinDescriptionTags = (
    3535    function_exists( 'bluem_get_IDINDescription_tags' ) ?
    3636        bluem_get_IDINDescription_tags() : []
     
    4040        bluem_get_IDINDescription_replaces() : []
    4141    );
    42     $idinDescriptionTable    = "<table><thead><tr><th>Invulveld</th><th>Voorbeeld invulling</th></tr></thead><tbody>";
     42    $idinDescriptionTable = "<table><thead><tr><th>Invulveld</th><th>Voorbeeld invulling</th></tr></thead><tbody>";
    4343    foreach ( $idinDescriptionTags as $ti => $tag ) {
    4444        if ( ! isset( $idinDescriptionReplaces[ $ti ] ) ) {
     
    4949
    5050    $idinDescriptionTable .= "</tbody></table>";
    51     $options              = get_option( 'bluem_woocommerce_options' );
     51    $options = get_option( 'bluem_woocommerce_options' );
    5252
    5353    if ( $options !== false
     
    109109            'default'     => '18',
    110110        ],
    111         'idin_request_name'          => [
     111        'idin_request_name' => [
    112112            'key'         => 'idin_request_name',
    113113            'title'       => 'bluem_idin_request_name',
     
    118118            'default'     => '1',
    119119        ],
    120         'idin_request_address'       => [
     120        'idin_request_address' => [
    121121            'key'         => 'idin_request_address',
    122122            'title'       => 'bluem_idin_request_address',
     
    127127            'default'     => '1',
    128128        ],
    129         'idin_request_birthdate'     => [
     129        'idin_request_birthdate' => [
    130130            'key'         => 'idin_request_birthdate',
    131131            'title'       => 'bluem_idin_request_birthdate',
     
    137137            'default'     => '1',
    138138        ],
    139         'idin_request_gender'        => [
     139        'idin_request_gender' => [
    140140            'key'         => 'idin_request_gender',
    141141            'title'       => 'bluem_idin_request_gender',
     
    146146            'default'     => '0',
    147147        ],
    148         'idin_request_telephone'     => [
     148        'idin_request_telephone' => [
    149149            'key'         => 'idin_request_telephone',
    150150            'title'       => 'bluem_idin_request_telephone',
     
    155155            'default'     => '1',
    156156        ],
    157         'idin_request_email'         => [
     157        'idin_request_email' => [
    158158            'key'         => 'idin_request_email',
    159159            'title'       => 'bluem_idin_request_email',
     
    172172            'default'     => 'Uw identificatie is succesvol ontvangen. Hartelijk dank.'
    173173        ],
    174         'IDINErrorMessage'   => [
     174        'IDINErrorMessage' => [
    175175            'key'         => 'IDINErrorMessage',
    176176            'title'       => 'bluem_IDINErrorMessage',
     
    208208            ],
    209209        ],
    210         'IDINDescription'             => [
     210        'IDINDescription' => [
    211211            'key'         => 'IDINDescription',
    212212            'title'       => 'bluem_IDINDescription',
     
    229229        ],
    230230
    231         'idin_add_field_in_order_emails'     => [
     231        'idin_add_field_in_order_emails' => [
    232232            'key'         => 'idin_add_field_in_order_emails',
    233233            'title'       => 'bluem_idin_add_field_in_order_emails',
     
    238238            'default'     => '1',
    239239        ],
    240         'idin_add_address_in_order_emails'   => [
     240        'idin_add_address_in_order_emails' => [
    241241            'key'         => 'idin_add_address_in_order_emails',
    242242            'title'       => 'bluem_idin_add_address_in_order_emails',
     
    247247            'default'     => '1',
    248248        ],
    249         'idin_add_name_in_order_emails'      => [
     249        'idin_add_name_in_order_emails' => [
    250250            'key'         => 'idin_add_name_in_order_emails',
    251251            'title'       => 'bluem_idin_add_name_in_order_emails',
     
    265265            'default'     => '1',
    266266        ],
    267 
    268 
    269267        'idin_identify_button_inner' => [
    270268            'key'         => 'idin_identify_button_inner',
     
    298296            'default'     => "Uw leeftijd is niet toereikend. U kan dus niet deze bestelling afronden."
    299297        ],
    300 
    301298
    302299        'idin_identity_dialog_thank_you_message' => [
     
    338335        ],
    339336
    340 
    341         // 'idin_show_notice_in_checkout' => [
    342         //     'key' => 'idin_show_notice_in_checkout',
    343         //     'title' => 'bluem_idin_show_notice_in_checkout',
    344         //     'name' => 'Wil je de identificatie melding bovenin de checkout weergeven?',
    345         //     'description' => "Wil je de melding van identificatie nodig ook bovenaan de checkout als melding weergeven?",
    346         //     'type' => 'bool',
    347         //     'default' => '1',
    348         // ],
     337        'idin_show_notice_in_checkout' => [
     338            'key' => 'idin_show_notice_in_checkout',
     339            'title' => 'bluem_idin_show_notice_in_checkout',
     340            'name' => 'Wil je de identificatie melding bovenin de checkout weergeven?',
     341            'description' => "Wil je de melding van identificatie nodig ook bovenaan de checkout als melding weergeven?",
     342            'type' => 'bool',
     343            'default' => '1',
     344        ],
    349345    ];
    350346}
     
    626622}
    627623
    628 
    629624function bluem_idin_get_categories( int $preset_scenario = null ) {
    630625    $catListObject = new BluemIdentityCategoryList();
     
    642637    }
    643638
    644 
    645     // '0' => 'Voer geen identiteitscheck uit voor de checkout procedure', dus we overschrijven hier geen categoriëen
    646 
    647     // '1' => 'Check op de minimumleeftijd door een AgeCheckRequest',
     639    /**
     640     * Check the scenario
     641     *
     642     * '0' => 'Voer geen identiteitscheck uit voor de checkout procedure', dus we overschrijven hier geen categoriëen
     643     * '1' => 'Check op de minimumleeftijd door een AgeCheckRequest'
     644     * '2' => 'Voer een volledige identiteitscontrole uit en sla dit op, maar blokkeer de checkout NIET, als minimumleeftijd niet bereikt is'
     645     * '3' => 'Voer een volledige identiteitscontrole uit, sla dit op EN blokkeer de checkout WEL, als minimumleeftijd niet bereikt is'
     646     */
    648647    if ( $scenario == 1 ) {
    649         $catListObject->addCat( "AgeCheckRequest" );
    650 
    651         // return prematurely because we don't even consider the rest of the stuffs.
    652         return $catListObject->getCats();
    653 
    654 
    655         // '2' => 'Voer een volledige identiteitscontrole uit en sla dit op, maar blokkeer de checkout NIET, als minimumleeftijd niet bereikt is',
    656         // '3' => 'Voer een volledige identiteitscontrole uit, sla dit op EN blokkeer de checkout WEL, als minimumleeftijd niet bereikt is',
     648        if (method_exists($catListObject, 'Add')) {
     649            $catListObject->Add( "AgeCheckRequest" );
     650        } else {
     651            $catListObject->addCat( "AgeCheckRequest" );
     652        }
     653
     654        if (method_exists($catListObject, 'getCategories')) {
     655            return $catListObject->getCategories();
     656        } else {
     657            return $catListObject->getCats();
     658        }
    657659    } elseif ( $scenario == 2 || $scenario == 3 ) {
    658         // always ask for this
    659         $catListObject->addCat( "CustomerIDRequest" );
     660        if (method_exists($catListObject, 'Add')) {
     661            $catListObject->Add( "CustomerIDRequest" );
     662        } else {
     663            $catListObject->addCat( "CustomerIDRequest" );
     664        }
    660665
    661666        if ( $scenario == 3 ) {
    662             // deze moet verplicht mee
     667            if (method_exists($catListObject, 'Add')) {
     668                $catListObject->Add( "BirthDateRequest" );
     669            } else {
     670                $catListObject->addCat( "BirthDateRequest" );
     671            }
     672        }
     673    }
     674
     675    /**
     676     * Check which data to get.
     677     */
     678    if ( isset( $options['idin_request_name'] ) && $options['idin_request_name'] == "1" ) {
     679        if (method_exists($catListObject, 'Add')) {
     680            $catListObject->Add( "NameRequest" );
     681        } else {
     682            $catListObject->addCat( "NameRequest" );
     683        }
     684    }
     685    if ( isset( $options['idin_request_address'] ) && $options['idin_request_address'] == "1" ) {
     686        if (method_exists($catListObject, 'Add')) {
     687            $catListObject->Add( "AddressRequest" );
     688        } else {
     689            $catListObject->addCat( "AddressRequest" );
     690        }
     691    }
     692    if ( isset( $options['idin_request_birthdate'] ) && $options['idin_request_birthdate'] == "1" ) {
     693        if (method_exists($catListObject, 'Add')) {
     694            $catListObject->Add( "BirthDateRequest" );
     695        } else {
    663696            $catListObject->addCat( "BirthDateRequest" );
    664697        }
    665698    }
    666     if ( isset( $options['idin_request_name'] ) && $options['idin_request_name'] == "1" ) {
    667         $catListObject->addCat( "NameRequest" );
    668     }
    669     if ( isset( $options['idin_request_address'] ) && $options['idin_request_address'] == "1" ) {
    670         $catListObject->addCat( "AddressRequest" );
    671     }
    672     if ( isset( $options['idin_request_address'] ) && $options['idin_request_address'] == "1" ) {
    673         $catListObject->addCat( "AddressRequest" );
    674     }
    675     if ( isset( $options['idin_request_birthdate'] ) && $options['idin_request_birthdate'] == "1" ) {
    676         $catListObject->addCat( "BirthDateRequest" );
    677     }
    678699    if ( isset( $options['idin_request_gender'] ) && $options['idin_request_gender'] == "1" ) {
    679         $catListObject->addCat( "GenderRequest" );
     700        if (method_exists($catListObject, 'Add')) {
     701            $catListObject->Add( "GenderRequest" );
     702        } else {
     703            $catListObject->addCat( "GenderRequest" );
     704        }
    680705    }
    681706    if ( isset( $options['idin_request_telephone'] ) && $options['idin_request_telephone'] == "1" ) {
    682         $catListObject->addCat( "TelephoneRequest" );
     707        if (method_exists($catListObject, 'Add')) {
     708            $catListObject->Add( "TelephoneRequest" );
     709        } else {
     710            $catListObject->addCat( "TelephoneRequest" );
     711        }
    683712    }
    684713    if ( isset( $options['idin_request_email'] ) && $options['idin_request_email'] == "1" ) {
    685         $catListObject->addCat( "EmailRequest" );
    686     }
    687 
    688     return $catListObject->getCats();
    689     //explode(",", str_replace(" ", "", $bluem_config->IDINCategories));
    690 }
    691 
     714        if (method_exists($catListObject, 'Add')) {
     715            $catListObject->Add( "EmailRequest" );
     716        } else {
     717            $catListObject->addCat( "EmailRequest" );
     718        }
     719    }
     720    return $catListObject->getCategories();
     721}
    692722
    693723/* ********* RENDERING THE STATIC FORM *********** */
     
    803833}
    804834
    805 /**
    806  * CALLBACK
    807  **/
    808835add_action( 'parse_request', 'bluem_idin_shortcode_callback' );
    809836/**
    810837 * This function is executed at a callback GET request with a given mandateId. This is then, together with the entranceCode in user or Bluem session storage, sent for a SUD to the Bluem API.
    811  *
    812838 */
    813839function bluem_idin_shortcode_callback() {
     
    11211147}
    11221148
     1149add_action( 'parse_request', 'bluem_idin_webhook' );
     1150/**
     1151 * Identity webhook action
     1152 *
     1153 * @return void
     1154 */
     1155function bluem_idin_webhook()
     1156{
     1157    if (strpos($_SERVER["REQUEST_URI"], "bluem-woocommerce/bluem_idin_webhook") === false) {
     1158        return;
     1159    }
     1160    http_response_code(200);
     1161    var_dump('Soon available..');
     1162    exit;
     1163}
     1164
    11231165add_action( 'show_user_profile', 'bluem_woocommerce_idin_show_extra_profile_fields', 2 );
    11241166add_action( 'edit_user_profile', 'bluem_woocommerce_idin_show_extra_profile_fields' );
     
    20482090}
    20492091
    2050 // @todo: deprecate this
    2051 //class BluemIdentityCategoryList
    2052 //{
    2053 //    public $_cats = [];
    2054 //
    2055 //    public function getCats()
    2056 //    {
    2057 //        return $this->_cats;
    2058 //    }
    2059 //    public function addCat($cat)
    2060 //    {
    2061 //        if (!in_array($cat, $this->_cats)) {
    2062 //            $this->_cats[] = $cat;
    2063 //        }
    2064 //    }
    2065 //}
    2066 
    20672092// https://wordpress.stackexchange.com/questions/314955/add-custom-order-meta-to-order-completed-email
    20682093add_filter( 'woocommerce_email_order_meta_fields', 'bluem_order_email_identity_meta_data', 10, 3 );
     
    20802105function bluem_order_email_identity_meta_data( $fields, $sent_to_admin, $order ) {
    20812106    global $current_user;
    2082 
    20832107
    20842108    $options = get_option( 'bluem_woocommerce_options' );
  • bluem/trunk/bluem.php

    r2975761 r2981398  
    22/**
    33 * Plugin Name: Bluem ePayments, iDIN and eMandates integration for shortcodes and WooCommerce checkout
    4  * Version: 1.3.17.9
     4 * Version: 1.3.17.10
    55 * Plugin URI: https://wordpress.org/plugins/bluem
    66 * Description: Bluem integration for WordPress and WooCommerce to facilitate Bluem services inside your site. Payments and eMandates payment gateway and iDIN identity verification
     
    1111 *
    1212 * WC requires at least: 5.0.0
    13  * WC tested up to: 8.1
     13 * WC tested up to: 8.2
    1414 *
    1515 * Text Domain: bluem
  • bluem/trunk/composer.lock

    r2975761 r2981398  
    99        {
    1010            "name": "bluem-development/bluem-php",
    11             "version": "2.3.2.6",
     11            "version": "2.3.2.8",
    1212            "source": {
    1313                "type": "git",
    1414                "url": "https://github.com/bluem-development/bluem-php.git",
    15                 "reference": "55e4eb2dbf9220d12a5cb579dad66d2b92575b94"
    16             },
    17             "dist": {
    18                 "type": "zip",
    19                 "url": "https://api.github.com/repos/bluem-development/bluem-php/zipball/55e4eb2dbf9220d12a5cb579dad66d2b92575b94",
    20                 "reference": "55e4eb2dbf9220d12a5cb579dad66d2b92575b94",
     15                "reference": "2441a00cc9cdd6099f136bf9bc00f6c816f8853f"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/bluem-development/bluem-php/zipball/2441a00cc9cdd6099f136bf9bc00f6c816f8853f",
     20                "reference": "2441a00cc9cdd6099f136bf9bc00f6c816f8853f",
    2121                "shasum": ""
    2222            },
     
    2828                "ext-openssl": "*",
    2929                "ext-simplexml": "*",
    30                 "php": ">=8.0"
     30                "php": ">=8.0",
     31                "selective/xmldsig": "^3.0"
    3132            },
    3233            "require-dev": {
     
    7172            "support": {
    7273                "issues": "https://github.com/bluem-development/bluem-php",
    73                 "source": "https://github.com/bluem-development/bluem-php/tree/2.3.2.6"
    74             },
    75             "time": "2023-09-29T17:12:12+00:00"
     74                "source": "https://github.com/bluem-development/bluem-php/tree/2.3.2.8"
     75            },
     76            "time": "2023-10-18T23:56:47+00:00"
    7677        },
    7778        {
     
    328329            },
    329330            "time": "2021-05-03T11:20:27+00:00"
     331        },
     332        {
     333            "name": "selective/xmldsig",
     334            "version": "3.0.0",
     335            "source": {
     336                "type": "git",
     337                "url": "https://github.com/selective-php/xmldsig.git",
     338                "reference": "fb9cdf2ecfcf4b65931db8796c7336a43b607d73"
     339            },
     340            "dist": {
     341                "type": "zip",
     342                "url": "https://api.github.com/repos/selective-php/xmldsig/zipball/fb9cdf2ecfcf4b65931db8796c7336a43b607d73",
     343                "reference": "fb9cdf2ecfcf4b65931db8796c7336a43b607d73",
     344                "shasum": ""
     345            },
     346            "require": {
     347                "ext-dom": "*",
     348                "ext-openssl": "*",
     349                "php": "~8.0 || ~8.1 || ~8.2"
     350            },
     351            "require-dev": {
     352                "friendsofphp/php-cs-fixer": "^3",
     353                "phpstan/phpstan": "^1",
     354                "phpunit/phpunit": "^9 || ^10",
     355                "squizlabs/php_codesniffer": "^3",
     356                "starkbank/ecdsa": "^2.0"
     357            },
     358            "type": "library",
     359            "autoload": {
     360                "psr-4": {
     361                    "Selective\\XmlDSig\\": "src/"
     362                }
     363            },
     364            "notification-url": "https://packagist.org/downloads/",
     365            "license": [
     366                "MIT"
     367            ],
     368            "description": "Sign XML Documents with Digital Signatures",
     369            "homepage": "https://github.com/selective-php/xmldsig",
     370            "keywords": [
     371                "signatures",
     372                "verify",
     373                "xml",
     374                "xmldsig"
     375            ],
     376            "support": {
     377                "issues": "https://github.com/selective-php/xmldsig/issues",
     378                "source": "https://github.com/selective-php/xmldsig/tree/3.0.0"
     379            },
     380            "abandoned": "robrichards/xmlseclibs",
     381            "time": "2023-01-28T18:17:36+00:00"
    330382        },
    331383        {
     
    9841036        {
    9851037            "name": "composer/pcre",
    986             "version": "3.1.0",
     1038            "version": "3.1.1",
    9871039            "source": {
    9881040                "type": "git",
    9891041                "url": "https://github.com/composer/pcre.git",
    990                 "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2"
    991             },
    992             "dist": {
    993                 "type": "zip",
    994                 "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",
    995                 "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",
     1042                "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9"
     1043            },
     1044            "dist": {
     1045                "type": "zip",
     1046                "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9",
     1047                "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9",
    9961048                "shasum": ""
    9971049            },
     
    10351087            "support": {
    10361088                "issues": "https://github.com/composer/pcre/issues",
    1037                 "source": "https://github.com/composer/pcre/tree/3.1.0"
     1089                "source": "https://github.com/composer/pcre/tree/3.1.1"
    10381090            },
    10391091            "funding": [
     
    10511103                }
    10521104            ],
    1053             "time": "2022-11-17T09:50:14+00:00"
     1105            "time": "2023-10-11T07:11:09+00:00"
    10541106        },
    10551107        {
  • bluem/trunk/gateways/Bluem_Bank_Based_Payment_Gateway.php

    r2959619 r2981398  
    3131        /**
    3232         * Set payment identifier.
    33         */
     33         */
    3434        $this->setPaymentIdentifier($this->id);
    3535
     
    245245    public function bluem_bank_payments_webhook()
    246246    {
    247         if ( !empty( $_GET['env'] )
    248              && in_array(
    249                  sanitize_text_field( $_GET['env'] ),
    250                  [ 'test', 'prod' ]
    251              )
    252         ) {
    253             $env = sanitize_text_field( $_GET['env'] );
    254         } else {
    255             $env = "test";
    256         }
    257 
    258247        try {
    259             $this->bluem->Webhook();
     248            $webhook = $this->bluem->Webhook();
     249
     250            if ($webhook->xmlObject ?? null !== null) {
     251                if (method_exists($webhook, 'getStatus')) {
     252                    $webhook_status = $webhook->getStatus();
     253                }
     254                if (method_exists($webhook, 'getEntranceCode')) {
     255                    $entranceCode = $webhook->getEntranceCode();
     256                }
     257                if (method_exists($webhook, 'getTransactionID')) {
     258                    $transactionID = $webhook->getTransactionID();
     259                }
     260
     261                $order = $this->getOrder( $transactionID );
     262                if ( is_null( $order ) ) {
     263                    http_response_code(404);
     264                    echo "Error: No order found";
     265                    exit;
     266                }
     267                $order_status = $order->get_status();
     268
     269                if ( self::VERBOSE ) {
     270                    echo "order_status: $order_status" . PHP_EOL;
     271                    echo "webhook_status: $webhook_status" . PHP_EOL;
     272                }
     273
     274                $user_id = $order->get_user_id();
     275
     276                $user_meta = get_user_meta( $user_id );
     277
     278                if ( $webhook_status === "Success" ) {
     279                    if ( $order_status === "processing" ) {
     280                        // order is already marked as processing, nothing more is necessary
     281                    } else if ( $order_status === "pending" ) {
     282                        $order->update_status( 'processing', __( 'Betaling is gelukt en goedgekeurd; via webhook', 'wc-gateway-bluem' ) );
     283                    }
     284                } elseif ( $webhook_status === "Cancelled" ) {
     285                    $order->update_status('cancelled', __('Betaling is geannuleerd; via webhook', 'wc-gateway-bluem'));
     286                } elseif ( $webhook_status === "Open" || $webhook_status == "Pending" ) {
     287                    // if the webhook is still open or pending, nothing has to be done yet
     288                } elseif ( $webhook_status === "Expired" ) {
     289                    $order->update_status( 'failed', __( 'Betaling is verlopen; via webhook', 'wc-gateway-bluem' ) );
     290                } else {
     291                    $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status; via webhook', 'wc-gateway-bluem' ) );
     292                }
     293                http_response_code(200);
     294                echo 'OK';
     295                exit;
     296            }
    260297        } catch ( Exception $e ) {
     298            http_response_code(500);
    261299            echo "Error: Exception: " . $e->getMessage();
    262300            exit;
    263301        }
    264 
    265         // @todo: continue webhook specifics
    266         // @todo: remove obsolete mandate references, this code below is to be deleted
    267 
    268         $entranceCode  = $statusUpdateObject->entranceCode . "";
    269         $transactionID = $statusUpdateObject->PaymentStatus->MandateID . "";
    270 
    271         $webhook_status = $statusUpdateObject->PaymentStatus->Status . "";
    272 
    273         $order = $this->getOrder( $transactionID );
    274         if ( is_null( $order ) ) {
    275             echo "Error: No order found";
    276             exit;
    277         }
    278         $order_status = $order->get_status();
    279 
    280         if ( self::VERBOSE ) {
    281             echo "order_status: $order_status" . PHP_EOL;
    282             echo "webhook_status: $webhook_status" . PHP_EOL;
    283         }
    284 
    285         $user_id   = $user_id = $order->get_user_id();
    286         $user_meta = get_user_meta( $user_id );
    287 
    288         // Todo: if max amount comes back from webhook (it should) then it can be accessed here
    289         // if (isset($user_meta['bluem_latest_mandate_amount'][0])) {
    290         //  $mandate_amount = $user_meta['bluem_latest_mandate_amount'][0];
    291         // } else {
    292         // }
    293 
    294 
    295         if ( isset( $statusUpdateObject->PaymentStatus->AcceptanceReport->MaxAmount ) ) {
    296             $mandate_amount = (float) ( $statusUpdateObject->PaymentStatus->AcceptanceReport->MaxAmount . "" );
    297         } else {
    298             $mandate_amount = 0.0;    // mandate amount is not set, so it is unlimited
    299         }
    300         if ( self::VERBOSE ) {
    301             var_dump( $mandate_amount );
    302             echo PHP_EOL;
    303             die();
    304         }
    305 
    306         if ( self::VERBOSE ) {
    307             echo "mandate_amount: $mandate_amount" . PHP_EOL;
    308         }
    309 
    310         $mandate_successful = false;
    311 
    312         if ( $mandate_amount !== 0.0 ) {
    313             $order_price      = $order->get_total();
    314             $max_order_amount = ( $order_price * 1.1 );
    315             if ( self::VERBOSE ) {
    316                 echo "max_order_amount: $max_order_amount" . PHP_EOL;
    317             }
    318 
    319             if ( $mandate_amount >= $max_order_amount ) {
    320                 $mandate_successful = true;
    321                 if ( self::VERBOSE ) {
    322                     echo "payment is enough" . PHP_EOL;
    323                 }
    324             } else if ( self::VERBOSE ) {
    325                 echo "payment is too small" . PHP_EOL;
    326             }
    327         }
    328         if ( $webhook_status === "Success" ) {
    329 //                if ($order_status === "processing") {
    330             // order is already marked as processing, nothing more is necessary
    331 //                } else
    332             // check if maximum of order does not exceed mandate size based on user metadata
    333             if ( ( $order_status === "pending" ) && $mandate_successful ) {
    334                 $order->update_status( 'processing', __( 'Betaling is gelukt en goedgekeurd; via webhook', 'wc-gateway-bluem' ) );
    335             }
    336         } elseif ( $webhook_status === "Cancelled" ) {
    337             $order->update_status( 'cancelled', __( 'Betaling is geannuleerd; via webhook', 'wc-gateway-bluem' ) );
    338 
    339 //            elseif ($webhook_status === "Open" || $webhook_status == "Pending") {
    340             // if the webhook is still open or pending, nothing has to be done yet
    341         } elseif ( $webhook_status === "Expired" ) {
    342             $order->update_status( 'failed', __( 'Betaling is verlopen; via webhook', 'wc-gateway-bluem' ) );
    343         } else {
    344             $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status; via webhook', 'wc-gateway-bluem' ) );
    345         }
    346         exit;
    347302    }
    348303
  • bluem/trunk/gateways/Bluem_Mandates_Payment_Gateway.php

    r2959619 r2981398  
    88class Bluem_Mandates_Payment_Gateway extends Bluem_Payment_Gateway
    99{
    10     protected $_show_fields = false;
    11 
    12     /**
    13     * Class constructor
    14     */
    15     public function __construct()
    16     {
     10    protected $_show_fields = false;
     11
     12    /**
     13    * Class constructor
     14    */
     15    public function __construct()
     16    {
    1717        $methodDescription = 'eMandate Payment Gateway voor WordPress - WooCommerce.';
    1818
     
    2121            'Bluem Digitaal Incassomachtiging (eMandate)',
    2222            $methodDescription,
    23             home_url( 'wc-api/bluem_mandates_callback' )
     23            home_url( 'wc-api/bluem_mandates_callback' )
    2424        );
    2525
    26         if ( isset( $this->bluem_config->localInstrumentCode ) && $this->bluem_config->localInstrumentCode == "B2B" ) {
    27             $this->method_title = 'Bluem Zakelijke Incassomachtiging (eMandate)';
    28         } else {
    29             $this->method_title = 'Bluem Particuliere Incassomachtiging (eMandate)';
    30         }
    31 
    32         $this->has_fields = true;
    33 
    34         $options = get_option( 'bluem_woocommerce_options' );
    35 
    36         if ( !empty( $options['mandatesUseDebtorWallet'] ) && $options['mandatesUseDebtorWallet'] == '1' ) {
     26        if ( isset( $this->bluem_config->localInstrumentCode ) && $this->bluem_config->localInstrumentCode == "B2B" ) {
     27            $this->method_title = 'Bluem Zakelijke Incassomachtiging (eMandate)';
     28        } else {
     29            $this->method_title = 'Bluem Particuliere Incassomachtiging (eMandate)';
     30        }
     31
     32        $this->has_fields = true;
     33
     34        $options = get_option( 'bluem_woocommerce_options' );
     35
     36        if ( !empty( $options['mandatesUseDebtorWallet'] ) && $options['mandatesUseDebtorWallet'] == '1' ) {
    3737            $this->_show_fields = true;
    3838        }
    3939
    40         // This action hook saves the settings
    41         add_action(
    42             'woocommerce_update_options_payment_gateways_' . $this->id,
    43             array( $this, 'process_admin_options' )
    44         );
    45 
    46         // ********** CREATING plugin URLs for specific functions **********
    47         add_action(
    48             'woocommerce_api_bluem_mandates_webhook',
    49             array( $this, 'bluem_mandates_webhook' ),
    50             5
    51         );
    52         add_action(
    53             'woocommerce_api_bluem_mandates_callback',
    54             array( $this, 'bluem_mandates_callback' )
    55         );
    56 
    57         // ********** Allow filtering Orders based on MandateID **********
    58         add_filter(
    59             'woocommerce_order_data_store_cpt_get_orders_query',
    60             function ( $query, $query_vars ) {
    61                 if ( ! empty( $query_vars['bluem_mandateid'] ) ) {
    62                     $query['meta_query'][] = array(
    63                         'key'   => 'bluem_mandateid',
    64                         'value' => esc_attr( $query_vars['bluem_mandateid'] ),
    65                     );
    66                 }
    67 
    68                 return $query;
    69             },
    70             10,
    71             2
    72         );
    73     }
    74 
    75     /**
    76     * Generic thank you page that redirects to the specific order page.
    77     *
    78     * @param [type] $order_id
    79     *
    80     * @return void
    81     */
    82     public function bluem_thankyou( $order_id ) {
    83         $order = wc_get_order( $order_id );
    84 
    85         $url = $order->get_checkout_order_received_url();
    86 
    87         if ( ! $order->has_status( 'failed' ) ) {
    88             wp_safe_redirect( $url );
    89             exit;
    90         }
    91 
    92         // @todo: add alternative route?
    93     }
    94 
    95     /**
    96     * Create plugin options page in admin interface
    97     *
    98     * @return void
    99     */
    100     public function init_form_fields() {
    101         $this->form_fields = apply_filters( 'wc_offline_form_fields', [
    102             'enabled'     => [
    103                 'title'       => 'Enable/Disable',
    104                 'label'       => 'Activeer de Bluem eMandate Gateway',
    105                 'type'        => 'checkbox',
    106                 'description' => '',
    107                 'default'     => 'no'
    108             ],
    109             'title'       => [
    110                 'title'       => 'Titel van betaalmethode',
    111                 'type'        => 'text',
    112                 'description' => 'Dit bepaalt de titel die de gebruiker ziet tijdens het afrekenen.',
    113                 'default'     => 'Incasso machtiging voor zakelijke Rabobank, ING of ABN AMRO rekeningen',
    114             ],
    115             'description' => [
    116                 'title'       => 'Description',
    117                 'type'        => 'textarea',
    118                 'description' => 'Dit bepaalt de beschrijving die de gebruiker ziet tijdens het afrekenen.                  ',
    119                 'default'     => 'Geef een B2B eMandate af voor een incasso voor je bestelling.',
    120             ]
    121         ] );
    122     }
    123 
    124     /**
    125     * Check if a valid mandate already exists for this user
    126     *
    127     * @param  $order Order object
    128     */
    129     private function _checkExistingMandate( $order ) {
    130         global $current_user;
    131 
    132         $order_id = $order->get_id();
    133 
    134         $user_id = $current_user->ID;
    135 
    136         $retrieved_request_from_db = false;
    137 
    138         $reason = "";
    139 
    140         $ready = false;
    141 
    142         if ( ! empty( $user_id ) ) {
    143             $request = bluem_db_get_most_recent_request( $user_id, "mandates" );
    144 
    145             if ( $request !== false ) {
    146                 $bluem_latest_mandate_entrance_code = $request->entrance_code;
    147                 $bluem_latest_mandate_id            = $request->transaction_id;
    148 
    149                 $retrieved_request_from_db = true;
    150 
    151                 $ready = true;
    152             } else {
    153                 // no latest request found, also trying in user metadata (legacy)
    154                 $user_meta = get_user_meta( $user_id );
    155 
    156                 $bluem_latest_mandate_id = null;
    157                 if ( ! empty( $user_meta['bluem_latest_mandate_id'] ) ) {
    158                     $bluem_latest_mandate_id = $user_meta['bluem_latest_mandate_id'][0];
    159 
    160                     $ready = true;
    161                 }
    162 
    163                 $bluem_latest_mandate_entrance_code = null;
    164                 if ( ! empty( $user_meta['bluem_latest_mandate_entrance_code'] ) ) {
    165                     $bluem_latest_mandate_entrance_code = $user_meta['bluem_latest_mandate_entrance_code'][0];
    166 
    167                     $ready = true;
    168                 }
    169             }
    170         }
    171 
    172         if ( $ready
    173              && ! is_null( $bluem_latest_mandate_id )
    174              && $bluem_latest_mandate_id !== ""
    175              && ! is_null( $bluem_latest_mandate_entrance_code )
    176              && $bluem_latest_mandate_entrance_code !== ""
    177         ) {
     40        // This action hook saves the settings
     41        add_action(
     42            'woocommerce_update_options_payment_gateways_' . $this->id,
     43            array( $this, 'process_admin_options' )
     44        );
     45
     46        // ********** CREATING plugin URLs for specific functions **********
     47        add_action(
     48            'woocommerce_api_bluem_mandates_webhook',
     49            array( $this, 'bluem_mandates_webhook' ),
     50            5
     51        );
     52        add_action(
     53            'woocommerce_api_bluem_mandates_callback',
     54            array( $this, 'bluem_mandates_callback' )
     55        );
     56
     57        // ********** Allow filtering Orders based on MandateID **********
     58        add_filter(
     59            'woocommerce_order_data_store_cpt_get_orders_query',
     60            function ( $query, $query_vars ) {
     61                if ( ! empty( $query_vars['bluem_mandateid'] ) ) {
     62                    $query['meta_query'][] = array(
     63                        'key'   => 'bluem_mandateid',
     64                        'value' => esc_attr( $query_vars['bluem_mandateid'] ),
     65                    );
     66                }
     67
     68                return $query;
     69            },
     70            10,
     71            2
     72        );
     73    }
     74
     75    /**
     76    * Generic thank you page that redirects to the specific order page.
     77    *
     78    * @param [type] $order_id
     79    *
     80    * @return void
     81    */
     82    public function bluem_thankyou( $order_id ) {
     83        $order = wc_get_order( $order_id );
     84
     85        $url = $order->get_checkout_order_received_url();
     86
     87        if ( ! $order->has_status( 'failed' ) ) {
     88            wp_safe_redirect( $url );
     89            exit;
     90        }
     91
     92        // @todo: add alternative route?
     93    }
     94
     95    /**
     96    * Create plugin options page in admin interface
     97    *
     98    * @return void
     99    */
     100    public function init_form_fields() {
     101        $this->form_fields = apply_filters( 'wc_offline_form_fields', [
     102            'enabled'     => [
     103                'title'       => 'Enable/Disable',
     104                'label'       => 'Activeer de Bluem eMandate Gateway',
     105                'type'        => 'checkbox',
     106                'description' => '',
     107                'default'     => 'no'
     108            ],
     109            'title'       => [
     110                'title'       => 'Titel van betaalmethode',
     111                'type'        => 'text',
     112                'description' => 'Dit bepaalt de titel die de gebruiker ziet tijdens het afrekenen.',
     113                'default'     => 'Incasso machtiging voor zakelijke Rabobank, ING of ABN AMRO rekeningen',
     114            ],
     115            'description' => [
     116                'title'       => 'Description',
     117                'type'        => 'textarea',
     118                'description' => 'Dit bepaalt de beschrijving die de gebruiker ziet tijdens het afrekenen.                  ',
     119                'default'     => 'Geef een B2B eMandate af voor een incasso voor je bestelling.',
     120            ]
     121        ] );
     122    }
     123
     124    /**
     125    * Check if a valid mandate already exists for this user
     126    *
     127    * @param  $order Order object
     128    */
     129    private function _checkExistingMandate( $order ) {
     130        global $current_user;
     131
     132        $order_id = $order->get_id();
     133
     134        $user_id = $current_user->ID;
     135
     136        $retrieved_request_from_db = false;
     137
     138        $reason = "";
     139
     140        $ready = false;
     141
     142        if ( ! empty( $user_id ) ) {
     143            $request = bluem_db_get_most_recent_request( $user_id, "mandates" );
     144
     145            if ( $request !== false ) {
     146                $bluem_latest_mandate_entrance_code = $request->entrance_code;
     147                $bluem_latest_mandate_id            = $request->transaction_id;
     148
     149                $retrieved_request_from_db = true;
     150
     151                $ready = true;
     152            } else {
     153                // no latest request found, also trying in user metadata (legacy)
     154                $user_meta = get_user_meta( $user_id );
     155
     156                $bluem_latest_mandate_id = null;
     157                if ( ! empty( $user_meta['bluem_latest_mandate_id'] ) ) {
     158                    $bluem_latest_mandate_id = $user_meta['bluem_latest_mandate_id'][0];
     159
     160                    $ready = true;
     161                }
     162
     163                $bluem_latest_mandate_entrance_code = null;
     164                if ( ! empty( $user_meta['bluem_latest_mandate_entrance_code'] ) ) {
     165                    $bluem_latest_mandate_entrance_code = $user_meta['bluem_latest_mandate_entrance_code'][0];
     166
     167                    $ready = true;
     168                }
     169            }
     170        }
     171
     172        if ( $ready
     173            && ! is_null( $bluem_latest_mandate_id )
     174            && $bluem_latest_mandate_id !== ""
     175            && ! is_null( $bluem_latest_mandate_entrance_code )
     176            && $bluem_latest_mandate_entrance_code !== ""
     177        ) {
    178178            try {
    179179                $existing_mandate_response = $this->bluem->MandateStatus(
     
    189189
    190190            if ( ! $existing_mandate_response->Status() ) {
    191                 $reason = "No / invalid bluem response for existing mandate";
    192                 // existing mandate response is not at all valid,
    193                 // continue with actual mandate process
    194             } else if (
     191                $reason = "No / invalid bluem response for existing mandate";
     192                // existing mandate response is not at all valid,
     193                // continue with actual mandate process
     194            } else if (
    195195                $existing_mandate_response->EMandateStatusUpdate->EMandateStatus->Status . "" === "Success"
    196196            ) {
     
    248248                }
    249249
    250 $reason = "Existing mandate found, but not valid";
    251 } else {
     250                $reason = "Existing mandate found, but not valid";
     251            } else {
    252252                $reason = "Existing mandate is not a successful mandate";
    253253            }
    254         } else {
    255             $reason = "Not ready, no metadata";
    256         }
    257 
    258         return array(
    259             'result'  => 'fail',
    260             'message' => $reason
    261         );
    262     }
    263 
    264     /**
     254        } else {
     255            $reason = "Not ready, no metadata";
     256        }
     257
     258        return array(
     259            'result'  => 'fail',
     260            'message' => $reason
     261        );
     262    }
     263
     264    /**
    265265     * Define payment fields
    266266     */
    267267    public function payment_fields()
    268268    {
    269         $BICs = $this->bluem->retrieveBICsForContext( "Mandates" );
    270 
    271         $description = $this->get_description();
     269        $BICs = $this->bluem->retrieveBICsForContext( "Mandates" );
     270
     271        $description = $this->get_description();
    272272
    273273        $options = [];
    274274
    275         if ( $description ) {
    276             echo wpautop( wptexturize( $description ) ); // @codingStandardsIgnoreLine.
    277         }
     275        if ( $description ) {
     276            echo wpautop( wptexturize( $description ) ); // @codingStandardsIgnoreLine.
     277        }
    278278
    279279        // Loop through BICS
     
    282282        }
    283283
    284         // Check for options
     284        // Check for options
    285285        if ( $this->_show_fields && !empty( $options ) )
    286286        {
     
    296296    /**
    297297     * Payment fields validation
    298     * @TODO
     298    * @TODO
    299299     */
    300300    public function validate_fields()
     
    303303    }
    304304
    305     /**
    306     * Process payment through Bluem portal
    307     *
    308     * @param String $order_id
    309     *
    310     * @return void
    311     */
    312     public function process_payment( $order_id )
    313     {
    314         global $current_user;
    315 
    316         $verbose = false;
    317 
    318         // Convert UTF-8 to ISO
    319         if ( ! empty( $this->bluem_config->eMandateReason ) ) {
    320             $this->bluem_config->eMandateReason = utf8_decode( $this->bluem_config->eMandateReason );
    321         } else {
    322             $this->bluem_config->eMandateReason = "Incasso machtiging";
    323         }
     305    /**
     306    * Process payment through Bluem portal
     307    *
     308    * @param String $order_id
     309    *
     310    * @return void
     311    */
     312    public function process_payment( $order_id )
     313    {
     314        global $current_user;
     315
     316        $verbose = false;
     317
     318        // Convert UTF-8 to ISO
     319        if ( ! empty( $this->bluem_config->eMandateReason ) ) {
     320            $this->bluem_config->eMandateReason = utf8_decode( $this->bluem_config->eMandateReason );
     321        } else {
     322            $this->bluem_config->eMandateReason = "Incasso machtiging";
     323        }
    324324
    325325        try {
     
    334334        $order = wc_get_order( $order_id );
    335335
    336         // $user_id = $order->get_user_id();
    337         // $user_id = get_post_meta($order_id, '_customer_user', true);
    338         // improved retrieval of user id:
    339         $user_id = $current_user->ID;
    340 
    341         $settings = get_option( 'bluem_woocommerce_options' );
    342 
    343         $check = $this->_checkExistingMandate( $order );
    344 
    345         if ( isset( $check['result'] ) && $check['result'] === "success" ) {
    346             return array(
    347                 'result'   => 'success',
    348                 'redirect' => $order->get_checkout_order_received_url()
    349             );
    350             // @todo Possibly allow different redirect after fast checkout with existing, valid, mandate.
    351         }
    352 
    353         $bluem_mandates_bic = isset($_POST['bluem_mandates_bic']) ? sanitize_text_field($_POST['bluem_mandates_bic']) : '';
    354 
    355         $order_id = $order->get_id();
    356         // update: added prefixed order ID for retries of mandate requests
    357         $prefixed_order_id = date( "His" ) . $order_id;
    358         $mandate_id = $this->bluem->CreateMandateId(
    359             $prefixed_order_id,
    360             $user_id
    361         );
     336        // $user_id = $order->get_user_id();
     337        // $user_id = get_post_meta($order_id, '_customer_user', true);
     338        // improved retrieval of user id:
     339        $user_id = $current_user->ID;
     340
     341        $settings = get_option( 'bluem_woocommerce_options' );
     342
     343        $check = $this->_checkExistingMandate( $order );
     344
     345        if ( isset( $check['result'] ) && $check['result'] === "success" ) {
     346            return array(
     347                'result'   => 'success',
     348                'redirect' => $order->get_checkout_order_received_url()
     349            );
     350            // @todo Possibly allow different redirect after fast checkout with existing, valid, mandate.
     351        }
     352
     353        $bluem_mandates_bic = isset($_POST['bluem_mandates_bic']) ? sanitize_text_field($_POST['bluem_mandates_bic']) : '';
     354
     355        $order_id = $order->get_id();
     356        // update: added prefixed order ID for retries of mandate requests
     357        $prefixed_order_id = date( "His" ) . $order_id;
     358        $mandate_id = $this->bluem->CreateMandateId(
     359            $prefixed_order_id,
     360            $user_id
     361        );
    362362
    363363        try {
     
    374374        }
    375375
    376         if ( !empty( $bluem_mandates_bic ) )
     376        if ( !empty( $bluem_mandates_bic ) )
    377377        {
    378378            $request->selectDebtorWallet( $bluem_mandates_bic );
     
    380380
    381381        // allow third parties to add additional data to the request object through this additional action
    382         $request = apply_filters(
    383             'bluem_woocommerce_enhance_mandate_request',
    384             $request
    385         );
     382        $request = apply_filters(
     383            'bluem_woocommerce_enhance_mandate_request',
     384            $request
     385        );
    386386
    387387        try {
     
    395395
    396396        if ( self::VERBOSE ) {
    397             var_dump( $order_id );
    398             var_dump( $user_id );
    399             var_dump( $mandate_id );
    400             var_dump( $response );
    401             die();
    402         }
    403 
    404         if ( $response instanceof ErrorBluemResponse ) {
    405             throw new RuntimeException( "An error occurred in the payment method. Please contact the webshop owner with this message:  " . $response->error() );
    406         }
    407 
    408         $attrs = $response->EMandateTransactionResponse->attributes();
    409 
    410         if ( ! isset( $attrs['entranceCode'] ) ) {
    411             throw new RuntimeException( "An error occurred in reading the transaction response. Please contact the webshop owner" );
    412         }
    413         $entranceCode = $attrs['entranceCode'] . "";
    414 
    415         update_post_meta( $order_id, 'bluem_entrancecode', $entranceCode );
    416         update_post_meta( $order_id, 'bluem_mandateid', $mandate_id );
    417 
    418         // https://docs.woocommerce.com/document/managing-orders/
    419         // Possible statuses: 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled',
    420 
    421         // Remove cart
    422         global $woocommerce;
    423         $woocommerce->cart->empty_cart();
    424         $order->update_status( 'pending', __( 'Awaiting Bluem eMandate Signature', 'wc-gateway-bluem' ) );
    425 
    426         if ( isset( $response->EMandateTransactionResponse->TransactionURL ) ) {
    427 
    428             // redirect cast to string, for AJAX response handling
    429             $transactionURL = ( $response->EMandateTransactionResponse->TransactionURL . "" );
    430 
    431             // Logging transaction
    432             $raw_request_object = [
    433                 'entrance_code'    => $entranceCode,
    434                 'transaction_id'   => $mandate_id,
    435                 'transaction_url'  => $transactionURL,
    436                 'user_id'          => get_current_user_id(),
    437                 'timestamp'        => date( "Y-m-d H:i:s" ),
    438                 'description'      => "Mandate request {$order_id} {$user_id}",
    439                 'debtor_reference' => "",
    440                 'type'             => "mandates",
    441                 'order_id'         => $order_id,
    442                 'payload'          => json_encode(
    443                     [
    444                         'environment'           => $this->bluem_config->environment,
    445                         'order_amount'          => $order->get_total(),
    446                         'created_mandate_id'    => $mandate_id,
    447                         'local_instrument_code' => $this->bluem_config->localInstrumentCode,
    448                         'issuing_type'          => $this->bluem_config->requestType,
    449                         'sequence_type'         => $this->bluem_config->sequenceType,
    450                         'linked_orders'         => [ $order_id ]
    451                     ]
    452                 )
    453             ];
    454 
    455             bluem_db_create_request(
    456                 $raw_request_object
    457             );
    458 
    459             return array(
    460                 'result'   => 'success',
    461                 'redirect' => $transactionURL
    462             );
    463         }
    464 
    465         return array(
    466             'result' => 'failure'
    467         );
    468     }
    469 
    470     /**
    471      * mandates_Webhook action
    472      *
    473      * @return void
    474      */
    475     public function bluem_mandates_webhook()
    476     {
    477         // @todo: update this
    478 
     397            var_dump( $order_id );
     398            var_dump( $user_id );
     399            var_dump( $mandate_id );
     400            var_dump( $response );
     401            die();
     402        }
     403
     404        if ( $response instanceof ErrorBluemResponse ) {
     405            throw new RuntimeException( "An error occurred in the payment method. Please contact the webshop owner with this message:  " . $response->error() );
     406        }
     407
     408        $attrs = $response->EMandateTransactionResponse->attributes();
     409
     410        if ( ! isset( $attrs['entranceCode'] ) ) {
     411            throw new RuntimeException( "An error occurred in reading the transaction response. Please contact the webshop owner" );
     412        }
     413        $entranceCode = $attrs['entranceCode'] . "";
     414
     415        update_post_meta( $order_id, 'bluem_entrancecode', $entranceCode );
     416        update_post_meta( $order_id, 'bluem_mandateid', $mandate_id );
     417
     418        // https://docs.woocommerce.com/document/managing-orders/
     419        // Possible statuses: 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled',
     420
     421        // Remove cart
     422        global $woocommerce;
     423        $woocommerce->cart->empty_cart();
     424        $order->update_status( 'pending', __( 'Awaiting Bluem eMandate Signature', 'wc-gateway-bluem' ) );
     425
     426        if ( isset( $response->EMandateTransactionResponse->TransactionURL ) ) {
     427
     428            // redirect cast to string, for AJAX response handling
     429            $transactionURL = ( $response->EMandateTransactionResponse->TransactionURL . "" );
     430
     431            // Logging transaction
     432            $raw_request_object = [
     433                'entrance_code'    => $entranceCode,
     434                'transaction_id'   => $mandate_id,
     435                'transaction_url'  => $transactionURL,
     436                'user_id'          => get_current_user_id(),
     437                'timestamp'        => date( "Y-m-d H:i:s" ),
     438                'description'      => "Mandate request {$order_id} {$user_id}",
     439                'debtor_reference' => "",
     440                'type'             => "mandates",
     441                'order_id'         => $order_id,
     442                'payload'          => json_encode(
     443                    [
     444                        'environment'           => $this->bluem_config->environment,
     445                        'order_amount'          => $order->get_total(),
     446                        'created_mandate_id'    => $mandate_id,
     447                        'local_instrument_code' => $this->bluem_config->localInstrumentCode,
     448                        'issuing_type'          => $this->bluem_config->requestType,
     449                        'sequence_type'         => $this->bluem_config->sequenceType,
     450                        'linked_orders'         => [ $order_id ]
     451                    ]
     452                )
     453            ];
     454
     455            bluem_db_create_request(
     456                $raw_request_object
     457            );
     458
     459            return array(
     460                'result'   => 'success',
     461                'redirect' => $transactionURL
     462            );
     463        }
     464
     465        return array(
     466            'result' => 'failure'
     467        );
     468    }
     469
     470    /**
     471     * mandates_Webhook action
     472     *
     473     * @return void
     474     */
     475    public function bluem_mandates_webhook()
     476    {
    479477        try {
    480             $this->bluem->Webhook();
     478            $webhook = $this->bluem->Webhook();
     479
     480            if ($webhook->xmlObject ?? null !== null) {
     481                if (method_exists($webhook, 'getStatus')) {
     482                    $webhook_status = $webhook->getStatus();
     483                }
     484                if (method_exists($webhook, 'getEntranceCode')) {
     485                    $entranceCode = $webhook->getEntranceCode();
     486                }
     487                if (method_exists($webhook, 'getTransactionID')) {
     488                    $transactionID = $webhook->getTransactionID();
     489                }
     490                if (method_exists($webhook, 'getMandateID')) {
     491                    $mandateID = $webhook->getMandateID();
     492                }
     493
     494                $order = $this->getOrder( $mandateID );
     495                if ( is_null( $order ) ) {
     496                    http_response_code(404);
     497                    echo "Error: No order found";
     498                    exit;
     499                }
     500                $order_status = $order->get_status();
     501
     502                if ( self::VERBOSE ) {
     503                    echo "order_status: $order_status" . PHP_EOL;
     504                    echo "webhook_status: $webhook_status" . PHP_EOL;
     505                }
     506
     507                $user_id = $user_id = $order->get_user_id();
     508
     509                $user_meta = get_user_meta( $user_id );
     510
     511                // Todo: if maxamount comes back from webhook (it should) then it can be accessed here
     512                // if (isset($user_meta['bluem_latest_mandate_amount'][0])) {
     513                //  $mandate_amount = $user_meta['bluem_latest_mandate_amount'][0];
     514                // } else {
     515                // }
     516
     517                $acceptanceReport = $webhook->getAcceptanceReportArray();
     518
     519                if ( !empty( $acceptanceReport['MaxAmount'] ) ) {
     520                    $mandate_amount = (float) ( $acceptanceReport['MaxAmount'] . "" );
     521                } else {
     522                    $mandate_amount = 0.0;    // mandate amount is not set, so it is unlimited
     523                }
     524                if ( self::VERBOSE ) {
     525                    var_dump( $mandate_amount );
     526                    echo PHP_EOL;
     527                }
     528
     529                $settings = get_option( 'bluem_woocommerce_options' );
     530
     531                if ( $settings['localInstrumentCode'] !== "B2B" ) {
     532                    $maxAmountEnabled = true;
     533                } else {
     534                    $maxAmountEnabled = ( isset( $settings['maxAmountEnabled'] ) && $settings['maxAmountEnabled'] === "1" );
     535                }
     536
     537                if ( self::VERBOSE ) {
     538                    echo "mandate_amount: {$mandate_amount}" . PHP_EOL;
     539                }
     540
     541                if ( $maxAmountEnabled ) {
     542                    $maxAmountFactor =  isset( $settings['maxAmountFactor'] )
     543                        ? (float) ( $settings['maxAmountFactor'] )
     544                        : 1.0 ;
     545
     546                    $mandate_successful = false;
     547
     548                    if ( $mandate_amount !== 0.0 ) {
     549                        $order_price = $order->get_total();
     550                        $max_order_amount = $order_price * $maxAmountFactor;
     551                        if ( self::VERBOSE ) {
     552                            echo "max_order_amount: {$max_order_amount}" . PHP_EOL;
     553                        }
     554
     555                        if ( $mandate_amount >= $max_order_amount ) {
     556                            $mandate_successful = true;
     557                            if ( self::VERBOSE ) {
     558                                echo "mandate is enough" . PHP_EOL;
     559                            }
     560                        } else if ( self::VERBOSE ) {
     561                            echo "mandate is too small" . PHP_EOL;
     562                        }
     563                    }
     564                } else {
     565                    $mandate_successful = true;
     566                }
     567
     568                if ( $webhook_status === "Success" ) {
     569                    if ($order_status === "processing") {
     570                        // order is already marked as processing, nothing more is necessary
     571                    } else {
     572                        if ( ( $order_status === "pending" ) && $mandate_successful ) {
     573                            $order->update_status(
     574                                'processing',
     575                                __(
     576                                    "Machtiging (Mandaat ID $mandateID) is gelukt en goedgekeurd; via webhook",
     577                                    'wc-gateway-bluem'
     578                                )
     579                            );
     580                        }
     581                    }
     582                } elseif ( $webhook_status === "Cancelled" ) {
     583                    $order->update_status( 'cancelled', __( 'Machtiging is geannuleerd; via webhook', 'wc-gateway-bluem' ) );
     584                } elseif ($webhook_status === "Open" || $webhook_status == "Pending") {
     585                    // if the webhook is still open or pending, nothing has to be done yet
     586                } elseif ( $webhook_status === "Expired" ) {
     587                    $order->update_status( 'failed', __( 'Machtiging is verlopen; via webhook', 'wc-gateway-bluem' ) );
     588                } else {
     589                    $order->update_status( 'failed', __( 'Machtiging is gefaald: fout of onbekende status; via webhook', 'wc-gateway-bluem' ) );
     590                }
     591                http_response_code(200);
     592                echo 'OK';
     593                exit;
     594            }
    481595        } catch ( Exception $e ) {
    482             // @todo: handle exception
    483         }
    484 
    485         $entranceCode = $statusUpdateObject->entranceCode . "";
    486         $mandateID    = $statusUpdateObject->EMandateStatus->MandateID . "";
    487 
    488         $webhook_status = $statusUpdateObject->EMandateStatus->Status . "";
    489 
    490         $order = $this->getOrder( $mandateID );
    491         if ( is_null( $order ) ) {
    492             echo "Error: No order found";
    493             exit;
    494         }
    495         $order_status = $order->get_status();
    496 
    497         if ( self::VERBOSE ) {
    498             echo "order_status: {$order_status}" . PHP_EOL;
    499             echo "webhook_status: {$webhook_status}" . PHP_EOL;
    500         }
    501 
    502         $user_id   = $user_id = $order->get_user_id();
    503         $user_meta = get_user_meta( $user_id );
    504 
    505         // Todo: if maxamount comes back from webhook (it should) then it can be accessed here
    506         // if (isset($user_meta['bluem_latest_mandate_amount'][0])) {
    507         //  $mandate_amount = $user_meta['bluem_latest_mandate_amount'][0];
    508         // } else {
    509         // }
    510 
    511         if ( isset( $statusUpdateObject->EMandateStatus->AcceptanceReport->MaxAmount ) ) {
    512             $mandate_amount = (float) ( $statusUpdateObject->EMandateStatus->AcceptanceReport->MaxAmount . "" );
    513         } else {
    514             $mandate_amount = 0.0;    // mandate amount is not set, so it is unlimited
    515         }
    516         if ( self::VERBOSE ) {
    517             var_dump( $mandate_amount );
    518             echo PHP_EOL;
    519         }
    520 
    521         $settings = get_option( 'bluem_woocommerce_options' );
    522 
    523         if ( $settings['localInstrumentCode'] !== "B2B" ) {
    524             $maxAmountEnabled = true;
    525         } else {
    526             $maxAmountEnabled = ( isset( $settings['maxAmountEnabled'] ) && $settings['maxAmountEnabled'] === "1" );
    527         }
    528 
    529         if ( self::VERBOSE ) {
    530             echo "mandate_amount: {$mandate_amount}" . PHP_EOL;
    531         }
    532 
    533         if ( $maxAmountEnabled ) {
    534 
    535             $maxAmountFactor =  isset( $settings['maxAmountFactor'] )
    536                 ? (float) ( $settings['maxAmountFactor'] )
    537                 : 1.0 ;
    538 
    539             $mandate_successful = false;
    540 
    541             if ( $mandate_amount !== 0.0 ) {
    542                 $order_price      = $order->get_total();
    543                 $max_order_amount =  $order_price * $maxAmountFactor;
    544                 if ( self::VERBOSE ) {
    545                     echo "max_order_amount: {$max_order_amount}" . PHP_EOL;
    546                 }
    547 
    548                 if ( $mandate_amount >= $max_order_amount ) {
    549                     $mandate_successful = true;
    550                     if ( self::VERBOSE ) {
    551                         echo "mandate is enough" . PHP_EOL;
    552                     }
    553                 } else if ( self::VERBOSE ) {
    554                     echo "mandate is too small" . PHP_EOL;
    555                 }
    556             }
    557         } else {
    558             $mandate_successful = true;
    559         }
    560 
    561         if ( $webhook_status === "Success" ) {
    562 //                if ($order_status === "processing") {
    563 //                    // order is already marked as processing, nothing more is necessary
    564 //                } else
    565             // check if maximum of order does not exceed mandate size based on user metadata
    566             if ( ( $order_status === "pending" ) && $mandate_successful ) {
    567                 $order->update_status(
    568                     'processing',
    569                     __(
    570                         "Machtiging (Mandaat ID $mandateID) is gelukt en goedgekeurd; via webhook",
    571                         'wc-gateway-bluem'
    572                     )
    573                 );
    574             }
    575         } elseif ( $webhook_status === "Cancelled" ) {
    576             $order->update_status( 'cancelled', __( 'Machtiging is geannuleerd; via webhook', 'wc-gateway-bluem' ) );
    577         }
    578 //            elseif ($webhook_status === "Open" || $webhook_status == "Pending") {
    579         // if the webhook is still open or pending, nothing has to be done yet
    580 //            }
    581         elseif ( $webhook_status === "Expired" ) {
    582             $order->update_status( 'failed', __( 'Machtiging is verlopen; via webhook', 'wc-gateway-bluem' ) );
    583         } else {
    584             $order->update_status( 'failed', __( 'Machtiging is gefaald: fout of onbekende status; via webhook', 'wc-gateway-bluem' ) );
    585         }
    586         exit;
    587     }
     596            http_response_code(500);
     597            echo "Error: Exception: " . $e->getMessage();
     598            exit;
     599        }
     600    }
    588601
    589602    /**
     
    594607     * @return mixed|null
    595608     */
    596     private function getOrder( string $mandateID )
    597     {
    598         $orders = wc_get_orders( array(
    599             'orderby'         => 'date',
    600             'order'           => 'DESC',
    601             'bluem_mandateid' => $mandateID
    602         ) );
    603         if ( count( $orders ) == 0 ) {
    604             return null;
    605         }
    606 
    607         return $orders[0];
    608     }
    609 
    610     /**
    611     * mandates_Callback function after Mandate process has been completed by the user
    612     * @return void
    613     */
    614     public function bluem_mandates_callback()
    615     {
    616         // $this->bluem = new Bluem( $this->bluem_config );
     609    private function getOrder( string $mandateID )
     610    {
     611        $orders = wc_get_orders( array(
     612            'orderby'         => 'date',
     613            'order'           => 'DESC',
     614            'bluem_mandateid' => $mandateID
     615        ) );
     616        if ( count( $orders ) == 0 ) {
     617            return null;
     618        }
     619
     620        return $orders[0];
     621    }
     622
     623    /**
     624    * mandates_Callback function after Mandate process has been completed by the user
     625    * @return void
     626    */
     627    public function bluem_mandates_callback()
     628    {
     629        // $this->bluem = new Bluem( $this->bluem_config );
    617630        // dont recreate it here, it should already exist in the gateway!
    618631
    619         if ( ! isset( $_GET['mandateID'] ) ) {
    620             $errormessage = "Fout: geen juist mandaat id teruggekregen bij mandates_callback. Neem contact op met de webshop en vermeld je contactgegevens.";
    621             bluem_error_report_email(
    622                 [
    623                     'service'  => 'mandates',
    624                     'function' => 'mandates_callback',
    625                     'message'  => $errormessage
    626                 ]
    627             );
    628             bluem_dialogs_render_prompt( $errormessage );
    629             exit;
    630         }
    631 
    632         if ( $_GET['mandateID'] == "" ) {
    633             $errormessage = "Fout: geen juist mandaat id teruggekregen bij mandates_callback. Neem contact op met de webshop en vermeld je contactgegevens.";
    634             bluem_error_report_email(
    635                 [
    636                     'service'  => 'mandates',
    637                     'function' => 'mandates_callback',
    638                     'message'  => $errormessage
    639                 ]
    640             );
    641             bluem_dialogs_render_prompt( $errormessage );
    642             exit;
    643         }
    644         $mandateID = $_GET['mandateID'];
    645 
    646         $order = $this->getOrder( $mandateID );
    647         if ( is_null( $order ) ) {
    648             $errormessage = "Fout: mandaat niet gevonden in webshop. Neem contact op met de webshop en vermeld de code {$mandateID} bij je gegevens.";
    649             bluem_error_report_email(
    650                 [
    651                     'service'  => 'mandates',
    652                     'function' => 'mandates_callback',
    653                     'message'  => $errormessage
    654                 ]
    655             );
    656             bluem_dialogs_render_prompt( $errormessage );
    657             exit;
    658         }
    659 
    660         $request_from_db = bluem_db_get_request_by_transaction_id_and_type(
    661             $mandateID,
    662             "mandates"
    663         );
    664 
    665         if ( ! $request_from_db ) {
    666             // @todo: give an error, as this transaction has clearly not been saved
    667 
    668             $entranceCode = $order->get_meta( 'bluem_entrancecode' );
    669         }
    670 
    671         $entranceCode = $request_from_db->entrance_code;
     632        if ( ! isset( $_GET['mandateID'] ) ) {
     633            $errormessage = "Fout: geen juist mandaat id teruggekregen bij mandates_callback. Neem contact op met de webshop en vermeld je contactgegevens.";
     634            bluem_error_report_email(
     635                [
     636                    'service'  => 'mandates',
     637                    'function' => 'mandates_callback',
     638                    'message'  => $errormessage
     639                ]
     640            );
     641            bluem_dialogs_render_prompt( $errormessage );
     642            exit;
     643        }
     644
     645        if ( $_GET['mandateID'] == "" ) {
     646            $errormessage = "Fout: geen juist mandaat id teruggekregen bij mandates_callback. Neem contact op met de webshop en vermeld je contactgegevens.";
     647            bluem_error_report_email(
     648                [
     649                    'service'  => 'mandates',
     650                    'function' => 'mandates_callback',
     651                    'message'  => $errormessage
     652                ]
     653            );
     654            bluem_dialogs_render_prompt( $errormessage );
     655            exit;
     656        }
     657        $mandateID = $_GET['mandateID'];
     658
     659        $order = $this->getOrder( $mandateID );
     660        if ( is_null( $order ) ) {
     661            $errormessage = "Fout: mandaat niet gevonden in webshop. Neem contact op met de webshop en vermeld de code {$mandateID} bij je gegevens.";
     662            bluem_error_report_email(
     663                [
     664                    'service'  => 'mandates',
     665                    'function' => 'mandates_callback',
     666                    'message'  => $errormessage
     667                ]
     668            );
     669            bluem_dialogs_render_prompt( $errormessage );
     670            exit;
     671        }
     672
     673        $request_from_db = bluem_db_get_request_by_transaction_id_and_type(
     674            $mandateID,
     675            "mandates"
     676        );
     677
     678        if ( ! $request_from_db ) {
     679            // @todo: give an error, as this transaction has clearly not been saved
     680
     681            $entranceCode = $order->get_meta( 'bluem_entrancecode' );
     682        }
     683
     684        $entranceCode = $request_from_db->entrance_code;
    672685
    673686        try {
     
    687700
    688701        if ( ! $response->Status() ) {
    689             $errormessage = "Fout bij opvragen status: " . $response->Error() . "<br>Neem contact op met de webshop en vermeld deze status";
    690             bluem_error_report_email(
    691                 [
    692                     'service'  => 'mandates',
    693                     'function' => 'mandates_callback',
    694                     'message'  => $errormessage
    695                 ]
    696             );
    697             bluem_dialogs_render_prompt( $errormessage );
    698             exit;
    699         }
    700 
    701         if ( self::VERBOSE ) {
    702             var_dump( "mandateid: " . $mandateID );
    703             var_dump( "entrancecode: " . $entranceCode );
    704             echo "<hr>";
    705             var_dump( $response );
    706             echo "<hr>";
    707         }
    708 
    709         $statusUpdateObject = $response->EMandateStatusUpdate;
    710         $statusCode         = $statusUpdateObject->EMandateStatus->Status . "";
    711 
    712         // $request_from_db = bluem_db_get_request_by_transaction_id($mandateID);
    713         if ( $statusCode !== $request_from_db->status ) {
    714             bluem_db_update_request(
    715                 $request_from_db->id,
    716                 [
    717                     'status' => $statusCode
    718                 ]
    719             );
    720         }
    721         if ( $statusCode === "Success" ) {
    722             if ( $request_from_db->id !== "" ) {
    723                 $new_data = [];
    724                 if ( isset( $response->EMandateStatusUpdate->EMandateStatus->PurchaseID ) ) {
    725                     $new_data['purchaseID'] = $response
    726                                                   ->EMandateStatusUpdate->EMandateStatus->PurchaseID . "";
    727                 }
    728                 if ( isset( $response->EMandateStatusUpdate->EMandateStatus->AcceptanceReport ) ) {
    729                     $new_data['report'] = $response
    730                         ->EMandateStatusUpdate->EMandateStatus->AcceptanceReport;
    731                 }
    732                 if ( count( $new_data ) > 0 ) {
    733                     bluem_db_put_request_payload(
    734                         $request_from_db->id,
    735                         $new_data
    736                     );
    737                 }
    738             }
    739             $this->validateMandate(
    740                 $response, $order, true, true,
    741                 true, $mandateID, $entranceCode
    742             );
    743         } elseif ( $statusCode === "Pending" ) {
    744             bluem_dialogs_render_prompt(
    745                 "<p>Uw machtiging wacht op goedkeuring van
     702            $errormessage = "Fout bij opvragen status: " . $response->Error() . "<br>Neem contact op met de webshop en vermeld deze status";
     703            bluem_error_report_email(
     704                [
     705                    'service'  => 'mandates',
     706                    'function' => 'mandates_callback',
     707                    'message'  => $errormessage
     708                ]
     709            );
     710            bluem_dialogs_render_prompt( $errormessage );
     711            exit;
     712        }
     713
     714        if ( self::VERBOSE ) {
     715            var_dump( "mandateid: " . $mandateID );
     716            var_dump( "entrancecode: " . $entranceCode );
     717            echo "<hr>";
     718            var_dump( $response );
     719            echo "<hr>";
     720        }
     721
     722        $statusUpdateObject = $response->EMandateStatusUpdate;
     723        $statusCode         = $statusUpdateObject->EMandateStatus->Status . "";
     724
     725        // $request_from_db = bluem_db_get_request_by_transaction_id($mandateID);
     726        if ( $statusCode !== $request_from_db->status ) {
     727            bluem_db_update_request(
     728                $request_from_db->id,
     729                [
     730                    'status' => $statusCode
     731                ]
     732            );
     733        }
     734        if ( $statusCode === "Success" ) {
     735            if ( $request_from_db->id !== "" ) {
     736                $new_data = [];
     737                if ( isset( $response->EMandateStatusUpdate->EMandateStatus->PurchaseID ) ) {
     738                    $new_data['purchaseID'] = $response
     739                            ->EMandateStatusUpdate->EMandateStatus->PurchaseID . "";
     740                }
     741                if ( isset( $response->EMandateStatusUpdate->EMandateStatus->AcceptanceReport ) ) {
     742                    $new_data['report'] = $response
     743                        ->EMandateStatusUpdate->EMandateStatus->AcceptanceReport;
     744                }
     745                if ( count( $new_data ) > 0 ) {
     746                    bluem_db_put_request_payload(
     747                        $request_from_db->id,
     748                        $new_data
     749                    );
     750                }
     751            }
     752            $this->validateMandate(
     753                $response, $order, true, true,
     754                true, $mandateID, $entranceCode
     755            );
     756        } elseif ( $statusCode === "Pending" ) {
     757            bluem_dialogs_render_prompt(
     758                "<p>Uw machtiging wacht op goedkeuring van
    746759                    een andere ondertekenaar namens uw organisatie.<br>
    747760                    Deze persoon dient in te loggen op internet bankieren
     
    749762                    Hierna is de machtiging goedgekeurd en zal dit
    750763                    reageren op deze site.</p>"
    751             );
    752             exit;
    753         } elseif ( $statusCode === "Cancelled" ) {
    754             $order->update_status(
    755                 'cancelled',
    756                 __( 'Machtiging is geannuleerd', 'wc-gateway-bluem' )
    757             );
    758 
    759             bluem_transaction_notification_email(
    760                 $request_from_db->id
    761             );
    762             bluem_dialogs_render_prompt( "Je hebt de mandaat ondertekening geannuleerd" );
    763             // terug naar order pagina om het opnieuw te proberen?
    764             exit;
    765         } elseif ( $statusCode === "Open" || $statusCode == "Pending" ) {
    766             bluem_dialogs_render_prompt( "De mandaat ondertekening is nog niet bevestigd. Dit kan even duren maar gebeurt automatisch." );
    767             // callback pagina beschikbaar houden om het opnieuw te proberen?
    768             // is simpelweg SITE/wc-api/bluem_callback?mandateID=$mandateID
    769             exit;
    770         } elseif ( $statusCode === "Expired" ) {
    771             $order->update_status(
    772                 'failed',
    773                 __(
    774                     'Machtiging is verlopen',
    775                     'wc-gateway-bluem'
    776                 )
    777             );
    778 
    779             bluem_transaction_notification_email(
    780                 $request_from_db->id
    781             );
    782 
    783             bluem_dialogs_render_prompt(
    784                 "Fout: De mandaat of het verzoek daartoe is verlopen"
    785             );
    786             exit;
    787         } else {
    788             $order->update_status(
    789                 'failed',
    790                 __(
    791                     'Machtiging is gefaald: fout of onbekende status',
    792                     'wc-gateway-bluem'
    793                 )
    794             );
    795             $errormessage = "Fout: Onbekende of foutieve status teruggekregen: {$statusCode}
     764            );
     765            exit;
     766        } elseif ( $statusCode === "Cancelled" ) {
     767            $order->update_status(
     768                'cancelled',
     769                __( 'Machtiging is geannuleerd', 'wc-gateway-bluem' )
     770            );
     771
     772            bluem_transaction_notification_email(
     773                $request_from_db->id
     774            );
     775            bluem_dialogs_render_prompt( "Je hebt de mandaat ondertekening geannuleerd" );
     776            // terug naar order pagina om het opnieuw te proberen?
     777            exit;
     778        } elseif ( $statusCode === "Open" || $statusCode == "Pending" ) {
     779            bluem_dialogs_render_prompt( "De mandaat ondertekening is nog niet bevestigd. Dit kan even duren maar gebeurt automatisch." );
     780            // callback pagina beschikbaar houden om het opnieuw te proberen?
     781            // is simpelweg SITE/wc-api/bluem_callback?mandateID=$mandateID
     782            exit;
     783        } elseif ( $statusCode === "Expired" ) {
     784            $order->update_status(
     785                'failed',
     786                __(
     787                    'Machtiging is verlopen',
     788                    'wc-gateway-bluem'
     789                )
     790            );
     791
     792            bluem_transaction_notification_email(
     793                $request_from_db->id
     794            );
     795
     796            bluem_dialogs_render_prompt(
     797                "Fout: De mandaat of het verzoek daartoe is verlopen"
     798            );
     799            exit;
     800        } else {
     801            $order->update_status(
     802                'failed',
     803                __(
     804                    'Machtiging is gefaald: fout of onbekende status',
     805                    'wc-gateway-bluem'
     806                )
     807            );
     808            $errormessage = "Fout: Onbekende of foutieve status teruggekregen: {$statusCode}
    796809                    <br>Neem contact op met de webshop en vermeld deze status";
    797             bluem_error_report_email(
    798                 [
    799                     'service'  => 'mandates',
    800                     'function' => 'mandates_callback',
    801                     'message'  => $errormessage
    802                 ]
    803             );
    804 
    805             bluem_dialogs_render_prompt(
    806                 $errormessage
    807             );
    808             exit;
    809         }
     810            bluem_error_report_email(
     811                [
     812                    'service'  => 'mandates',
     813                    'function' => 'mandates_callback',
     814                    'message'  => $errormessage
     815                ]
     816            );
     817
     818            bluem_dialogs_render_prompt(
     819                $errormessage
     820            );
     821            exit;
     822        }
    810823        exit;
    811     }
    812 
    813     /**
    814     * Validating a given mandate based on MaxAmount given in $response, compared to $order total pricing and some additional parameters
    815     *
    816     * @param [type] $response
    817     * @param [type] $order
    818     * @param boolean $block_processing
    819     * @param boolean $update_metadata
    820     * @param [type] $mandate_id
    821     * @param [type] $entrance_code
    822     *
    823     * @return bool
     824    }
     825
     826    /**
     827    * Validating a given mandate based on MaxAmount given in $response, compared to $order total pricing and some additional parameters
     828    *
     829    * @param [type] $response
     830    * @param [type] $order
     831    * @param boolean $block_processing
     832    * @param boolean $update_metadata
     833    * @param [type] $mandate_id
     834    * @param [type] $entrance_code
     835    *
     836    * @return bool
    824837     */
    825     private function validateMandate( $response, $order, $block_processing = false, $update_metadata = true, $redirect = true, $mandate_id = null, $entrance_code = null )
    826     {
    827         $maxAmountResponse = $this->bluem->GetMaximumAmountFromTransactionResponse( $response );
    828         $user_id           = $order->get_user_id();
     838    private function validateMandate( $response, $order, $block_processing = false, $update_metadata = true, $redirect = true, $mandate_id = null, $entrance_code = null )
     839    {
     840        $maxAmountResponse = $this->bluem->GetMaximumAmountFromTransactionResponse( $response );
     841        $user_id           = $order->get_user_id();
    829842
    830843        // @todo: remove mandate ID from parameters and get it here:
    831         $mandate_id = $response->EMandateStatusUpdate->EMandateStatus->MandateID . "";
    832 
    833         $settings         = get_option( 'bluem_woocommerce_options' );
    834         $maxAmountEnabled = ( isset( $settings['maxAmountEnabled'] ) && $settings['maxAmountEnabled'] === "1" );
    835         if ( $maxAmountEnabled ) {
    836             $maxAmountFactor = ( isset( $settings['maxAmountFactor'] ) ? (float) ( $settings['maxAmountFactor'] ) : false );
    837         } else {
    838             $maxAmountFactor = 1.0;
    839         }
    840 
    841         $successful_mandate = false;
    842 
    843         $request_id      = "";
    844         $request_from_db = false;
    845         if ( ! empty( $mandate_id ) ) {
    846             $request_from_db = bluem_db_get_request_by_transaction_id_and_type(
    847                 $mandate_id,
    848                 "mandates"
    849             );
    850 
    851             $request_id = $request_from_db->id;
    852         }
    853 
    854         if ( $maxAmountEnabled ) {
    855 
    856             // NextDeli specific: estimate 10% markup on order total:
    857             $order_total_plus = (float) $order->get_total() * $maxAmountFactor;
    858 
    859             if ( self::VERBOSE ) {
    860                 if ( $maxAmountResponse->amount === 0.0 ) {
    861                     echo "No max amount set";
    862                 } else {
    863                     echo "MAX AMOUNT SET AT {$maxAmountResponse->amount} {$maxAmountResponse->currency}";
    864                 }
    865                 echo "<hr>";
    866                 echo "Totaalbedrag: ";
    867                 var_dump( (float) $order->get_total() );
    868                 echo " | totaalbedrag +10 procent: ";
    869                 var_dump( $order_total_plus );
    870                 echo "<hr>";
    871             }
    872 
    873             if ( isset( $maxAmountResponse->amount ) && $maxAmountResponse->amount !== 0.0 ) {
    874                 if ( $update_metadata ) {
    875                     if ( self::VERBOSE ) {
    876                         echo "<br>updating user meta: bluem_latest_mandate_amount to value {$maxAmountResponse->amount} - result: ";
    877                     }
    878                     update_user_meta(
    879                         $user_id,
    880                         'bluem_latest_mandate_amount',
    881                         $maxAmountResponse->amount
    882                     );
    883                 }
    884                 $allowed_margin = ( $order_total_plus <= $maxAmountResponse->amount );
    885                 if ( self::VERBOSE ) {
    886                     echo "binnen machtiging marge?";
    887                     var_dump( $allowed_margin );
    888                 }
    889 
    890                 if ( $allowed_margin ) {
    891                     $successful_mandate = true;
    892                 } else if ( $block_processing ) {
     844        $mandate_id = $response->EMandateStatusUpdate->EMandateStatus->MandateID . "";
     845
     846        $settings         = get_option( 'bluem_woocommerce_options' );
     847        $maxAmountEnabled = ( isset( $settings['maxAmountEnabled'] ) && $settings['maxAmountEnabled'] === "1" );
     848        if ( $maxAmountEnabled ) {
     849            $maxAmountFactor = ( isset( $settings['maxAmountFactor'] ) ? (float) ( $settings['maxAmountFactor'] ) : false );
     850        } else {
     851            $maxAmountFactor = 1.0;
     852        }
     853
     854        $successful_mandate = false;
     855
     856        $request_id      = "";
     857        $request_from_db = false;
     858        if ( ! empty( $mandate_id ) ) {
     859            $request_from_db = bluem_db_get_request_by_transaction_id_and_type(
     860                $mandate_id,
     861                "mandates"
     862            );
     863
     864            $request_id = $request_from_db->id;
     865        }
     866
     867        if ( $maxAmountEnabled ) {
     868
     869            // NextDeli specific: estimate 10% markup on order total:
     870            $order_total_plus = (float) $order->get_total() * $maxAmountFactor;
     871
     872            if ( self::VERBOSE ) {
     873                if ( $maxAmountResponse->amount === 0.0 ) {
     874                    echo "No max amount set";
     875                } else {
     876                    echo "MAX AMOUNT SET AT {$maxAmountResponse->amount} {$maxAmountResponse->currency}";
     877                }
     878                echo "<hr>";
     879                echo "Totaalbedrag: ";
     880                var_dump( (float) $order->get_total() );
     881                echo " | totaalbedrag +10 procent: ";
     882                var_dump( $order_total_plus );
     883                echo "<hr>";
     884            }
     885
     886            if ( isset( $maxAmountResponse->amount ) && $maxAmountResponse->amount !== 0.0 ) {
     887                if ( $update_metadata ) {
     888                    if ( self::VERBOSE ) {
     889                        echo "<br>updating user meta: bluem_latest_mandate_amount to value {$maxAmountResponse->amount} - result: ";
     890                    }
     891                    update_user_meta(
     892                        $user_id,
     893                        'bluem_latest_mandate_amount',
     894                        $maxAmountResponse->amount
     895                    );
     896                }
     897                $allowed_margin = ( $order_total_plus <= $maxAmountResponse->amount );
     898                if ( self::VERBOSE ) {
     899                    echo "binnen machtiging marge?";
     900                    var_dump( $allowed_margin );
     901                }
     902
     903                if ( $allowed_margin ) {
     904                    $successful_mandate = true;
     905                } else if ( $block_processing ) {
    893906                    $order->update_status( 'pending', __( 'Machtiging moet opnieuw ondertekend worden, want mandaat bedrag is te laag', 'wc-gateway-bluem' ) );
    894907
     
    915928                    exit;
    916929                }
    917             } else {
    918                 if ( $update_metadata ) {
    919                     if ( self::VERBOSE ) {
    920                         echo "<br>updating user meta: bluem_latest_mandate_amount to value 0 - result: ";
    921                     }
    922                     update_user_meta( $user_id, 'bluem_latest_mandate_amount', 0 );
    923                 }
    924                 $successful_mandate = true;
    925             }
    926         } else {
    927             // no maxamount check, so just continue;
    928             $successful_mandate = true;
    929         }
    930 
    931         if ( $update_metadata ) {
    932             if ( self::VERBOSE ) {
    933                 echo "<br>updating user meta: bluem_latest_mandate_validated to value {$successful_mandate} - result: ";
    934             }
    935             update_user_meta(
    936                 $user_id,
    937                 'bluem_latest_mandate_validated',
    938                 $successful_mandate
    939             );
    940         }
    941 
    942         if ( $successful_mandate ) {
    943             if ( $update_metadata ) {
    944                 if ( $mandate_id !== "" ) {
    945                     if ( self::VERBOSE ) {
    946                         echo "<br>updating user meta: bluem_latest_mandate_id to value {$mandate_id} - result: ";
    947                     }
    948                     update_user_meta(
    949                         $user_id,
    950                         'bluem_latest_mandate_id',
    951                         $mandate_id
    952                     );
    953                 }
    954                 if ( $entrance_code !== "" ) {
    955                     if ( self::VERBOSE ) {
    956                         echo "<br>updating user meta: entranceCode to value {$entrance_code} - result: ";
    957                     }
    958                     update_user_meta(
    959                         $user_id,
    960                         'bluem_latest_mandate_entrance_code',
    961                         $entrance_code
    962                     );
    963                 }
    964             }
    965 
    966             if ( self::VERBOSE ) {
    967                 echo "mandaat is succesvol, order kan worden aangepast naar machtiging_goedgekeurd";
    968             }
    969 
    970             $order->update_status(
    971                 'processing',
    972                 __(
    973                     "Machtiging (mandaat ID {$mandate_id}, verzoek ID {$request_id}
     930            } else {
     931                if ( $update_metadata ) {
     932                    if ( self::VERBOSE ) {
     933                        echo "<br>updating user meta: bluem_latest_mandate_amount to value 0 - result: ";
     934                    }
     935                    update_user_meta( $user_id, 'bluem_latest_mandate_amount', 0 );
     936                }
     937                $successful_mandate = true;
     938            }
     939        } else {
     940            // no maxamount check, so just continue;
     941            $successful_mandate = true;
     942        }
     943
     944        if ( $update_metadata ) {
     945            if ( self::VERBOSE ) {
     946                echo "<br>updating user meta: bluem_latest_mandate_validated to value {$successful_mandate} - result: ";
     947            }
     948            update_user_meta(
     949                $user_id,
     950                'bluem_latest_mandate_validated',
     951                $successful_mandate
     952            );
     953        }
     954
     955        if ( $successful_mandate ) {
     956            if ( $update_metadata ) {
     957                if ( $mandate_id !== "" ) {
     958                    if ( self::VERBOSE ) {
     959                        echo "<br>updating user meta: bluem_latest_mandate_id to value {$mandate_id} - result: ";
     960                    }
     961                    update_user_meta(
     962                        $user_id,
     963                        'bluem_latest_mandate_id',
     964                        $mandate_id
     965                    );
     966                }
     967                if ( $entrance_code !== "" ) {
     968                    if ( self::VERBOSE ) {
     969                        echo "<br>updating user meta: entranceCode to value {$entrance_code} - result: ";
     970                    }
     971                    update_user_meta(
     972                        $user_id,
     973                        'bluem_latest_mandate_entrance_code',
     974                        $entrance_code
     975                    );
     976                }
     977            }
     978
     979            if ( self::VERBOSE ) {
     980                echo "mandaat is succesvol, order kan worden aangepast naar machtiging_goedgekeurd";
     981            }
     982
     983            $order->update_status(
     984                'processing',
     985                __(
     986                    "Machtiging (mandaat ID {$mandate_id}, verzoek ID {$request_id}
    974987                        is gelukt en goedgekeurd",
    975                     'wc-gateway-bluem'
    976                 )
    977             );
    978 
    979             bluem_transaction_notification_email(
    980                 $request_id
    981             );
    982 
    983             do_action(
    984                 'bluem_woocommerce_valid_mandate_callback',
    985                 $user_id,
    986                 $response
    987             );
    988 
    989             if ( $redirect ) {
    990                 if ( self::VERBOSE ) {
    991                     die();
    992                 }
    993                 $this->bluem_thankyou( $order->get_id() );
    994             }
     988                    'wc-gateway-bluem'
     989                )
     990            );
     991
     992            bluem_transaction_notification_email(
     993                $request_id
     994            );
     995
     996            do_action(
     997                'bluem_woocommerce_valid_mandate_callback',
     998                $user_id,
     999                $response
     1000            );
     1001
     1002            if ( $redirect ) {
     1003                if ( self::VERBOSE ) {
     1004                    die();
     1005                }
     1006                $this->bluem_thankyou( $order->get_id() );
     1007            }
    9951008
    9961009            return true;
    997         }
     1010        }
    9981011        return false;
    999     }
     1012    }
    10001013}
  • bluem/trunk/readme.txt

    r2975761 r2981398  
    66Tested up to: 6.3
    77Requires PHP: 7.4
    8 Stable tag: 1.3.17.9
     8Stable tag: 1.3.17.10
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676
    7777== Changelog ==
     78- 1.3.17.10: Updated eMandates BIC list in PHP library and webhook improvements.
    7879- 1.3.17.9: Updated BIC list in PHP library. Some improvements.
    7980- 1.3.17.8: Updated BIC list PHP library. Some improvements.
  • bluem/trunk/vendor/bluem-development/bluem-php/README.md

    r2975761 r2981398  
    865865- Yoursafe   <BR> BIC: `BITSNL2A`
    866866- N26   <BR> BIC: `NTSBDEB1`
     867- Nationale-Nederlanden   <BR> BIC: `NNBANL2G`
    867868#### eMandates CORE
    868869- ABN AMRO  <BR> BIC: `ABNANL2A`
    869870- ASN Bank  <BR> BIC: `ASNBNL21`
    870871- ING   <BR> BIC: `INGBNL2A`
    871 - Knab  <BR> BIC: `KNABNL2H`
    872872- Rabobank  <BR> BIC: `RABONL2U`
    873873- RegioBank <BR> BIC: `RBRBNL21`
  • bluem/trunk/vendor/bluem-development/bluem-php/composer.json

    r2959619 r2981398  
    2222        "ext-curl": "*",
    2323        "ext-json": "*",
    24         "ext-openssl": "*"
     24        "ext-openssl": "*",
     25        "selective/xmldsig": "^3.0"
    2526    },
    2627    "autoload": {
  • bluem/trunk/vendor/bluem-development/bluem-php/composer.lock

    r2959619 r2981398  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "f8322c0c1b0af5e8a86dc7ba3717ab76",
    8     "packages": [],
     7    "content-hash": "48c42aa13be174ca13f0c70933f78e00",
     8    "packages": [
     9        {
     10            "name": "selective/xmldsig",
     11            "version": "3.0.0",
     12            "source": {
     13                "type": "git",
     14                "url": "https://github.com/selective-php/xmldsig.git",
     15                "reference": "fb9cdf2ecfcf4b65931db8796c7336a43b607d73"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/selective-php/xmldsig/zipball/fb9cdf2ecfcf4b65931db8796c7336a43b607d73",
     20                "reference": "fb9cdf2ecfcf4b65931db8796c7336a43b607d73",
     21                "shasum": ""
     22            },
     23            "require": {
     24                "ext-dom": "*",
     25                "ext-openssl": "*",
     26                "php": "~8.0 || ~8.1 || ~8.2"
     27            },
     28            "require-dev": {
     29                "friendsofphp/php-cs-fixer": "^3",
     30                "phpstan/phpstan": "^1",
     31                "phpunit/phpunit": "^9 || ^10",
     32                "squizlabs/php_codesniffer": "^3",
     33                "starkbank/ecdsa": "^2.0"
     34            },
     35            "type": "library",
     36            "autoload": {
     37                "psr-4": {
     38                    "Selective\\XmlDSig\\": "src/"
     39                }
     40            },
     41            "notification-url": "https://packagist.org/downloads/",
     42            "license": [
     43                "MIT"
     44            ],
     45            "description": "Sign XML Documents with Digital Signatures",
     46            "homepage": "https://github.com/selective-php/xmldsig",
     47            "keywords": [
     48                "signatures",
     49                "verify",
     50                "xml",
     51                "xmldsig"
     52            ],
     53            "support": {
     54                "issues": "https://github.com/selective-php/xmldsig/issues",
     55                "source": "https://github.com/selective-php/xmldsig/tree/3.0.0"
     56            },
     57            "abandoned": "robrichards/xmlseclibs",
     58            "time": "2023-01-28T18:17:36+00:00"
     59        }
     60    ],
    961    "packages-dev": [
    1062        {
    1163            "name": "doctrine/deprecations",
    12             "version": "v1.1.1",
     64            "version": "1.1.2",
    1365            "source": {
    1466                "type": "git",
    1567                "url": "https://github.com/doctrine/deprecations.git",
    16                 "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
    17             },
    18             "dist": {
    19                 "type": "zip",
    20                 "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
    21                 "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
     68                "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
     69            },
     70            "dist": {
     71                "type": "zip",
     72                "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
     73                "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
    2274                "shasum": ""
    2375            },
     
    51103            "support": {
    52104                "issues": "https://github.com/doctrine/deprecations/issues",
    53                 "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
    54             },
    55             "time": "2023-06-03T09:27:29+00:00"
     105                "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
     106            },
     107            "time": "2023-09-27T20:04:15+00:00"
    56108        },
    57109        {
    58110            "name": "doctrine/instantiator",
    59             "version": "2.0.0",
     111            "version": "1.5.0",
    60112            "source": {
    61113                "type": "git",
    62114                "url": "https://github.com/doctrine/instantiator.git",
    63                 "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
    64             },
    65             "dist": {
    66                 "type": "zip",
    67                 "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
    68                 "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
    69                 "shasum": ""
    70             },
    71             "require": {
    72                 "php": "^8.1"
     115                "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
     116            },
     117            "dist": {
     118                "type": "zip",
     119                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
     120                "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
     121                "shasum": ""
     122            },
     123            "require": {
     124                "php": "^7.1 || ^8.0"
    73125            },
    74126            "require-dev": {
    75                 "doctrine/coding-standard": "^11",
     127                "doctrine/coding-standard": "^9 || ^11",
    76128                "ext-pdo": "*",
    77129                "ext-phar": "*",
    78                 "phpbench/phpbench": "^1.2",
    79                 "phpstan/phpstan": "^1.9.4",
    80                 "phpstan/phpstan-phpunit": "^1.3",
    81                 "phpunit/phpunit": "^9.5.27",
    82                 "vimeo/psalm": "^5.4"
     130                "phpbench/phpbench": "^0.16 || ^1",
     131                "phpstan/phpstan": "^1.4",
     132                "phpstan/phpstan-phpunit": "^1",
     133                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
     134                "vimeo/psalm": "^4.30 || ^5.4"
    83135            },
    84136            "type": "library",
     
    107159            "support": {
    108160                "issues": "https://github.com/doctrine/instantiator/issues",
    109                 "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
     161                "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
    110162            },
    111163            "funding": [
     
    123175                }
    124176            ],
    125             "time": "2022-12-30T00:23:10+00:00"
     177            "time": "2022-12-30T00:15:36+00:00"
    126178        },
    127179        {
     
    296348        {
    297349            "name": "nikic/php-parser",
    298             "version": "v4.16.0",
     350            "version": "v4.17.1",
    299351            "source": {
    300352                "type": "git",
    301353                "url": "https://github.com/nikic/PHP-Parser.git",
    302                 "reference": "19526a33fb561ef417e822e85f08a00db4059c17"
    303             },
    304             "dist": {
    305                 "type": "zip",
    306                 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17",
    307                 "reference": "19526a33fb561ef417e822e85f08a00db4059c17",
     354                "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
     355            },
     356            "dist": {
     357                "type": "zip",
     358                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
     359                "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
    308360                "shasum": ""
    309361            },
     
    346398            "support": {
    347399                "issues": "https://github.com/nikic/PHP-Parser/issues",
    348                 "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0"
    349             },
    350             "time": "2023-06-25T14:52:30+00:00"
     400                "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
     401            },
     402            "time": "2023-08-13T19:53:39+00:00"
    351403        },
    352404        {
     
    635687        {
    636688            "name": "phpdocumentor/type-resolver",
    637             "version": "1.7.2",
     689            "version": "1.7.3",
    638690            "source": {
    639691                "type": "git",
    640692                "url": "https://github.com/phpDocumentor/TypeResolver.git",
    641                 "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d"
    642             },
    643             "dist": {
    644                 "type": "zip",
    645                 "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d",
    646                 "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d",
     693                "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419"
     694            },
     695            "dist": {
     696                "type": "zip",
     697                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
     698                "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
    647699                "shasum": ""
    648700            },
     
    687739            "support": {
    688740                "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
    689                 "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2"
    690             },
    691             "time": "2023-05-30T18:13:47+00:00"
     741                "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3"
     742            },
     743            "time": "2023-08-12T11:01:26+00:00"
    692744        },
    693745        {
     
    836888        {
    837889            "name": "phpstan/phpdoc-parser",
    838             "version": "1.22.1",
     890            "version": "1.24.2",
    839891            "source": {
    840892                "type": "git",
    841893                "url": "https://github.com/phpstan/phpdoc-parser.git",
    842                 "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0"
    843             },
    844             "dist": {
    845                 "type": "zip",
    846                 "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0",
    847                 "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0",
     894                "reference": "bcad8d995980440892759db0c32acae7c8e79442"
     895            },
     896            "dist": {
     897                "type": "zip",
     898                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442",
     899                "reference": "bcad8d995980440892759db0c32acae7c8e79442",
    848900                "shasum": ""
    849901            },
     
    877929            "support": {
    878930                "issues": "https://github.com/phpstan/phpdoc-parser/issues",
    879                 "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1"
    880             },
    881             "time": "2023-06-29T20:46:06+00:00"
     931                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2"
     932            },
     933            "time": "2023-09-26T12:28:12+00:00"
    882934        },
    883935        {
    884936            "name": "phpstan/phpstan",
    885             "version": "1.10.25",
     937            "version": "1.10.38",
    886938            "source": {
    887939                "type": "git",
    888940                "url": "https://github.com/phpstan/phpstan.git",
    889                 "reference": "578f4e70d117f9a90699324c555922800ac38d8c"
    890             },
    891             "dist": {
    892                 "type": "zip",
    893                 "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578f4e70d117f9a90699324c555922800ac38d8c",
    894                 "reference": "578f4e70d117f9a90699324c555922800ac38d8c",
     941                "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691"
     942            },
     943            "dist": {
     944                "type": "zip",
     945                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691",
     946                "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691",
    895947                "shasum": ""
    896948            },
     
    941993                }
    942994            ],
    943             "time": "2023-07-06T12:11:37+00:00"
     995            "time": "2023-10-06T14:19:14+00:00"
    944996        },
    945997        {
    946998            "name": "phpunit/php-code-coverage",
    947             "version": "9.2.26",
     999            "version": "9.2.29",
    9481000            "source": {
    9491001                "type": "git",
    9501002                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
    951                 "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
    952             },
    953             "dist": {
    954                 "type": "zip",
    955                 "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
    956                 "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
     1003                "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76"
     1004            },
     1005            "dist": {
     1006                "type": "zip",
     1007                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76",
     1008                "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76",
    9571009                "shasum": ""
    9581010            },
     
    10101062            "support": {
    10111063                "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
    1012                 "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26"
     1064                "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
     1065                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29"
    10131066            },
    10141067            "funding": [
     
    10181071                }
    10191072            ],
    1020             "time": "2023-03-06T12:58:08+00:00"
     1073            "time": "2023-09-19T04:57:46+00:00"
    10211074        },
    10221075        {
     
    12631316        {
    12641317            "name": "phpunit/phpunit",
    1265             "version": "9.6.9",
     1318            "version": "9.6.13",
    12661319            "source": {
    12671320                "type": "git",
    12681321                "url": "https://github.com/sebastianbergmann/phpunit.git",
    1269                 "reference": "a9aceaf20a682aeacf28d582654a1670d8826778"
    1270             },
    1271             "dist": {
    1272                 "type": "zip",
    1273                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778",
    1274                 "reference": "a9aceaf20a682aeacf28d582654a1670d8826778",
     1322                "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be"
     1323            },
     1324            "dist": {
     1325                "type": "zip",
     1326                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be",
     1327                "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be",
    12751328                "shasum": ""
    12761329            },
     
    12871340                "phar-io/version": "^3.0.2",
    12881341                "php": ">=7.3",
    1289                 "phpunit/php-code-coverage": "^9.2.13",
     1342                "phpunit/php-code-coverage": "^9.2.28",
    12901343                "phpunit/php-file-iterator": "^3.0.5",
    12911344                "phpunit/php-invoker": "^3.1.1",
     
    13461399                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
    13471400                "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
    1348                 "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9"
     1401                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13"
    13491402            },
    13501403            "funding": [
     
    13621415                }
    13631416            ],
    1364             "time": "2023-06-11T06:13:56+00:00"
     1417            "time": "2023-09-19T05:39:22+00:00"
    13651418        },
    13661419        {
     
    14311484                "type": "git",
    14321485                "url": "https://github.com/Roave/SecurityAdvisories.git",
    1433                 "reference": "ab25db1db0a52ad128748f1f1499dd9ffc859058"
    1434             },
    1435             "dist": {
    1436                 "type": "zip",
    1437                 "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ab25db1db0a52ad128748f1f1499dd9ffc859058",
    1438                 "reference": "ab25db1db0a52ad128748f1f1499dd9ffc859058",
     1486                "reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6"
     1487            },
     1488            "dist": {
     1489                "type": "zip",
     1490                "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/efd339340c840237fad050f3ea6fd8bbbbfc7ed6",
     1491                "reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6",
    14391492                "shasum": ""
    14401493            },
    14411494            "conflict": {
    14421495                "3f/pygmentize": "<1.2",
    1443                 "admidio/admidio": "<4.2.9",
     1496                "admidio/admidio": "<4.2.11",
    14441497                "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3",
    1445                 "aheinze/cockpit": "<=2.2.1",
     1498                "aheinze/cockpit": "<2.2",
     1499                "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5",
    14461500                "akaunting/akaunting": "<2.1.13",
    14471501                "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53",
     
    14551509                "andreapollastri/cipi": "<=3.1.15",
    14561510                "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<1.0.2|>=2,<2.2.5",
     1511                "apache-solr-for-typo3/solr": "<2.8.3",
    14571512                "apereo/phpcas": "<1.6",
    14581513                "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3",
     
    14611516                "area17/twill": "<1.2.5|>=2,<2.5.3",
    14621517                "artesaos/seotools": "<0.17.2",
    1463                 "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
    1464                 "athlon1600/php-proxy-app": "<3",
     1518                "asymmetricrypt/asymmetricrypt": "<9.9.99",
     1519                "athlon1600/php-proxy": "<=5.1",
     1520                "athlon1600/php-proxy-app": "<=3",
     1521                "austintoddj/canvas": "<=3.4.2",
    14651522                "automad/automad": "<1.8",
    14661523                "awesome-support/awesome-support": "<=6.0.7",
     
    14681525                "azuracast/azuracast": "<0.18.3",
    14691526                "backdrop/backdrop": "<1.24.2",
     1527                "backpack/crud": "<3.4.9",
    14701528                "badaso/core": "<2.7",
    14711529                "bagisto/bagisto": "<0.1.5",
     
    14771535                "bassjobsen/bootstrap-3-typeahead": ">4.0.2",
    14781536                "bigfork/silverstripe-form-capture": ">=3,<3.1.1",
    1479                 "billz/raspap-webgui": "<2.8.9",
     1537                "billz/raspap-webgui": "<=2.9.2",
    14801538                "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3",
    14811539                "bmarshall511/wordpress_zero_spam": "<5.2.13",
     
    14881546                "brotkrueml/typo3-matomo-integration": "<1.3.2",
    14891547                "buddypress/buddypress": "<7.2.1",
    1490                 "bugsnag/bugsnag-laravel": ">=2,<2.0.2",
     1548                "bugsnag/bugsnag-laravel": "<2.0.2",
    14911549                "bytefury/crater": "<6.0.2",
    14921550                "cachethq/cachet": "<2.5.1",
    1493                 "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4",
     1551                "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.1,<4.1.4|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10",
    14941552                "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10",
    14951553                "cardgate/magento2": "<2.0.33",
     1554                "cardgate/woocommerce": "<=3.1.15",
    14961555                "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
    14971556                "cartalyst/sentry": "<=2.1.6",
    14981557                "catfan/medoo": "<1.7.5",
    1499                 "centreon/centreon": "<22.10-beta.1",
     1558                "cecil/cecil": "<7.47.1",
     1559                "centreon/centreon": "<22.10.0.0-beta1",
    15001560                "cesnet/simplesamlphp-module-proxystatistics": "<3.1",
    1501                 "cockpit-hq/cockpit": "<2.4.1",
     1561                "chriskacerguis/codeigniter-restserver": "<=2.7.1",
     1562                "civicrm/civicrm-core": ">=4.2,<4.2.9|>=4.3,<4.3.3",
     1563                "cockpit-hq/cockpit": "<=2.6.3",
    15021564                "codeception/codeception": "<3.1.3|>=4,<4.1.22",
    1503                 "codeigniter/framework": "<=3.0.6",
     1565                "codeigniter/framework": "<3.1.9",
    15041566                "codeigniter4/framework": "<4.3.5",
    1505                 "codeigniter4/shield": "<1-beta.4|= 1.0.0-beta",
     1567                "codeigniter4/shield": "<1.0.0.0-beta4",
    15061568                "codiad/codiad": "<=2.8.4",
    1507                 "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5",
    1508                 "concrete5/concrete5": "<9.2|>= 9.0.0RC1, < 9.1.3",
     1569                "composer/composer": "<1.10.27|>=2,<2.2.22|>=2.3,<2.6.4",
     1570                "concrete5/concrete5": "<=9.2.1",
    15091571                "concrete5/core": "<8.5.8|>=9,<9.1",
    15101572                "contao-components/mediaelement": ">=2.14.2,<2.21.1",
    15111573                "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4",
    15121574                "contao/core": ">=2,<3.5.39",
    1513                 "contao/core-bundle": "<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4|= 4.10.0",
     1575                "contao/core-bundle": "<4.9.42|>=4.10,<4.13.28|>=5,<5.1.10",
    15141576                "contao/listing-bundle": ">=4,<4.4.8",
    15151577                "contao/managed-edition": "<=1.5",
    1516                 "craftcms/cms": "<=4.4.9|>= 4.0.0-RC1, < 4.4.12|>= 4.0.0-RC1, <= 4.4.5|>= 4.0.0-RC1, <= 4.4.6|>= 4.0.0-RC1, < 4.4.6|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1",
    1517                 "croogo/croogo": "<3.0.7",
     1578                "cosenary/instagram": "<=2.3",
     1579                "craftcms/cms": "<=4.4.14",
     1580                "croogo/croogo": "<4",
    15181581                "cuyz/valinor": "<0.12",
    15191582                "czproject/git-php": "<4.0.3",
    15201583                "darylldoyle/safe-svg": "<1.9.10",
    15211584                "datadog/dd-trace": ">=0.30,<0.30.2",
     1585                "datatables/datatables": "<1.10.10",
    15221586                "david-garcia/phpwhois": "<=4.3.1",
    15231587                "dbrisinajumi/d2files": "<1",
    1524                 "dcat/laravel-admin": "<=2.1.3-beta",
     1588                "dcat/laravel-admin": "<=2.1.3.0-beta",
    15251589                "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3",
    15261590                "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1",
     
    15361600                "doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
    15371601                "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4",
    1538                 "dolibarr/dolibarr": "<17.0.1|= 12.0.5|>= 3.3.beta1, < 13.0.2",
    1539                 "dompdf/dompdf": "<2.0.2|= 2.0.2",
    1540                 "drupal/core": ">=7,<7.96|>=8,<9.4.14|>=9.5,<9.5.8|>=10,<10.0.8",
    1541                 "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
     1602                "dolibarr/dolibarr": "<18",
     1603                "dompdf/dompdf": "<2.0.2|==2.0.2",
     1604                "drupal/core": "<9.4.14|>=9.5,<9.5.8|>=10,<10.0.8",
     1605                "drupal/drupal": ">=6,<6.38|>=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
    15421606                "dweeves/magmi": "<=0.7.24",
    15431607                "ecodev/newsletter": "<=4",
    15441608                "ectouch/ectouch": "<=2.7.2",
    1545                 "elefant/cms": "<1.3.13",
     1609                "elefant/cms": "<2.0.7",
    15461610                "elgg/elgg": "<3.3.24|>=4,<4.0.5",
    15471611                "encore/laravel-admin": "<=1.8.19",
     
    15511615                "ether/logs": "<3.0.4",
    15521616                "exceedone/exment": "<4.4.3|>=5,<5.0.3",
    1553                 "exceedone/laravel-admin": "= 3.0.0|<2.2.3",
    1554                 "ezsystems/demobundle": ">=5.4,<5.4.6.1",
     1617                "exceedone/laravel-admin": "<2.2.3|==3",
     1618                "ezsystems/demobundle": ">=5.4,<5.4.6.1-dev",
    15551619                "ezsystems/ez-support-tools": ">=2.2,<2.2.3",
    1556                 "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1",
    1557                 "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
     1620                "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1-dev",
     1621                "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1-dev|>=5.4,<5.4.11.1-dev|>=2017.12,<2017.12.0.1-dev",
    15581622                "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24",
    15591623                "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26",
    15601624                "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1",
    1561                 "ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12",
    1562                 "ezsystems/ezplatform-kernel": "<1.2.5.1|>=1.3,<1.3.26",
     1625                "ezsystems/ezplatform-graphql": ">=1.0.0.0-RC1-dev,<1.0.13|>=2.0.0.0-beta1,<2.3.12",
     1626                "ezsystems/ezplatform-kernel": "<1.2.5.1-dev|>=1.3,<1.3.26",
    15631627                "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8",
    1564                 "ezsystems/ezplatform-richtext": ">=2.3,<2.3.7.1",
     1628                "ezsystems/ezplatform-richtext": ">=2.3,<2.3.7.1-dev",
    15651629                "ezsystems/ezplatform-user": ">=1,<1.0.1",
    1566                 "ezsystems/ezpublish-kernel": "<6.13.8.2|>=7,<7.5.30",
    1567                 "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1",
     1630                "ezsystems/ezpublish-kernel": "<6.13.8.2-dev|>=7,<7.5.30",
     1631                "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.03.5.1",
    15681632                "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
    1569                 "ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15",
     1633                "ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15",
    15701634                "ezyang/htmlpurifier": "<4.1.1",
    15711635                "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2",
    1572                 "facturascripts/facturascripts": "<=2022.8",
     1636                "facturascripts/facturascripts": "<=2022.08",
    15731637                "feehi/cms": "<=2.1.1",
    15741638                "feehi/feehicms": "<=2.1.1",
     
    15781642                "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2",
    15791643                "fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6",
    1580                 "flarum/core": "<1.7",
     1644                "flarum/core": "<1.8",
     1645                "flarum/framework": "<1.8",
    15811646                "flarum/mentions": "<1.6.3",
    1582                 "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15",
    1583                 "flarum/tags": "<=0.1-beta.13",
     1647                "flarum/sticky": ">=0.1.0.0-beta14,<=0.1.0.0-beta15",
     1648                "flarum/tags": "<=0.1.0.0-beta13",
    15841649                "fluidtypo3/vhs": "<5.1.1",
    1585                 "fof/byobu": ">=0.3-beta.2,<1.1.7",
     1650                "fof/byobu": ">=0.3.0.0-beta2,<1.1.7",
    15861651                "fof/upload": "<1.2.3",
    15871652                "fooman/tcpdf": "<6.2.22",
     
    15941659                "friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
    15951660                "friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
    1596                 "froala/wysiwyg-editor": "<3.2.7",
     1661                "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6",
     1662                "froala/wysiwyg-editor": "<3.2.7|>=4.0.1,<=4.1.1",
    15971663                "froxlor/froxlor": "<2.1",
    15981664                "fuel/core": "<1.8.1",
     
    16001666                "gaoming13/wechat-php-sdk": "<=1.10.2",
    16011667                "genix/cms": "<=1.1.11",
    1602                 "getgrav/grav": "<1.7.42",
    1603                 "getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1",
     1668                "getgrav/grav": "<=1.7.42.1",
     1669                "getkirby/cms": "<3.5.8.3-dev|>=3.6,<3.6.6.3-dev|>=3.7,<3.7.5.2-dev|>=3.8,<3.8.4.1-dev|>=3.9,<3.9.6",
     1670                "getkirby/kirby": "<=2.5.12",
    16041671                "getkirby/panel": "<2.5.14",
    16051672                "getkirby/starterkit": "<=3.7.0.2",
    16061673                "gilacms/gila": "<=1.11.4",
     1674                "gleez/cms": "<=1.2|==2",
    16071675                "globalpayments/php-sdk": "<2",
     1676                "gogentooss/samlbase": "<1.2.7",
    16081677                "google/protobuf": "<3.15",
    16091678                "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
     
    16111680                "gregwar/rst": "<1.0.3",
    16121681                "grumpydictator/firefly-iii": "<6",
     1682                "gugoan/economizzer": "<=0.9.0.0-beta1",
    16131683                "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5",
    16141684                "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5",
     1685                "haffner/jh_captcha": "<=2.1.3|>=3,<=3.0.2",
    16151686                "harvesthq/chosen": "<1.8.7",
    1616                 "helloxz/imgurl": "= 2.31|<=2.31",
     1687                "helloxz/imgurl": "<=2.31",
    16171688                "hhxsv5/laravel-s": "<3.7.36",
    16181689                "hillelcoren/invoice-ninja": "<5.3.35",
     
    16341705                "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
    16351706                "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
    1636                 "impresscms/impresscms": "<=1.4.3",
    1637                 "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1",
     1707                "impresscms/impresscms": "<=1.4.5",
     1708                "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.2.2",
    16381709                "in2code/ipandlanguageredirect": "<5.1.2",
    16391710                "in2code/lux": "<17.6.1|>=18,<24.0.2",
    16401711                "innologi/typo3-appointments": "<2.0.6",
    1641                 "intelliants/subrion": "<=4.2.1",
     1712                "intelliants/subrion": "<4.2.2",
    16421713                "islandora/islandora": ">=2,<2.4.1",
    16431714                "ivankristianto/phpwhois": "<=4.3",
    16441715                "jackalope/jackalope-doctrine-dbal": "<1.7.4",
    16451716                "james-heinrich/getid3": "<1.9.21",
     1717                "james-heinrich/phpthumb": "<1.7.12",
    16461718                "jasig/phpcas": "<1.3.3",
     1719                "jcbrand/converse.js": "<3.3.3",
     1720                "joomla/application": "<1.0.13",
    16471721                "joomla/archive": "<1.1.12|>=2,<2.0.1",
    16481722                "joomla/filesystem": "<1.6.2|>=2,<2.0.1",
    16491723                "joomla/filter": "<1.4.4|>=2,<2.0.1",
     1724                "joomla/framework": ">=2.5.4,<=3.8.12",
    16501725                "joomla/input": ">=2,<2.0.2",
     1726                "joomla/joomla-cms": ">=2.5,<3.9.12",
    16511727                "joomla/session": "<1.3.1",
    16521728                "joyqi/hyper-down": "<=2.4.27",
     
    16581734                "khodakhah/nodcms": "<=3",
    16591735                "kimai/kimai": "<1.1",
    1660                 "kitodo/presentation": "<3.1.2",
     1736                "kitodo/presentation": "<3.2.3|>=3.3,<3.3.4",
    16611737                "klaviyo/magento2-extension": ">=1,<3",
    1662                 "knplabs/knp-snappy": "<1.4.2",
     1738                "knplabs/knp-snappy": "<=1.4.2",
     1739                "kohana/core": "<3.3.3",
    16631740                "krayin/laravel-crm": "<1.2.2",
    16641741                "kreait/firebase-php": ">=3.2,<3.8.1",
    16651742                "la-haute-societe/tcpdf": "<6.2.22",
    1666                 "laminas/laminas-diactoros": "<2.18.1|>=2.24,<2.24.2|>=2.25,<2.25.2|= 2.23.0|= 2.22.0|= 2.21.0|= 2.20.0|= 2.19.0",
     1743                "laminas/laminas-diactoros": "<2.18.1|==2.19|==2.20|==2.21|==2.22|==2.23|>=2.24,<2.24.2|>=2.25,<2.25.2",
    16671744                "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1",
    16681745                "laminas/laminas-http": "<2.14.2",
    16691746                "laravel/fortify": "<1.11.1",
    1670                 "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
     1747                "laravel/framework": "<6.20.44|>=7,<7.30.6|>=8,<8.75",
    16711748                "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
    16721749                "latte/latte": "<2.10.8",
     
    16751752                "league/commonmark": "<0.18.3",
    16761753                "league/flysystem": "<1.1.4|>=2,<2.1.1",
    1677                 "league/oauth2-server": ">=8.3.2,<8.5.3",
     1754                "league/oauth2-server": ">=8.3.2,<8.4.2|>=8.5,<8.5.3",
    16781755                "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3",
    1679                 "librenms/librenms": "<22.10",
     1756                "librenms/librenms": "<2017.08.18",
    16801757                "liftkit/database": "<2.13.2",
    16811758                "limesurvey/limesurvey": "<3.27.19",
     
    16851762                "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2",
    16861763                "luyadev/yii-helpers": "<1.2.1",
    1687                 "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
    1688                 "magento/magento1ce": "<1.9.4.3",
    1689                 "magento/magento1ee": ">=1,<1.14.4.3",
    1690                 "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
     1764                "magento/community-edition": "<=2.4",
     1765                "magento/magento1ce": "<1.9.4.3-dev",
     1766                "magento/magento1ee": ">=1,<1.14.4.3-dev",
     1767                "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2.0-patch2",
    16911768                "maikuolan/phpmussel": ">=1,<1.6",
    16921769                "mantisbt/mantisbt": "<=2.25.5",
    16931770                "marcwillmann/turn": "<0.3.3",
    16941771                "matyhtf/framework": "<3.0.6",
    1695                 "mautic/core": "<4.3|= 2.13.1",
     1772                "mautic/core": "<4.3",
    16961773                "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35",
    16971774                "mediawiki/matomo": "<2.4.3",
     
    17051782                "mittwald/typo3_forum": "<1.2.1",
    17061783                "mobiledetect/mobiledetectlib": "<2.8.32",
    1707                 "modx/revolution": "<= 2.8.3-pl|<2.8",
     1784                "modx/revolution": "<=2.8.3.0-patch",
    17081785                "mojo42/jirafeau": "<4.4",
     1786                "mongodb/mongodb": ">=1,<1.9.2",
    17091787                "monolog/monolog": ">=1.8,<1.12",
    1710                 "moodle/moodle": "<4.2-rc.2|= 4.2.0|= 3.11",
     1788                "moodle/moodle": "<4.2.0.0-RC2-dev|==4.2",
     1789                "movim/moxl": ">=0.8,<=0.10",
     1790                "mpdf/mpdf": "<=7.1.7",
    17111791                "mustache/mustache": ">=2,<2.14.1",
    17121792                "namshi/jose": "<2.2",
    17131793                "neoan3-apps/template": "<1.1.1",
    1714                 "neorazorx/facturascripts": "<2022.4",
     1794                "neorazorx/facturascripts": "<2022.04",
    17151795                "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
    17161796                "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3",
    17171797                "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2",
     1798                "neos/neos-ui": "<=8.3.3",
    17181799                "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
    17191800                "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15",
    17201801                "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6",
    17211802                "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13",
    1722                 "nilsteampassnet/teampass": "<3.0.9",
     1803                "nilsteampassnet/teampass": "<3.0.10",
    17231804                "notrinos/notrinos-erp": "<=0.7",
    17241805                "noumo/easyii": "<=0.9",
    1725                 "nukeviet/nukeviet": "<4.5.2",
     1806                "nukeviet/nukeviet": "<4.5.02",
    17261807                "nyholm/psr7": "<1.6.1",
    17271808                "nystudio107/craft-seomatic": "<3.4.12",
    17281809                "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
    17291810                "october/backend": "<1.1.2",
    1730                 "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469",
    1731                 "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12",
     1811                "october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1",
     1812                "october/october": "<=3.4.4",
    17321813                "october/rain": "<1.0.472|>=1.1,<1.1.2",
    17331814                "october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.0.66",
     
    17351816                "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5",
    17361817                "open-web-analytics/open-web-analytics": "<1.7.4",
    1737                 "opencart/opencart": "<=3.0.3.7",
     1818                "opencart/opencart": "<=3.0.3.7|>=4,<4.0.2.3-dev",
    17381819                "openid/php-openid": "<2.3",
    1739                 "openmage/magento-lts": "<19.4.22|>=20,<20.0.19",
     1820                "openmage/magento-lts": "<=19.5|>=20,<=20.1",
    17401821                "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2",
    1741                 "orchid/platform": ">=9,<9.4.4",
    1742                 "oro/commerce": ">=4.1,<5.0.6",
     1822                "orchid/platform": ">=9,<9.4.4|>=14.0.0.0-alpha4,<14.5",
     1823                "oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1",
    17431824                "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7",
    17441825                "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8",
     1826                "oxid-esales/oxideshop-ce": "<4.5",
    17451827                "packbackbooks/lti-1-3-php-library": "<5",
    17461828                "padraic/humbug_get_contents": "<1.1.2",
    1747                 "pagarme/pagarme-php": ">=0,<3",
     1829                "pagarme/pagarme-php": "<3",
    17481830                "pagekit/pagekit": "<=1.0.18",
    17491831                "paragonie/random_compat": "<2",
     
    17521834                "pear/archive_tar": "<1.4.14",
    17531835                "pear/crypt_gpg": "<1.6.7",
     1836                "pear/pear": "<=1.10.1",
    17541837                "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1",
    17551838                "personnummer/personnummer": "<3.0.2",
    17561839                "phanan/koel": "<5.1.4",
    17571840                "php-mod/curl": "<2.3.2",
    1758                 "phpbb/phpbb": ">=3.2,<3.2.10|>=3.3,<3.3.1",
     1841                "phpbb/phpbb": "<3.2.10|>=3.3,<3.3.1",
    17591842                "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7",
    17601843                "phpmailer/phpmailer": "<6.5",
     
    17651848                "phpoffice/phpspreadsheet": "<1.16",
    17661849                "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.19",
    1767                 "phpservermon/phpservermon": "<=3.5.2",
     1850                "phpservermon/phpservermon": "<3.6",
    17681851                "phpsysinfo/phpsysinfo": "<3.2.5",
    17691852                "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3",
     
    17711854                "phpxmlrpc/extras": "<0.6.1",
    17721855                "phpxmlrpc/phpxmlrpc": "<4.9.2",
    1773                 "pimcore/customer-management-framework-bundle": "<3.3.10",
     1856                "pi/pi": "<=2.5",
     1857                "pimcore/admin-ui-classic-bundle": "<1.1.2",
     1858                "pimcore/customer-management-framework-bundle": "<3.4.2",
    17741859                "pimcore/data-hub": "<1.2.4",
     1860                "pimcore/demo": "<10.3",
    17751861                "pimcore/perspective-editor": "<1.5.1",
    1776                 "pimcore/pimcore": "<10.5.23",
     1862                "pimcore/pimcore": "<10.6.8",
    17771863                "pixelfed/pixelfed": "<=0.11.4",
    17781864                "pocketmine/bedrock-protocol": "<8.0.2",
    1779                 "pocketmine/pocketmine-mp": "<4.20.5|>=4.21,<4.21.1|< 4.18.0-ALPHA2|>= 4.0.0-BETA5, < 4.4.2",
     1865                "pocketmine/pocketmine-mp": "<=4.23|>=5,<5.3.1",
    17801866                "pressbooks/pressbooks": "<5.18",
    17811867                "prestashop/autoupgrade": ">=4,<4.10.1",
     
    17831869                "prestashop/contactform": ">=1.0.1,<4.3",
    17841870                "prestashop/gamification": "<2.3.2",
    1785                 "prestashop/prestashop": "<8.0.4",
     1871                "prestashop/prestashop": "<8.1.2",
    17861872                "prestashop/productcomments": "<5.0.2",
    17871873                "prestashop/ps_emailsubscription": "<2.6.1",
     
    17901876                "privatebin/privatebin": "<1.4",
    17911877                "processwire/processwire": "<=3.0.200",
    1792                 "propel/propel": ">=2-alpha.1,<=2-alpha.7",
     1878                "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7",
    17931879                "propel/propel1": ">=1,<=1.7.1",
    17941880                "pterodactyl/panel": "<1.7",
     1881                "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2",
    17951882                "ptrofimov/beanstalk_console": "<1.7.14",
    17961883                "pusher/pusher-php-server": "<2.2.1",
    1797                 "pwweb/laravel-core": "<=0.3.6-beta",
     1884                "pwweb/laravel-core": "<=0.3.6.0-beta",
    17981885                "pyrocms/pyrocms": "<=3.9.1",
     1886                "rainlab/blog-plugin": "<1.4.1",
    17991887                "rainlab/debugbar-plugin": "<3.1",
     1888                "rainlab/user-plugin": "<=1.4.5",
    18001889                "rankmath/seo-by-rank-math": "<=1.0.95",
     1890                "rap2hpoutre/laravel-log-viewer": "<0.13",
    18011891                "react/http": ">=0.7,<1.9",
    18021892                "really-simple-plugins/complianz-gdpr": "<6.4.2",
     
    18091899                "s-cart/s-cart": "<6.9",
    18101900                "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1",
    1811                 "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
    1812                 "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
     1901                "sabre/dav": "<1.7.11|>=1.8,<1.8.9",
     1902                "scheb/two-factor-bundle": "<3.26|>=4,<4.11",
    18131903                "sensiolabs/connect": "<4.2.3",
    18141904                "serluck/phpwhois": "<=4.2.6",
     1905                "sfroemken/url_redirect": "<=1.2.1",
    18151906                "sheng/yiicms": "<=1.2",
    18161907                "shopware/core": "<=6.4.20",
     
    18211912                "shopxo/shopxo": "<2.2.6",
    18221913                "showdoc/showdoc": "<2.10.4",
    1823                 "silverstripe/admin": "<1.12.7",
     1914                "silverstripe-australia/advancedreports": ">=1,<=2",
     1915                "silverstripe/admin": "<1.13.6",
    18241916                "silverstripe/assets": ">=1,<1.11.1",
    18251917                "silverstripe/cms": "<4.11.3",
    18261918                "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
    18271919                "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
    1828                 "silverstripe/framework": "<4.12.5",
    1829                 "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|>=4.1.1,<4.1.2|>=4.2.2,<4.2.3|= 4.0.0-alpha1",
     1920                "silverstripe/framework": "<4.13.14|>=5,<5.0.13",
     1921                "silverstripe/graphql": "<3.5.2|>=4.0.0.0-alpha1,<4.0.0.0-alpha2|>=4.1.1,<4.1.2|>=4.2.2,<4.2.3",
    18301922                "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1",
     1923                "silverstripe/recipe-cms": ">=4.5,<4.5.3",
    18311924                "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
    18321925                "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
     
    18371930                "silverstripe/versioned-admin": ">=1,<1.11.1",
    18381931                "simple-updates/phpwhois": "<=1",
    1839                 "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4",
     1932                "simplesamlphp/saml2": "<1.15.4|>=2,<2.3.8|>=3,<3.1.4",
    18401933                "simplesamlphp/simplesamlphp": "<1.18.6",
    18411934                "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
     
    18441937                "simplito/elliptic-php": "<1.0.6",
    18451938                "sitegeist/fluid-components": "<3.5",
     1939                "sjbr/sr-freecap": "<2.4.6|>=2.5,<2.5.3",
    18461940                "slim/psr7": "<1.4.1|>=1.5,<1.5.1|>=1.6,<1.6.1",
    18471941                "slim/slim": "<2.6",
     1942                "slub/slub-events": "<3.0.3",
    18481943                "smarty/smarty": "<3.1.48|>=4,<4.3.1",
    1849                 "snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5",
     1944                "snipe/snipe-it": "<=6.2.2",
    18501945                "socalnick/scn-social-auth": "<1.15.2",
    18511946                "socialiteproviders/steam": "<1.1",
    18521947                "spatie/browsershot": "<3.57.4",
    1853                 "spipu/html2pdf": "<5.2.4",
     1948                "spipu/html2pdf": "<5.2.8",
     1949                "spoon/library": "<1.4.1",
    18541950                "spoonity/tcpdf": "<6.2.22",
    18551951                "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1",
    1856                 "ssddanbrown/bookstack": "<22.2.3",
     1952                "ssddanbrown/bookstack": "<22.02.3",
    18571953                "statamic/cms": "<4.10",
    1858                 "stormpath/sdk": ">=0,<9.9.99",
     1954                "stormpath/sdk": "<9.9.99",
    18591955                "studio-42/elfinder": "<2.1.62",
    1860                 "subrion/cms": "<=4.2.1",
     1956                "subhh/libconnect": "<7.0.8|>=8,<8.1",
    18611957                "sukohi/surpass": "<1",
    1862                 "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8",
     1958                "sulu/sulu": "<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8|==2.4.0.0-RC1|>=2.5,<2.5.10",
    18631959                "sumocoders/framework-user-bundle": "<1.4",
    18641960                "swag/paypal": "<5.4.4",
     
    18791975                "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4",
    18801976                "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
    1881                 "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14",
     1977                "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3",
    18821978                "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
    18831979                "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
     
    18971993                "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2",
    18981994                "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12",
    1899                 "symfony/symfony": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
     1995                "symfony/symfony": "<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
    19001996                "symfony/translation": ">=2,<2.0.17",
     1997                "symfony/ux-autocomplete": "<2.11.2",
    19011998                "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
    19021999                "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
    19032000                "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
    19042001                "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
    1905                 "t3/dce": ">=2.2,<2.6.2",
     2002                "t3/dce": "<0.11.5|>=2.2,<2.6.2",
    19062003                "t3g/svg-sanitizer": "<1.0.3",
    19072004                "tastyigniter/tastyigniter": "<3.3",
     
    19102007                "terminal42/contao-tablelookupwizard": "<3.3.5",
    19112008                "thelia/backoffice-default-template": ">=2.1,<2.1.2",
    1912                 "thelia/thelia": ">=2.1-beta.1,<2.1.3",
     2009                "thelia/thelia": ">=2.1,<2.1.3",
    19132010                "theonedemon/phpwhois": "<=4.2.5",
    19142011                "thinkcmf/thinkcmf": "<=5.1.7",
    1915                 "thorsten/phpmyfaq": "<3.2-beta.2",
     2012                "thorsten/phpmyfaq": "<3.2.0.0-beta2",
     2013                "tikiwiki/tiki-manager": "<=17.1",
    19162014                "tinymce/tinymce": "<5.10.7|>=6,<6.3.1",
    19172015                "tinymighty/wiki-seo": "<1.2.2",
    1918                 "titon/framework": ">=0,<9.9.99",
    1919                 "tobiasbg/tablepress": "<= 2.0-RC1",
     2016                "titon/framework": "<9.9.99",
     2017                "tobiasbg/tablepress": "<=2.0.0.0-RC1",
    19202018                "topthink/framework": "<6.0.14",
    19212019                "topthink/think": "<=6.1.1",
    19222020                "topthink/thinkphp": "<=3.2.3",
    19232021                "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2",
    1924                 "tribalsystems/zenario": "<=9.3.57595",
     2022                "tribalsystems/zenario": "<=9.4.59197",
    19252023                "truckersmp/phpwhois": "<=4.3.1",
    19262024                "ttskch/pagination-service-provider": "<1",
    19272025                "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3",
    1928                 "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2",
     2026                "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2",
    19292027                "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
    1930                 "typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2",
     2028                "typo3/cms-core": "<8.7.51|>=9,<9.5.42|>=10,<10.4.39|>=11,<11.5.30|>=12,<12.4.4",
     2029                "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1",
    19312030                "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
     2031                "typo3/cms-rte-ckeditor": ">=9.5,<9.5.42|>=10,<10.4.39|>=11,<11.5.30",
    19322032                "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
    1933                 "typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1",
     2033                "typo3/html-sanitizer": ">=1,<1.5.1|>=2,<2.1.2",
    19342034                "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3",
    19352035                "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1",
     
    19372037                "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10",
    19382038                "ua-parser/uap-php": "<3.8",
     2039                "uasoft-indonesia/badaso": "<=2.9.7",
    19392040                "unisharp/laravel-filemanager": "<=2.5.1",
    19402041                "userfrosting/userfrosting": ">=0.3.1,<4.6.3",
     
    19452046                "vova07/yii2-fileapi-widget": "<0.1.9",
    19462047                "vrana/adminer": "<4.8.1",
     2048                "waldhacker/hcaptcha": "<2.1.2",
    19472049                "wallabag/tcpdf": "<6.2.22",
    1948                 "wallabag/wallabag": "<2.5.4",
     2050                "wallabag/wallabag": "<2.6.7",
    19492051                "wanglelecc/laracms": "<=1.0.3",
    19502052                "web-auth/webauthn-framework": ">=3.3,<3.3.4",
     
    19572059                "wikimedia/parsoid": "<0.12.2",
    19582060                "willdurand/js-translation-bundle": "<2.1.1",
    1959                 "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1",
     2061                "wintercms/winter": "<1.2.3",
    19602062                "woocommerce/woocommerce": "<6.6",
    19612063                "wp-cli/wp-cli": "<2.5",
     
    19812083                "yoast-seo-for-typo3/yoast_seo": "<7.2.3",
    19822084                "yourls/yourls": "<=1.8.2",
    1983                 "zencart/zencart": "< 1.5.7a",
     2085                "zencart/zencart": "<=1.5.7.0-beta",
    19842086                "zendesk/zendesk_api_client_php": "<2.2.11",
    19852087                "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
     
    20022104                "zendframework/zendframework": "<=3",
    20032105                "zendframework/zendframework1": "<1.12.20",
    2004                 "zendframework/zendopenid": ">=2,<2.0.2",
    2005                 "zendframework/zendxml": ">=1,<1.0.1",
     2106                "zendframework/zendopenid": "<2.0.2",
     2107                "zendframework/zendrest": "<2.0.2",
     2108                "zendframework/zendservice-amazon": "<2.0.3",
     2109                "zendframework/zendservice-api": "<1",
     2110                "zendframework/zendservice-audioscrobbler": "<2.0.2",
     2111                "zendframework/zendservice-nirvanix": "<2.0.2",
     2112                "zendframework/zendservice-slideshare": "<2.0.2",
     2113                "zendframework/zendservice-technorati": "<2.0.2",
     2114                "zendframework/zendservice-windowsazure": "<2.0.2",
     2115                "zendframework/zendxml": "<1.0.1",
     2116                "zenstruck/collection": "<0.2.1",
    20062117                "zetacomponents/mail": "<1.8.2",
    20072118                "zf-commons/zfc-user": "<1.2.2",
     
    20462157                }
    20472158            ],
    2048             "time": "2023-07-06T23:04:44+00:00"
     2159            "time": "2023-10-11T21:04:21+00:00"
    20492160        },
    20502161        {
     
    25542665        {
    25552666            "name": "sebastian/global-state",
    2556             "version": "5.0.5",
     2667            "version": "5.0.6",
    25572668            "source": {
    25582669                "type": "git",
    25592670                "url": "https://github.com/sebastianbergmann/global-state.git",
    2560                 "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
    2561             },
    2562             "dist": {
    2563                 "type": "zip",
    2564                 "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
    2565                 "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
     2671                "reference": "bde739e7565280bda77be70044ac1047bc007e34"
     2672            },
     2673            "dist": {
     2674                "type": "zip",
     2675                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
     2676                "reference": "bde739e7565280bda77be70044ac1047bc007e34",
    25662677                "shasum": ""
    25672678            },
     
    26062717            "support": {
    26072718                "issues": "https://github.com/sebastianbergmann/global-state/issues",
    2608                 "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
     2719                "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
    26092720            },
    26102721            "funding": [
     
    26142725                }
    26152726            ],
    2616             "time": "2022-02-14T08:28:10+00:00"
     2727            "time": "2023-08-02T09:26:13+00:00"
    26172728        },
    26182729        {
     
    30713182        {
    30723183            "name": "symfony/polyfill-ctype",
    3073             "version": "v1.27.0",
     3184            "version": "v1.28.0",
    30743185            "source": {
    30753186                "type": "git",
    30763187                "url": "https://github.com/symfony/polyfill-ctype.git",
    3077                 "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
    3078             },
    3079             "dist": {
    3080                 "type": "zip",
    3081                 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
    3082                 "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
     3188                "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
     3189            },
     3190            "dist": {
     3191                "type": "zip",
     3192                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
     3193                "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
    30833194                "shasum": ""
    30843195            },
     
    30953206            "extra": {
    30963207                "branch-alias": {
    3097                     "dev-main": "1.27-dev"
     3208                    "dev-main": "1.28-dev"
    30983209                },
    30993210                "thanks": {
     
    31333244            ],
    31343245            "support": {
    3135                 "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
     3246                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
    31363247            },
    31373248            "funding": [
     
    31493260                }
    31503261            ],
    3151             "time": "2022-11-03T14:55:06+00:00"
     3262            "time": "2023-01-26T09:26:14+00:00"
    31523263        },
    31533264        {
    31543265            "name": "symfony/polyfill-mbstring",
    3155             "version": "v1.27.0",
     3266            "version": "v1.28.0",
    31563267            "source": {
    31573268                "type": "git",
    31583269                "url": "https://github.com/symfony/polyfill-mbstring.git",
    3159                 "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
    3160             },
    3161             "dist": {
    3162                 "type": "zip",
    3163                 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
    3164                 "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
     3270                "reference": "42292d99c55abe617799667f454222c54c60e229"
     3271            },
     3272            "dist": {
     3273                "type": "zip",
     3274                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
     3275                "reference": "42292d99c55abe617799667f454222c54c60e229",
    31653276                "shasum": ""
    31663277            },
     
    31773288            "extra": {
    31783289                "branch-alias": {
    3179                     "dev-main": "1.27-dev"
     3290                    "dev-main": "1.28-dev"
    31803291                },
    31813292                "thanks": {
     
    32163327            ],
    32173328            "support": {
    3218                 "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
     3329                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
    32193330            },
    32203331            "funding": [
     
    32323343                }
    32333344            ],
    3234             "time": "2022-11-03T14:55:06+00:00"
     3345            "time": "2023-07-28T09:04:16+00:00"
    32353346        },
    32363347        {
    32373348            "name": "symfony/polyfill-php80",
    3238             "version": "v1.27.0",
     3349            "version": "v1.28.0",
    32393350            "source": {
    32403351                "type": "git",
    32413352                "url": "https://github.com/symfony/polyfill-php80.git",
    3242                 "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
    3243             },
    3244             "dist": {
    3245                 "type": "zip",
    3246                 "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
    3247                 "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
     3353                "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
     3354            },
     3355            "dist": {
     3356                "type": "zip",
     3357                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
     3358                "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
    32483359                "shasum": ""
    32493360            },
     
    32543365            "extra": {
    32553366                "branch-alias": {
    3256                     "dev-main": "1.27-dev"
     3367                    "dev-main": "1.28-dev"
    32573368                },
    32583369                "thanks": {
     
    32993410            ],
    33003411            "support": {
    3301                 "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
     3412                "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
    33023413            },
    33033414            "funding": [
     
    33153426                }
    33163427            ],
    3317             "time": "2022-11-03T14:55:06+00:00"
     3428            "time": "2023-01-26T09:26:14+00:00"
    33183429        },
    33193430        {
     
    35113622        {
    35123623            "name": "webonyx/graphql-php",
    3513             "version": "v15.5.1",
     3624            "version": "v15.7.0",
    35143625            "source": {
    35153626                "type": "git",
    35163627                "url": "https://github.com/webonyx/graphql-php.git",
    3517                 "reference": "b305633164a48947e22d53b6b15fcb98613c6592"
    3518             },
    3519             "dist": {
    3520                 "type": "zip",
    3521                 "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/b305633164a48947e22d53b6b15fcb98613c6592",
    3522                 "reference": "b305633164a48947e22d53b6b15fcb98613c6592",
     3628                "reference": "44ff70977ee020c0b24bfdfaf947be56943de505"
     3629            },
     3630            "dist": {
     3631                "type": "zip",
     3632                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/44ff70977ee020c0b24bfdfaf947be56943de505",
     3633                "reference": "44ff70977ee020c0b24bfdfaf947be56943de505",
    35233634                "shasum": ""
    35243635            },
     
    35333644                "dms/phpunit-arraysubset-asserts": "dev-master",
    35343645                "ergebnis/composer-normalize": "^2.28",
     3646                "friendsofphp/php-cs-fixer": "3.30.0",
    35353647                "mll-lab/php-cs-fixer-config": "^5",
    35363648                "nyholm/psr7": "^1.5",
    35373649                "phpbench/phpbench": "^1.2",
    35383650                "phpstan/extension-installer": "^1.1",
    3539                 "phpstan/phpstan": "1.10.19",
    3540                 "phpstan/phpstan-phpunit": "1.3.13",
     3651                "phpstan/phpstan": "1.10.37",
     3652                "phpstan/phpstan-phpunit": "1.3.14",
    35413653                "phpstan/phpstan-strict-rules": "1.5.1",
    35423654                "phpunit/phpunit": "^9.5 || ^10",
     
    35443656                "react/http": "^1.6",
    35453657                "react/promise": "^2.9",
    3546                 "rector/rector": "^0.17.0",
     3658                "rector/rector": "^0.18",
    35473659                "symfony/polyfill-php81": "^1.23",
    35483660                "symfony/var-exporter": "^5 || ^6",
     
    35723684            "support": {
    35733685                "issues": "https://github.com/webonyx/graphql-php/issues",
    3574                 "source": "https://github.com/webonyx/graphql-php/tree/v15.5.1"
     3686                "source": "https://github.com/webonyx/graphql-php/tree/v15.7.0"
    35753687            },
    35763688            "funding": [
     
    35803692                }
    35813693            ],
    3582             "time": "2023-06-16T12:19:23+00:00"
     3694            "time": "2023-10-04T09:10:34+00:00"
    35833695        }
    35843696    ],
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Bluem.php

    r2959619 r2981398  
    589589     * @returns null|PaymentStatusBluemResponse|MandateStatusBluemResponse|IdentityStatusBluemResponse
    590590     */
    591     public function Webhook()
     591    public function Webhook($data = '')
    592592    {
    593593        try {
    594594            $webhook = new Webhook(
    595595                $this->configuration->senderID,
    596                 $this->configuration->environment
     596                $this->configuration->environment,
     597                $data
    597598            );
    598599        } catch (Exception $e) {
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Contexts/MandatesContext.php

    r2959619 r2981398  
    4848                new BIC("ASNBNL21", "ASN Bank"),
    4949                new BIC("INGBNL2A", "ING"),
    50                 new BIC("KNABNL2H", "Knab"),
    5150                new BIC("RABONL2U", "Rabobank"),
    5251                new BIC("RBRBNL21", "RegioBank"),
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Validators/BluemXMLValidator.php

    r2959619 r2981398  
    1616    /**
    1717     * @var int
     18     *
    1819     */
    1920    public $feedErrors = 0;
     21
    2022    /**
    2123     * Formatted libxml Error details
     
    2426     */
    2527    public $errorDetails;
     28
    2629    /**
    2730     * XSD Schema definition location, to be set by context
     
    3033     */
    3134    protected $feedSchema = "";
     35
     36    /**
     37     * @var DOMDocument
     38     */
    3239    private \DOMDocument $handler;
    3340
     
    3946    public function __construct(string $feedSchema = null)
    4047    {
    41         $this->handler    = new DOMDocument('1.0', 'utf-8');
     48        $this->handler = new DOMDocument('1.0', 'utf-8');
    4249        $this->feedSchema = $feedSchema;
    4350    }
     
    6774
    6875        libxml_use_internal_errors(true);
    69         // if (!($fp = fopen($feeds, "r"))) {
    70         //    die("could not open XML input");
    71         // }
    72         // $contents = fread($fp, filesize($feeds));
    73         // fclose($fp);
    7476
    7577        $this->handler->loadXML($contents, LIBXML_NOBLANKS);
     
    8082            return false;
    8183        } else {
    82             //The file is valid
    8384            return true;
    8485        }
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Validators/WebhookSignatureValidation.php

    r2959619 r2981398  
    1010
    1111use Bluem\BluemPHP\Helpers\Now;
     12use Selective\XmlDSig\PublicKeyStore;
     13use Selective\XmlDSig\CryptoVerifier;
     14use Selective\XmlDSig\XmlSignatureVerifier;
     15
    1216use Exception;
    13 use Selective\XmlDSig\XmlSignatureValidator;
    1417
    1518class WebhookSignatureValidation extends WebhookValidator
     
    3235        $temp_file_path = stream_get_meta_data($temp_file)['uri'];
    3336
    34         $signatureValidator = new XmlSignatureValidator();
     37        $publicKeyStore = new PublicKeyStore();
    3538
    3639        $public_key_file_path = dirname(__DIR__, 2) . self::KEY_FOLDER . $this->getKeyFileName();
    3740
    3841        try {
    39             $signatureValidator->loadPublicKeyFile($public_key_file_path);
     42            $publicKeyStore->loadFromPem(file_get_contents($public_key_file_path));
     43            $cryptoVerifier = new CryptoVerifier($publicKeyStore);
     44
     45            // Create a verifier instance and pass the crypto decoder
     46            $xmlSignatureVerifier = new XmlSignatureVerifier($cryptoVerifier);
     47
     48            // Verify a XML file
     49            $xmlVerified = $xmlSignatureVerifier->verifyXml(file_get_contents($temp_file_path));
     50            if (! $xmlVerified) {
     51                $this->addError("Invalid signature");
     52            }
    4053        } catch (Exception $e) {
    4154            $this->addError($e->getMessage());
    42         }
    43 
    44         $xmlVerified = $signatureValidator->verifyXmlFile($temp_file_path);
    45         if (! $xmlVerified) {
    46             $this->addError("Invalid signature");
    4755        }
    4856
     
    7381            $timestamp = '202206090200-202307110159';
    7482        }
    75 
    7683        return $prefix . $timestamp . '.pem';
    7784    }
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Validators/WebhookValidator.php

    r2959619 r2981398  
    2828    }
    2929
    30     abstract public function validate($data): self;
     30    abstract public function validate(string $data): self;
    3131}
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Validators/WebhookXmlValidation.php

    r2959619 r2981398  
    1414// @todo: use XSD validation with given XSDs
    1515
    16 class WebhookXmlValidation extends WebhookValidator
     16class WebhookXmlValidation extends WebhookXMLValidator
    1717{
    1818    private const ALLOWED_SERVICE_INTERFACES = [
  • bluem/trunk/vendor/bluem-development/bluem-php/src/Webhook.php

    r2959619 r2981398  
    2323    private const STATUSCODE_BAD_REQUEST = 400;
    2424
    25     public string $service;
    26     public ?SimpleXMLElement $xmlObject;
    27 
    28     private string $xmlInterface;
    29     private string $xmlPayloadKey;
     25    public string $service = '';
     26
     27    public ?SimpleXMLElement $xmlObject = null;
     28
     29    private string $xmlInterface = '';
     30
     31    private string $xmlPayloadKey = '';
    3032
    3133    public function __construct(
    3234        private $senderID,
    33         private $environment = BLUEM_ENVIRONMENT_TESTING
     35        private $environment = BLUEM_ENVIRONMENT_TESTING,
     36        private $webhookData = ''
    3437    ) {
    35         $this->parse();
    36     }
    37 
    38     private function parse(): void
    39     {
    40         if (!$this->isHttpsRequest()) {
    41             $this->exitWithError('Not HTTPS');
    42             return;
    43         }
    44 
    45         if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
    46             $this->exitWithError('Not POST');
    47             return;
    48         }
    49 
    50         // Check: An empty POST to the URL (normal HTTP request) always has to respond with HTTP 200 OK.
    51         $postData = file_get_contents('php://input');
    52 
    53         if (empty($postData)) {
    54             $this->exitWithError('No data body given');
    55             return;
    56         }
    57 
    58         // Check: content type: XML with utf-8 encoding
    59         if ($_SERVER["CONTENT_TYPE"] !== self::XML_UTF8_CONTENT_TYPE) {
    60             $this->exitWithError('Wrong Content-Type given: should be XML with UTF-8 encoding');
    61             return;
    62         }
    63 
    64         $xmlObject = $this->parseRawXML($postData);
     38        $this->parse($this->webhookData);
     39    }
     40
     41    private function parse($xmlData = ''): void
     42    {
     43        if (empty($xmlData))
     44        {
     45            if (!$this->isHttpsRequest()) {
     46                $this->exitWithError('Not HTTPS');
     47                return;
     48            }
     49
     50            if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
     51                $this->exitWithError('Not POST');
     52                return;
     53            }
     54
     55            // Check: content type: XML with utf-8 encoding
     56            if ($_SERVER["CONTENT_TYPE"] !== self::XML_UTF8_CONTENT_TYPE) {
     57                $this->exitWithError('Wrong Content-Type given: should be XML with UTF-8 encoding');
     58                return;
     59            }
     60
     61            // Check: An empty POST to the URL (normal HTTP request) always has to respond with HTTP 200 OK.
     62            $xmlData = file_get_contents('php://input');
     63
     64            if (empty($xmlData)) {
     65                $this->exitWithError('No data body given');
     66                return;
     67            }
     68        }
     69
     70        $xmlObject = $this->parseRawXML($xmlData);
     71
    6572        if (! $xmlObject instanceof \SimpleXMLElement) {
    6673            $this->exitWithError('Could not parse XML');
     
    7481        }
    7582
    76         $signatureValidation = (new WebhookSignatureValidation($this->environment))->validate($postData);
     83        $signatureValidation = (new WebhookSignatureValidation($this->environment))->validate($xmlData);
    7784        if (! $signatureValidation::$isValid) {
    7885            $this->exitWithError($signatureValidation->errorMessage());
     
    138145            return $payload;
    139146        }
    140 
    141         return $payload->$key . '' ?? '';
    142     }
     147        return $payload->$key ?? '';
     148    }
     149
    143150    private function getPayload(): SimpleXMLElement
    144151    {
     
    198205    {
    199206        if ($this->isPayments()) {
    200             return $this->getPayloadValue('Status');
     207            $value = $this->getPayloadValue('Status');
     208
     209            if (!empty($value)) {
     210                return $value;
     211            }
    201212        }
    202213        return $this->getPayload()->Status . "";
  • bluem/trunk/vendor/bluem-development/bluem-php/tests/Integration/BluemGenericTestCase.php

    r2959619 r2981398  
    6464    }
    6565
    66 
    6766    // test that we can set the configuration
    6867    public function testSetConfiguration(): void
     
    9594    protected function _finalizeBluemRequestAssertion(BluemRequestInterface $request) :void
    9695    {
    97 
    9896        try {
    9997            // $this->assertEquals($request->getStatus(), "success");
  • bluem/trunk/vendor/bluem-development/bluem-php/tests/Integration/IPAPITest.php

    r2975761 r2981398  
    3535    }
    3636
    37     public function NetherlandsIPTestDataProvider(): array
     37    public static function NetherlandsIPTestDataProvider(): array
    3838    {
    3939        return [
  • bluem/trunk/vendor/bluem-development/bluem-php/tests/Integration/WebhookTest.php

    r2959619 r2981398  
    1515class WebhookTest extends BluemGenericTestCase
    1616{
    17     public function testCanPerformWebhook()
     17    /**
     18     * Test webhook for payments.
     19     *
     20     * @return void
     21     */
     22    public function testCanPerformWebhookPayment()
    1823    {
    1924        $this->markTestSkipped("To be implemented");
     25
     26        $dirPath = dirname(dirname(__DIR__)) . '/validation/webhooks';
     27
     28        $fileName = 'webhook_payment.xml';
     29
     30        $filePath = $dirPath . '/' . $fileName;
     31
     32        $status = '';
     33
     34        if (is_file($filePath)) {
     35            $xmlData = file_get_contents($filePath);
     36
     37            $webhook = $this->bluem->Webhook($xmlData);
     38
     39            if ($webhook !== null) {
     40                if (method_exists($webhook, 'getStatus')) {
     41                    $status = $webhook->getStatus();
     42                }
     43            }
     44        }
     45        $this->assertEquals('Success', $status, $fileName . ': Status not success: ' . $status);
     46    }
     47
     48    /**
     49     * Test webhook for mandates.
     50     *
     51     * @return void
     52     */
     53    public function testCanPerformWebhookMandate()
     54    {
     55        $this->markTestSkipped("To be implemented");
     56
     57        $dirPath = dirname(dirname(__DIR__)) . '/validation/webhooks';
     58
     59        $fileName = 'webhook_mandate.xml';
     60
     61        $filePath = $dirPath . '/' . $fileName;
     62
     63        $status = '';
     64
     65        if (is_file($filePath)) {
     66            $xmlData = file_get_contents($filePath);
     67
     68            $webhook = $this->bluem->Webhook($xmlData);
     69
     70            if ($webhook !== null) {
     71                if (method_exists($webhook, 'getStatus')) {
     72                    $status = $webhook->getStatus();
     73                }
     74            }
     75        }
     76        $this->assertEquals('Success', $status, $fileName . ': Status not success: ' . $status);
     77    }
     78
     79    /**
     80     * Test webhook for identity.
     81     *
     82     * @return void
     83     */
     84    public function testCanPerformWebhookIdentity()
     85    {
     86        $this->markTestSkipped("To be implemented");
     87
     88        $dirPath = dirname(dirname(__DIR__)) . '/validation/webhooks';
     89
     90        $fileName = 'webhook_identity.xml';
     91
     92        $filePath = $dirPath . '/' . $fileName;
     93
     94        $status = '';
     95
     96        if (is_file($filePath)) {
     97            $xmlData = file_get_contents($filePath);
     98
     99            $webhook = $this->bluem->Webhook($xmlData);
     100
     101            if ($webhook !== null) {
     102                if (method_exists($webhook, 'getStatus')) {
     103                    $status = $webhook->getStatus();
     104                }
     105            }
     106        }
     107        $this->assertEquals('Success', $status,  $fileName . ': Status not success: ' . $status);
    20108    }
    21109}
  • bluem/trunk/vendor/composer/autoload_psr4.php

    r2959619 r2981398  
    1212    'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
    1313    'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
     14    'Selective\\XmlDSig\\' => array($vendorDir . '/selective/xmldsig/src'),
    1415    'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
    1516    'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'),
  • bluem/trunk/vendor/composer/autoload_static.php

    r2959619 r2981398  
    2222            'Symfony\\Contracts\\Translation\\' => 30,
    2323            'Symfony\\Component\\Translation\\' => 30,
     24            'Selective\\XmlDSig\\' => 18,
    2425        ),
    2526        'P' =>
     
    5859        array (
    5960            0 => __DIR__ . '/..' . '/symfony/translation',
     61        ),
     62        'Selective\\XmlDSig\\' =>
     63        array (
     64            0 => __DIR__ . '/..' . '/selective/xmldsig/src',
    6065        ),
    6166        'Psr\\Log\\' =>
  • bluem/trunk/vendor/composer/installed.json

    r2975761 r2981398  
    33        {
    44            "name": "bluem-development/bluem-php",
    5             "version": "2.3.2.6",
    6             "version_normalized": "2.3.2.6",
     5            "version": "2.3.2.8",
     6            "version_normalized": "2.3.2.8",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/bluem-development/bluem-php.git",
    10                 "reference": "55e4eb2dbf9220d12a5cb579dad66d2b92575b94"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/bluem-development/bluem-php/zipball/55e4eb2dbf9220d12a5cb579dad66d2b92575b94",
    15                 "reference": "55e4eb2dbf9220d12a5cb579dad66d2b92575b94",
     10                "reference": "2441a00cc9cdd6099f136bf9bc00f6c816f8853f"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/bluem-development/bluem-php/zipball/2441a00cc9cdd6099f136bf9bc00f6c816f8853f",
     15                "reference": "2441a00cc9cdd6099f136bf9bc00f6c816f8853f",
    1616                "shasum": ""
    1717            },
     
    2323                "ext-openssl": "*",
    2424                "ext-simplexml": "*",
    25                 "php": ">=8.0"
     25                "php": ">=8.0",
     26                "selective/xmldsig": "^3.0"
    2627            },
    2728            "require-dev": {
     
    3536                "vlucas/phpdotenv": "^5.4"
    3637            },
    37             "time": "2023-09-29T17:12:12+00:00",
     38            "time": "2023-10-18T23:56:47+00:00",
    3839            "type": "package",
    3940            "installation-source": "dist",
     
    6869            "support": {
    6970                "issues": "https://github.com/bluem-development/bluem-php",
    70                 "source": "https://github.com/bluem-development/bluem-php/tree/2.3.2.6"
     71                "source": "https://github.com/bluem-development/bluem-php/tree/2.3.2.8"
    7172            },
    7273            "install-path": "../bluem-development/bluem-php"
     
    339340        },
    340341        {
     342            "name": "selective/xmldsig",
     343            "version": "3.0.0",
     344            "version_normalized": "3.0.0.0",
     345            "source": {
     346                "type": "git",
     347                "url": "https://github.com/selective-php/xmldsig.git",
     348                "reference": "fb9cdf2ecfcf4b65931db8796c7336a43b607d73"
     349            },
     350            "dist": {
     351                "type": "zip",
     352                "url": "https://api.github.com/repos/selective-php/xmldsig/zipball/fb9cdf2ecfcf4b65931db8796c7336a43b607d73",
     353                "reference": "fb9cdf2ecfcf4b65931db8796c7336a43b607d73",
     354                "shasum": ""
     355            },
     356            "require": {
     357                "ext-dom": "*",
     358                "ext-openssl": "*",
     359                "php": "~8.0 || ~8.1 || ~8.2"
     360            },
     361            "require-dev": {
     362                "friendsofphp/php-cs-fixer": "^3",
     363                "phpstan/phpstan": "^1",
     364                "phpunit/phpunit": "^9 || ^10",
     365                "squizlabs/php_codesniffer": "^3",
     366                "starkbank/ecdsa": "^2.0"
     367            },
     368            "time": "2023-01-28T18:17:36+00:00",
     369            "type": "library",
     370            "installation-source": "dist",
     371            "autoload": {
     372                "psr-4": {
     373                    "Selective\\XmlDSig\\": "src/"
     374                }
     375            },
     376            "notification-url": "https://packagist.org/downloads/",
     377            "license": [
     378                "MIT"
     379            ],
     380            "description": "Sign XML Documents with Digital Signatures",
     381            "homepage": "https://github.com/selective-php/xmldsig",
     382            "keywords": [
     383                "signatures",
     384                "verify",
     385                "xml",
     386                "xmldsig"
     387            ],
     388            "support": {
     389                "issues": "https://github.com/selective-php/xmldsig/issues",
     390                "source": "https://github.com/selective-php/xmldsig/tree/3.0.0"
     391            },
     392            "abandoned": "robrichards/xmlseclibs",
     393            "install-path": "../selective/xmldsig"
     394        },
     395        {
    341396            "name": "symfony/polyfill-mbstring",
    342397            "version": "v1.19.0",
  • bluem/trunk/vendor/composer/installed.php

    r2975761 r2981398  
    22    'root' => array(
    33        'name' => 'bluem-development/bluem-woocommerce',
    4         'pretty_version' => 'dev-master',
    5         'version' => 'dev-master',
    6         'reference' => 'f136d980d3c9db6ca0dee4da23d8a088c245e311',
     4        'pretty_version' => '1.0.0+no-version-set',
     5        'version' => '1.0.0.0',
     6        'reference' => NULL,
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'bluem-development/bluem-php' => array(
    14             'pretty_version' => '2.3.2.6',
    15             'version' => '2.3.2.6',
    16             'reference' => '55e4eb2dbf9220d12a5cb579dad66d2b92575b94',
     14            'pretty_version' => '2.3.2.8',
     15            'version' => '2.3.2.8',
     16            'reference' => '2441a00cc9cdd6099f136bf9bc00f6c816f8853f',
    1717            'type' => 'package',
    1818            'install_path' => __DIR__ . '/../bluem-development/bluem-php',
     
    2121        ),
    2222        'bluem-development/bluem-woocommerce' => array(
    23             'pretty_version' => 'dev-master',
    24             'version' => 'dev-master',
    25             'reference' => 'f136d980d3c9db6ca0dee4da23d8a088c245e311',
     23            'pretty_version' => '1.0.0+no-version-set',
     24            'version' => '1.0.0.0',
     25            'reference' => NULL,
    2626            'type' => 'library',
    2727            'install_path' => __DIR__ . '/../../',
     
    6868            'type' => 'library',
    6969            'install_path' => __DIR__ . '/../psr/log',
     70            'aliases' => array(),
     71            'dev_requirement' => false,
     72        ),
     73        'selective/xmldsig' => array(
     74            'pretty_version' => '3.0.0',
     75            'version' => '3.0.0.0',
     76            'reference' => 'fb9cdf2ecfcf4b65931db8796c7336a43b607d73',
     77            'type' => 'library',
     78            'install_path' => __DIR__ . '/../selective/xmldsig',
    7079            'aliases' => array(),
    7180            'dev_requirement' => false,
Note: See TracChangeset for help on using the changeset viewer.