How to reproduce

  1. Populate your cart with some products
  2. Proceed through checkout until the Billing and Delivery information
  3. Enter values longer than 20 charachers in any of the following: billing_first_name / billing_last_name / billing_phone / delivery_first_name / delivery_last_name / delivery_phone
  4. Proceed through to order review and submit

What should happen

You should be sent through to sagepays payment page where you select your card type and then proceed through to entering details.

What actually happens

You are redirected back to the /cart/checkout page with no errors, trying the same details again and the customer enters an endless loop.

The file attached is sagepays server integration guidelines. Page 42 and 43 document the #maxlengths accepted.

DPR of $form[billing_first_name] showing maxlength = 30;
[billing_first_name] => Array
(
[#type] => textfield
[#title] => First name
[#description] =>
[#size] => 32
[#maxlength] => 32
[#required] => 1
[#default_value] =>
[#summary] => First name is not set.
)

Comments

md2’s picture

StatusFileSize
new1.29 KB

Patch attached, simple hook_form_alter to reduce the #maxlengths.

leo pitt’s picture

Assigned: Unassigned » leo pitt
Status: Active » Needs review

Thanks - I've just committed this to dev, once this has come through in the latest build, please test it out.

leo pitt’s picture

Still getting my head around git - this patch should be present in the next build of 6.x-1.x.

leo pitt’s picture

Status: Needs review » Closed (fixed)

Fixed in 6.x-1.5