I have corrected a few issues with the Protx payment method:
Script: catalog/controller/payment/protx.php
Code: Select all
//Line 7:
//This initially was: if (!$this->config->get('paypal_test')) {
//changed to: if (!$this->config->get('protx_test')) {
Code: Select all
// mod start - Must make VendorTxCode unique else payment will fail on Protx system!
$query = 'VendorTxCode=' . date("dmYHis") . $this->session->data['order_id'];
// mod end
$query .= '&Amount=' . $this->currency->format($order_info['total'], $order_info['currency'], $order_info['value'], FALSE);
$query .= '&Currency=' . $order_info['currency'];
// mod start - Made a little more user friendly
$query .= '&Description=' . 'Items on ' . date($this->language->get('date_format_short')) . ' Order No: ' . $this->session->data['order_id'];
// mod end
$query .= '&SuccessURL=' . $this->url->https('checkout/success');
$query .= '&FailureURL=' . $this->url->https('checkout/payment');
$query .= '&CustomerName=' . $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
// mod start - additional info to help reduce the number of failed or fraudulent transactions
$query .= '&ContactNumber=' . $order_info['telephone'];
$query .= '&DeliveryAddress=' . $order_info['shipping_address_1'] . "\r\n" .
$order_info['shipping_address_2'] . "\r\n" .
$order_info['shipping_city'] . "\r\n" .
$order_info['shipping_zone'] . "\r\n";
$query .= '&DeliveryPostCode=' . $order_info['shipping_postcode'];
// Duplicate the above so recieving address and card address match
$query .= '&BillingAddress=' . $order_info['shipping_address_1'] . "\r\n" .
$order_info['shipping_address_2'] . "\r\n" .
$order_info['shipping_city'] . "\r\n" .
$order_info['shipping_zone'] . "\r\n";
$query .= '&BillingPostCode=' . $order_info['shipping_postcode'];
// mod end
Phil.