-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Currently solving this in a custom module as follows:
use craft\commerce\Plugin as Commerce;
Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function (Event $e) {
$order = $e->sender;
$hash = Craft::$app->request->getQueryParam('hash');
$plugin = Commerce::getInstance();
$last_transaction = $plugin->getTransactions()->getTransactionByHash($hash);
$gateway = $plugin->getGateways()->getGatewayById($last_transaction->gatewayId);
$klarna_order_id = $last_transaction->reference;
// Acknowledge the order
$acknowledgement = new Acknowledge($gateway, $klarna_order_id);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working