I've got all the initial code working that handles the purchase for the user through Google Wallet and submits the actual charge to their credit card. Also in the setup I specified a post-back url for this where I capture the order details like the order number, price, item name, etc and I save them to my database.
But when I look in Google Wallet under 'orders' I see the order flagged in yellow with the description 'chargeable' (after awhile it will turn to green and be marked 'charged') so clearly there needs to be some checking to make sure the charge was made successfully before I treat it as such. The Google documentation says that I need to receive a charge-amount-notification back from them to confirm that the charge was successful. But I see no good examples for this or instructions on how to implement it. Do I need to poll their API for a success code or something? I really just need a good example in C# so I can see how this all ties together and how best to proceed.
thanks!
Related
I am trying to post a purchase order to QuickBooks online using the c# .NET IPP QBOV3 SDK.
I have managed to get Invoices posting OK, so I thought adding an purchase order, would be very similar. However, this is not the case. (at least it doesnt seem to be - correct me if I am wrong)
I can not find any working c# examples of this, so was hoping someone could set me in the right direction.
The only question I could find on SO is - how to add purchase order with QBO rest api v3.0
However, this code just gives a "Bad request" error, which is not very helpful at all.
Even if someone could point me in the right direction on how I can view the JSON request I am sending, and how I can view the response would be a help.
The code mentioned in the link in the question is OK.
The problem I had was the item itself - in the item list there is a tick box, which states if the item is sold or purchased - I had the tick box to say it was sold, silly mistake. (obviously should of been set to the item is purchased)
Having this ticked on, was enough to stop the PO from being created.
What I want is to calculate the ROI of a campaign and this is my scenario. A user comes from Google Adwords into my webpage and then downloads a software. The software is coded in C#.
I know that there is a conversion option from Google that registers the action when the download button is clicked. But this is not the end because the ROI is not calculated when the software is downloade, but from his spending inside the software.
However, my question is more technical than that.
What I want to achieve is to "marry" the adwords visitor with his downloadable software. Meaning, to pass a unique code (or anything that works maybe a cookie) from the webpage to the software.
Some possible answers that lack extended knowledge from my side are:
Create a cookie with a unique id when a user enters the webpage from google adwords, and then somehow the software will read it. As far as I know a software can not read a cookie (I may be mistaken) but what if on software's first launch opens a webpage on his browser?
Make use of IP address. So, if a user comes from google adwords, get his IP, save it into a database and the same happens when he opens the software. Theoretically you have a match.
Did you encounter such things?
Do you know any way that actually works?
You can make use of universal analytics measurement protocol. Please check here :
https://developers.google.com/analytics/devguides/collection/protocol/v1/
Is there a way to run some sort of script or process after a line or entry is edited in my mysql database. I'm mainly wondering because I'd like to send an email for user authentication after an entry is created. Afterwards, once the link sent to the email is clicked, I'll figure a way of updating the entry. I am most familiar with C#, but am willing to learn php for this as I'd like to anyways. Any code samples or tutorials would be awesome.
I've searched online but haven't found anything useful. Maybe I just don't know what to look for.
I don't know if this is related, but under attributes, there is an option for "on update CURRENT TIME STAMP". Would this be related?
Additional information. I use C# for client based operations and Cpanel w/ phpMyAdmin for database editing.
You might be interested in triggers. Read on http://dev.mysql.com/doc/refman/5.0/en/triggers.html
EDIT Your next question possibly would be: How to send email from a trigger?
Unfortunately there is not a single, trivial way to do so. These are two different approaches:
You can write a so called user defined function (or find an existing one), that would send an email and this function would be called from the trigger.
The trigger would write the emails to be sent into a queue. (The queue might be a table or even a file). There would be a system job that would periodically read from the queue and send the emails.
UPDATE: apparently this only happens when fetching videos from a playlist feed, which is what I'm doing.
I recently noticed my youtube api requests for videos were returning blank keyword entries. I found the blog post at http://apiblog.youtube.com/2012/08/video-tags-just-for-uploaders.html, and I'm already sending requests as the channel/video owner, yet I still get blank keywords. This has the undesirable side-effect of deleting existing keywords if I make any changes to the video details, such as to descriptions or titles.
For instance, I have video series where every video will have the same description. Perfect place to use the API to run through all the vids in a list and update their details. This used to work fine. But one ill-fated day, this routine became destructive. Any time I do this now, the keywords get blanked out, and I have to go back through all of the affected vids, replacing the lost keywords by hand. I've stopped using my API-based utility since this began happening.
The descriptions and titles will get updated as desired, but the keywords get blanked out, even if I don't touch them. I recall reading somewhere in the API docs something to the effect that when you submit updates for video details, any entries not filled in will be erased. In this instance, because the keyword entries I get back are already blank, any updates I do to the video other than to the keywords cause the keywords to be deleted.
Anybody have any ideas or workarounds? If I can't continue using the API to manage keywords, I would at least like to be able to continue making updates to titles and descriptions, but that won't work right now because the keywords get deleted with any title or description updates :(
The YouTube API should absolutely return media:keywords when you make an authenticated request for a video or a feed of videos in the current account. You can test it yourself at
http://gdata.youtube.com/demo/index.html
Click Authenticate there, then make a request for Uploads -> Query, and enter default as the user name. Run that request and take a look at the responses—all the videos that actually have keywords should have a media:keywords returned for them. (Obviously if you've already deleted the keywords for a given video, they won't be returned, so test with a newly uploaded video that you've set keywords for.)
There is an internal bug that I believe is still open that prevented media:keywords from being returned in playlist entries when you're fetching a playlist feed. Are you perhaps reading your videos from a playlist?
Actually, this is a known issue as YouTube decided to allow Keywords retrieval only for authenticated users.
This is very annoying, but I'm also currently looking for a way safe way to retrieve those keywords, using Zend, without writing donw my password in plain text.
Let's look for a solution together :)
YOUTUBE API : Retrieve video keywords
I have a .net c# web application that allows users to purchase products.
My site has a payment page, with input fields etc.
I have had some attacks recently via bots automating the submit of payments just to validate credit card authorization.
So I need to change my page so that bots cant do this. So I am looking at advice as to do this? I have started by changing the field names so that they are different each time to page loads, via a hash. Any other tips?
CAPTCHA will help to stop this. It will require the user to complete a validation check before the page will go through. Here is a sample implementation of how CAPTCHA can be implemented in ASP.Net
A "captcha" is the standard way of preventing bot submitted forms. Recaptcha is free, works well and is actually helping to scan books through its use.
I tried the following approach once and it gave me good results.
In short the idea is to create an invisible field, name it so that the robot could easily understand it and, on the server side, check the value of this field. If it is populated, than it was definitely a robot and you can safely ignore this request.
For example:
Rename your FirstName field to, say, EmanTsrif.
Add another field <input id="FirstName" class="trap_for_robots">.
Define css class trap_for_robots: {display: none} (preferable in a standalone .css file - don't use style="display:none"!).
In your codebehind check if (FirstName.Text != "") { //do nothing, log something }.
I can understand that you are trying to find a solution which does not involve human interaction in order to keep the user experience as good as possible.
Since the evil-doers are using your site to check credit card validity you are probably dealing with a more targeted misuse of your resources as opposed to common blocking scenarios for automated processes, like comment spam bots and alike. Depending on how valuable "your service" is to the people who are exploiting your website, locking them out without requiring human interaction might only work until they figured out what you changed.
Alternating field names aren't going to stop them from populating the fields by order of appearance on your site, for example.
Solutions like having javascript populate a hidden form field are only good as long the bot does not speak javascript.
I would suggest to use all the techniques found when searching for captcha alternatives and use the methods in random combinations for each request - then hope that another site is less secured so they start using a different site to get what they need.
If all doesn't help you can still use a solution that involves human interaction.
Ajax control kit has a "NoBot" control you can use.
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/NoBot/NoBot.aspx
Have look on this wikipedia article , read the "Technical measures to stop bots" section, it gives a number of measures to stop bots.