Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
Updated Authorize and Purchase requests to send order id instead of t…
Browse files Browse the repository at this point in the history
…ransaction id
  • Loading branch information
jmauzyk committed Aug 7, 2020
1 parent 0c70d05 commit 96f1b3b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
12 changes: 11 additions & 1 deletion src/Message/AbstractRequest.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function getTestMode()
return $this->getParameter('testMode');
}

public function getOrderId()
{
return $this->getParameter('orderId');
}

// Setters
// =========================================================================

Expand All @@ -48,7 +53,7 @@ public function setApiUsername($value)
{
return $this->setParameter('apiUsername', $value);
}

public function setApiHost($value)
{
return $this->setParameter('apiHost', $value);
Expand All @@ -64,6 +69,11 @@ public function setTestMode($value)
return $this->setParameter('testMode', $value);
}

public function setOrderId($value)
{
return $this->setParameter('orderId', $value);
}

protected function liveEndpoint()
{
return 'https://'.$this->getApiHost().'/cardconnect/rest';
Expand Down
2 changes: 1 addition & 1 deletion src/Message/AuthorizeRequest.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function getData()
'cvv2' => $card->getCvv(),
'amount' => $this->getAmountInteger(),
'currency' => $this->getCurrency(),
'orderid' => $this->getTransactionId(),
'orderid' => $this->getOrderId(),
'name' => $card->getName(),
'address' => $card->getBillingAddress1(),
'address2' => $card->getBillingAddress2(),
Expand Down
3 changes: 1 addition & 2 deletions src/Message/PurchaseRequest.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function getData()
'cvv2' => $card->getCvv(),
'amount' => $this->getAmountInteger(),
'currency' => $this->getCurrency(),
'orderid' => $this->getTransactionId(),
'orderid' => $this->getOrderId(),
'name' => $card->getName(),
'address' => $card->getBillingAddress1(),
'address2' => $card->getBillingAddress2(),
Expand All @@ -26,7 +26,6 @@ public function getData()
'postal' => $card->getBillingPostcode(),
'email' => $card->getEmail(),
'phone' => $card->getBillingPhone(),
'retref' => $this->getTransactionReference(),
'bin' => 'Y',
'tokenize' => 'Y',
'ecomind' => 'E',
Expand Down

0 comments on commit 96f1b3b

Please sign in to comment.