• Resolved ocean99988

    (@ocean99988)


    Hi,

    Been getting this error when setting up the sandbox mode.
    Wondering if anyone could help?
    The following are the error logs.

    [23-04-2018 05:22:58] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 400
    [23-04-2018 05:22:58] PayPal\Core\PayPalHttpConnection: DEBUG : Response Headers : HTTP/1.1 400 Bad Request, Date: Mon, 23 Apr 2018 05:22:58 GMT, Server: Apache, paypal-debug-id: 30c838702f18d, Content-Language: *, Connection: close, HTTP_X_PP_AZ_LOCATOR: sandbox.slc, Paypal-Debug-Id: 30c838702f18d, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2993544538%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Mon, 23 Apr 2018 05:52:58 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 279, Content-Type: application/json, ,
    [23-04-2018 05:22:58] PayPal\Core\PayPalHttpConnection: ERROR : Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment. {“name”:”VALIDATION_ERROR”,”details”:[{“field”:”transactions[0].item_list.shipping_address.city”,”issue”:”Value must not be blank.”}],”message”:”Invalid request. See details.”,”information_link”:”https://developer.paypal.com/docs/api/payments/#errors”,”debug_id”:”30c838702f18d”}
    [23-04-2018 05:22:58] PayPal\Core\PayPalHttpConnection: DEBUG :

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor angelleye

    (@angelleye)

    So the error is saying that we sent a blank shipping city in the PayPal request. This is odd because we simply pull what WooCommerce cart object has for that. Have you done something custom with your checkout pages to remove shipping fields, by chance?

    Thread Starter ocean99988

    (@ocean99988)

    Hi,

    Thanks for your reply. I used customized checkout form and disable the shipping city. I have enabled it and now i am facing another issue.

    [24-04-2018 02:11:11] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.sandbox.paypal.com/v1/payments/payment
    [24-04-2018 02:11:13] PayPal\Core\PayPalHttpConnection: DEBUG : Request Headers : POST /v1/payments/payment HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.6.4 (platform-ver=5.6.35; bit=64; os=Linux_4.14.17-x86_64-linode99; machine=x86_64; crypto-lib-ver=1.0.1e-fips; curl=7.54.1), Authorization: Bearer A21AAFE5tuInPGRBIqJuDD9NC32rOhV9JQ6pEPFY3DCCen4oeUUV-Pvpula5hxoCVeX8JgZshiRBcSYzgcD7k520dzkHkb0rQ, PayPal-Request-Id: 234266110632293152453586925575, PayPal-Partner-Attribution-Id: AngellEYE_SP_WooCommerce, Content-Length: 826, ,
    [24-04-2018 02:11:13] PayPal\Core\PayPalHttpConnection: DEBUG : Request Data : {“intent”:”authorize”,”payer”:{“payment_method”:”credit_card”,”funding_instruments”:[{“credit_card”:{“type”:”visa”,”number”:”4483742968619671″,”expire_month”:”05″,”expire_year”:2027,”cvv2″:”650″,”first_name”:”Andy”,”last_name”:”Choo”}}]},”transactions”:[{“amount”:{“currency”:”SGD”,”total”:”180.00″,”details”:{“shipping”:”0.00″,”tax”:”0.00″,”subtotal”:”180.00″}},”item_list”:{“items”:[{“name”:”Acai Berry Granola (Upsized with Love!)”,”currency”:”SGD”,”quantity”:1,”price”:”180.00″}],”shipping_address”:{“recipient_name”:”AndyChoo”,”line1″:”14 Robinson Rd”,”line2″:””,”city”:”singapore”,”state”:””,”postal_code”:”048545″,”country_code”:”SG”}},”description”:”Payment description”,”invoice_number”:”5ade923e4a8b3″,”custom”:”{\”order_id\”:5701,\”order_key\”:\”wc_order_5ade9165c27d4\”}”,”soft_descriptor”:”Singapore Red Cross”}]}
    ——————————————————————————————————————————–

    [24-04-2018 02:11:13] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 500
    [24-04-2018 02:11:13] PayPal\Core\PayPalHttpConnection: DEBUG : Response Headers : HTTP/1.1 500 Internal Server Error, Date: Tue, 24 Apr 2018 02:11:12 GMT, Server: Apache, paypal-debug-id: f396f00d514af, Content-Language: *, X-SLR-RETRY: 500, X-SLR-RETRY-API: /v1/payments/payment, Connection: close, HTTP_X_PP_AZ_LOCATOR: sandbox.slc, Paypal-Debug-Id: f396f00d514af, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D1083367002%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Tue, 24 Apr 2018 02:41:12 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 184, Content-Type: application/json, ,
    [24-04-2018 02:11:13] PayPal\Core\PayPalHttpConnection: ERROR : Got Http response code 500 when accessing https://api.sandbox.paypal.com/v1/payments/payment. {“name”:”INTERNAL_SERVICE_ERROR”,”message”:”An internal service error occurred.”,”information_link”:”https://developer.paypal.com/docs/api/payments/#errors”,”debug_id”:”f396f00d514af”}
    [24-04-2018 02:11:13] PayPal\Core\PayPalHttpConnection: DEBUG :

    Able to advise?

    Plugin Contributor angelleye

    (@angelleye)

    I see you’re working in the sandbox, and it’s giving you an “internal server error”. Unfortunately, this basically means the sandbox is not working properly at the moment. Give it a try a little later and it should be good, or if you switch to live it will work there.

    Thread Starter ocean99988

    (@ocean99988)

    Hi!

    Thanks for replying.
    I retried and i got the following error.

    [24-04-2018 08:01:25] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.sandbox.paypal.com/v1/payments/payment
    [24-04-2018 08:01:26] PayPal\Core\PayPalHttpConnection: DEBUG : Request Headers : POST /v1/payments/payment HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.6.4 (platform-ver=5.6.35; bit=64; os=Linux_4.14.17-x86_64-linode99; machine=x86_64; crypto-lib-ver=1.0.1e-fips; curl=7.54.1), Authorization: Bearer A21AAExMmADqpqiM_fb7HOA7nR75uH6GVaKLAeHw4kmHLABt_dDBI0z5_Kff241TJSdZv1wCQdt5rEIfyF2hm7bBXwIxMcd2g, PayPal-Request-Id: 234266110629374152455688245167, PayPal-Partner-Attribution-Id: AngellEYE_SP_WooCommerce, Content-Length: 823, ,
    [24-04-2018 08:01:26] PayPal\Core\PayPalHttpConnection: DEBUG : Request Data : {“intent”:”sale”,”payer”:{“payment_method”:”credit_card”,”funding_instruments”:[{“credit_card”:{“type”:”visa”,”number”:”4268372341799452″,”expire_month”:”10″,”expire_year”:”2021″,”cvv2″:”242″,”first_name”:”Andy”,”last_name”:”Choo”}}]},”transactions”:[{“amount”:{“currency”:”SGD”,”total”:”180.00″,”details”:{“shipping”:”0.00″,”tax”:”0.00″,”subtotal”:”180.00″}},”item_list”:{“items”:[{“name”:”Acai Berry Granola (Upsized with Love!)”,”currency”:”SGD”,”quantity”:1,”price”:”180.00″}],”shipping_address”:{“recipient_name”:”AndyChoo”,”line1″:”14 Robinson Rd”,”line2″:””,”city”:”singapore”,”state”:””,”postal_code”:”048545″,”country_code”:”SG”}},”description”:”Payment description”,”invoice_number”:”5adee453833b2″,”custom”:”{\”order_id\”:5705,\”order_key\”:\”wc_order_5adee3ad2c0f0\”}”,”soft_descriptor”:”Singapore Red Cross”}]}
    ——————————————————————————————————————————–

    [24-04-2018 08:01:26] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 400
    [24-04-2018 08:01:26] PayPal\Core\PayPalHttpConnection: DEBUG : Response Headers : HTTP/1.1 400 Bad Request, Date: Tue, 24 Apr 2018 08:01:25 GMT, Server: Apache, paypal-debug-id: b1735d4ea2623, Content-Language: *, Connection: close, HTTP_X_PP_AZ_LOCATOR: sandbox.slc, Paypal-Debug-Id: b1735d4ea2623, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D1441062490%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Tue, 24 Apr 2018 08:31:26 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 189, Content-Type: application/json, ,
    [24-04-2018 08:01:26] PayPal\Core\PayPalHttpConnection: ERROR : Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment. {“name”:”DUPLICATE_REQUEST_ID”,”message”:”PayPal-Request-Id header was already used.”,”information_link”:”https://developer.paypal.com/docs/api/payments/#errors”,”debug_id”:”b1735d4ea2623″}
    [24-04-2018 08:01:26] PayPal\Core\PayPalHttpConnection: DEBUG :

    Can help?

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    @ocean99988, I see that you have a similar ticket for this last question, I would recommend you to please follow it there.
    I’m going to go ahead and mark this as resolved now. But feel free to respond here again it you need any further assistance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Got Http response code 400’ is closed to new replies.