Support » Plugin: MANGOPAY WooCommerce » Mangopay WC Vendors – Fatal Error

  • Resolved iitbritesh


    Hi, I am setting up a UK marketplace.

    I am using latest version of Woocommerce + WC Vendors and have installed Mangopay in Sandbox mode.

    These are the only 3 plugins active and no extra plugin.

    I am using a basic Generatepress theme with no customizations.

    I have two issues:

    1) On the WC Vendors vendor settings page where the vendors provide their bank data, the following fatal error shows up

    Fatal error: Uncaught MangoPay\Libraries\Exception: Unexpected response. Missing PersonType property in /home/urbanart/public_html/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php:299 Stack trace: #0 /home/urbanart/public_html/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php(61): MangoPay\ApiUsers->GetUserResponse(Array) #1 /home/urbanart/public_html/wp-content/plugins/mangopay-woocommerce/inc/ MangoPay\ApiUsers->Get(”) #2 /home/urbanart/public_html/wp-content/plugins/mangopay-woocommerce/inc/ mpAccess->get_mp_user(”) #3 /home/urbanart/public_html/wp-content/plugins/mangopay-woocommerce/inc/ mangopayWCMain->kyc_doc_upload_form_func(Array) #4 /home/urbanart/public_html/wp-includes/class-wp-hook.php(286): mangopayWCMain->kyc_doc_upload_form_doaction(‘settings.php’, ‘wc-vendors/dash…’, ‘/home/urbanart/…’, Array) #5 /home/urbanart/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #6 /home/urbanart in /home/urbanart/public_html/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php on line 299

    2) Once users registers on my-account page, they don’t get any success message but they see a blank screen that looks like page has crashed with following error – Error: MANGOPAY API returned: «Bad request. One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.»

    I believe the user has no place to enter bank details during registration – so why the error here?

    Any help will be highly appreciated

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author mangopay



    Thanks for reporting your issue.
    Do you still have the issue?
    I don’t really get where you actually have the error because normally you are suppose to enter such details in Users section of the WP admin.
    Are you talking about the vendor dashboard?

    All the best

    Thread Starter iitbritesh


    Hi, sorry for the late reply – I have been in touch with the guys at Mangopay and have found a more detailed analysis of the cause.

    So to answer your question, the problem I faced was in two places

    1) On the vendor settings page – I saw the error that I have described above in (1) – This is the WC Vendors settings page from the shortcode – [wcv_shop_settings] – this is a snapshot of the page –
    It’s a frontend page

    2) Second error I got was when registering a new user either from the frontend /my-account endpoint OR the backend wp-admin/user-new.php

    This is what Mangopay support told me –

    I have had a look and the issue is not with the set up but the data being provided.

    The initial issue is arising at the point of user creation.
    You need a user to be created in order to link the bank account to.

    However at the moment the user creation is failing and so no ID for the user is being created.

    Looking at what is causing the failure is the birthday.

    The UNIX time stamp in one birthday request is -59330793600
    This is not a valid timestamp.
    So how the birthday choice is being handled on your platform is causing the error when a user is created.

    They asked me to do this and I tried and it worked!

    Can you make a test and set the birthday to 12/12/1992.
    Let me know once done so I can see if the user is successfully created.

    I believe that there is an issue with the way the birthday field is inserted by Mangopay plugin on the registration form – See this is the output of the date picker when I select 30th November –

    Plugin Author Yann at WP&Co


    @iitbritesh the date format of the birthday field depends on the the date format you chose for WordPress in wp-admin > settings > general > date format

    The “S” parameter in dates is not supported by the MANGOPAY plugin at this time, so please use an alternate date format such as “j F Y”.

    The most common date formats that do not use the “S” parameter are supported, like for example:

    j F Y

    We might support the “S” parameter in date formats in a future release.

    Thread Starter iitbritesh


    Oh thank you so much for this! – Changed to d/m/Y and works!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mangopay WC Vendors – Fatal Error’ is closed to new replies.