public function payOrder($orderId, $params = null) { try { $rtn = $this->_paypal->doExpressCheckoutPayment($params['token'], $params['PayerID'], $params['paymentType'], $params['currencyCodeType'], $params['paymentAmount']); } catch (Exception $ex) { $this->_logErrorPayment($orderId, TCVM_Payment_Imple::PAYMENT_PAYPAL_EXPRESS_CHECKOUT, $ex->getMessage()); throw $ex; } $this->_logSuccessPayment($orderId, TCVM_Payment_Imple::PAYMENT_PAYPAL_EXPRESS_CHECKOUT, $rtn['TRANSACTIONID'], $rtn); return $rtn; }
public function payOrder($orderId, $params = null) { //check order status if suscess or cancel can't be paid $rtn = array(); $params = $this->_generPaypalParam($orderId, $params); try { $rtn = $this->_paypal->doDirectPay($params); } catch (Exception $ex) { $this->_logErrorPayment($orderId, TCVM_Payment_Imple::PAYMENT_PAYPAL_DIRECT_PAY, $ex->getMessage()); throw $ex; } $this->_logSuccessPayment($orderId, TCVM_Payment_Imple::PAYMENT_PAYPAL_DIRECT_PAY, $rtn['TRANSACTIONID'], $rtn); return $rtn; }