Google Checkout : Best way to handle cart editing and checkout confirmation - web-services

I am in the process of implementing Google Checkout in an e-store. Once customers click the 'Google Checkout' button, my project requires that they are able to navigate back to the e-store to possibly edit the cart. Customers should be able to click the 'back' button, type in the URL to my cart page, or click the 'edit' link from Google.
At the same time, I need to clear the cart and provide customers with a blank slate as soon as they click the confirmation button on Google's side. I am already listening for a new-order-notification from Google, but this does not always arrive quickly enough to prevent customers from returning to the e-store and scratching theirs heads as to why their carts still show the items they just purchased.
Have any Google Checkout implementors come up with a novel solution to this problem? Any ideas are appreciated!

I've done this using 2 different approaches, neither properly fulfils your requirement of handling the back button AND clearing the basket if they complete the order, but they've worked for me in practice without any complaints.
First approach: clear the basket and provide way of reconstructing it via query string in the "EditCartUrl" Google Checkout request parameter. Then, when the customer clicks the edit basket button their basket is reconstructed. The back button, however, does not work in this situation.
Second approach: don't clear the basket, but (optionally) make it read-only before redirecting to Google Checkout. We do this so that the basket record cannot be changed while they are within Google Checkout. If they then click back, or edit cart, a NEW basket is created on our site (cloned from the original) each time. This provides support for the back button, but will only provide the customer with a cleared basket if the order has gone through and we have processed the request before they return to the site.
Making the basket read-only is optional - we do it so we can preserve the basket record to match the resulting order from Google Checkout. If you don't require this, it's as simple as not clearing the basket.
The second approach has done me fine for the last few years without any complaints from customers. I'd rather the customer be able to click the back button than worry too much about them seeing the basket not empty itself after checking out using Google.

Related

How to develop a button for followers of a web site

I apologize for my English it is not very good.
I am developing a website that will have own followers.
I need to create a button by followers such as facebook, twitter or google plus buttons.
Thank you for any information that will allow me to begin to develop the button next to the platform.
Thank you
First, your English is fair enough. For creating your own follow button you will have to have an image that will be displayed on your website. When someone clicks on that button, your webapp should be able to know who clicked it and your should be able to remember that user in future as well. So first you will have users to register on your website (like facebook and twitter) for unique identification of each user.
Next, for remembering that a particular user is following your website you need to persist some information about that user. The obvious approach is having a database table to store the information. For instance you can have IS_FOLLOWING column in your USER table
But there are some considerations. First, the user must remain on the same page or be able to continue his activity even after cicking the follow button. For example, if the user is filling some form then his data should remain intact even after clicking the follow button. If the user is directed to some other page, he might lose information.
Second, database operations are costly. So you need to use them wisely.
One approach that I could think of is having AJAX do the work. If you want to learn AJAX you can visit this website and for AJAX database operations this one will be helpful.
Ajax will do all the work in background and both the problems mentioned above will be addressed. I hope this was helpful.

Paypal shipping options

