order = new RiceCardPay(); $this->args = $args; } //拼团 if($order_type==OrderTypeEnum::GROUPBUY){ $this->order = new GroupBuyPay; $this->args = $args; } //拼团裂变 if($order_type==OrderTypeEnum::GROUPBUYLB){ $this->order = new GroupBuyLbPay; $this->args = $args; } //会员卡 if($order_type==OrderTypeEnum::MEMBERCARDBUY){ $this->order = new MemberCardPay(); $this->args = $args; } if($order_type==OrderTypeEnum::ZA){ $this->order = new ZaPay; $this->args = $args; } } //准备支付 public function prePay(){ if(isset($this->order)){ return $this->order->prePay($this->args); } } //重新支付 public function rePay(){ if(isset($this->order)){ return $this->order->rePay($this->args); } } //异步回调 public function notifyPay(){ return $this->order->notifyPay($this->args); } public function getInstance(){ return $this->order; } }