• Resolved meldev

    (@meldev)


    A customer is getting this error when trying to checkout:

    “There was an error processing your payment. Reason: Request is not well-formed, syntactically incorrect, or violates schema.”

    When I check the error log, it appears the country is missing from the shipping address and this is causing an error. However this is a virtual product and the customer does not enter any shipping info at checkout. How can I fix this issue?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @meldev

    The PayPal plugin only tries to add shipping info if WooCommerce is telling it that shipping is required.

    Can you check that your product is configured to be virtual?

    The plugin calls the WooCommerce code WC()->cart->needs_shipping() which returns true if WooCommerce determines shipping is needed. That WooCommerce function has a filter woocommerce_cart_needs_shipping which one of your plugins might be using to return true.

    Kind Regards

    Thread Starter meldev

    (@meldev)

    I checked and it is a virtual product. It is a subscription but I’m not sure that would cause this. It seems to be this particular customer that’s having an issue. I haven’t had any one else report this error. Could there be another cause?

    Plugin Author Payment Plugins

    (@mrclayton)

    The fact that it’s a subscription is a clue. When processing a subscription payment via the checkout page, the plugin relies on the WooCommerce order to tell it if a shipping address exists. It looks something like:

    $order->has_shipping_address() and if it has a shipping address, it will add it to the PayPal order object.

    So it appears that for some reason, this customer’s WooCommerce order has a shipping address associated with it and that is why the PayPal plugin is adding it.

    You could remove the shipping address info from the order via the order details page within WooCommerce or try clearing the customer’s session and asking them to re-add the item to the cart and attempting the purchase again.

    Kind Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Request is not well-formed, syntactically incorrect, or violates schema.’ is closed to new replies.