0

below is my request json

{"description":"Offer Pass","formatVersion":1,"organizationName":"Skywire","passTypeIdentifier":"aaaaaa","serialNumber":"123456","teamIdentifier":"vvvvvvv","generic":{"primaryFields":[{"key":"name","label":"MEMBER NAME","value":"aaaaKanodia"}],"auxiliaryFields":[{"key":"key_2","label":"Membership Number","value":"P0120417"},{"key":"key_1","label":"Expire Date","value":"04\/26\/2018"}],"backFields":[{"key":"contact","label":"CONTACT","value":"For any membership queries or feedback mail us at infor@skywire.co.in\n"},{"key":"privilages","label":"PRIVILAGES","value":"Delhi : chroma, salesindia 
Mumbai : chroma, raj electronics"}]},"barcode":{"format":"PKBarcodeFormatQR","message":"P0120417","messageEncoding":"iso-8859-1"},"backgroundColor":"rgb(255,255,255)","labelColor":"rgb(0, 187, 211)","stripColor":"rgb(30, 30, 30)","foregroundColor":"rgb(0, 0, 0)","relevantDate":"2017-04-05T09:00-08:00","logoText":"","locations":[{"latitude":22.996,"longitude":72.4997}],"webServiceURL":"https:\/\/www.test.com\/qa\/skywire\/passAPI-ios\/examples\/index.php","authenticationToken":"1ef899002ccf3b9ed2f3106a38dd9cbb"}

and this is my index.php

$myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); fwrite($myfile, json_encode($_SERVER));

but newfile.txt file not generated inside ftp. anyone can help please.

Kruti Aparnathi
  • 175
  • 1
  • 11
  • You have a lot of learning to do. Your webServiceURL needs to point to the root of a RESTful web service. Your index.php may we the entry point, but it will need to be able to handle all of the 5 endpoints listed in the specification. Normally, this requires the use of redirect rules and code to parse the URI and extract the data communicated in the URI, headers and body. – PassKit Apr 08 '17 at 13:47
  • can you pls give me example for restful webservice ? – Kruti Aparnathi Apr 10 '17 at 04:41
  • Almost every API these days is an example. Lots of info here http://stackoverflow.com/questions/3636330/what-are-restful-web-services and in the possible duplicate post linked at the top. – PassKit Apr 10 '17 at 04:45
  • can I use curl ? – Kruti Aparnathi Apr 10 '17 at 05:46
  • how can i get device id ? can u please help .. – Kruti Aparnathi Apr 10 '17 at 06:05
  • As I mentioned, you have a lot of learning. This site is not set up to support teaching at the level you require. This user was in a similar situation to you, trying to develop a solution in PHP. http://stackoverflow.com/questions/15802000/how-to-generate-get-request-to-webserviceurl-version-devices-devicelibraryidenti If you review this and her other questions, you should be able to increase your understanding. – PassKit Apr 10 '17 at 06:13
  • Regarding using cURL. You need to BUILD the RESTful service. cURL is used to consume web services. In the case of Wallet, the device will be issuing the equivalent of cURL commands against your server. – PassKit Apr 10 '17 at 06:15

0 Answers0