Thursday, May 20, 2010
Top Ten Reasons To Go To Google I/O 2010
1. free Motorola Droid phone
2. and ... another free HTC EVO 4G phone
3. lots of food
4. meet original developers
5. geeks/nerds party (too drunk to take picture)
6. see some big bosses
7. nice city view
8. buy iPad at list price
9. eat, drink, code and play
10. chat with 3rd parties developers at sandbox
Friday, April 30, 2010
ezSHOP - A PayPal Shopping Cart For Your Google Site
On my previous posting, I have demoed using the Google Spreadsheet to manage the PayPal shopping cart on Google Site. However, the back-end server was an Amazon EC-based PHP agent. Now I have ported the server to Google App Engine which users can just use their Google authentication login to finish the setup without giving away their passwords.
To begin the store setup you need to prepare your items on the Google Spreadsheet, you can see the example spreadsheet here. Make sure your spreadsheet has the same headers (case sensitive), the sku, title, price, picture url fields are required, all others are optional.
To start the set up go to ezshop411.appspot.com
You need to have a Google account (Gmail or Google Apps account) to start. Once you login, you will be bringing to the User Preference page. Your nick name will be your Google account id and the email will be your Google Email. The following two fields asking for an additional Google account which should have minimum READ access right for the spreadsheet you gonna use for the store. You can enter the same account information as your original one, however, for the security, we recommend use different Google account.
user preference settings
Now, open the Google Site, select the site you want to add the ezSHOP store, choose the PAGE you want to add the store Gadget, click at "Edit page" button. Once you are in EDIT mode, go to the section where you want to add the Gadget, then click at "Insert" button, choose "More gadgets"
A new window will pop out -
Click at "Add gadget by URL" on the left-hand side.
Type in the URL which you copy from your main page's Gadget URL then click at "Add" button.
You can always come back to edit the Gadget setting by clicking at "Properties" of the Gadget.
Once you save the PAGE from EDIT mode, you should be able to see the store items listing right away. The current released version only supports PayPal "Buy Now" button. I will add the PayPal shopping cart function for the next release. Once customer click at "Buy Now" button, a PayPal payment page will show up and customer can fill up the information to complete the transaction!
There are some other issues like shipping charge, sales tax, inventory control... etc. You will need to go to your PayPal account page to set up correctly. Some of the functions can be done programmatically through PayPal API, we will discuss these more details in the future releases.
Above is the sample spreadsheet we used to do the demo, you can download it and upload it to your Google Doc to test this ezSHOP Gadget.
********************************************************
NOTE:
This Gadget only works under HTTP not HTTPS since there is PayPal service url link within the HTML codes, unfortunately, now Google Sites default URL only allows HTTPS, like https://sites.google.com/a/.... therefore, you have to map your own domain host name to the Google SITES to use HTTP, for example, create a host named "store" under your Domain, so http://store.yourdomain.com will be your url. To map your domain host to Google Sites just go to "Manage Site" and choose "Map this site" button to proceed. Only done, you can see the Gadget under you own domain url page.
Friday, March 19, 2010
Create A Digital Contents Store Under Google Sites with PayPal Shopping Cart
Google Apps has become one of the most popular (Cloud Computing) IT solution for the businesses, the built-in Google Sites is a very powerful tool for publishing the web contents. The Google Sites uses the Gadget concept to create the pages, it does offer all kind of gadgets for you to choose, however, for the shopping cart gadget beside the Google Checkout Store Gadget I didn't find any gadget can offer a simple shopping cart with PayPal checkout function and Google Checkout Store Gadget only accepts Google Checkout payments.
Quite a few my customers are using PayPal as their internet merchandise service, in order to help them to accept Credit card and PayPal payments, I have developed some Gadgets for them to embed into their Google sites. The shopping Cart concept is the same as Google Shopping Cart Wizard, a Google Spreadsheet is used to maintain the store items.
When creating the Gadget, the administrator needs to decide to use PayPal BuyNow or PayPal Shopping Cart feature, and add the correct Paypal email address, the final step to to decide which Google Spreadsheet to use. Once finish, a simple layout shopping store will be generated right away! Anything you change on the spreadsheet will be updated on the web site too.
The demo case is a photo gallery store which customers need to download the photo right afetr they pay. Therefore, the PayPal Web Site Payment Standard API has been implemented to process the real time transactions. Once the server receive the payment confirmation from PayPal, an email will send to the buyer with a digital link which points to the download site of the digital content (photo image). All the contents are stored in the Google Docs without public access, the server agent needs to find out the link and make it accessable for the new customer and generate the email with the link to specified customers.
When creating the Gadget, the administrator needs to decide to use PayPal BuyNow or PayPal Shopping Cart feature, and add the correct Paypal email address, the final step to to decide which Google Spreadsheet to use. Once finish, a simple layout shopping store will be generated right away! Anything you change on the spreadsheet will be updated on the web site too.
The demo case is a photo gallery store which customers need to download the photo right afetr they pay. Therefore, the PayPal Web Site Payment Standard API has been implemented to process the real time transactions. Once the server receive the payment confirmation from PayPal, an email will send to the buyer with a digital link which points to the download site of the digital content (photo image). All the contents are stored in the Google Docs without public access, the server agent needs to find out the link and make it accessable for the new customer and generate the email with the link to specified customers.
Meetup Gadget
After finished the Meetups Coming To Town, I was asked to see if I can convert it into a Google Gadget which is much easier for users to integrate into their browser. I didn't have time until last weekend, with two days testing and tuning, the new "Meetups Coming To Town" gadget finally born.
I have to removed the auto location detect function from the web-based version since I still could not find a reliable and free geo location API and the Google Gears is still not a standard for most of the users. Therefore, users need to manually type into their state and city to get correct display. A "topic" field allow users to filter the meetups by keyword.
The background engine to talk to the Meetup API is a PHP script under Apache, I will change it to a Google App Engine application in the near future. The Google Gadgets API is very easy to use, most of the codes in the program no need to change, the Ajax part is the place I spent a lot of time to redo and tune the codes.
Give it a try and give me the comment, no matter you like it or hate it! However, the Meetup API search function is not that friendly, for example, if you search "single" you might get nothing, if change to "singles" you will get plenty of meetups.
I have to removed the auto location detect function from the web-based version since I still could not find a reliable and free geo location API and the Google Gears is still not a standard for most of the users. Therefore, users need to manually type into their state and city to get correct display. A "topic" field allow users to filter the meetups by keyword.
The background engine to talk to the Meetup API is a PHP script under Apache, I will change it to a Google App Engine application in the near future. The Google Gadgets API is very easy to use, most of the codes in the program no need to change, the Ajax part is the place I spent a lot of time to redo and tune the codes.
Give it a try and give me the comment, no matter you like it or hate it! However, the Meetup API search function is not that friendly, for example, if you search "single" you might get nothing, if change to "singles" you will get plenty of meetups.
Thursday, March 11, 2010
No API? No Problem! A Data-Entry Robot Comes To Rescue!
One of my client has average one hundred transactions on PayPal per day, I have written a program which takes advantage of PayPal API to improve the shipment process for their warehouse. However, the biggest headache for them is to enter the tracking information into PayPal for each transaction. Ever since PayPal released their first API, the developers have been asking the shipment tracking info API, and even on PayPal web site there is a name for it - AddTrackingInfo. The truth is the API item never existed!
Roughly one month ago, I read the news about a MIT student developed a graphic-based program called sikuli. I didn't pay much attention then, however, I was thinking about it might be a good replacement for the tooling I used on screen scraping and keyboard automation in some applications.
While customer keep asking, and as usual I searched entire PayPal developer site and made sure the tracking API won't be available anytime soon, I have decided to give it a try. The sikuli is a Jython-based language, it can take parameters from file, so what I need is to generate a file from the database with the PayPal transaction ID and the shipping tracking number daily, and a sikuli script file to do the data entry. The sikuli file will emulate the whole PayPal order tracking data entry process.
After two-hour trials and errors, the script finally works like a champ, since I want it to run stable rather than fast, I have added more dealy than usual, it takes around 20 seconds to finish each order update. Now I need is a compiler to make the script a executable file. Thank you sikuli, you saved my life! KowTow __/\__
Above is part of the sikuli script.
Labels:
Data-Entry Robot,
Jython,
PayPal API,
sikuli,
Tracking Info
Tuesday, March 9, 2010
Google Apps Marketplace Goes Live!
Google launched its Google Apps Marketplace tonight! After released so many APIs, Google finally opens a door for developers to integrate their applications more tightly with Google Apps.
I think this is a very important mile-stone for Google Apps which has been trying to take on IBM Lotus Notes and MS Sharepoint, and this is the only way for Cloud-based Google Apps make its way into the corporations IT door - ONE CONTROL PANEL!
My company - Auctions411 so far only offers two services under this new Marketplace, our new applications for Google Apps still under developing should be ready by April.
Anyway! Congratulations to the grand opening of Google Apps Marketplace! Hope it will bring some good businesses for cloud-based IT solution providers.
I think this is a very important mile-stone for Google Apps which has been trying to take on IBM Lotus Notes and MS Sharepoint, and this is the only way for Cloud-based Google Apps make its way into the corporations IT door - ONE CONTROL PANEL!
My company - Auctions411 so far only offers two services under this new Marketplace, our new applications for Google Apps still under developing should be ready by April.
Anyway! Congratulations to the grand opening of Google Apps Marketplace! Hope it will bring some good businesses for cloud-based IT solution providers.
Monday, March 8, 2010
Meetups Coming To Town - A Mashup of Meetup, Google Gears, & Google Map APIs
Meetup.com is one of the social network site that facilitates offline group meetings in various locations around the world. I have been attending some of the groups' meetups since 2009 and found they were very helpful, most important of all - all the meetups I went to were FREE!
The Meetup.com API is very easy to use and everybody received one API key when registering with the site. I decided to utilize the API by integrating it with Google Gears and Map APIs to come out a mashup for people can easy to find out what meetups happening in his(her) own town.
To automatically find out the locations that users are in, the Google Gears API is used to retrieve Geolocation. Users will need to install Google Gears to use the feature, otherwise, they have to manually keyin the location information.
The very first time you run the mashup it will ask your authorization -
A PHP file is running at back-end to communicate with Meetup API and the main program - mymu.html, I need to modifiy the header of the json output from Meetup in order for Dojo to accept it as a dojox.data.jsonreststore datastore to feed the spreadsheet displayed on top.
The main JavaScript function - init() will try to find the user geolocation first, then retrieve data from Meetup API and populate the information on Dojo spreadsheet and a Google Map.(init2)
The Meetup.com API is very easy to use and everybody received one API key when registering with the site. I decided to utilize the API by integrating it with Google Gears and Map APIs to come out a mashup for people can easy to find out what meetups happening in his(her) own town.
To automatically find out the locations that users are in, the Google Gears API is used to retrieve Geolocation. Users will need to install Google Gears to use the feature, otherwise, they have to manually keyin the location information.
The very first time you run the mashup it will ask your authorization -
A PHP file is running at back-end to communicate with Meetup API and the main program - mymu.html, I need to modifiy the header of the json output from Meetup in order for Dojo to accept it as a dojox.data.jsonreststore datastore to feed the spreadsheet displayed on top.
<?php
$state = urlencode($_GET["state"]);
$city = urlencode($_GET["city"]);
if (isset($_GET["page"]))
$page = $_GET["page"];
else
$page = "50";
if (isset($_GET["topic"]))
$topic = $_GET["topic"];
else
$topic="";
if (! isset($_GET["type"]))
$type=0;
else
$type=$_GET["type"];
switch($type) {
case "0":
break;
case "1":
$curl = curl_init();
$req = "http://api.meetup.com/events.json/?country=us&state=" . $state . "&city=" . $city . "&key=YourMeetupApiKey";
if ($topic != "") {
$req .= "&topic=" . $topic;
}
if ($page != "") {
$req .= "&page=" . $page;
}
curl_setopt($curl, CURLOPT_URL, $req );
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
$result=str_replace("\"results\":", "identifier:\"id\", items:", $result);
echo $result;
break;
}
?>
You can test the program by going to maps.auctions411.com and see the detail javaScript and HTML codes from there. Beside the "State" and "City" filters, a optional "Topic" field is also available for you the limit the results. A Dojo speradsheet on upper page will show all the future meetups coming to your city, and a Google Map on the lower page will display where they will be held. Click at the row of the spreadsheet or the Google map marker, a more detail window will pop-out.The main JavaScript function - init() will try to find the user geolocation first, then retrieve data from Meetup API and populate the information on Dojo spreadsheet and a Google Map.(init2)
function init() {
if (!window.google || !google.gears) {
alert('Gears is not installed, please get it at http://gears.google.com ');
return;
}
function successCallback(p) {
if (p.gearsAddress.country == "United States") {
dijit.byId('city').attr('value', p.gearsAddress.city);
dijit.byId('state').attr('name', p.gearsAddress.city);
}
init2();
}
function errorCallback(err) {
var msg = 'Error retrieving your location: ' + err.message;
alert(msg);
}
try {
var geolocation = google.gears.factory.create('beta.geolocation');
geolocation.getCurrentPosition(successCallback,
errorCallback,
{ enableHighAccuracy: true,
gearsRequestAddress: true });
} catch (e) {
alert('Error using Geolocation API: ' + e.message);
return;
}
}
function init2() {
gridView(); //create spreadsheet
loadMap(dijit.byId('city').value + ", " + dijit.byId('state').value); // load the city map
drawMap(store); // draw the markers
}
Labels:
Dojo,
GeoLocation,
Google Gears,
Google Map,
Mashup,
Meetup,
Meetup API
Subscribe to:
Posts (Atom)






















