PurchaseClearController.php 870 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace hd\controllers;
  3. use bizHd\purchase\classes\PurchaseClearClass;
  4. use Yii;
  5. use common\components\util;
  6. class PurchaseClearController extends BaseController
  7. {
  8. //生成结算订单 shish 2021.1.26
  9. public function actionCreateOrder()
  10. {
  11. $post = Yii::$app->request->post();
  12. $ids = $post['id'];
  13. $data['merchantId'] = $this->sjId;
  14. $data['id'] = $ids;
  15. $respond = PurchaseClearClass::addClear($data);
  16. util::success($respond);
  17. }
  18. public function actionWxPay()
  19. {
  20. $string = '{
  21. "code": 1,
  22. "msg": "操作成功",
  23. "data": {
  24. "appId": "wx21b7c3ef12082099",
  25. "nonceStr": "i7f1e9z6ls42f3342m4j2bngxj6rq08e",
  26. "package": "prepay_id=wx042304351179687ee46ee32d8ecf420000",
  27. "signType": "MD5",
  28. "timeStamp": "1612451097",
  29. "paySign": "39FD249CD03B24FDA1755493F09D7C2E"
  30. }
  31. }';
  32. echo $string;
  33. }
  34. }