This commit is contained in:
wangjinlei
2025-01-09 09:25:20 +08:00
parent 0df350a819
commit 6abe90ec53
4 changed files with 40 additions and 1 deletions

View File

@@ -14,6 +14,11 @@ use PaypalServerSdkLib\Models\Builders\PaypalWalletExperienceContextBuilder;
use PaypalServerSdkLib\Models\Builders\PurchaseUnitRequestBuilder;
use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
use think\Db;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\Exception;
use think\exception\DbException;
use think\exception\PDOException;
use think\Queue;
use think\Validate;
@@ -28,6 +33,14 @@ class Order extends base{
}
/**
* @throws DataNotFoundException
* @throws ModelNotFoundException
* @throws DbException
* @throws PDOException
* @throws Exception
* @throws \Exception
*/
public function creatArticleOrder(){
$data = $this->request->post();
$rule = new Validate([
@@ -54,6 +67,7 @@ class Order extends base{
$re['paypal'] = $ii;
return jsonSuccess($re);
}
$insert['order_sn'] = 'TMR'.date('Ymd') . strtoupper(bin2hex(random_bytes(8)));
$insert['user_id'] = $article_info['user_id'];
$insert['type'] = 0;
$insert["article_id"] = $data['article_id'];