Hi.. sorry to bug you guys / webmaster with this... but I have been banging my head trying to figure out the finishing process for orders in payments methods. I have been developing my own payment method (sorry I couldn't afford you guys)...
In other words, this field "order_created" in the database always is 0, although with the other payment methods it get's processed correctly and the order is properly finished.
I have tried returning "completed" in function checkTransaction($pmconfigs, $order, $act), like this:
$payment_status = trim(stripslashes($_POST['ok_txn_status']));
if ($payment_status == 'completed'){
return array(1, '');
} elseif ($payment_status == 'pending') {
saveToLog("payment.log", "Status pending. Order ID ".$order->order_id.". Reason: ".$_POST['pending_reason']);
return array(2, trim(stripslashes($_POST['pending_reason'])) );
} elseif ($payment_status == 'failed') {
return array(3, 'Status Failed. Order ID '.$order->order_id );
} elseif ($payment_status == 'refunded') {
return array(3, "Status Refunded. Order ID ".$order->order_id );
}else {
return array(0, "Order number ".$order->order_id."\nOkpay error\nPayment status - $payment_status.");
}
And also this:
function complete($pmconfigs, $order, $payment) {
if ($order->order_status == '1'){
$checkout = JModelLegacy::getInstance('checkout', 'jshop');
$checkout->changeStatusOrder($order->order_id, $pmconfigs['transaction_pending_status'], 0);
return;
} else
return;
}
But still comes up as "Not finished"
What else do I need to do??
I don't understand this: it is too cryptic!
/**
* Exec after notify. Step7.
*/
function nofityFinish($pmconfigs, $order, $rescode){
}
/**
* exec before end. Step7.
*/
function finish($pmconfigs, $order, $rescode, $act){
}
/**
* exec complete. StepFinish.
*/
function complete($pmconfigs, $order, $payment){
}
Thank you in advance...