Captura omnipay
// after initial completeAuthorize()
// store $ref in your database with the payment
$ref = $response->getTransactionReference();
// then later, when you want to capture it
$data = array(
'transactionReference' => $ref,
'amount' => '10.00', // pass original amount, or can be less
);
$response = $gateway->capture($data)->send();
if ($response->isSuccessful()) {
// success
} else {
// error, maybe you took too long to capture the transaction
echo $response->getMessage();
}
Better Bison