Line 416: invalid format
'BillingCity' => substr($order->billing_city, 0, 40),

This works
'BillingCity' => substr($order->billing_city, 0, 38),

Comments

longwave’s picture

Sage Pay documents that 40 characters is the maximum here, but I suspect the city in question contained multibyte characters. The true fix is to use drupal_substr() instead of substr().