Saturday, May 23, 2009

Paypal - Make a online payment very simple

I would like share my thoughts on integrating paypal pro API in my project. After long time I'm coming back to online payment integration project. So I was recollected all the things that related to paypal integration and also got help from my collegues who are currenly working in such a kind of project.

Finally I can make the paypal pro API working with the NVP (Name value Pair) library with neccessary configuration made in the paypal.

Using paypal pro we don't need to redirect the user to paypal for payment, we can do that by asking the user to enter CC details in our site itself and then call the paypal pro API in a secure way.

Following are the steps that I have done for website payment pro API configuration in the paypal site. So it will be useful for me and for many others in the future.

1. Go to developer.paypal.com

2. Register as developer.

3. Create website payments pro account.

Enter all the billing details.(SSN -- 111XXXXXX)

Verify email account(by email or go to "Test Mail" section in sandbox")

4. Go to the following URL to enter bank or credit card details.

https://www.sandbox.paypal.com/row/cgi-bin/webscr?cmd=_seal-confirm-me&return_cmd=_account&standalone=1

5. Click create virtual terminal

6. Accept/reactivate billing aggreement in the account overview page.

7. Click request API credentials.


For building custom shopping carts: Store the following credential information in a secure location with limited access.

API Signature Credential:


API Username: sample_api1.gmail.com
API Password: XXXXXXXXXXXXXXXXXXXXXXXX
Signature: XXXXXXXXXXXXXXXXXXXXXXXX
Request Date: XXXXXXXXXXXXXXXXXXXXXXXX

Sunday, April 26, 2009

Finally found a bug in IE

Last week I was stuck with javascript issue in IE. I have list of elements in a form and I want to access one of them by their name. In FF its works but in IE it doesn't work for me. It screwed me for an hour but finally I got the reason for the problem.

Let’s say I have an input box with name "1_txt" and a button with name "btn". When click the button it calls a function that will put a "Welcome!" message in the textbox. It works in FF. But in IE it changed the value of the button to "Welcome!" instead of the textbox.

Reason for the problem here is when we give element name start with number (1, 2, 3...) and followed by underscore ("_") and then alphanumeric. IE split the element name by underscore like 1+’_’+"txt". So it gets 1 as an index in the elements array. That’s why it updating the button (second item in the element array i.e., index is 1) element.


Eg:


<html>

<head>

<script language="javascript">

function showMessage()

{

document.forms["frm"].elements["1_txt"].value = "Welcome!";

}

</script>

</head>

<body>

<form name="frm">

<input type="text" name="1_txt" size="20" />

<input type="button" name="btn" value="Click" onclick="showMessage();" />

</form>

</body>

</html>

Tuesday, April 14, 2009

Trend in blogging Vs Tamil literatures

Blog consists of large content or even a page or story. It is a kind of short story or incident or event, sometimes it’s good to read the interesting blog when we have the enough time to do so or even we can create one like I did. But the point here is, we get more details about the topic because we have the ability to create a blog with large content. Only disadvantage I personally feel is readers are so lazy to read large blog.

We have so many Tamil literatures like cilapathikaram, manimekalai, ramayanam, mahabharatham, etc... These above literatures consist of several paragraphs. Each paragraph in most of these literatures is song. Below is a paragraph from cilapathikaram.

அரசியல் பிழைத்தோர்க் கறங்கூற்றாவதூஉம்
உரைசால் பத்தினிக் குயர்ந்தோ ரேத்தலும்
ஊழ்வினை யுருத்துவந் தூட்டும் என்பதூஉம்
சூழ்வினைச் சிலம்பு காரண மாகச்
சிலப்பதி காரம் என்னும் பெயரால்.


Same disadvantage arise here. People who have interested and leisure time can get benefits by reading these stories.

Early 2006, we have every much experienced with micro blogging. When I thought about how micro blogging got this much of wider audience. I found that it’s very easy to create and read a micro blogging. Most popular micro blogging site is Twitter. We have maximum of 140 characters to create a micro blog in Twitter.

Thirukural, is one of the best literature in Tamil and it’s also translated in many other languages. It just contains two lines. First line contains four words and second line contains three words. Below is one of the Thirukural.

அகர முதல எழுத்தெல்லாம் ஆதி
பகவன் முதற்றே உலகு.


Now micro blogging further reduced by the flutter. It’s the new micro blogging site. We have maximum of 26 characters to create a micro blog in flutter.

Athichudi, is written by very famous women Tamil poet Auvvaiyar . It’s in single line. Normally contains two or three words. Below is one of the Athichudi.

அறம் செய விரும்பு.