• Resolved quangthien27

    (@quangthien27)


    Hi, Paypal is connected successfully on our plans page, but I’m getting this error when trying to subscribe using Paypal

    Console error: Uncaught Error: Expected an order id to be passed

    Request

    {

    "additional_properties": {},

    "body": {

    "intent": "CAPTURE",

    "purchase_units": [

    {

    "amount": {

    "currency_code": "USD",

    "value": "1.49",

    "breakdown": {

    "item_total": {

    "currency_code": "USD",

    "value": 1.49

    }

    }

    },

    "items": [

    {

    "name": "Supporter",

    "quantity": 1,

    "unit_amount": {

    "currency_code": "USD",

    "value": 1.49

    }

    }

    ]

    }

    ],

    "payment_source": {

    "paypal": {

    "attributes": {

    "vault": {

    "permit_multiple_payment_tokens": "false",

    "store_in_vault": "xxxxxx",

    "usage_type": "MERCHANT",

    "customer_type": "CONSUMER"

    }

    },

    "experience_context": {

    "user_action": "PAY_NOW",

    "shipping_preference": "NO_SHIPPING",

    "return_url": "https://[redeacted]/account/",

    "cancel_url": "https://[redeacted]/account/"

    }

    }

    }

    },

    Response

    {

    "additional_properties": {},

    "body": {

    "name": "INVALID_REQUEST",

    "message": "Request is not well-formed, syntactically incorrect, or violates schema.",

    "debug_id": "[redeacted]",

    "details": [

    {

    "field": "/purchase_units/@reference_id=='default'/amount/breakdown/item_total/value",

    "value": "xxxxxx",

    "location": "body",

    "issue": "INVALID_STRING_LENGTH",

    "description": "The value of a field is either too short or too long."

    },

    {

    "field": "/purchase_units/@reference_id=='default'/items/0/unit_amount/value",

    "value": "xxxxxx",

    "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": "xxxxxx"

    }

    ]

    },
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Paypal button doesn’t work’ is closed to new replies.