The Yelp API follows the OAuth method of authentication. Once you sign up for the developer account, you get the consumer key, consumer secret, token, token secret variables. These need to be passed to the Yelp API along with the search query and location details. The output is returned as a JSON string which can then be parsed to obtain the various details of search results. The API returns the rating number, rating stars data, detailed address of the place and the phone number. However if you are interested in reading more info about the place like reviews then they have a constraint to link back to the Yelp business page of the place. This is a bit of a limitation if you want to display the data directly inside your application.
Build a prototype using Google Places API which will search for all the restaurants, based on any text query entered for a given location. The search results should return the place photos, place details, reviews and ratings.
The Google places API needs an API key to operate. Once that is generated by signing up, they are a number of web service calls which have to be made to fetch the relevant data. The text-search service was used to obtain the data for the specified text query. The request was made using CURL in PHP. Not all the place details that are needed are returned by the text-search service alone. It gives a key called as a reference id which needs to be passed on to a place details service which then returns the detailed info of the place. The photos of the place were obtained using the place photo web service call. The photo reference key obtained from the detail request needs to be passed as part of the photo service call. You can also pass the maxwidth / maxheight parameter and the thumbnail will be returned with the mentioned dimension and correct aspect ratio.
Radius search was also implemented to fetch the data based on a specified miles range.
Synchronize a web-application built for saving meditation and yoga related classes information of customers with MindBody API. The customers will signup into MindBody and their data should be captured from there and updated into the web-application database. The customers should be able to book appointments from the web-application which should be updated into the MindBody database.
The credentials for Mind-body developer API were obtained. The source name, password, siteId, were all supplied to the SOAP request call . Then a query was fired on the MindBody database as a part of the request to fetch all the customers profile information present in MindBody. The data was retrieved in CSV format. Then a validation was implemented to check if the emails of the customers were present in the web-application database. If no then these records were created in the web-application database. The MindBody client id was inserted too. If the record of the customer was found then the record was updated with the MindBody client id received from the API.
A cron job was setup to sync the database daily with Mindbody looking for new customers. The client id from Mind Body was used for mapping between the application and the API.
The customers had access to an appointment form where they could select the location, and the appointment date for booking. Then a request was made to the MindBody server passing the location, date, staff id, client id to add the new appointment in the MindBody database. The status of the API was tracked to track the success / failure of the request.
The application helped the client streamline his business in terms of managing all the user related activities and sessions for yoga and meditation.
Integrate BeanStream payment gateway in a web-application built using the wordpress framework. The Application is for a small hotel and there is a dedicated page from where the users who are interested in booking rooms can specify their booking date, room type and confirm the booking by paying the amount for the same.
An order form was created on the hotel booking page, it had all the fields added for taking the users information. The merchant id was obtained from the merchant login. It was integrated as hidden field in the payment form. The payment related fields like credit card number, name, address, expiry date, city, province, country were all integrated on the same page.
The information entered was validated for correctness and then the user information was posted on the BeanStream server payment URL via a PHP Curl Request.
This ensured that the user was not redirected away from the parent website. The Curl response was captured and the payment completion status was obtained from it. If the transaction was Approved then the user was redirected to the payment completion page , else to the cancel/failure page.
The payment notification URL was defined in the payment gateway merchant login and data sent on that URL was used to update the database with the booking information of the user.
The entire code was first built as an independent prototype and after it was tested with test and live payment transactions, it was modified to integrate into existing word-press platform. The tests were repeated after integration in word-press.
Integrate an SMS gateway into a forex signals provider website. The website has users data from all around the world. Daily the members who have purchased a plan for signals on the website should receive the signal data as an SMS and email.
A lot of research was put into by us for the client to find the best suitable SMS gateway vendor. The biggest challenge here was that the users in the database were present from different countries. Each country has its own codes for phone numbers and also multiple carriers.
After seeing multiple vendors we shorlisted BulkSMS gateway. We first built a prototype for the client by testing out sending sms to 10 different countries mobile numbers. The results and the pricing worked out well. They provide credits and have different credit charges for different countries and carriers.
The API gives good stats about the message delivery and failures. All the information was captured daily for the client and saved for reporting.
They have three groups for the SMS type which are Economy, Medium and Premium. Depending on the group selected the charges of credits used vary. The best results were obtained with the Economy group itself. Most of the SMS were delivered successfully daily, with minimum failure rate.
The logic was built into the system to find the active members in the AMember membership database and send them signal information via SMS by connecting to the BulkSMS Server URL and Port Number. The same information was sent by email too.
Integrate Liberty Reserve Payment gateway into a forex signals provider website. The forex website manages membership data using AMember. The website has monthly plans . The user should be signed up directly into the website upon purchase of a plan.
Liberty Reserve payment gateway did not support the creation of recurring plans. The various plans were created inside the merchant login. The product ids were mapped on the order form to the product ids created in AMember admin. The store account id, store name, were also passed as hidden fields in the order form.
The payment form did not have fields to capture the user information, hence before posting the data to the Liberty Reserve server, the name, email , mobile were captured on the order form itself and passed as hidden fields to the Payment URL.
The success and cancel URLs were defined, the Post Payment Notification URL was also defined in the merchant login. The data sent there was used to create the membership account of first time customers. In case of existing members their records were updated.
PS: Sometime in 2013 LR was shutdown after alleged charges of money laundering. A lot of genuine customers who had their money in their accounts became bankrupt overnight. As of now the domain name and assets are seized by the US Global Illicit financial team. The matter is being investigated.
Integrate Swreg Payment gateway into a forex signals provider website. The forex website manages membership data using AMember. The website has monthly plans and each plan will be of recurring type. The user should be signed up directly into the website upon purchase of a plan.
The recurring plans were created in the SWREG merchant login. The product ids were mapped with the product ids defined in the Amember admin.
The order form was created with the plan buttons and the various hidden fields for the payment form. On click of any plan the user was redirected to the SWREG server. The user information was collected along with his credit card information and user was redirected to a success or failure page depending on the status of the payment. The success and failure page URLs were defined in the merchant login.
The post payment notification data URL was also defined in the merchant login. The data was sent to this URL in XML format. A PHP parser script was implemented on this URL to read the payment data and create the user membership account. In case of recurring payments the users plan details were renewed. Various simulations tests were conducted in the sandbox account to test the various payment completion and cancelled scenarios.
Integrate Esellerate Payment gateway into a forex signals provider website. The forex website manages membership data using AMember. The website has monthly plans and each plan will be of recurring type. The user should be signed up directly into the website upon purchase of a plan.
The Esellerate Merchant login provided two keys for integrating the payment gateway. They were defined as hidden variables s and pc in the order form. The recurring plans for each product was created inside the merchant login. The product code was assigned as the product ids from Amember.
Each plan had a unique id which needed to be defined into a hidden variable on the order form _cartitem0.skurefnum.
The payment URL was defined as the form action and on click of the plan button the user was redirected to the Esellerate web server. The users profile information was captured in the page and on post payment the user was redirected to the Success or Cancel/Failure page. The URLs for these pages were defined in the merchant login.
The payment notification URL was also defined in the merchant login and post payment information was posted on that URL. The data returned was in XML format. The data was parsed by the XML parser program written in PHP and user was registered as a member in the Amember database.
In case of the recurring users the plan was renewed. There are also tools for posting mock data while development to the payment notification URL in the merchant login. These tools were used to test out the various cases of payments being made.
Some General Points
Esellerate as a payment gateway is very strict in taking action against websites which receive complains of selling ponzi schemes/plans, MLM ideas, abusive substances etc. They do not promote any of these activities and you should take each customer complaint very seriously else there is a good chance your account will be blacklisted. Do inquire with their support about the details of your business plans before you go ahead and purchase their gateway plans.
Integrate G2S Payment gateway into a forex signals provider website. The forex website manages membership data using Amember. The website has monthly plans and each plan will be of recurring type. The user should be signed up directly into the website upon purchase of a plan.
The details of the payment gateway were taken from the client. The G2S gateway provides the merchant id, merchant site id, secret key, payment URLs to redirect the user. The monthly recurring plans along with their frequency were defined in the G2S merchant login. Each plan has a product id and rebilling id. The product ids were mapped with the amember product plans.
On the Order page the POST buttons were created for each of the plans. When a particular plan was selected , the information associated with the plan was posted to the G2S payment URL. This URL also needed a valid checksum generated for security purpose which was composed of secret key, merchant key, rebilling product id, rebilling template id, time stamp. Upon successfully posting the data to the G2S server the user would see a payment form. On that form the personal information of the user and the credit card / banking information was captured and payment was completed.
G2S was provided with 3 URLs of the website. These were the
1) Success URL (called on post payment success)
2) Cancel / Failure URL (called on post payment failure)
3) Payment Notification URL (called on post payment)
The data captured from the Payment Notification URL was used for updating the records into the website database. The user profile information (name,email,mobile) was also captured from it and he was registered as a member with a random password, with the information sent on email and sms . In case the Post payment notification had information that the record was of type recurring then the database was updated accordingly. The logic was also built to capture each notification from the G2S server for every recurring payment made successfully or cancelled. Validations were done to ensure that while signup, the users email is unique in the system.
The client benefited with a huge number of sales of his monthly recurring plans by integrating G2S gateway with amember on his forex website.
Create a working prototype to fetch the bit-coin related information from MtGOX using its http API. The prototype will then be integrated in an eCommerce application which will use bitcoins as a form of payment currency for its transactions.
The MTGOX query needs a nonce generated along with the key and secret key as part of the headers. The data is posted on the API url via curl in PHP and it generates a JSON response. Some of the methods experimented with the API were getTrades, withdraw, info,ticker, bitcoin_tx. The success and failure endpoint URLS were defined which captured the status of the transaction done while integrating the API.