Skip to content

Commit

Permalink
Added option for deadline parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbnielsen committed Aug 20, 2021
1 parent 3212062 commit c268205
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,23 @@ public function setLanguage($value)
return $this->setParameter('language', $value);
}

/**
* @return int
*/
public function getDeadline()
{
return $this->getParameter('deadline');
}

/**
* @param $value
* @return int
*/
public function setDeadline($value)
{
return $this->setParameter('deadline', $value);
}

/**
* @return array
*/
Expand Down
6 changes: 6 additions & 0 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Omnipay\Quickpay\Message;

use Cart\Cart;
use Omnipay\Common\Exception\InvalidRequestException;


Expand Down Expand Up @@ -43,6 +44,11 @@ public function getQuickpayParams()
$params['description'] = $this->getDescription();
}

// show expiry timer on Quicpay payment screen
if ($this->getDeadline() != '') {
$params['deadline'] = $this->getDeadline();
}

return $params;
}

Expand Down

0 comments on commit c268205

Please sign in to comment.