Wednesday, July 15, 2009

UPS Tracking Number.:---- Solution

The unique solution for the Web Developers those using the UPS as a shipping method to their E-Commerce Store.

By researching the web I came to make a conclusion that many people has the one question that how to get the tracking number from UPS.

So Here is the solution. As Under:::::

The easy overview for UPS shipping method for the Web Developers:

Create a Tracking number as the system that can be tracked.

The basic steps to create the number is as under.

Create a Tracking Number:



The following code is a generic method that can be used to calculate a check digit for a UPS Tracking Number. The input for the method is a String, but you could rework it to use a raw Char[] if wish. This method leaves the rest of the tracking number up to you. it takes a 15 character sequence, in this case a String, and calculates the check digit using this sequence. For information sake, I will describe how the company I work for generates tracking numbers. This is up to you, as only two portions are required by UPS, the rest you can make up on your own.

The first two characters must be "1Z".
The next 6 characters we fill with our UPS accout number "XXXXXX"
The next 2 characters denote the service type:
* "01" for Next Day Air shipments
* "02" for Second Day Air shipments
* "03" for Groud shipments
The next 5 characters is our invoice number (Our invoices are 6 digits, we drop the first digit e.g 123456 invoice would yield 23456 characters.
The next 2 digits is the package number, zero filled e.g. Package 1 is "01", 2 is "02"
The last and final character is the check digit.
First of all you will notice that the described sequence above gives is 17 characters, where as we only need 15 to calculate the check digit. To do this, we drop the "1Z" portion, and only use the last 15 characters in the method.

Next let me take a moment to outline the algorithm used to generate the check digit, then you'll see the method below the outline:

Start a running total
Examine each character in the sequence
If the character is in an odd position (e.g 1st,3rd,5th....) then
If the character is numeric then add the numeric value to the running total
If the character is alpha, then
Calculate n to be (ASCII value of character - 48)
Calculate x to be ((2 * n) - (9 * INT(n/5))) where INT(n/5) returns n/5 rounded down to the next integer (e.g 34.3 would be 34 but also 34.8 would be 34)
Add x to the running total
If the character is in an even position (e.g 2nd, 4th, 6th......) then
If the character is numeric then
Calculate n to be (2 * numeric value of character)
Add n to the running total
If the character is alpha then
Calculate n to be (ASCII value of character - 48)
Add n to the running total
Calculate x to be (Running total modulo 10)
If x = 0 then x is the check digit
If x > 0 then
Calculate y to be (10 - x)
y is the check digit

Source : Futuristic Gateway

Wednesday, July 8, 2009

Tips: How To set the Payment Gateway in your Site.?

Using Paypal:

This is the easy method to embed.
Procedure for standard method: Just collect your total order that the customer purchase. Make a good designed shopping cart. And also create a form redirecting to paypal gateway. And send the proper terms in hidden field. And you done. For this method you just have to provide your account email address.

Another Method:

Paypal Direct Payment: There is a API that paypal provides so you can use that api for your transaction. By this method you have to set the shopping cart and for transaction you have to send the information using php curl function or SMTP protocol. By sending the appropriate information you will get the result weather the transaction done or not. By this method the costomer is not transfer to paypal. Paypal is just back-end the whole procedure can be done in the site. For this method you have to provide API-USERNAME, API-PASSWORD and API-SIGNATURE.

Cyber source:


Like Paypal this company also provide the payment gateway as well as the subscription option. The method is some how same as the paypal direct funding capture. But this method can also store users personal information remotely and we can get the information later.

Source: Sanjay N. Prajapati(www.futuristicgateway.com)