I'm trying to implement PayPalPro in Virtuemart for Joomla, but cannot seem to capture the TransactionID. The com_virtuemart/classes/ps_checkout.php file has the following code, which should capture it and store it in the database.
$fields = array(
'order_id' => $order_id,
'payment_method_id' => $d["payment_method_id"],
'order_payment_log' => @$d["order_payment_log"],
'order_payment_trans_id' => $vmInputFilter->safeSQL( @$d["order_payment_trans_id"] )
);
.
.
.
$db->buildQuery( 'INSERT', '#__{vm}_order_payment', $fields, '', $specialfield );
$db->query();
I could not, however, find where the order_payment_trans_id field is set in the $d array in the com_paypalprous/ps_paypalprous.php file, so I added this after every call to DoDirectPayment() or fetch_data():
if ( "" != getArrayValue($resarray, 'TRANSACTIONID') ) {
$d["order_payment_trans_id"] = trim(urldecode(getArrayValue($resarray, 'TRANSACTIONID')));
}
The field is not being captured. Has anyone solved this problem?