• Resolved yeqingwp

    (@yeqingwp)


    When using your PayPal payment plug-in, an error is prompted

    INVALID_STRING_LENGTH The value of a field is either too short or too long.

    Here is the log:

    Response Body: {"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"b4cf5c4a046e5","details":[{"field":"/application_context/brand_name","value":"Purchasing disposable vape  on the Vape Alliance, bringing together high-quality electronic cigarette brands, electronic cigarette manufacturers, and providing OEM/ODM services for global electronic cigarette wholesale dealers/distributors/agents, brands","location":"body","issue":"INVALID_STRING_LENGTH","description":"The value of a field is either too short or too long."}],"links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH","rel":"information_link","encType":"application/json"}]}
    
    2022-11-18T12:24:37+00:00 WARNING Failed to create order. PayPal API response: [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
    2022-11-18T12:24:37+00:00 ERROR Order creation failed: [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
    2022-11-18T12:24:37+00:00 ERROR Order creation failed: [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
    2022-11-18T12:28:46+00:00 DEBUG POST https://api.paypal.com/v2/checkout/orders
    Request Body: {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","amount":{"currency_code":"USD","value":"1110.00","breakdown":{"item_total":{"currency_code":"USD","value":"1110.00"},"shipping":{"currency_code":"USD","value":"0.00"},"tax_total":{"currency_code":"USD","value":"0.00"}}},"description":"","items":[{"name":"\u6d4b\u8bd5","unit_amount":{"currency_code":"USD","value":"555.00"},"quantity":2,"description":"\u6d4b\u8bd5","sku":"","category":"PHYSICAL_GOODS"}],"payee":{"merchant_id":"GB7K6RPZA7B26"},"shipping":{"name":{"full_name":" "},"address":{"country_code":"AF","address_line_1":"nannskdkfa","admin_area_2":"sz","postal_code":"518000"}}}],"application_context":{"user_action":"CONTINUE","shipping_preference":"GET_FROM_FILE","landing_page":"LOGIN","locale":"zh-CN","brand_name":"Purchasing disposable vape  on the Vape Alliance, bringing together high-quality electronic cigarette brands, electronic cigarette manufacturers, and providing OEM\/ODM services for global electronic cigarette wholesale dealers\/distributors\/agents, brands","return_url":"https:\/\/invapeshop.com\/?wc-ajax=ppc-return-url","cancel_url":"https:\/\/invapeshop.com\/checkout\/"},"payer":{"email_address":"[email protected]","name":{"given_name":"fd","surname":"fdf"},"address":{"country_code":"AF","address_line_1":"nannskdkfa","admin_area_2":"sz","postal_code":"518000"},"phone":{"phone_type":"HOME","phone_number":{"national_number":"13800000000"}}},"payment_method":{"payee_preferred":"IMMEDIATE_PAYMENT_REQUIRED","payer_selected":"PAYPAL"}}
    Response Debug ID: 941daab9d2c63
    Response: Array
    (
        [code] => 400
        [message] => Bad Request
    )
    
    Response Body: {"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"941daab9d2c63","details":[{"field":"/application_context/brand_name","value":"Purchasing disposable vape  on the Vape Alliance, bringing together high-quality electronic cigarette brands, electronic cigarette manufacturers, and providing OEM/ODM services for global electronic cigarette wholesale dealers/distributors/agents, brands","location":"body","issue":"INVALID_STRING_LENGTH","description":"The value of a field is either too short or too long."}],"links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH","rel":"information_link","encType":"application/json"}]}
    
    2022-11-18T12:28:46+00:00 WARNING Failed to create order. PayPal API response: [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
    2022-11-18T12:28:46+00:00 ERROR Order creation failed: [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
    2022-11-18T12:28:46+00:00 ERROR Order creation failed: [INVALID_REQUEST] Request is not well-formed, syntactically incorrect, or violates schema. https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @yeqingwp,

    The “Brand name” field is too long and must be shorter.
    This field can be set in the “Standard Payments” tab and supports a maximum of 127 characters.
    I hope this helps!

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    We have not heard back from you in a while, so I’m marking this thread as resolved.
    Hopefully, the above information helped you out.
    If you have any further questions, please feel free to reopen this topic or create a new one.
    Thank you!

    Kind regards,
    Niklas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘INVALID_STRING_LENGTH The value of a field is either too short or too long.’ is closed to new replies.