
As a business owner in development projects, there are days where I just wonder if I’m doing the right thing and being a good businessperson. I recently had a project which just was one bad thing after another happening, and while it wasn’t really anything I caused, the customer was very upset. It led me to think about why things go wrong in web projects and what can I do to prevent them?
The simple fact is that Web Projects are very much like kids. They each need to be raised, educated, and disciplined in pretty much the same way. However, like kids, not all Web Projects are ever exactly the same since there are always different players involved, new technologies to explore, and plenty of kicking, screaming and crying when things don’t go exactly the way they are supposed to.
I get where my clients are coming from, and you always want to focus on the positive and not the negative for a new project, which is why in my contracts I put a “bugs” clause which basically says that the web is a huge place filled with plenty of facets and the slightest blemish in one of those facets can cause the entire project to be delayed, not function properly, etc. However, I think it’s fair to say that even when I’ve been forced to sign a “sh*t happens” document when going to the doctors, it doesn’t make it any better if things go wrong.
So what can we do? Do we play Scotty from Star Trek and just over-exaggerate the timelines so when things do go smoothly we’re heroes? But that can limit the clients who need things done quickly and also force them into unneeded delays for their business as well. Do we tell them about all the things that can go wrong and hope they sit back and say, “Wow thanks for letting me know all hell could break loose so I can prepare for it?”….not likely. How about just giving up web development and just taking up selling pet rocks at a carnival…those people have it made!
But what happens when the google eyes fall off that night from the rock? Or the little feet bend and snap and now looks like something out of a horror movie? Do you get less upset because its a pet rock? Or do you still get upset just a bit because money was spent and things didn’t go exactly as expected.
I guess the revelation here is that things go wrong in any business no matter what that business is. I’m sure some engineers can weigh in here about how their project got completely screwed up, or even a restaurant owner who unfortunately had a shell from an egg make it into a food critic’s dish.
I think the key here is how you handle those issues as both a consumer and a vendor. If you are a vendor…do what you can to make things right by understanding the customer’s frustration. If you are a customer…if you see someone trying to make an effort to right a wrong (whether its themselves or just in general) work with them to get to the other side. I’ve had great relationships made by hanging in there with a vendor and seeing just how good they do in a crisis situation to make everything turn out right.
So….just like kids….there will be good days and bad days….but it will never change your love or understanding towards them. I think we as a society get too wrapped up in the “me” and really need to step back sometimes and not allows ourselves to take out our frustrations for other aspects of our life on these situations when they present themselves.
Hopefully this will help you as a customer reading this to know we will always work with you as a client to make things right if something should go wrong, or if you are a business owner…know that you are not alone and things can and do go wrong at times. Try your best to rectify the situation and hopefully your customer will see your efforts.
Doug
Before I throw them under the bus completely, let me first point out the positives about PayPal. First, it is a great way for new businesses who are maybe testing out the waters of their business model and don’t want to get locked into all of the hassle of setting up a merchant account through their banks. Second, they do provide a great number of applications that do cater to many of the different scnenarios many online businesses need such as Recurring Payments, Calculation of Shipping based on Area, and plenty more. So for the most part, PayPal is a “good” option for many online businesses.
Why PayPal Needs a Quality Assurance Wakeup Call
I spent literally 4 whole days going back and forth from blog to blog, developer forum to developer forum looking for the answer to this seemingly simple scenario. Create a recurring payment and charge a single payment for items in the same transaction. According to PayPal, this is a piece of cake. Not so young Skywalker.
I started by going to PayPal’s website and discovered their old Express Checkout site had changed quite a bit and some of the familiar code snippets they had available before to perform tasks such as this were gone. I wasn’t that concerned and proceeded to their Express Checkout area which, again according to PayPal, was an easy and great way to perform the tasks I wanted to complete.
PayPal’s Code Wizard…Merlin’s Red-Headed Step Child
Ok so here’s the point of the blog post. This code wizard of PayPal. Now most wizards are pretty friendly. They are supposed to walk you through the basic features of what you’re trying to accomplish and give you a base to start from so you can then maybe go into the advanced features and adjust your code accordingly. Theirs is completely a mind-screw and you’ll just love what I found out.
Help for You Fellow Coders in ASP.net
If you found this article because you got the “Token is Invalid”, or “Timeout Error”, or “Amount is Undefined”, dude…I feel your frustration. You also probably spotted a few articles where these other devs said, all you have to do is call the SetExpressCheckout, change your version to 42 or higher, etc. What they failed to mention was in the PayPal’s own generated code wizard, the version number is not a NVP (Name-Value-Pair) you put into your code…it’s in the .CS code itself way down at the bottom of the friggin’ class.
How I Solved the Issue
Go into the PayPalFunctions.cs the wizard generates for you and scroll down to the buildCredentialsNVPString(). Change the following code from:
codec["VERSION"] = “2.6″;
to:
codec["VERSION"] = “54.0″;
You can see they were off by just a few versions. Now while I understand that the wizard is not made for recurring payments, it would have been nice for them to mention that in maybe the final screen. I would also imagine that this change of version will work for the Express Checkout regardless of whether you’re doing recurring payments or not, but maybe not.
Other Items I Had to Solve
Other things they don’t really point out to you are the things you should include in the NVP for the SetExpressCheckout:
NVPCodec encoder = new NVPCodec();
encoder["METHOD"] = “SetExpressCheckout”;
encoder["AMT"] = “45.00″; //amt;
encoder["RETURNURL"] = returnURL;
encoder["CANCELURL"] = cancelURL;
encoder["PAYMENTACTION"] = “Sale”;
encoder["L_DESC0"] = “12 Month Subscription to Your Store”; // THIS MUST MATCH THE BILLING AGREEMENTDESCRIPTION
encoder["L_BILLINGTYPE0"] = “RecurringPayments”;
encoder["L_BILLINGAGREEMENTDESCRIPTION0"] = “12 Month Subscription to Your Store”; // THIS MUST MATCH YOUR L_DESCn FIELD…IN MY EXAMPLE THE L_DESC0
encoder["L_NAME1"] = “Item Number 1″;
encoder["L_NUMBER1"] = “XY1238″;
encoder["L_DESC1"] = “Some Description”;
encoder["L_AMT1"] = “15.00″;
encoder["L_QTY1"] = “3″;
You’ll notice there’s a few things they exclude in their version that is code generated and such. Now in a separate function I called DoRecurring, I have the following NVP:
NVPCodec encoder = new NVPCodec();
encoder["METHOD"] = “CreateRecurringPaymentsProfile”;
encoder["TOKEN"] = token;
encoder["DESC"] = “12 Month Subscription to Your Store”; //YEP ADD THIS AGAIN
encoder["PROFILESTARTDATE"] = “2009-03-16T13:00:00Z”; //MAKE SURE THIS IS GMT FORMAT
encoder["BILLINGPERIOD"] = “Month”; //Month, Year, etc.
encoder["BILLINGFREQUENCY"] = “1″; // This is the “cycle” so each month the customer will be billed once
encoder["AMT"] = “25.00″;
encoder["L_BILLINGTYPE0"] = “RecurringPayments”; //Has to be this for recurring to work
encoder["L_BILLINGAGREEMENTDESCRIPTION0"] = “12 Month Subscription to Your Store”; //YEP HAS TO MATCH
So there ya go. Now if you’re still a bit confused at the way PayPal’s Code Wizard said things like insert this on your billing and confirmation pages, etc. Don’t let that bother you. Here’s a simple version to do what I was trying to accomplish. Hopefully this helps make it a bit clearer for you:
- Take the image they put in a form and make it an Image Button.
- On click of this image, in your code behind, insert the SetExpressCheckout code to setup your transaction and send the user to paypal to either enter their credit card or log into their PP account.
- After they do this they will be returned to a return URL you specified in the Wizard. Create something called checkout.aspx and in the .cs file in the page load save the token and payerid into session variables.
- Put another button on this page and say something like “Finalize Payment”. (Above this you’d put something like a list of the items or subscriptions they’ll be purchasing….just so they’re really sure about purchasing.
- On the click of that button put in the call to the CreateRecurringProfile function by copying the call as the FinalizeCheckout does.
Hopefully that helps you out a bit. If you have any questions please email me at info[-at-]justicesolutionsllc.com or simply comment below. I’ll really try to respond and help as much as I can because this was really frustrating. I hope a PayPal developer reads this and rather than criticizing the hell out of my code which may not be perfect, really takes this back to PayPal and does a real QA on their code wizard and their manuals. Because there are critical pieces and better explanations needed.
I sat back and said a prayer for a moment since I believed that getting angry was not going to solve my problem. And just like that I had a thought….approach this problem as if I were my 6 year old son using the form. Within minutes I had the problem figured out, put in a quick javascript validator to make sure the values would be entered correctly and just like that…the problem was solved.
So I decided to blog about this since many times not only developers, but business owners will have their websites so complex that it will cause more problems than successes simply because they are not thinking like a user who’s prime source of income would be a nice chocolate chip cookie.
I’ve actually had my son test quite a few of my websites and even though I may have to read the form to him to fill out, he has discovered some issues with my sites and I’ve coded appropriately to deal with them. So the next time you’re ready to launch a new form, or a new functionality of your site, think to yourself….if I were 6 how would I look at this. Or better yet, if you can snag a youngster from your family or your close friends, use them to test it themselves and pay them with a nice big cookie for their good work.
Happy Coding!
Doug.
Ok, how many of you have been out at the store at the last minute getting those flowers for Valentine’s Day, grabbed the box of chocolates, and then suddenly remembered that you needed a card as well? To top it all off you were running late in getting back to your house for that special V-Day dinner? Arrggh….panic is starting to set in.
So you quickly run down to the greeting card aisle, quickly survey the demilitarized zone of Valentine’s Day cards, find one that looks nice and has words that seem appropriate and zip over to the checkout counter. Ok, we’re nearly complete…but wait….we need to write something inside of the card and sign it….oh no!
So we look frantically through the glove compartment box, flip the sun visors, look in the change drawer, the middle console, under the seat, all in the hopes of finding that single writing implement that is most likely missing a cap, has a glob of ink dangling from the tip and has been severely chewed on the end so much that you could dislodge a penny from the ashtray by using it as a chisel.
This is usually the moment where for some strange reason you’ve luckily managed to hit all of the green lights for a change and are actually hoping for a red light for that mere 30 seconds you need to write those unending words of love and compassion that will sweep your honey right off of her feet.
Ok so you get a red light finally and then warped pen in hand you stroke those loving words on the open side of the card right on the steering wheel. However you then push too hard on the Love…Me….which of course beeps the horn at the car in front of you and awards you the friendly one finger wave from the driver ahead of you.
So you get back to the house in time to go out to dinner, you calmly stroll on into the house, flowers, chocolates, and your novelette of a Valentine’s Day card in hand, and proudly give the items of your affection to your sweetheart.
She gasps for a moment, just so happy she has married a man who still likes to make Valentine’s Day special…grabs the flowers, the chocolates and the card sets them down to give a very welcomed and very earned Valentine’s Day smooch.
Finally without another word, she sniffs the elegant scent of the roses, mouth waters over the chocolate treats she’ll be enjoying later tonight, and then opens the card…which magically says on the front….
“This Valentine’s Day I wanted to say Something Special…”
and on the inside…
“You’ll Do.”
Funny enough…I don’t think she ever read the other side of the card I wrote on. Happy Valentine’s Day Everyone!
Image is Everything!
Ok, it’s Friday and it’s my birthday…so woo hoo for me. However, I wanted to quickly make a blog about how many times I’ve heard people say, “Well at least I have a website” or “It’s not a great site, but at least I have a website.” These are the same companies that can’t understand why they are getting low conversions and low sales.
The simple fact of the matter is, image is everything. Whether your site is just a few pages, or a full fledged application portal, it must look and behave as though it cost a million bucks. Otherwise, people will quickly dismiss your site feeling as though you probably don’t have the ability to either service their needs, or deliver the products or services you are selling.
Take for example these two BBQ style restaurants:
as you can see they are similar in the style of restaurant and even most of the items on the menu are pretty similar. However, which one are you more likely to take your family to? I’m assuming you said San Tan Flat….and I’m assuming that most of you reading this blog have never been to either establishment before. But faced with the tantalizing decision as to which BBQ restaurant you’ll be taking your family to on Friday night, chances are you’d first try San Tan Flat before you’d try the Horny Toad.
As a side note, you definitely want to check out the video San Tan Flat has on its home page. Drew Carey did a spot on Reason.TV about this restaurant recently. Apparently there’s a “Footloose” type drama going on between the restaurant and the county for get this….. “The patrons dancing to the music”. The appear to be charging them $5,000.00 per violation.This is also the case for many companies who even may outrank some of their competitor’s sites in the search engines. Why? Because the site says it all. One is a site that clearly has taken the time to give itself a very professional appearance, and the other, well just wants to have website that they can put on their take out menus and coasters.
Keeping your site fresh, up to date, and professional looking is just as important as the quality of products and services your business is trying to promote or sell on the web. You’d also be amazed that many times a site “facelift” isn’t as expensive as you would think. So when you’re looking to either create a new website, or have its look changed…please keep this example in mind. It could mean the difference between a successful business and a failing one.
Have a great weekend everyone.
Doug.
If your company uses any type of printed materials for either contracts, sales orders, forms, etc. you should consider perhaps going with a more dynamic solution of taking your contracts and forms to PDF’s which can be signed digitally pretty easily now, and emailed back without a single sheet of green gold being wasted.
Companies like eFax (www.efax.com) have really stepped it up and have even added a free service to their monthly subscribers by allowing them to upload and store and then use their scanned in digital signature for even more paperless processing.
ColdFusion FlashDocs/PDF
If your website or web application is ColdFusion based, you’re just about as close as you can get to already having this functionality added to your system. Simply by using ColdFusion 7&8′s <cfdocument> tag like the following will instantly transform your page into a PDF which can be enhanced with dynamic data from your application/forms very quickly:
<cfdocument format="pdf" name="mydocument">
<cfloop index="x" from="1" to="40">
<p>
doloras lorem upsom doloras paris hilton is my hero loreum ipsom dsoio foom an to dht end of the world
will anyone actually read this probably not but let me put more realtext in so it flows a bit nicely
<cfloop index="y" from="1" to="#randRange(1,9)#">This sentence will appear a random amount of time.</cfloop>
</p>
</cfloop>
</cfdocument>
.NET and Tall Components
If you’re a .NET firm or company, there’s quite a number of solutions out there for you as well. We’ve personally just worked on a project for Westcor Land Title www.ewestcor.com where all of their jackets and other assorted loan closing documents are generated on the fly. Thereby reducing their need to request hundreds of these jackets and documents from a printer, thus reducing paper.
For that project we worked with TallComponents www.tallcomponents.com/ to accomplish this task which really allows for quite a bit of customization even more so in some respects than Adobe’s solution.
For you PHP and Ruby folks, I did find a few quick and free solutions to generate PDF’s from PHP. The one that seems to be the easiest to use, but doesn’t do a whole lot of fancy effects is www.fpdf.org
So you’re in good shape as well.
Go Green By Going Red
So you can go a bit greener by using the “Red” logo Adobe PDF format in a host of different ways on almost every type of web programming language in use today. So save a tree…plant a PDF on your web app today.







