• Resolved mawebdesignuk

    (@mawebdesignuk)


    Hi
    We had a payment that failed today with the following error, any idea why?

    Failed to process the payment. Please try again or contact the shop admin. 
    
    [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. 
    
    https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX 
    
    https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH PayPalGateway.
    
    php:500 [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. 
    
    https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX 
    
    https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH OrderEndpoint.
    
    php:551 Order status changed from Pending payment to Failed.

    Any help much appriciated

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @mawebdesignuk,

    The wording of your message makes it sound like this happened only for a single order. Are other PayPal orders completing?
    This error combination could occur, for example, when the plugin is configured with invalid API credentials. But in that case, all order attempts would fail.
    To better judge it, we would need a link to the site with the PayPal gateway enabled.

    I suggest disconnecting your account and reconnecting it using the onboarding wizard, as this automatically inserts the API credentials for you.
    Please let us know how this works for you. Thanks!

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Hi @niklasinpsyde

    Its a first order using PayPal, we have used the onboard wizard; which automatically inserts the API credentials for us. So these must be correct.

    The URL is https://justbeds.direct/

    Thank you for your help and support

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @mawebdesignuk,

    The PayPal Payments log files would help us better understand the issue or when the gateway is enabled and the button can be clicked.
    Could you please check if Logging is enabled in the Connection tab?
    If not, we are first interested in a copy of your WooCommerce system report. The system report can be accessed from here:
    WooCommerce > Status > Get system report > Copy for support
    You can share it either here in the forums or privately with us from here:
    https://paypal.inpsyde.com/docs/request-support/
    If you send a private message, please include a link to this thread.
    Thanks!

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Hi Niklas

    Yes we had to disable PayPal until the issue is resolved, are you free now if we enable it for you to test??

    Report

    ### WooCommerce PayPal Payments ###
    
    Onboarded: ?
    Shop country code: GB
    WooCommerce currency supported: ?
    Advanced Card Processing available in country: ?
    Pay Later messaging available in country: ?
    Webhook status: –
    Vault enabled: ?
    Logging enabled: –
    Reference Transactions: –
    Used PayPal Checkout plugin: –
    Tracking enabled: ?

    Thank you

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @mawebdesignuk,

    Thanks, could you please also enable Logging in the Connection tab ? This logs additional information.
    But I will check right away when you re-enable the gateway for a moment.
    Thanks!

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Hi

    The logging has been enabled and the gateway has been enabled ??

    Thanks for you help and support with this

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @mawebdesignuk,

    Thanks! I checked, and the gateway appears functional. So the problem is not with the API credentials.
    It could also be that there is a specific product which, for some reason, exceeds a string limit. So it may be worth giving it a try with exactly the product combination from the failed order.

    But just adding a few random products and attempting to check out did not result in any errors for me (these usually occur directly when clicking the button).
    To understand what exactly the problem is, we would need to see the full body of the API request that failed. As long as Logging is enabled, every API request will be logged and the invalid field will be highlighted.
    So this error somehow must be triggered and logged to be able to judge which field is the problem.

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Hi

    The failed product was:

    https://justbeds.direct/product/nbb-bunk-bed/

    This was the error:

    Failed to process the payment. Please try again or contact the shop admin. [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH PayPalGateway.php:500 [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH OrderEndpoint.php:551 Order status changed from Pending payment to Failed.

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    I can make a payment fail with a similar error when providing invalid field data like a name with more than 127 characters, but this is not something a user would normally do. And I think this also does not result in a failed order being created.
    You could see this in the logs, though.

    So I’m afraid, without logs of the original payment attempt, I can’t quite judge which problem prevented this order from completing.
    In any case, to verify the entire payment flow, we recommend testing the plugin with a PayPal sandbox account connected: https://woocommerce.com/document/woocommerce-paypal-payments/#testing-in-sandbox
    This allows you to go through the entire checkout process without moving actual funds.
    I wouldn’t anticipate any issues based on what I’m seeing on your page, though.

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Hi

    Ok, appriciate your help.

    So if a user puts in the name field more than 127 characters, the order fails, is that correct?

    PS: Will try the sandbox account ??

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Also with us just enabling the logs, the old failed order would not be in there, would it?

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    So if a user puts in the name field more than 127 characters, the order fails, is that correct?

    Yes, PayPal only accepts field values with a certain length, and exceeding it usually causes an error. That being said, I don’t think this necessarily what happened to the initial order, as lots of details are sent to PayPal that could potentially be invalid.

    Also with us just enabling the logs, the old failed order would not be in there, would it?

    Correct, the logs are only written while the Logging checkbox in set. So if logging was deactivated, it can be difficult to judge what exactly happened with previous orders.
    But when logging is enabled, errors like this are usually easy to pinpoint, granted the error does occur.

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Ok

    Really appriciate you help ??

    We will try the sandbox account and keep logs enabled.

    Have a great day

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Thanks, if you encounter any more error or when other questions come up, don’t hesitate to let us know.

    If you don’t have a separate staging site for testing, you can also?install the plugin?Check Conflicts. This allows you to change theme and plugin activations?only for your IP address, so the changes are not visible to other visitors of your site.
    With this plugin, you can enable PayPal Payments only for your IP address and make sandbox tests, while regular visitors will not see the PayPal gateway.
    I hope this helps!

    Kind regards,
    Niklas

    Thread Starter mawebdesignuk

    (@mawebdesignuk)

    Your a star, thanks for your support

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Failed to process the payment’ is closed to new replies.