Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/sella_ok.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/sella_ok.php (.../sella_ok.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/sella_ok.php (.../sella_ok.php) (revision 13704) @@ -1,6 +1,6 @@ Init(); @@ -28,4 +28,4 @@ ON g.GatewayId = pt.GatewayId WHERE g.ClassName = '.$application->Conn->qstr('kSellaGuestPayGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/ideal_nl.php =================================================================== diff -u -N -r13549 -r13704 --- branches/5.1.x/units/gateways/gw_classes/ideal_nl.php (.../ideal_nl.php) (revision 13549) +++ branches/5.1.x/units/gateways/gw_classes/ideal_nl.php (.../ideal_nl.php) (revision 13704) @@ -1,6 +1,6 @@ Application->GetVar('ideal_nl_bank_id'); $fields['description'] = 'Invoice #'.$item_data['OrderNumber']; + $fields['returnurl'] = $this->getNotificationUrl() . '?order_id='.$item_data['OrderId']; + $fields['reporturl'] = $this->getNotificationUrl() . '?mode=report&order_id='.$item_data['OrderId']; - $fields['returnurl'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?order_id='.$item_data['OrderId']; - $fields['reporturl'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?mode=report&order_id='.$item_data['OrderId']; - $transaction_xml = curl_post($gw_params['request_url'], $fields, null, 'GET'); $parser =& $this->Application->recallObject('kXMLHelper'); Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/paybox_notify.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/paybox_notify.php (.../paybox_notify.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/paybox_notify.php (.../paybox_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Conn->qstr('kPayboxGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/google_checkout.php =================================================================== diff -u -N -r13465 -r13704 --- branches/5.1.x/units/gateways/gw_classes/google_checkout.php (.../google_checkout.php) (revision 13465) +++ branches/5.1.x/units/gateways/gw_classes/google_checkout.php (.../google_checkout.php) (revision 13704) @@ -1,6 +1,6 @@ gwParams['submit_url'], 0, 8) == 'https://' ? true : null; - $shipping_url = $this->Application->BaseURL('/in-commerce/units/gateways/gw_classes/notify_scripts', $use_ssl).'google_checkout_shippings.php'; + $shipping_url = $this->getNotificationUrl('units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php', $use_ssl); $shipping_xml = ' '.$shipping_xml.' Index: branches/5.1.x/units/gateways/gw_classes/multicards.php =================================================================== diff -u -N -r13465 -r13704 --- branches/5.1.x/units/gateways/gw_classes/multicards.php (.../multicards.php) (revision 13465) +++ branches/5.1.x/units/gateways/gw_classes/multicards.php (.../multicards.php) (revision 13704) @@ -1,6 +1,6 @@ Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m')); // $ret['return'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m')); -// $ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId']; +// $ret['notify_url'] = $this->getNotificationUrl() . '?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId']; // $ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button $ret['no_note'] = 1; // customer is not prompted for notes Index: branches/5.1.x/gw_notify.php =================================================================== diff -u -N -r13549 -r13704 --- branches/5.1.x/gw_notify.php (.../gw_notify.php) (revision 13549) +++ branches/5.1.x/gw_notify.php (.../gw_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Init(); - /*$fh = fopen(WRITEABLE . '/gw.log', 'a'); + /* + // for debugging payment gateway notifications, don't remove + $fh = fopen(WRITEABLE . '/gw.log', 'a'); fwrite ($fh, "\n\n".date('d/m/y h:i:s').":\n"); foreach ($_REQUEST as $key => $val) { fwrite($fh, "\n"); } - fclose($fh);*/ - + fclose($fh); + */ + $db =& $application->GetADODBConnection(); $application->setUnitOption('ord','AutoLoad',false); $order =& $application->recallObject('ord'); - + $order_id = $application->GetVar('order_id'); if ($order_id) { $order->Load($order_id); } - + $gw_data = $order->getGatewayData($application->GetVar('payment_type_id')); $application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] ); $gateway_object =& $application->recallObject( $gw_data['ClassName'] ); Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php (.../atosorigin_notify.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php (.../atosorigin_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Init(); @@ -26,4 +26,4 @@ ON g.GatewayId = pt.GatewayId WHERE g.ClassName = '.$application->Conn->qstr('kAtosOriginGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/paypal.php =================================================================== diff -u -N -r13465 -r13704 --- branches/5.1.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 13465) +++ branches/5.1.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 13704) @@ -1,6 +1,6 @@ getCountryIso( $item_data['BillingCountry'] ); - $ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId']; + $ret['notify_url'] = $this->getNotificationUrl() . '?sid=' . $this->Application->GetSID() . '&admin=1&order_id=' . $item_data['OrderId']; + $ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button return $ret; } @@ -149,7 +150,7 @@ /* @var $cs_helper kCountryStatesHelper */ $ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] ); - $ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'].'&payment_type_id='.$tag_params['payment_type_id']; + $ret['notify_url'] = $this->getNotificationUrl() . '?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'].'&payment_type_id='.$tag_params['payment_type_id']; $ret['cmd'] = '_xclick-subscriptions'; // act as "Buy Now" PayPal button $real_ret = array(); Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/sella_notify.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/sella_notify.php (.../sella_notify.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/sella_notify.php (.../sella_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Conn->qstr('kSellaGuestPayGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php (.../google_checkout_shippings.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php (.../google_checkout_shippings.php) (revision 13704) @@ -1,6 +1,6 @@ Init(); Index: branches/5.1.x/units/gateways/gw_classes/worldpay.php =================================================================== diff -u -N -r13465 -r13704 --- branches/5.1.x/units/gateways/gw_classes/worldpay.php (.../worldpay.php) (revision 13465) +++ branches/5.1.x/units/gateways/gw_classes/worldpay.php (.../worldpay.php) (revision 13704) @@ -1,6 +1,6 @@ 'm', 'sid' => $this->Application->GetSID(), 'admin' => 1); $ret['MC_return_page'] = $this->Application->HREF($tag_params['return_template'], '', $return_params); $ret['MC_cancel_return_page'] = $this->Application->HREF($tag_params['cancel_template'], '', $return_params); + $ret['MC_callback'] = $this->getNotificationUrl() . '?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId']; - $ret['MC_callback'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId']; return $ret; } Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php (.../verisign_pflink_notify.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php (.../verisign_pflink_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Init(); @@ -26,4 +26,4 @@ ON g.GatewayId = pt.GatewayId WHERE g.ClassName = '.$application->Conn->qstr('kVerisignPfLinkGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (.../google_checkout_notify.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (.../google_checkout_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Conn->qstr('kSellaGuestPayGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file Index: branches/5.1.x/add_to_cart.php =================================================================== diff -u -N --- branches/5.1.x/add_to_cart.php (revision 13100) +++ branches/5.1.x/add_to_cart.php (revision 0) @@ -1,20 +0,0 @@ -Init(); - -$application->Redirect('in-commerce/checkout/shop_cart', array('pass'=>'p,ord', 'ord_event' => 'OnAddToCart', 'p_id' => $application->GetVar('product'))); \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/atosorigin.php =================================================================== diff -u -N -r13549 -r13704 --- branches/5.1.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 13549) +++ branches/5.1.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 13704) @@ -1,6 +1,6 @@ Application->HREF($tag_params['return_template'],'',Array('pass'=>'m')); $params['cancel_return_url'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m')); - $params['automatic_response_url'] = $this->Application->BaseURL('/in-commerce/units/gateways/gw_classes/notify_scripts').'atosorigin_notify.php'; + $params['automatic_response_url'] = $this->getNotificationUrl('units/gateways/gw_classes/notify_scripts/atosorigin_notify.php'); $txt_amount = sprintf("%.2f", $item_data['TotalAmount']); - + $params['amount'] = str_replace( Array('.', ','), '', $txt_amount); $params['caddie'] = $this->Application->GetSID() . ',' . MD5($item_data['OrderId']); $params['order_id'] = $item_data['OrderId']; Index: branches/5.1.x/units/gateways/gw_classes/gw_base.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/gw_base.php (.../gw_base.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/gw_base.php (.../gw_base.php) (revision 13704) @@ -1,6 +1,6 @@ Application->BaseURL('', $use_ssl), $ret); + + return str_replace(DIRECTORY_SEPARATOR, '/', $ret); + } } \ No newline at end of file Index: branches/5.1.x/units/gateways/gw_classes/notify_scripts/multicards_notify.php =================================================================== diff -u -N -r13100 -r13704 --- branches/5.1.x/units/gateways/gw_classes/notify_scripts/multicards_notify.php (.../multicards_notify.php) (revision 13100) +++ branches/5.1.x/units/gateways/gw_classes/notify_scripts/multicards_notify.php (.../multicards_notify.php) (revision 13704) @@ -1,6 +1,6 @@ Init(); @@ -29,4 +27,4 @@ ON g.GatewayId = pt.GatewayId WHERE g.ClassName = '.$application->Conn->qstr('kMultiCardsGW'))); - include(FULL_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file + include(MODULES_PATH.'/in-commerce/gw_notify.php'); \ No newline at end of file