Using yii2 trying make success callback for payments. Callback work, but i need make changes for order. In my common/congig/main.php:
'successCallback' => function($invoice) {
$order = \common\models\Checkout::findOne($invoice->order_id);
$order->payment_status = 1;
$order->update();
}
$invoice->order_id; receives current order id, i need change payment status for checkout model.
Update:
can I somehow run it recursively? for example, if I have several records with one ID?