I'm using github.com/dcramer/django-paypal.git, what I sell are features for my webpage, so I don't need shipping info.
As some customers have told me that, they don't want to give their address, I want to accept payments without shipping information.
How can I do that?
My suggestion would be to hide that field in your site, and always send a specific address as the shipping address. Unless PayPal thinks its some kind of fraud it should work.
If the only thing you are going is creating a PP button, You have no control over what information PayPal asks for. ( As the button redirects them to PayPal's Site.) I am not sure if subscription Buttons work for you, but they may not ask for a shipping address.
Finally, your end Users can just enter some fake address, either to you or two PayPal. If your not actually gonna ship anything it doesn't matter.
EDIT: Did a bit more looking and found this. It is PayPal Documentation on Buttons. maybe useing BUTTONSUBTYPE
(Optional) The use of button you want to create. It is one of the following values:
PRODUCTS - button is used to purchase products; default for Buy Now and Add to Cart buttons
SERVICES - button is used to purchase services
EDIT2: Also see this. Look for no_shipping in Payment Pages section.

Possible to log form submission?

Here is the situation. My company has an e-commerce store, but we don't gather or process credit card information ourselves. When a user selects "Pay with credit card", they are immediately taken to the payment site, and then that site processes their credit card and sends the status back to us so that the order can be marked paid. Our site runs on ColdFusion, and it receives the data from the site as form data, processes the form variables, and creates an order for the customer, marked as paid. The credit card site only sends the information once, and there is no "handshake".
In the last month and a half we have been having an issue where occasionally we are not getting the information from the credit card processing site, although they say they have sent it. Hence orders are not being created, and products are sitting in customers' carts, even though the credit card has been charged. This problem is intermittent. We can't tie it to any server changes on our side, and the credit card site denies changes on their side.
So among the things we are trying to do is to log when the customers are actually trying to pay by credit card (so we can catch the missed ones more easily). So I want to somehow log the event when someone clicks "Pay with credit card." Issue is that form action submits the data to the credit card site. The only way I can think of to do this, is to change the form action to a page on our site, log the payment attempt, and then submit the form again to the credit card company. I know I can submit a form automatically with JavaScript, but that seems like a bad solution (what if JS is turned off?), but don't know how it would be possible to do server-side.
Please try to avoid solutions that involve AJAX if possible, as I know very little about it (I am a very rookie web developer in general, and just inherited this whole set-up).
Better solutions for how to log this event, or suggestions in general for this mess, will be greatly appreciated!
Responses to comments:
To Sam Dufel:
Would love to change to another provider like Paypal. Unfortunately my company is actually part of a university and we all have to use the same payment gateway.
To flup:
Would using a 301 or 302 status code preserve the form data? I tried looking this up, and it looks like it works with "get", but I need it to be sent with "post", since that is what the payment gateway is expecting.
To imthepitts:
We receive it as form data.
To Revent:
The issue is that orders aren't getting created at all (so customer and order information is just sitting in the temporary basket/customer/order tables). It seems like the page that is supposed to process the form data from the payment gateway isn't being accessed. I have added some logging to that page, but my company is so freaked out that they have disabled credit card payments and so I am not getting any data. If I can convince them that I have implemented a good logging solution to identify bugged orders quickly, they will turn it back on.
To Laksma:
We are using a unique identifier that is sent back. What I meant by handshake is some way of the payment gateway verifying that they have made a connection with our server. Maybe I was using the word incorrectly. Thank you for the suggestion of the log on the receiving page- I have added that.
To Nenotlep:
I know I said no AJAX, but I would like to hear more about your idea. Would the call to the logging page interfere with the form submission at all? I'm assuming it would be set up so that the function would trigger on the "onclick" event for the form button, and then form submission would proceed as normal? If it is easy to set up, then maybe that would be a good way of doing it.
I'm thinking of trying Sanjeev's solution, since that is similar to what I was planning to do anyway, but I actually would like to hear more about the AJAX idea if it is really that simple, mainly because it won't change the customer experience at all (unlike seeing the redirecting screen).
Additional response to steve:
I appreciate your input, and normally I love teaching myself new things, but I am just way too overwhelmed right now to even think about tackling a new technology.
I work on a payment gateway and had the same problem as yours. This was my solution -
Post the values to a intermediate page called as 'requestHandler.cfm'.
requestHandler.cfm saves the values into database table.
Continue to creates a <form> with all the required values as <input hidden>. Place a submit button and also JavaScript to fire 'submit' in say 2 seconds. Also put a note that, "If the page does not refresh in some time, click the submit button". As you are not going to do any validation on the form, a 'submit' button will just submit the form with or without JavaScript being active.
The Creditcard company will process the information and reply back with the values to a 'responseHandler.cfm' page.
I shall update my data based on the 'primarykeyvalue' sent to them. (Or just any reference that can identify the user)
Database table sample
The TransactionID will be '0' by default and will change to the number given by the credit card company
The paid flag which is default 'N' shall change to 'Y'
The Actual amount is what I have sent to be charged on the user credit card.
The Paid Amount should match the actual amount. This is to help me find if the details are tampered in any case by the user or middle man.
Handshake:
When a user is taken to the payment site, you should include a unique identifier to distingush the order, such as OrderID. Your payment provider must have some custom fields for your own use. Then, when the user is taken back to your site, the payment site response data should include the OrderID. That way you can match them. In other words, "handshake" is occured.
Intermittent successful payment:
On the listener, the page where the payment provider returns form data, you should implement a log to record from where the page is called and what data is sent.
"... is to change the form action to a page on our site, log the payment attempt, and then submit the form again to the credit card company." This is a doable solution.

Facebook likes (with comments) not working well on a password/login protected website

I am working with our web developer to integrate Facebook Likes (with comments) onto our website. However, he is having problems because FB doesn't work very well with sites where a log in is required. Currently when you click on the 'like' button the 'like' turns into 'confirm'. You then have to click on 'confirm' and another box appears showing how the like will appear on your FB page saying 'Click Like to post this to your profile' with the option of 'like' or cancel. If you click on 'like' then it allows the comment box to pop up then you can add a comment and post to FB.
There are currently too many clicks for this to work. Does anyone have any advice? Would it be better to just use straight likes with the number perhaps or is this a common problem with website that require a login. We just want users to be able to click once, add their comment and post it to FB.
Any help would be really apprecaited. If it is technical that is fine as I will pass replies onto my developer.
Many thanks
This will generally happen for URLs and sites that are new to the Facebook scraper. It is a security measure to prevent like-jacking that some sites have done in the past. You should ensure that you test your site fully with the Debug tool and after some confirmed 'likes', that step will be automatically removed and future users will just have to click like once.
Where you are gating content behind a login, I would additionally recommend that you show different HTML (including OG tags) for anything detected with the Facebook scraper User Agent (see When does Facebook scrape my page? on the Like Button FAQ) so that, for example, the OG tags for a product detail page are picked up correctly even though the scraper is technically not logged in.

How do I merge my old like button with my new Facebook page?

I've had a like button on my site for a long time, and right now it has ~500 likes. However, this button only likes the actual link to the website and not a page on Facebook.
Today I have created a new page for my service, and even though I've found a way to make a like button for the page, I'd like to know if there was a way to transfer the likes I had on the old button (link only) to the new button (fb page) and also maybe make it so that the old "link-only" button actually links to the new page (right now the link button and page button act as if they're completely unrelated).
Unfortunately, there is no way to transfer likes from one graph object to another.
But there is something you can do:
Every like button in fact creating edge in opengraph which have a page on Facebook, so you can inform people who already likes your "old page" about existence of new one.
You can publish stream updates to the users who have liked your page just like you can with Facebook Pages. There are two ways to get to the publishing interface:
From https://developers.facebook.com/docs/opengraph/#publishing
From your Web page, click Admin Page next to the Like button. From
Facebook, click Manage Pages under the Account tab, then click Go To
Page next to your page name You can publish stories to your users the
same way you write a Facebook post from your own wall: by typing in
the Publisher, the field at the top of the screen that says "What's on
your mind?" The stories appear in the News Feed of anyone who has
clicked the Like button on your webpage.
For samples how to do same thing from code look at http://developers.facebook.com/blog/post/465