Jump to content

payment module not adding order to database


stylepop

Recommended Posts

Hello,

 

Picked up the Paymate payment module and whilst it appears to work fine checking out, we've been noticing that orders are not showing up on the back-end.  Customers appear to have accounts, and the purchased products and carts show up on the customer page but not orders.  The customers have noted receiving an email receipt but it does not include an order number.  We believe the problem lies in the validation.php file and is using an invalid function or something, can anyone have a look at the following and see if they can recognize what might be the issue?

 

Thanks so much!

<?php

include(dirname(__FILE__). '/../../config/config.inc.php');
include(dirname(__FILE__).'/paymate.php');

        $link = new Link();

        /* Does the cart exist and is valid? */
        $cart = new Cart(Tools::getvalue('ref'));
        if (!Validate::isLoadedObject($cart))
                exit;

        $customer = new Customer($cart->id_customer);

        /* Loading the object */
        $paymate = new paymate();
        $feedback = $paymate->l('Transaction IDsq:').Tools::getvalue('transactionID');

        if (Tools::getvalue('responseCode') == "PA")
                $paymate->validateOrder(intval($cart->id), _PS_OS_PAYMENT_, Tools::getvalue('paymentAmount'),
		$paymate->displayName, $feedback, NULL);
        else
                $paymate->validateOrder(intval($cart->id), _PS_OS_ERROR_, Tools::getvalue('paymentAmount'),
		$paymate->displayName, $feedback, NULL);

        Tools::redirect('order-confirmation.php?id_module='.$paymate->id.'&id_cart='.$cart->id.'&key='.$customer->secure_key);

?>
Link to comment
Share on other sites

The module was picked up from the PrestaShop Addon's webpage here.  Whilst it says it is only compatible for versions 1.3.0.0 to 1.4.8.2, it seems to be accepting payment for version 1.6.0.9 but not adding orders to the back-end.  It appears to be some issue with it not being able to get an order number.

 

What's the best way to go about figuring out how to make this compatible?

Link to comment
Share on other sites

I would typically suggest that you contact the module developer and ask them if they will upgrade the module.  v1.4 is so old and no longer being maintained, I'm not really sure why they would not invest to upgrade the module, especially at the 279 price point.

 

Alternatively, you can post a topic in the paid jobs section and get bids for upgrading the module.  That is also a service I offer, so you can send me a PM or contact me via my website if you would like to get an estimate for that.  I would need to review the module and see how it is coded, but I suspect the addition of multi-store in PS v1.5 is what broke the module.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...