Open csdougliss opened 5 years ago
Hi @craigcarnell Some additional context on your 3dsecure test gateway would be really helpful. Does it use any specific controllers when order is placed? What is the flow in general?
@ishakhsuvarov order is saved, pending payment status
Customer is re-directed to a controller, which verifies that the customer is enrolled in 3dsecure through an API call.
If the customer is enrolled, they are re-directed to the bank, which then re-directs them back to the same controller in Magento.
There the order is captured (if 3dsecure was succesful):
/**
* @param OrderInterface $order
*/
protected function capture($order) {
if(!$order) {
return false;
}
/** @var Invoice $invoice */
$invoice = null;
if(!$order->hasInvoices()) {
return false;
}
foreach ($order->getInvoiceCollection() as $previousInvoice) {
$invoice = $previousInvoice;
$invoice->capture();
}
if($invoice && $invoice->getId()) {
$this->invoiceRepository->save($invoice);
}
}
Magento 2.3.1, happens locally using PHP 7.2, after returned from my 3dsecure test gateway to confirm order success.