Is there any way to patch items on purchase_items?

gcpman
Contributor
Contributor

Implementing a donation widget on my checkout page. Paypal express is init'd on page load so I cant really add add the fee to the paypal order req

 

To solve this I'm trying to patch the order to add the item and update the subtotal so everything works out. However it seems like you are not able to patch items? It's not listed on the API but it the whole purchase_items model is. I've been trying to patch the whole order but I'm getting an error parsing the path
ie: 
"name":"UNPROCESSABLE_ENTITY","details":[{"field":"path","value":"/purchase_units/@reference_id=='default/","location":"body","issue":"INVALID_JSON_POINTER_FORMAT","description":"Path should be a valid JSON Pointer https://tools.ietf.org/html/rfc6901 that references a location within the request where the operation is performed.

Login to Me Too
1 REPLY 1

gcpman
Contributor
Contributor

my path was incorrect 

"/purchase_units/@reference_id=='default/" => "/purchase_units/@reference_id=='default/'"

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.