Unsupported Media Type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey guys, Idk what happened but suddenly my paypal express checkout button doesnt work and it says : Unsupported Media Type.
I've copy and paste to make sure that I dont make any typo, but still it doesn't work.
and this is my code
any help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, i have the same problem with this config
paypal.Buttons({
createOrder: (data, actions) => {
return actions.order.create({
'purchase_units': [{
'amount': {
'value': costOfPlans[this.plan]
}
}]
})
},
onApprove: (data, actions) => {
return actions.order.capture().then(function (details) {
alert('Transaction completed: ' + data.orderID);
return fetch(process.env.API_URL + '/paypal/verifyOrder', {
method: 'post',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({
orderID: data.orderID
})
})
})
}
}).render('#paypal-button')
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Error code 415 : Unsupported Media Type' - occures when: using API to cancel Paypal subscription in REST APIs
- html smart buttons not working after inserting sandbox client id on <script src=sdk ... in Sandbox Environment
- disputes provide evidence api 415 UNSUPPORTED_MEDIA_TYPE in Sandbox Environment
- generate-qr-code return error: The requested media type is not supported in REST APIs
- RestApi - Order Capture with Postman - Getting error 415 - Unsupported Media Type in REST APIs