腾讯云优惠券
呆错支付插件开发过程中测试写入订单的实例
人气:279 更新:2022-02-20
public function test()
{
    //$result = \think\Db::execute( "INSERT INTO dc_pay (pay_name , pay_sign , pay_info_id , pay_user_id , pay_price , pay_quantity , pay_total_fee , pay_status) VALUES ('test' , '123456' , '1' , '1' , '10.62' , 1 , '0.12' , 1)");

    $result = DcDbSave('pay/Pay', [
        'pay_name'       => 'rechargeScore',
        'pay_sign'       => payCreateSign(),
        'pay_info_id'    => 1,
        'pay_user_id'    => 1,
        'pay_price'      => '12.23',
        'pay_quantity'   => 1,
        'pay_total_fee'  => '0.12',
        'pay_status'     => 1,
        'pay_module'     => 'user',
        'pay_controll'   => 'recharge',
        'pay_action'     => 'score',
        'pay_scene'      => 'pc',
        'pay_platform'   => 'alipay',
        'pay_content'    => '---',
    ]);

    dump(model('pay/Pay')->getLastSql());

    dump($result);
}