Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

scrivo

Pioneers
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Real Name
    Josh Stevens

scrivo's Achievements

  1. Hi, I was using the ozpost shipping module which has TNT live shipping pricing built into it, until I found out that the pricing requests are relayed though another server which you have to pay a monthly fee for. Is anyone able to build a TNT RTT shipping module? The TNT API documentation can be found here. Thanks, Josh
  2. Im using the Payway payment module, everything is working fine except that when the server-to-server data is transferred, the order status doesnt update. This is content on the register_payment_payway.php file, which is used in the server-to-server communication: <?php /* $Id: checkout_process.php 1750 2007-12-21 05:20:28Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); include_once('includes/functions/payway_utility.php'); require_once('includes/modules/payment/payway.php'); require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); if ( $headers['content-type'] == 'application/xml' ) { $xmlData = file_get_contents('php://input'); $parser = new XMLThing( $xmlData ); $response = $parser->parse(); $entry_line = $dtime . " Server-to-server data: \r\n"; while ( list( $key, $value ) = each( $response['PaymentResponse'] ) ) { $params[$key] = $value; // We reccommend you don't log your password. if ( $key != 'password' ) { $entry_line = $entry_line . ' ' . $key . ' = ' . $value . "\r\n"; } } } else { $entry_line = $dtime . " Server-to-server post\r\nPOST Parameters: \r\n"; foreach ( $_POST as $paramName => $paramValue ) { $params[$paramName] = $paramValue; if ( $paramName != 'password' ) { $entry_line = $entry_line . ' ' . $paramName . ' = ' . $paramValue . "\r\n"; } } $entry_line = $entry_line . "GET Parameters: \r\n"; foreach ( $_GET as $paramName => $paramValue ) { $params[$paramName] = $paramValue; if ( $paramName != 'password' ) { $entry_line = $entry_line . ' ' . $paramName . ' = ' . $paramValue . "\r\n"; } } } //debugLog( $entry_line ); if (getenv(HTTP_X_FORWARDED_FOR)) { $ip_address = $REMOTE_ADDR; } else { $ip_address = $_SERVER['REMOTE_ADDR']; } if ( $ip_address != MODULE_PAYMENT_PAYWAY_SERVER_IP ) { $testString = "HTTP/1.1 403 PayWay server IP not authenticated."; header( $testString ); echo "PayWay server IP not authenticated: " . $ip_address; } else if ( $params['username'] != MODULE_PAYMENT_PAYWAY_SECURITY_TOKEN_USERNAME || $params['password'] != MODULE_PAYMENT_PAYWAY_SECURITY_TOKEN_PASSWORD ) { header( "HTTP/1.1 403 Incorrect Username and Password" ); echo "Incorrect Username and password"; } else { // Save payment // If error results, return HTTP 500 // Otherwise, just return success //trigger_error(mysql_escape_string($params['payment_reference'])); if(MODULE_PAYMENT_PAYWAY_PAID_ORDER_STATUS_ID >0) { header("Location: http://www.google.com"); tep_db_query("UPDATE ".TABLE_ORDERS." SET orders_status='".MODULE_PAYMENT_PAYWAY_PAID_ORDER_STATUS_ID."'" . // ",payway_payment_reference='".mysql_escape_string($params['payment_reference'])."'," . //"payway_receipt_no='".mysql_escape_string($params['no_receipt'])."'" . " WHERE orders_id=".mysql_escape_string($params['payment_reference'])); tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . "(orders_id, orders_status_id, date_added, customer_notified, comments) values (" . $params["payment_reference"] . ", " . MODULE_PAYMENT_PAYWAY_PAID_ORDER_STATUS_ID . ", now(), 1, '***PayWay Payment Data*** Payment Reference#: ".mysql_escape_string($params['payment_reference'])." Receipt No#: ".mysql_escape_string($params['no_receipt']) . "')"); echo "Success"; } else { header( "HTTP/1.1 500 Payment order status not set correctly" ); echo("Payment order status not set correctly"); } } ?> Can anyone see anything wrong with this code or anything i may have set wrong?
  3. does anyone currently have the westpac payway module working? Just after some advice as im having trouble installing it... thanks Josh
×
×
  • Create New...