[quote name='tbirnseth' timestamp='1376794431' post='166988']
You'll need to look at an XHR response in firebug (or similar browser) to see what the data is. More than likely it is a PHP Notice of some sort that's coming back from the server and the JS ajax parser is not prepared to ignore PHP notifications.
[/quote]
Thanks for your reply, I also tryed an other payment processor (iDeal) and I get the exact same result. After selecting an bank and proceed with checkout I get a response which says that payment can't be done at the moment.
this is the other code:
```php
/***************************************************************************
* *
* Copyright (c) 2012 Sisow B.V. All rights reserved. *
* *
****************************************************************************/
//
// $Id: base.php 2011-05-24
//
use Tygh\Registry;
use Tygh\Http;
use Tygh\Session;
if (!defined('BOOTSTRAP')) { die('Access denied'); }
include_once 'sisow.cls5.php';
if (defined('PAYMENT_NOTIFICATION')) {
$order_id = $_REQUEST['ec'];
if ($mode == 'return') {
if (fn_check_payment_script($filename.'.php', $order_id)) {
fn_order_placement_routines($order_id);
}
}
elseif ($mode == 'notify') {
$pp_response = array();
$payment_id = db_get_field("SELECT payment_id FROM ?:orders WHERE order_id = ?i", $order_id);
$processor_data = fn_get_payment_method_data($payment_id);
$order_info = fn_get_order_info($order_id);
$sisow = new Sisow($processor_data['processor_params']['merchantid'], $processor_data['processor_params']['merchantkey']);
$trxid = $_REQUEST['trxid'];
if ($sisow->StatusRequest($trxid) != 0) {
exit('StatusRequest failed');
}
$pp_response['transaction_id'] = $trxid;
if ($sisow->status == Sisow::statusSuccess || $sisow->status == 'Pending' || $sisow->status == 'Reservation') {
if (isset($processor_data['processor_params']['statussuccess']) && $processor_data['processor_params']['statussuccess'] != "") {
$st = $processor_data['processor_params']['statussuccess'];
}
else {
$st = 'P';
}
$pp_response['order_status'] = $st;
$pp_response['reason_text'] = 'Approved by Sisow';
$pp_response['consumerAccount'] = $sisow->consumerAccount;
$pp_response['consumerName'] = $sisow->consumerName;
$pp_response['consumerCity'] = $sisow->consumerCity;
}
else {
if (isset($processor_data['processor_params']['statusfailed']) && $processor_data['processor_params']['statusfailed'] != "") {
$st = $processor_data['processor_params']['statusfailed'];
}
else {
$st = 'I';
}
$pp_response['order_status'] = $st;
$pp_response['reason_text'] = $sisow->status;
}
//fn_change_order_status($data['order'], $pp_response['order_status'], '', $force_notification);
if (fn_check_payment_script($filename.'.php', $order_id)) {
fn_finish_payment($order_id, $pp_response, false);
}
if($_GET['payment'] == 'sisowob' || $_GET['payment'] == 'sisowebill' || $_GET['payment'] == 'sisowecare')
{
if (fn_check_payment_script($filename.'.php', $order_id)) {
fn_order_placement_routines($order_id);
}
}
}
exit;
}
else
{
echo '
![payment logo]()
';
$arg = array();
$currency = $processor_data['processor_params']['currency'];
$amount = round(fn_format_price($order_info['total'], $currency) , 2);
//wanneer ideal is geselecteerd
//actie: controleren of er een bankkeuze is gemaakt
//uitvoer: bij geen bankkeuze wordt er een foutmelding gegeven en een redirect geplaatst
if($paymentcode == 'ideal' && (!isset($order_info['payment_info']['issuerid']) || $order_info['payment_info']['issuerid'] == ''))
{
fn_set_notification('E', fn_get_lang_var('warning'), 'Kies een bank', false, 'no_bank');
fn_redirect(Registry::get('config.current_location') . "/index.php?dispatch=checkout.checkout&order_id=".$order_id, true);
exit;
}
//wanneer ecare is geselecteerd
//actie: controleren of alle gegevens aanwezig zijn
//uitvoer: bij onjuiste gegevens wordt er een foutmelding gegeven en een redirect geplaatst
if($paymentcode == 'ecare' && ($order_info['payment_info']['sisow_gender'] == '' || $order_info['payment_info']['sisow_voor'] == '' || $order_info['payment_info']['days'] < 0 || $order_info['payment_info']['days'] > 31 || $order_info['payment_info']['month'] < 0 || $order_info['payment_info']['month'] > 12 || $order_info['payment_info']['year'] == ''))
{
if($order_info['payment_info']['sisow_gender'] == '')
fn_set_notification('E', fn_get_lang_var('warning'), 'Kies een aanhef', false, 'no_gender');
if($order_info['payment_info']['sisow_voor'] == '')
fn_set_notification('E', fn_get_lang_var('warning'), 'Vul uw voorletter(s) in.', false, 'no_initials');
if($order_info['payment_info']['days'] < 0 || $order_info['payment_info']['days'] > 31 || $order_info['payment_info']['month'] < 0 || $order_info['payment_info']['month'] > 12 || $order_info['payment_info']['year'] == '')
fn_set_notification('E', fn_get_lang_var('warning'), 'Vul een juiste geboortedatum in.', false, 'invalid_date');
fn_redirect(Registry::get('config.current_location') . "/index.php?dispatch=checkout.checkout&order_id=".$order_id, true);
exit;
}
//alle variabelen zetten voor de betaling
{
$arg['ipaddress'] = $_SERVER['REMOTE_ADDR'];
$arg['shipping_firstname'] = $order_info['s_firstname'];
$arg['shipping_lastname'] = $order_info['s_lastname'];
$arg['shipping_mail'] = $order_info['email'];
//$arg['shipping_company'] = $order_info[''];
$arg['shipping_address1'] = $order_info['s_address'];
$arg['shipping_address2'] = $order_info['s_address_2'];
$arg['shipping_zip'] = $order_info['s_zipcode'];
$arg['shipping_city'] = $order_info['s_city'];
//$arg['shipping_country'] = $order_info[''];
$arg['shipping_countrycode'] = $order_info['s_country'];
$arg['shipping_phone'] = $order_info['s_phone'];
$arg['shipping'] = $order_info['shipping_cost'];
$arg['billing_firstname'] = $order_info['b_firstname'];
$arg['billing_lastname'] = $order_info['b_lastname'];
$arg['billing_mail'] = $order_info['email'];
//$arg['billing_company'] = $order_info[''];
$arg['billing_address1'] = $order_info['b_address'];
$arg['billing_address2'] = $order_info['b_addresb_2'];
$arg['billing_zip'] = $order_info['b_zipcode'];
$arg['billing_city'] = $order_info['b_city'];
//$arg['billing_country'] = $order_info[''];
$arg['billing_countrycode'] = $order_info['b_country'];
$arg['billing_phone'] = $order_info['b_phone'];
//ecare
//extra variabelen zetten voor ecare
if($paymentcode == 'ecare')
{
if($order_info['payment_info']['year'] < 100)
{
$jaar = $order_info['payment_info']['year'] + 1000;
}
else
{
$jaar = $order_info['payment_info']['year'];
}
$arg['birthdate'] = sprintf('%02d%02d%04d', $order_info['payment_info']['days'], $order_info['payment_info']['month'], $jaar);
$arg['gender'] = $order_info['payment_info']['sisow_voor'];
$arg['initials'] = $order_info['payment_info']['sisow_gender'];
$arg['makeinvoice'] = 'false';
$arg['mailinvoice'] = 'false';
if($order_info['payment_method']['processor_params']['makeinvoice'] == 'on')
$arg['makeinvoice'] = 'true';
if($order_info['payment_method']['processor_params']['mailinvoice'] == 'on')
$arg['mailinvoice'] = 'true';
}
//producten en taxes
//kijken hoeveel btw aanwzig is
$arg['tax'] = 0;
foreach ($order_info['taxes'] as $tax)
{
$arg['tax'] += $tax['tax_subtotal'];
}
$arg['currency'] = $order_info['payment_method']['processor_params']['currency'];
//producten
//producten ophalen en prijzen berekenen
$prodnr = 0;
foreach($order_info['items'] as $product)
{
$prodnr ++;
$arg['product_id_'.$prodnr] = $product['product_code'];
$arg['product_description_'.$prodnr] = $product['product'];
$arg['product_quantity_'.$prodnr] = $product['amount'];
$netprice = fn_format_price($product['price'], $currency);
$taxrate = 0;
$product_data = fn_get_product_data($product['product_id'], $_SESSION['auth'], $order_info['lang_code'], '', true, true, true, true, false, true, true);
foreach ($order_info['taxes'] as $key => $tax)
{
if(in_array($key, $product_data['taxes']) && $tax['price_includes_tax'] == 'Y')
{
if($tax['rate_type'] == 'P')
{
$netprice = ($netprice * 100.0) / (100.0 + $tax['rate_value']);
}
}
}
$arg['product_netprice_'.$prodnr] = round($netprice * 100.0, 0);
$arg['product_nettotal_'.$prodnr] = $arg['product_netprice_'.$prodnr] * $arg['product_quantity_'.$prodnr];
$total = $arg['product_nettotal_'.$prodnr];
$taxrate = 0;
foreach ($order_info['taxes'] as $key => $tax)
{
if(in_array($key, $product_data['taxes']))
{
if($tax['rate_type'] == 'P')
{
$total = $total * ((100.0 + $tax['rate_value']) / 100.0);
$taxrate += ($tax['rate_value'] * 100.0);
}
}
}
$total = round($total, 0);
$arg['product_total_'.$prodnr] = $total;
$arg['product_taxrate_'.$prodnr] = $taxrate;
$arg['product_tax_'.$prodnr] = $arg['product_total_'.$prodnr] - $arg['product_nettotal_'.$prodnr];
}
//producten
//verzendkosten toevoegen aan de producten
if($order_info['shipping_cost'] > 0)
{
$prodnr ++;
$arg['product_id_'.$prodnr] = 'Shipping';
$arg['product_description_'.$prodnr] = 'Verzendkosten';
$arg['product_quantity_'.$prodnr] = '1';
$netprice = fn_format_price($order_info['shipping_cost'], $currency);
foreach ($order_info['taxes'] as $key => $tax)
{
if($tax['applies']['S'] > 0 && $tax['price_includes_tax'] == 'Y')
{
if($tax['rate_type'] == 'P')
{
$netprice = $netprice /((100.0 + $tax['rate_value']) / 100);
}
}
}
$taxamount = 0;
$taxrate = 0;
foreach ($order_info['taxes'] as $key => $tax)
{
if($tax['applies']['S'] > 0)
{
if($tax['rate_type'] == 'P')
{
$taxamount += $netprice * ($tax['rate_value'] / 100);
$taxrate += $tax['rate_value'];
}
}
}
$arg['product_netprice_'.$prodnr] = round($netprice * 100.0, 0);
$arg['product_total_'.$prodnr] = round(($netprice + $taxamount) * 100.0, 0);
$arg['product_nettotal_'.$prodnr] = $arg['product_netprice_'.$prodnr];
$arg['product_tax_'.$prodnr] = round($taxamount * 100.0, 0);
$arg['product_taxrate_'.$prodnr] = round($taxrate * 100.0, 0);
}
//producten
//payment fee toevoegen aan de producten
if( isset($order_info['payment_surcharge']) && $order_info['payment_surcharge'] > 0)
{
$prodnr ++;
$arg['product_id_'.$prodnr] = 'Fee';
$arg['product_description_'.$prodnr] = 'Paymentfee';
$arg['product_quantity_'.$prodnr] = '1';
$netprice = fn_format_price($order_info['payment_surcharge'], $currency);
foreach ($order_info['taxes'] as $key => $tax)
{
if(in_array($key, $order_info['payment_method']['tax_ids']) && $tax['price_includes_tax'] == 'Y')
{
if($tax['rate_type'] == 'P')
{
$netprice = $netprice /((100.0 + $tax['rate_value']) / 100);
}
}
}
$taxamount = 0;
$taxrate = 0;
foreach ($order_info['taxes'] as $key => $tax)
{
if(in_array($key, $order_info['payment_method']['tax_ids']))
{
if($tax['rate_type'] == 'P')
{
$taxamount += $netprice * ($tax['rate_value'] / 100);
$taxrate += $tax['rate_value'];
}
}
}
$arg['product_netprice_'.$prodnr] = round($netprice * 100.0, 0);
$arg['product_total_'.$prodnr] = round(($netprice + $taxamount) * 100.0, 0);
$arg['product_nettotal_'.$prodnr] = $arg['product_netprice_'.$prodnr];
$arg['product_tax_'.$prodnr] = round($taxamount * 100.0, 0);
$arg['product_taxrate_'.$prodnr] = round($taxrate * 100.0, 0);
}
//producten
//eventuele korting toevoegen
if(isset($order_info['discount']) && $order_info['discount'] > 0)
{
$prodnr ++;
$arg['product_id_'.$prodnr] = 'Disc';
$arg['product_description_'.$prodnr] = 'Koring';
$arg['product_quantity_'.$prodnr] = '1';
$arg['product_netprice_'.$prodnr] = round(fn_format_price($order_info['discount'], $currency) * 100.0, 0);
$arg['product_total_'.$prodnr] = $arg['product_netprice_'.$prodnr];
$arg['product_nettotal_'.$prodnr] = $arg['product_netprice_'.$prodnr];
$arg['product_tax_'.$prodnr] = '0';
$arg['product_taxrate_'.$prodnr] = '0';
}
//omschrijving inladen
if (isset($processor_data['processor_params']['description']) && $processor_data['processor_params']['description'] != "") {
$descr = str_replace("ORDER_ID", $order_id, $processor_data['processor_params']['description']);
}
else {
$descr = "Order " . $order_id;
}
//urls voor terugkoppeling inladen
$notifyurl = Registry::get('config.current_location') . "/index.php?dispatch=payment_notification.notify&payment=".$filename;
$returnurl = Registry::get('config.current_location') . "/index.php?dispatch=payment_notification.return&payment=".$filename;
//kijken of de testmodues geactiveerd moet worden
if ($processor_data['processor_params']['test'] == 'on') {
$arg['test'] = 'true';
}
else {
$arg['test'] = 'false';
}
//class sisow inladen en ontbrekene attributen inladen
$sisow = new Sisow($processor_data['processor_params']['merchantid'], $processor_data['processor_params']['merchantkey']);
$sisow->amount = $amount;
$sisow->payment = $paymentcode;
$sisow->purchaseId = $order_id;
$sisow->description = $descr;
$sisow->notifyUrl = $notifyurl;
$sisow->returnUrl = $returnurl;
if(isset($order_info['payment_info']['issuerid']) && $order_info['payment_info']['issuerid'] > 0)
$sisow->issuerId = $order_info['payment_info']['issuerid'];
//transaction request starten!
if(($ex = $sisow->transactionRequest($arg)) < 0)
{
fn_set_notification('E', fn_get_lang_var('warning'), 'Betalen met '.$order_info['payment_method']['payment'].' is nu niet mogelijk, betaal anders. ('. $ex . ', ' . $sisow->errorCode . ')' , false, 'invalid_date');
fn_redirect(Registry::get('config.current_location') . "/index.php?dispatch=checkout.checkout&order_id=".$order_id, true);
}
else
{
$url = $sisow->issuerUrl;
if($paymentcode == 'ebill' || $paymentcode == 'overboeking' || $paymentcode == 'ecare')
{
if(($sisow->StatusRequest()) < 0)
{
fn_set_notification('E', fn_get_lang_var('warning'), 'Betalen met '.$order_info['payment_method']['payment'].' is nu niet mogelijk, betaal anders. ('. $ex . ', ' . $sisow->errorCode . ')' , false, 'invalid_date');
fn_redirect(Registry::get('config.current_location') . "/index.php?dispatch=checkout.checkout&order_id=".$order_id, true);
}
else
{
//$url = $returnurl;
$url = Registry::get('config.current_location') . "/index.php?dispatch=payment_notification.notify&payment=".$filename."&status=".$sisow->status."&trxid=".$sisow->trxId."&ec=".$order_id;
}
}
?>
}
exit;
}
}
?>
```
Here is the error message:
//transaction request starten!
if(($ex = $sisow->transactionRequest($arg)) < 0)
{
fn_set_notification('E', fn_get_lang_var('warning'), 'Betalen met '.$order_info['payment_method']['payment'].' is nu niet mogelijk, betaal anders. ('. $ex . ', ' . $sisow->errorCode . ')' , false, 'invalid_date');
fn_redirect(Registry::get('config.current_location') . "/index.php?dispatch=checkout.checkout&order_id=".$order_id, true);
}