About 100 lines of boilerplate API code rewritten from C# to PHP

Slutfört Publicerat Jun 4, 2013 Betalades vid leverans
Slutfört Betalades vid leverans

I have an API with sample code in C#. I would like the sample code to be rewritten in PHP and tested.

-- SpyFuApiRequestBuilder Class --

This will probably be the bulk of the work. This is where the request is set up. It has 2 headers, Timestamp and Authentication. You'll want to make sure the datetime formatting is identical, otherwise the request will fail. Then on the Authentication header, it's basically a keyed HMAC where you're concatenating request elements into a string, then hashing that string with a secret key. One thing to pay attention to here is the ordering of the elements - the ordering needs to be the same, otherwise you could end up with a different hash than the server for the same request data.

-- SampleRequest Class --

This class is fairly simple. All it does it use the SpyFuApiRequestBuilder class to build a request, then submits it, then verifies that it gets a reasonable result back.

-- Testing Notes --

You can use the same username and secret key that are in the C# sample code. The server won't accept requests where the Timestamp is not within 15 minutes of the server time, so you should probably use the current time for each request you make while testing. Doing that should also avoid another possible little issue, which is that the server will only accept a given signature once (no repeated requests). If you just resign with a new datetime though, you should get a fresh hash that will work just fine.

Forgot to mention, for your current timestamp, use the current UTC time.

C#-programmering PHP

Projekt-id: #4590190

About the project

6 offerter Distansprojekt Aktivt Jun 5, 2013

Tilldelades:

photonix

Hello. I have reviewed your code and can get your code converted into php quickly for you. Please see private messages.

$100 USD inom 2 dagar
(4 omdömen)
2.6

6 frilansare har lagt bud på i genomsnitt $168 för det här jobbet

nuprogramer

Hello , I am expert and can do this for you.

$155 USD inom 3 dagar
(66 omdömen)
6.7
kamrankhatti

can do this for you

$155 USD inom 3 dagar
(57 omdömen)
6.6
aziz2k9

I can do this job.

$244 USD inom 7 dagar
(9 omdömen)
4.0
abparmar99

Hello sir, I have gone through your details and i can do it easily. Let's discuss and start.

$257 USD inom 5 dagar
(9 omdömen)
3.2
lukaszlach

I have reviewed your C# code and find it really simple to convert to PHP. I can handle both your PHP and Node.js code rewriting projects.

$94 USD inom 5 dagar
(0 omdömen)
0.0