Hi Bob, I tried to be redirected to the payment site but this is not going as I expected.
Beside the form itself, I have added a custom code containing the following:
<?php
$key = "xxxxxxxxxxxxx";
$vadsparams= array();
$vadsparams['vads_site_id'] = "xxxxxxxx";
$montant_en_euro = 9.99;
$vadsparams['vads_amount'] = 100*$montant_en_euro; // en cents
$vadsparams['vads_contrib'] = "joomla";
$vadsparams['vads_ctx_mode'] = "TEST";
$vadsparams['vads_currency'] = "978";
$vadsparams['vads_cust_email'] = JRequest::getVar('email');
$vadsparams['vads_cust_id'] = "00001";
$vadsparams['vads_cust_name'] =JRequest::getVar('name');
$vadsparams['vads_page_action'] = "PAYMENT";
$vadsparams['vads_action_mode'] = "INTERACTIVE";
$vadsparams['vads_payment_config']= "SINGLE";
$vadsparams['vads_version'] = "V2";
//-------------------------------------------------------
// Parametrage du retour automatique vers le site marchand
$vadsparams['vads_return_mode'] = "GET";
$vadsparams['vads_redirect_success_timeout'] = "5";
$vadsparams['vads_redirect_success_message'] = "Redirection vers la boutique dans quelques instants";
$vadsparams['vads_redirect_error_timeout'] = "5";
$vadsparams['vads_redirect_error_message'] = "Redirection vers la boutique dans quelques instants";
mt_srand();
$temp = str_pad(mt_rand(0,864000),6,'0',STR_PAD_LEFT);
$vadstransid=$temp;
$vadsparams['vads_trans_id']=$vadstransid;
$ts=time();
$vadsparams['vads_trans_date'] = gmdate ("YmdHis", $ts);
ksort($vadsparams);
$contenu_signature = "";
foreach ($vadsparams as $nom => $valeur){
$contenu_signature .= $valeur."+";
}
$contenu_signature .= $key;
$vadsparams['signature'] = sha1($contenu_signature);
foreach($vadsparams as $nom => $valeur){
$form->data[$nom] = $valeur;
}
?>
and after that, in a CURL [GH] (with the target URL "https://systempay.cyberpluspaiement.com/vads-payment/")
vads_action_mode={vads_action_mode}
vads_amount={vads_amount}
vads_ctx_mode={vads_ctx_mode}
vads_contrib=joomla
vads_currency={vads_currency}
vads_cust_email={vads_cust_email}
vads_cust_id={vads_cust_id}
vads_cust_name={vads_cust_name}
vads_page_action={vads_page_action}
vads_payment_config={vads_payment_config}
vads_key_test={vads_key_test}
vads_redirect_error_message={vads_redirect_error_message}
vads_redirect_error_timeout={vads_redirect_error_timeout}
vads_redirect_success_message={vads_redirect_success_message}
vads_redirect_success_timeout={vads_redirect_success_timeout}
vads_return_mode={vads_return_mode}
signature={signature}
vads_site_id={vads_site_id}
vads_trans_date={vads_trans_date}
vads_trans_id={vads_trans_id}
vads_version={vads_version}
Until this, I get everything from the debugger, I get a correct header response from the targeted site, but nothing else happens, no redirect. I tried to add a redirect URL element with the same targeted URL, but still nothing.
Normally, I should be redirected to the targeted site.
There is a content message (Blue exclamation mark and message in blue):
$content[0]: vads_action_mode={vads_action_mode} vads_amount={vads_amount} vads_ctx_mode={vads_ctx_mode} vads_contrib=joomla vads_currency={vads_currency} vads_cust_email={vads_cust_email} vads_cust_id={vads_cust_id} vads_cust_name={vads_cust_name} vads_page_action={vads_page_action} vads_payment_config={vads_payment_config} vads_key_test={vads_key_test} vads_redirect_error_message={vads_redirect_error_message} vads_redirect_error_timeout={vads_redirect_error_timeout} vads_redirect_success_message={vads_redirect_success_message} vads_redirect_success_timeout={vads_redirect_success_timeout} vads_return_mode={vads_return_mode} signature={signature} vads_site_id={vads_site_id} vads_trans_date={vads_trans_date} vads_trans_id={vads_trans_id} vads_version={vads_version}
By the way, the above message is displayed even without debugger element. Is it normal?
Hereunder the debugger datas for CURL [GH]
cURL OK : the cURL function was found on this server.
cURL Target URL: https://systempay.cyberpluspaiement.com/vads-payment/
cURL Values: vads_action_mode=INTERACTIVE&vads_amount=999&vads_ctx_mode=TEST&vads_contrib=joomla&vads_currency=978&vads_cust_email=email@test.fr&vads_cust_id=00001&vads_cust_name=Jojo le Mérou&vads_page_action=PAYMENT&vads_payment_config=SINGLE&vads_redirect_error_message=Redirection vers la boutique dans quelques instants&vads_redirect_error_timeout=5&vads_redirect_success_message=Redirection vers la boutique dans quelques instants&vads_redirect_success_timeout=5&vads_return_mode=GET&signature=45853b25dfc1ef2382ba295571d6b9f2bed84485&vads_site_id=70501609&vads_trans_date=20111115210104&vads_trans_id=322931&vads_version=V2
cURL:Resource id #170
cURL info: Array ( [url] => https://systempay.cyberpluspaiement.com/vads-payment/ [content_type] => text/html;charset=UTF-8 [http_code] => 200 [header_size] => 769 [request_size] => 774 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.455215 [namelookup_time] => 0.005383 [connect_time] => 0.015918 [pretransfer_time] => 0.210148 [size_upload] => 620 [size_download] => 26759 [speed_download] => 58783 [speed_upload] => 1361 [download_content_length] => -1 [upload_content_length] => 620 [starttransfer_time] => 0.449816 [redirect_time] => 0 )
Response:
Systempay
Informations sur la transaction
http://www.unsaf.org/j17
Identifiant du commerçant : xxxxxxx
Numéro de transaction : xxxxxx
Montant : 9,99 EUR
Paiement sécurisé
Choisissez votre moyen de paiement :
CB
CB e-carteBleue
e-carteBleue Maestro
Maestro Mastercard
Mastercard Visa
Visa
What did I missed?
Thanks a lot for your help.
Fred