29 lines
658 B
PHP
29 lines
658 B
PHP
<?php
|
|
|
|
namespace app\common\service\pay;
|
|
|
|
use app\common\enum\OrderEnum;
|
|
use app\common\enum\YesNoEnum;
|
|
use app\common\model\store_cash_finance_flow\StoreCashFinanceFlow;
|
|
|
|
/**
|
|
* 现金支付
|
|
* Class CashPay
|
|
* @package app\common\service\pay
|
|
*/
|
|
class CashPay extends PayTool
|
|
{
|
|
|
|
public function refund($amount, $order)
|
|
{
|
|
$model = new StoreCashFinanceFlow();
|
|
$model->store_id = $order['store_id'] ?? 0;
|
|
$model->cash_price = $order->pay_price;
|
|
$model->receivable = $order->pay_price;
|
|
$model->remark = '退款';
|
|
$model->type = 1;
|
|
$model->status = YesNoEnum::YES;
|
|
$model->save();
|
|
}
|
|
|
|
} |