• Resolved uncharted83

    (@uncharted83)


    I recently installed and activated PayPal on my site.
    I tested it in sandbox mode twice and it work fine.

    A few days later we got our first customer that use PayPal, so by then, I think it’s all ok. However, the next day I get the next customer. This is where it gets wired.

    I saw 3 orders in my WordPress Backend from the same customer. The first one is a success. The second one failed, the third is yet a success – but processed with Stripe instead.

    Luckily, I could check what went wrong through Hotjar, and I see he gets an error message after the first try. “Something went wrong, please try again”.
    The second time he get’s the same error.

    The only problem is that the first time was a success and the money came through.

    Anyway, I contacted PayPal Developer support and they said the payment was declined due to risk. Didn’t get any explanation to why it was declined and at the same time a success?

    Anyway, one day later we get our next paying customer – who first try PayPal, and get an error message [UNPROCESSABLE_ENTITY] THe requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v*/#error-MISSING_SHIPPING_ADDRESS

    So I return to support and I get an answer. I have no clue what he’s talking about. I think he assumes I’m a developer maybe?

    This is his email to me:

    Good Day, 
    
    Happy to assist you on this request!
    
    We have analysed your API request logs and could find that you've processed /v2/checkout/orders API request call. Where we could find the  the variable application_context.shipping_preference is passed with value SET_PROVIDED_ADDRESS and no shipping address details was passed in the API request. 
    Due to the reason the API request was declined with error message "The shipping address is required when shipping_preference=SET_PROVIDED_ADDRESS", we request you to pass the shipping details variable on your v2/checkout/orders API request calls.
    
    According to our API request logs, you are passing this variable:
    
        "return_url": "https://pellvac.com/?wc-ajax=ppc-return-url",
            "shipping_preference": "SET_PROVIDED_ADDRESS",
            "user_action": "CONTINUE"
        }
    
    Our full response is: 
    {
        "debug_id": "4b9a7d1a46730",
        "details": [
            {
                "description": "The shipping address is required when <code>shipping_preference=SET_PROVIDED_ADDRESS</code>.",
                "field": "/purchase_units/@reference_id=='default'/shipping/address",
                "issue": "MISSING_SHIPPING_ADDRESS"
            }
        ],
        "links": [
            {
                "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_SHIPPING_ADDRESS",
                "method": "GET",
                "rel": "information_link"
            }
        ],
        "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
        "name": "UNPROCESSABLE_ENTITY"
    }
    
    Actually, you would need to pass the full shipping address of the buyer.
    
    Example:
    
     "shipping": {
                    "address": {
                        "address_line_1": "*****",
                        "address_line_2": "*****",
                        "admin_area_1": "xxxx",
                        "admin_area_2": "xxx",
                        "country_code": "XX",
                        "postal_code": "XXX XXXX"
    
    For more information about shipping variables, please find the link below:
    https://developer.paypal.com/docs/api/orders/v2/#definition-shipping_detail
    
    We request to check your integration and pass the missing mentioned shipping variable on your API request call will resolve your issues. 
    
    Thank you so much for understanding!

    —————————

    What am I supposed to do with this information? And will this fix the other issue I stated in the beginning of this novel of mine?

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

Viewing 5 replies - 16 through 20 (of 20 total)
Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘[UNPROCESSABLE_ENTITY] — Missing Shipping Adress’ is closed to new replies.