コード例 #1
0
ファイル: SavedCard.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Check - payment processor is applicable for specified order or not
  *
  * @param \XLite\Model\Order          $order  Order
  * @param \XLite\Model\Payment\Method $method Payment method
  *
  * @return boolean
  */
 public function isApplicable(\XLite\Model\Order $order, \XLite\Model\Payment\Method $method)
 {
     $controller = \XLite::getController();
     return $order->getProfile() && $order->getProfile()->getSavedCards() && method_exists($controller, 'isLogged') && $controller->isLogged() && parent::isApplicable($order, $method);
 }
コード例 #2
0
ファイル: XPayments.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Pay
  *
  * @param \XLite\Model\Payment\Transaction $transaction Transaction
  * @param array                            $request     Input data request OPTIONAL
  *
  * @return string
  */
 public function pay(\XLite\Model\Payment\Transaction $transaction, array $request = array())
 {
     $this->savePaymentSettingsToTransaction($transaction);
     return parent::pay($transaction, $request);
 }
コード例 #3
0
 /**
  * Get payment method configuration page URL
  *
  * @param \XLite\Model\Payment\Method $method    Payment method
  * @param boolean                     $justAdded Flag if the method is just added via administration panel. Additional init configuration can be provided
  *
  * @return string
  */
 public function getConfigurationURL(\XLite\Model\Payment\Method $method, $justAdded = false)
 {
     return $this->getModule() && $this->getModule()->getModuleId() ? \XLite\Core\Converter::buildURL('xpc', '', array('section' => 'welcome')) : parent::getConfigurationURL($method, $justAdded);
 }