OrderController.php 656 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\modules\client\controllers\v1\alipay;
  3. use app\modules\client\models\v1\alipay\OrderForm;
  4. class OrderController extends BaseController
  5. {
  6. //获取运费
  7. public function actionGetFreight() {
  8. $from = new OrderForm();
  9. $from->attributes = get_params();
  10. $from->store_id = get_store_id();
  11. return $this->asJson($from->getFreight());
  12. }
  13. //创建订单
  14. public function actionCreateOrder() {
  15. $from = new OrderForm();
  16. $from->attributes = all_params();
  17. $from->store_id = get_store_id();
  18. return $this->asJson($from->createOrder());
  19. }
  20. }