|Well NVP stands for Named Value Pair, in which you send "Name=Jim" as a NVP
Credit card processing can be separated into these categories
TIPS or MANUAL CHARGE
So you have to AUTH FIRST, then CAPTURE.GET BALANCE is for gift cards. The rest are back end functions, But remember, you always have to capture at some point, like the end of the day.
1. I don't see the purpose for IPN. If a customer has a dispute, they call you first. Why would I want a IPN to tell me they disputed the charge, it should never go there in the first place.
I can't see how PayPal can accurately calculate shipping, sales tax and discounts.
Shipping is based in dimensional and gravitational weight of about 160 lbs and girth of 165. Girth (2x Width + 2x Height)
Each state is different, in California, services are tax free, the state is about 7.0%, my county is .75% for 7.75%. Shipping is non taxable.
Discounts always come off the subtotal before tax and shipping
Well from looking at your code, you seem to be a confident programmer. But take no offense, with all due respect, you seem to have no clue about running a store or a small business, and do not realize how large the scope of calculating Sales tax, shipping and discounts are. There are basic formulas, but someone has to assign the values for every item in the store first in order to calculate them, unless you only sell 1 product. Now you have 48 states, and Alaska and Hawaii which is minimum 2 day air at about $15 to $23 dollars for about 2 pounds and 25 inches of girth.
PayPal is a terrible service to use, and very expensive. If I as a store owner was told I have to use PayPal for my online store, because the programmer told me so, I would laugh. I'm not paying $25 a month plus $3.25 for a AVS lookup, and I think plus 3.7% total for each transaction, plus .25 each per batch capture. If its American Express, Add $5 per month more for $30 a month, plus 3 more points minimum.
Consider having the customer qualify for a merchant processor account first, and that the website you made meets the minimum requirement for approval first. Then select a payment gateway from the available choices.
I wrote this article years ago on payment gateways and merchants processors. I may port it over to a code project tutorial in the future if they let me.
[How to choose a payment gateway^]