mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-03 19:53:19 +03:00
27 lines
712 B
PHP
27 lines
712 B
PHP
|
<?php
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
}
|