Skip to content

Commit

Permalink
Update token request and add response message
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinDamyanovAmpeco committed Sep 18, 2024
1 parent c4da9fb commit dab3558
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ampeco/omnipay-cardcom",
"description": "Omnipay plugin for Cardcom payment gateway",
"version": "1.2.8",
"version": "1.2.9",
"type": "library",
"license": "MIT",
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Message/GetTokenRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function getEndpoint()
public function getData()
{
return [
'TerminalNumber' => $this->gateway->getHoldTerminalId(),
'TerminalNumber' => $this->gateway->getTokenizationTerminalId() ?? $this->gateway->getHoldTerminalId(),
'ApiName' => $this->gateway->getApiName(),
'LowProfileId' => $this->getTransactionReference(),
];
Expand Down
5 changes: 5 additions & 0 deletions src/Message/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ public function isSuccessful(): bool
{
return $this->getCode() < 400 && $this->data['ResponseCode'] === self::PURCHASE_RESPONSE_CODE_SUCCESS;
}

public function getMessage()
{
return @$this->data['Description'];
}
}

0 comments on commit dab3558

Please sign in to comment.