35 lines
866 B
PHP
35 lines
866 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Services\DistributeService;
|
|
use App\Services\Payment\WxpayService;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Tests\TestCase;
|
|
use App\Models\Order;
|
|
|
|
class ExampleTest extends TestCase
|
|
{
|
|
/**
|
|
* A basic test example.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function test_example()
|
|
{
|
|
// $order = Order::findOrFail(3146);
|
|
// try {
|
|
// DB::beginTransaction();
|
|
// (new DistributeService())->wechatShare($order);
|
|
// $order->update(['profit_paid' => now()]);
|
|
// DB::commit();
|
|
// } catch (\Exception $e) {
|
|
// DB::rollBack();
|
|
// report($e);
|
|
// }
|
|
$result = (new WxpayService())->queryShare('4200002029202310133548206841', '20231013084421898946');
|
|
dump($result);
|
|
$this->assertTrue(true);
|
|
}
|
|
}
|