* @copyright 2021 DIGITAL RETAIL TECHNOLOGIES SL * @license https://opensource.org/licenses/MIT The MIT License * * Don't forget to prefix your containers with your own identifier * to avoid any conflicts with others containers. */ class RetailcrmTestHelper { public static function createOrderPayment($order_reference) { $orderPayment = new OrderPayment(); $orderPayment->order_reference = $order_reference; $orderPayment->id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT'); $orderPayment->conversion_rate = 1.000000; $orderPayment->amount = 100; $orderPayment->payment_method = 'Bank wire'; $orderPayment->date_add = date('Y-m-d H:i:s'); $orderPayment->save(); return $orderPayment; } public static function deleteOrderPayment($id) { $orderPayment = new OrderPayment($id); return $orderPayment->delete(); } public static function getMaxOrderId() { return Db::getInstance()->getValue( 'SELECT MAX(id_order) FROM `' . _DB_PREFIX_ . 'orders`' ); } public static function getMaxCustomerId() { return Db::getInstance()->getValue( 'SELECT MAX(id_customer) FROM `' . _DB_PREFIX_ . 'customer`' ); } }