Exemple #1
0
 public function approve()
 {
     if ($this->isBeingVerified()) {
         $result = \Paynl\Transaction::approve($this->getId());
         $this->_reload();
         //status is changed, so refresh the object
         return $result;
     } else {
         throw new Error("Cannot approve transaction because it does not have the status 'verify'");
     }
 }
Exemple #2
0
 public function testApproveWithoutTransactionId()
 {
     \Paynl\Config::setApiToken('123456789012345678901234567890');
     $this->setExpectedException('\\Paynl\\Error\\Required');
     \Paynl\Transaction::approve('');
 }