• Resolved Annonnimmo

    (@annonnimmo)


    Hi,
    I have only one virtual product, so I removed billing address related fields and also all shipping fields from Woocommerce checkout.

    When I try to pay with Paypal button or credit cartd button, it appears the error:
    /purchase_units/@reference_id=='wc_order_6QTH749ElJmxO'/shipping/address/country_code A required field / parameter is missing.

    Country is Italy.

    May I pass this field with some small code in functions.php?
    May you help me?
    Thank you.

    From the log:

    2022-01-05T16:10:19+00:00 INFO Smart PayPal Checkout For WooCommerce Version: 2.0.8
    2022-01-05T16:10:19+00:00 INFO WooCommerce Version: 6.0.0
    2022-01-05T16:10:19+00:00 INFO Test Mode: Yes
    2022-01-05T16:10:19+00:00 INFO Action Name : Create order
    2022-01-05T16:10:19+00:00 INFO Order Request : Array
    (
        [intent] => CAPTURE
        [application_context] => Array
            (
                [brand_name] => Associazione
                [locale] => en-US
                [landing_page] => NO_PREFERENCE
                [shipping_preference] => NO_SHIPPING
                [user_action] => PAY_NOW
                [return_url] => https://www.google.com
                [cancel_url] => https://www.google.com
            )
    
        [payment_method] => Array
            (
                [payee_preferred] => IMMEDIATE_PAYMENT_REQUIRED
            )
    
        [purchase_units] => Array
            (
                [0] => Array
                    (
                        [reference_id] => wc_order_yXj69uw09ViW2
                        [amount] => Array
                            (
                                [currency_code] => EUR
                                [value] => 10
                                [breakdown] => Array
                                    (
                                        [item_total] => Array
                                            (
                                                [currency_code] => EUR
                                                [value] => 10
                                            )
    
                                    )
    
                            )
    
                        [soft_descriptor] => Associazione
                        [invoice_id] => WC-PSB10875
                        [custom_id] => {"order_id":10875,"order_key":"wc_order_zdLikpJqVrUZN"}
                        [items] => Array
                            (
                                [0] => Array
                                    (
                                        [name] => Iscrizione
                                        [category] => DIGITAL_GOODS
                                        [quantity] => 1
                                        [unit_amount] => Array
                                            (
                                                [currency_code] => EUR
                                                [value] => 10
                                            )
    
                                    )
    
                            )
    
                        [shipping] => Array
                            (
                                [name] => Array
                                    (
                                        [full_name] => Pippo Rossi
                                    )
    
                                [address] => Array
                                    (
                                        [admin_area_1] => TN
                                    )
    
                            )
    
                    )
    
            )
    
        [payer] => Array
            (
                [email_address] => [email protected]
                [phone] => Array
                    (
                        [phone_number] => Array
                            (
                                [national_number] => 43534534534
                            )
    
                    )
    
                [name] => Array
                    (
                        [given_name] => Pippo
                        [surname] => Rossi
                    )
    
            )
    
    )
    
    2022-01-05T16:10:19+00:00 INFO Error Message : Array
    (
        [name] => INVALID_REQUEST
        [message] => Request is not well-formed, syntactically incorrect, or violates schema.
        [debug_id] => 958ac6ed83f28
        [details] => Array
            (
                [0] => Array
                    (
                        [field] => /purchase_units/@reference_id=='wc_order_yXj69uw09ViW2'/shipping/address/country_code
                        [value] => 
                        [location] => body
                        [issue] => MISSING_REQUIRED_PARAMETER
                        [description] => A required field / parameter is missing.
                    )
    
            )
    
        [links] => Array
            (
                [0] => Array
                    (
                        [href] => https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER
                        [rel] => information_link
                        [encType] => application/json
                    )
    
            )
    
    )
    
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor mbjtech

    (@mbjtech)

    @annonnimmo,
    Hello Annonnimmo,

    Thank you so much for submit support ticket!!

    We found issue and started working on it, will get back to you with new released within next 24 hours.

    Please keep in touch and update latest version when it available, will update you here as well.

    Thanks again.

    Plugin Contributor mbjtech

    (@mbjtech)

    @annonnimmo
    Hello Annonnimmo,

    We just resolved issue and released new version.

    Please update plugin version and let me know if you need more help.

    Thanks!

    Thread Starter Annonnimmo

    (@annonnimmo)

    Hi @mbjtech ,
    updating to version 2.0.9 solved the problem.

    Good and fast support, thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error “/shipping/address/country_code A required field / parameter is missing”’ is closed to new replies.