Having recently introduced the ebizmarts Sage Pay Suite PRO integration to hook a magento website up to Sagepay, using the direct method I was periodically getting the error “Error: MALFORMED. 3055 : The CardType field is required”.
After a bit of detective work, I believe this error is getting caused by:
a) The customer going through the onepage checkout, entering their payment details and checking out. They are then passed to their providers 3D secure page. They somehow get back to the website (possibly back button) because the page hasn’t loaded or an error. When they go through the checkout for the second time the payment method is already selected (on the radio button) but the details have cleared (and the form is hidden). They can click continue (probably assuming the details have been stored), but they won’t get passed to the 3D secure page, and instead get the error “MALFORMED. 3055 : The CardType field is required”.
b) They’ve almost completed the checkout (including the payment details), but then exited the checkout perhaps to edit the basket. When they go back to checkout, again the payment method is now pre-selected but the details have cleared (and the form is hidden). They click continue (again probably assuming the details have been stored) but they won’t get passed to the 3D secure page and instead get the error “MALFORMED. 3055 : The CardType field is required”.
I’ve fixed it by removing the default checked status of the radio button in:
checked="checked", so if the customer returns to the payment screen no payment method is pre-selected, and they then must select a method to continue. The payment form appears and it must be filled in, and so the error shouldn’t occur.