Ejemplo n.º 1
0
 /**
  * @param Payment $payment
  * @return Message\Response
  */
 public function paymentRecurrent(Payment $payment)
 {
     if (!$payment->getOriginalPayId()) {
         throw new InvalidArgumentException('The origPayId is required for recurrent payment.');
     }
     $data = $payment->toArray();
     $data['signature'] = $this->signature->signPayment($data);
     return $this->processRequest(Message\Request::paymentRecurrent($data));
 }
Ejemplo n.º 2
0
 /**
  * @param Payment $payment
  * @return Message\Response
  */
 public function paymentOneclickInit(Payment $payment)
 {
     if (!$payment->getOriginalPayId()) {
         throw new InvalidArgumentException('The origPayId is required for oneclick payment.');
     }
     if (!$this->isOneclickPaymentSupported()) {
         throw new NotSupportedException('payment/oneclick is not supported in currently used eAPI version');
     }
     $data = $payment->toArray();
     $data['signature'] = $this->signature->signPayment($data);
     return $this->processRequest(Message\Request::paymentOneclickInit($data));
 }