Rss Feed Tweeter button Facebook button Technorati button Reddit button Myspace button Delicious button Digg button

Switch and Maestro Cards with Zen Cart and PayPal Pro UK

Zen cart occasionally returns PayPal Pro code 7 error for Maestro payments. This indicates either an issue number or start date is required. Often customers are unable to enter a start date and if the issue number is left blank the payment will fail.

Switch is now known as Maestro yet banks issue cards in both the old format (long number and issue number) and the new format (credit card style 16 digits and start date) that can lead to confusion when processing payments.

One fix supplied on the Zen Cart forums was to combine the processing of Switch and Maestro together. Unfortunately it only allows customers to enter the old format as the valid from form is greyed out. If customers with a new maestro card pay without providing a start date the payment will fail. I have modified the paypaldp.php (located in /includes/modules/payment) as suggested in the forums above and made a small change which provides both start date and issue number field for the customer to fill out.

Line 249-260 now reads:

‘var value = document.checkout_payment.paypalwpp_cc_type.value;’ .
‘if (value == “Solo”) {‘ .
‘ document.checkout_payment.paypalwpp_cc_issue_month.disabled = false;’ .
‘ document.checkout_payment.paypalwpp_cc_issue_year.disabled = false;’ .
‘ document.checkout_payment.paypalwpp_cc_checkcode.disabled = true;’ .
‘ if (document.checkout_payment.paypalwpp_cc_issuenumber) document.checkout_payment.paypalwpp_cc_issuenumber.disabled = true;’ .
‘} else if (value == “Switch” || value == “Maestro”) {‘ .
‘ document.checkout_payment.paypalwpp_cc_issuenumber.disabled = false;’ .
‘ if (document.checkout_payment.paypalwpp_cc_issue_month) document.checkout_payment.paypalwpp_cc_issue_month.disabled = false;’ .
‘ if (document.checkout_payment.paypalwpp_cc_issue_year) document.checkout_payment.paypalwpp_cc_issue_year.disabled = false;’ .
‘ document.checkout_payment.paypalwpp_cc_checkcode.disabled = false;’ .
‘} else {‘ .

My changes from those suggesting in the forum are in red – this turns on the card issue date. Please don’t miss the second change in this file as mentioned in the forum. I copied the same code as described.

I also modified the languages file to provide a short explanation for the customer.

Includes/languages/english/modules/payment/paypaldp.php I changed the definition (around line 30) to:

define(‘MODULE_PAYMENT_PAYPALDP_TEXT_CREDIT_CARD_MAESTRO_ISSUENUMBER’, ‘Maestro/Switch Issue No.:<br/>NB: If your Switch/Maestro card does not have an issue number please provide a card issue date.’);

I have tested it with a 16 digit Maestro card using a start date and it works fine.

Resources you must read when re-designing a web page.

I admit I have neglected my websites look recently and decided it was time for a spring clean. A fresh new look and some SEO love.

There are thousands of web pages dedicated to web design and SEO, here are some worth looking at:

For choosing colour palates I use this scheme chooser and colour scheme generator. They make it easy to select complementing colours.

You can also check your colour scheme used in CSS with this free and easy to use colour contrast tool.

iWebtool have a page dedicated to free on-line tools to analyse your website.

CopyBlogger offer some useful tips on copy writing for SEO success.

If you are unfamiliar with the jargon of web page components there is a a good basic guide to SEO web essentials at webconfs.com

My favourite page is Web Pages That Suck. It’s a humorous and attention grabbing title yet packed with loads of information. By showing you how NOT to design a website you can learn how to do things the right way. It was this site that provoked me to get rid of my red and green theme. They offer a detailed check list to apply to your own web-site design and then suggestions for further action.

And finally if you need some new buttons for your Zen or OS Commerce cart then Advance Software have a free on-line tool where you can create and download an entire button set with correct labels for simple uploading to your site.