Not sure about others by the WorldPay transaction ID plays a pivotal role in our reporting and isn't stored at all on the site by the module.

I don't know what the best storage method would be other than setting up a seperate table to store the additional details.

$trans_id = $_POST['transId'];

So a seperate table with:

order_id
trans_id
trans_time ($_POST['transTime'])
cardtype ($_POST['cardType'])

possibly the $_POST['transStatus'] and $_POST['amount'] too.

Comments

matason’s picture

Assigned: Unassigned » matason

Hi jamestamr, I'll have a look into this tomorrow.

rossfowler88’s picture

+1 re the Trans ID

However, some of the proposed data is already stored in the UC_payment_receipts table (Card type, Order ID, amount and time - though that may be when it hits the database rather than the worldpay trans time).

Some data is combined together in the comment field, but why duplicate this when you could use the existing table?

Why not dump all the post data into the data field of the uc_payment_receipts table (currently NULL is passed) so anyone could extract whatever data is required?

I would also append the trans id specifically to the uc_payment_receipts comment field created for success transactions so that it displays on the /admin/store/orders/xx/payments screen, eg
$comment = t('Paid by !type, Worldpay ref #!transid, order #!order.', ...

I'd also be tempted to add a test status active flag to the comment as well.

Not sure why it is proposed to record the transaction status. If there is an entry in payment receipts table then it must be a success, if the order is cancelled or the payment fails (ie trans status 'C') the worldpay module should have updated the order status to cancelled.

gruberroland’s picture

This is work in progress. If anyone knows how to display additional data on the order overview please contact me.

gruberroland’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Assigned: matason » gruberroland
Issue summary: View changes
gruberroland’s picture

The current 7.x branch shows transaction ID, card type and timestamp in the order admin view.

gruberroland’s picture

Status: Active » Closed (fixed)

The 7.x dev branch stores all response parameters in the database and displays them on order admin page.