How can I use google checkout function in my Flex 4 web application?
Now I am developing a flex appli开发者_如何学Pythoncation (app server is apache + PHP + mysql ) what need integrate with google checkout function ,but the google checkout has not flex SDK to use ,what should I do ?Thanks .
The problem with standard google checkout is you go to google to checkout. That can confuse customers and you will lose sales when people don't complete the order once they get to google checkout.
The better approach is to build/find a simple order system backend and a flex shopping cart front end. The order process will work as follows using 1 php script...
- The customers places items in the cart (flex) and chooses to checkout
- The data from the cart is passed and stored in your order system (mysql) and given an orderID. Make sure you have an order_status column and set it to "pending".
- Now using the Google Checkout API you pass the customer's infomation, billing, shipping, order total and the orderID that you want google to pass back to you as part of the results. This will all be done behind the scenes using the API and a php script.
- Google's API will respond and you store that response in your order database updating the status to "New Order" or "Declined" and store any extra feedback in another column in case you want to lookup why an order was declined if a customer calls.
- Now output the response from google in your script ... echo $response;
- In Flex you will listen to the response and show the customer a "Thank You!" page with maybe an orderID. Also a good idea to send an email in that same PHP script if google doesn't already do it for you.
Links to google checout and api docs Google Checkout: custom_cart Google Checkout: custom_processing
I made something just like this but using paypal's payments pro api. To save you time you may want to look around for a prebuilt shopping cart that you can use just for it's backend order and product system. And you may be able to find a flex shopping cart to use as well. The goal is to make the process seamless to your custom so they never need to leave the flex app. The click checkout, fill out the form (billing, shipping) ... progress bar/icon spins, results pops up with a thank you.
精彩评论