Skip to content
Advertisement

Tag: rest

How to validate a sale with PayPal REST API and IPN

I currently have a fully working cart and checkout process through PayPal _xcart method, but I want to migrate it to REST API, mainly because I want to mitigate the possibility of price-jacking. Currently my IPN does check for price jack and sets the according flags so the product doesn’t get downloaded (selling digital products only). Anyway more to the

Laravel 5 Eloquent appending relationships to JSON on multiple levels

So it is pretty easy to include relationships on models such as: when there’s a get request to the user resource, it will include associated roles automagically. But in this setup, the role resources returned with user resource also includes it’s own included relationships like: This generates huge objects, that mostly include unnecessary related child models. I can workaround this

ZF2 Apigility Rest – unable to get multiple params

I’m using Apigility to build my Rest APIs. I want to build have the ability to take in multiple parameters. Such as http://mydomain.com/users/1/activities/4 I now this is possible from this page: https://github.com/zfcampus/zf-apigility/issues/10 I have edit my module route to: ‘route’ => ‘/users/:users_id/activities[/:activities_id]’, But, I don’t know how to retrieve users_id from the url. I tried grabbing the params in my

How to pass custom header to RESTful call?

There are some web service APIs that I need to connect to for my website. Most of the APIs involve something like this: But one web service requires the API key to be set in a custom HTTP header. How do I make the request to this API url and pass the custom header at the same time? Answer You

Call a REST API in PHP

Our client had given me a REST API to which I need to make a PHP call. But as a matter of fact, the documentation given with the API is very limited, so I don’t really know how to call the service. I’ve tried to Google it, but the only thing that came up was an already expired Yahoo! tutorial

PHP multipart form data PUT request?

I’m writing a RESTful API. I’m having trouble with uploading images using the different verbs. Consider: I have an object which can be created/modified/deleted/viewed via a post/put/delete/get request to a URL. The request is multi part form when there is a file to upload, or application/xml when there’s just text to process. To handle the image uploads which are associated

RESTful API methods; HEAD & OPTIONS

I’m writing a RESTful API module for an application in PHP, and I’m a bit mixed on the verbs HEAD and OPTIONS. OPTIONS  Used to retrieve the available HTTP verbs for a given resource? HEAD Used to determine whether a given resource is available? If someone could clarify* these verbs, that would be much appreciated. * The clarification was with

Advertisement