<?php
namespace App\Models;

use CodeIgniter\Model;

class PaymentModel extends Model
{
    protected $table = 'payments';
    protected $primaryKey = 'id';
    protected $allowedFields = ['order_id','merchant_txn_no','response','status'];

    public function updatePaymentByOrderId($orderId, $data)
    {
        return $this->where('order_id', $orderId)->set($data)->update();
    }
}
