private function createPaymentRequest($order, $requestParams) { $options = $this->getPaymentOptions($order['payment']); $request = Payment::createRequest($order['payment'], $options); $requestParams = array_merge($requestParams, array('orderSn' => $order['sn'], 'title' => $order['title'], 'summary' => '', 'amount' => $order['amount'])); return $request->setParams($requestParams); }
protected function createPaymentRequest($order, $requestParams) { $options = $this->getPaymentOptions($order['payment']); $request = Payment::createRequest($order['payment'], $options); $processor = OrderProcessorFactory::create($order["targetType"]); $targetId = isset($order["targetId"]) ? $order['targetId'] : $order['id']; $requestParams = array_merge($requestParams, array('orderSn' => $order['sn'], 'userId' => $order['userId'], 'title' => $order['title'], 'targetTitle' => $processor->getTitle($targetId), 'summary' => '', 'note' => $processor->getNote($targetId), 'amount' => $order['amount'], 'targetType' => $order['targetType'])); return $request->setParams($requestParams); }