Skip to content

Commit

Permalink
Merge pull request #4 from PatronBase/browser-height-width-params
Browse files Browse the repository at this point in the history
Added browser height and width parameters
  • Loading branch information
daneastmond authored Jul 15, 2024
2 parents 9bad59e + a262a2e commit 8298407
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,48 @@ public function setLocale($value)
return $this->setParameter('locale', $value);
}

/**
* Get the browserScreenHeight field
*
* @return null|int
*/
public function getBrowserScreenHeight()
{
return $this->getParameter('browserScreenHeight');
}

/**
* Set the browserScreenHeight field
*
* @param null|int $value
* @return self
*/
public function setBrowserScreenHeight($value)
{
return $this->setParameter('browserScreenHeight', $value);
}

/**
* Get the browserScreenWidth field
*
* @return null|int
*/
public function getBrowserScreenWidth()
{
return $this->getParameter('browserScreenWidth');
}

/**
* Set the browserScreenWidth field
*
* @param null|int $value
* @return self
*/
public function setBrowserScreenWidth($value)
{
return $this->setParameter('browserScreenWidth', $value);
}

/**
* Get the transaction type
*
Expand Down Expand Up @@ -175,6 +217,8 @@ public function getData()
// optional fields
$optional_data = array(
'customer_ip_address' => $this->getClientIp(),
'customer_browser_screen_height' => $this->getBrowserScreenHeight(),
'customer_browser_screen_width' => $this->getBrowserScreenWidth(),
// merchant defined data 1-4 are stored with tokens, so transaction-specific data from 5 onwards
'merchant_defined_data5' => $this->getDescription(),
'override_backoffice_post_url' => $this->getNotifyUrl(),
Expand Down

0 comments on commit 8298407

Please sign in to comment.