Reply To: easyStartPrice is not defined

Yes we already have a form. That’s not the problem at all.

The problem is that the form isn’t sending the deposit amount. Instead, it’s sending the total amount. Please go to the booking page and see for yourself here: http://aws.vacationrentalsquebeccity.com/suite-belle/

Here’s the code, with your suggested modifications, but still doesn’t behave properly.


'Pay via Chase E-Xact',
'form_name' => 'gateway_form',
// 'form_name' => 'A21092-01',
'amount_name' => x_amount,

);
return $gateways;
}

add_filter('reservations_register_gateway', 'register_my_custom_gateway', 10, 1);

function generate_my_gateway_payment_form($res,$id,$title,$price,$nonce){
//Open form with link to gateway; the name of this should be the value of form_name at gateway registration
$form = '';
//https://checkout.e-xact.com/pay
//Add a image as button to click on
$form.= 'Your payment is secured by Chase E-xact. To proceed, click the secure button below.';

//$xlogin = 'HCO-IRTHB-791';
//$key = 'wu~rtX5qJLDTeIQP2TsK';
$xlogin = 'WSP-APART-uoKceQAOQg';
$key = 'Cp3np_Hafh9flysxWCzm';
$sequence = rand(1000, 100000) + 123456;
$timeStamp = time();
$curr = 'CAD';
$mode = 'FALSE';
$xtype = 'AUTH_CAPTURE';
$logo = get_site_url().'/wp-content/uploads/2015/02/vrqc-logo.png';
$xemail = "irth03@gmail.com";
$xcustomeremail = 'TRUE';

if( phpversion() >= '5.1.2' ) {
$fingerprint = hash_hmac("md5", $xlogin . "^" . $sequence . "^" . $timeStamp . "^" . $price . "^" . $curr, $key); }
else {
$fingerprint = bin2hex(mhash(MHASH_MD5, $xlogin . "^" . $sequence . "^" . $timeStamp . "^" . $price . "^" . $curr, $key));
}

$array = array(
'x_login' => $xlogin,
'x_fp_sequence' => $sequence,
'x_fp_timestamp' => $timeStamp,
'x_amount' => $price,
'x_fp_hash' => $fingerprint,
'x_show_form' => 'PAYMENT_FORM',
'x_invoice_num' => $id,
'x_test_request' => $mode,
'x-type' => $xtype,
'x_email' => $xemail,
'x_logo_url' => $logo,
'x_email_customer' => $xcustomeremail,
'x_currency_code' => $curr
);

//Generate hidden fields from the array
$form .= easyreservations_generate_hidden_fields($array);
//Close form
$form .= '';

return $form;
}
add_filter('reservations_generate_gateway_button', 'generate_my_gateway_payment_form', 10, 5);

Maybe I’m still not understanding your instructions?