after some look at blesta code, i find that the GatewayPayments->getBuildProcess() is not setting the errors, it only return the html returned data, in this case is a empty value . we have made a simple fix, in two files .
components/gateway_payments/gateway_payments.php line 162
change from
return $html;
to
if (($errors = $gateway_obj->errors())) {
// If no response given and errors set, pass those errors along
$this->Input->setErrors($errors);
return;
}
return $html;
file controllers/client_pay.php line 868
change from
$this->set(
'gateway_buttons',
$this->Payments->getBuildProcess(
$contact_info,
$total,
$payment['currency'],
$apply_amounts,
$options,
$payment['method']['pay_with']
)
);
to
$gateway_buttons = $this->Payments->getBuildProcess(
$contact_info,
$total,
$payment['currency'],
$apply_amounts,
$options,
$payment['method']['pay_with']
);
if ($errors = $this->Payments->errors()) {
$this->setMessage('error', $errors);
}
$this->set('gateway_buttons', $gateway_buttons);
with this way, any error returned the the buildproccess will shown to the client . like invalid zip code, empty state ...ect