• dannykater

    (@dannykater)


    From front-end we:
    – Register users
    – Update user profile fields (user_mp_status and user_business_type)

    Then when you go to the WCV Pro Shop Settings Page it’s broken and debug_log.php shows below error (whole error at the bottom):

    [09-Nov-2017 16:16:39 UTC] PHP Fatal error: Uncaught MangoPay\Libraries\Exception: Unexpected response. Missing PersonType property in /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php:299

    I found out that it’s because the mp_user_id_sandbox is not set yet. This value only seems to be set when i open the profile in the back-end or when a user completes an order. Obviously we would like the Shop Settings Page to work before so users can complete the KYC.

    Thanks.

    Whole error log:

    [09-Nov-2017 16:16:39 UTC] PHP Fatal error:  Uncaught MangoPay\Libraries\Exception: Unexpected response. Missing PersonType property in /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php:299
    Stack trace:
    #0 /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php(61): MangoPay\ApiUsers->GetUserResponse(Array)
    #1 /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/inc/mangopay.inc.php(1541): MangoPay\ApiUsers->Get('')
    #2 /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/inc/main.inc.php(468): mpAccess->get_mp_user('')
    #3 /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/inc/main.inc.php(405): mangopayWCMain->kyc_doc_upload_form_func(Array)
    #4 /var/www/virtual/surfsnb.com/htdocs/wp-includes/class-wp-hook.php(298): mangopayWCMain->kyc_doc_upload_form_doaction('store-settings....', 'wc-vendors/dash...', '/var/www/virtua...', Array)
    #5 /var/www/virtual/surfsnb.com/htdocs/wp-includes/class- in /var/www/virtual/surfsnb.com/htdocs/wp-content/plugins/mangopay-woocommerce/sdk/MangoPay/ApiUsers.php on line 299
    • This topic was modified 7 years ago by dannykater.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Yann at WP&Co

    (@ydubois)

    The MANGOPAY user IDs are supposed to be created as soon as a user registers (wether it is a vendor or a buyer). Could you please specify how the users were registered?

    Registration using default WP/WooCommerce registration pages (back-end or front-end) should automatically create all necessary information, so I suspect there is some unsupported customized registration process?

    Please also specify which version of WC Vendors Pro is being used, thanks.

    • This reply was modified 6 years, 10 months ago by Yann at WP&Co.
    Thread Starter dannykater

    (@dannykater)

    Yes, i use a custum registration page. On which action hook is this “necessary information” automatically created? Then i’ll add an do_action on the custom registration page.

    Thanks.

    Plugin Author Yann at WP&Co

    (@ydubois)

    The right way to do things would be to modify the existing registration forms using templates and hooks provided by WooCommerce. It will be quite hard to reproduce the same workflow and call all necessary hooks by yourself outside of the WooCommerce “standard” workflow. And things risk to break whenever you upgrade WooCommerce.

    The problem is not only that all required fields must be added to the form, they also need to be validated and saved at the right time, and the MANGOPAY API needs to be called to create the users. And there are also front-end scripts that are used for the country and date picker menus.

    I thus strongly encourage you to build your registration forms only by modifying the existing form templates provided by WordPress, WooCommerce and WC-Vendors, and not to try to build your own forms outside of those.

    The MANGOPAY WooCommerce plugin will only ensure compatibility with the “official” registration forms. Anything else will be unsupported custom work. We do not provide help for such customizations / developments in this user support forum.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing PersonType’ is closed to new replies.