Skip to content

Commit

Permalink
fixing email sending issue
Browse files Browse the repository at this point in the history
  • Loading branch information
KavindaHarshana committed Feb 3, 2022
1 parent 84ae619 commit ef9056c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/extensions/SilverShopSCAPaymentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ class SilverShopSCAPaymentExtension extends DataExtension
public function onPaymentCaptured($response = null)
{
$order = $this->Cart();
$order->Status = 'Paid';

$order->Placed = DBDatetime::now()->Rfc2822();;
$order->write();

if ($order && $order->exists()) {
OrderProcessor::create($order)->completePayment();
}

$order->Status = 'Paid';
$order->write();
}

public function getIdentifierToken()
Expand Down

0 comments on commit ef9056c

Please sign in to comment.