Skip to content

Commit

Permalink
Upgraded cardinity vendor package
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 14, 2024
1 parent fb33564 commit ed32dfd
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 19 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class Payment extends ResultObject
Value assigned by Cardinity. */
private $status;

/** @type string Payment status reason.
Value assigned by Cardinity. */
private $threedsStatusReason;

/** @type string Error message.
Returned only if status is declined.
Provides human readable information why the payment failed.
Expand Down Expand Up @@ -246,6 +250,26 @@ public function setStatus($status)
$this->status = $status;
}

/**
* Gets the value of status.
* @return mixed
*/
public function getThreedsStatusReason()
{
return $this->threedsStatusReason;
}

/**
* Sets the value of threeds status reason.
* @param mixed $threedsStatusReason the status reason
* @return void
*/
public function setThreedsStatusReason($threedsStatusReason)
{
$this->threedsStatusReason = $threedsStatusReason;
}


/**
* Gets the value of error.
* @return mixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function testDeclinedWithMerchantAdviceCode()
{
$newPaymentParams = $this->paymentParams;

$newPaymentParams['payment_instrument']['pan'] = '4200000000000018';
$newPaymentParams['payment_instrument']['pan'] = '5454545454540018';
$newPaymentParams['amount'] = 150.23;

$method = new Payment\Create($newPaymentParams);
Expand All @@ -258,4 +258,25 @@ public function testDeclinedWithMerchantAdviceCode()

return $result;
}

public function test3dsStatusReason()
{
$newPaymentParams = $this->paymentParams;

$newPaymentParams['payment_instrument']['pan'] = '5454545454540109';
$newPaymentParams['amount'] = 150.23;

$method = new Payment\Create($newPaymentParams);

try {
$result = $this->client->call($method);
} catch (\Cardinity\Exception\Declined $e){
$result = $e->getResult();
$this->assertInstanceOf('Cardinity\Method\Payment\Payment', $result);
$this->assertSame('declined', $result->getStatus());
$this->assertSame('01: Card authentication failed', $result->getThreedsStatusReason());
}

return $result;
}
}
14 changes: 7 additions & 7 deletions upload/system/storage/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"packages": [
{
"name": "cardinity/cardinity-sdk-php",
"version": "v3.3.2",
"version_normalized": "3.3.2.0",
"version": "v3.3.3",
"version_normalized": "3.3.3.0",
"source": {
"type": "git",
"url": "https://github.com/cardinity/cardinity-sdk-php.git",
"reference": "234f9decdde3214134c2678146df93601e170c82"
"reference": "9b6075208c6678d4d5f7e5a9f015a5c94959097c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cardinity/cardinity-sdk-php/zipball/234f9decdde3214134c2678146df93601e170c82",
"reference": "234f9decdde3214134c2678146df93601e170c82",
"url": "https://api.github.com/repos/cardinity/cardinity-sdk-php/zipball/9b6075208c6678d4d5f7e5a9f015a5c94959097c",
"reference": "9b6075208c6678d4d5f7e5a9f015a5c94959097c",
"shasum": ""
},
"require": {
Expand All @@ -27,7 +27,7 @@
"phpunit/phpunit": "^8.5",
"symfony/yaml": "^4.4"
},
"time": "2024-04-25T09:26:08+00:00",
"time": "2024-05-13T11:57:54+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand All @@ -43,7 +43,7 @@
"homepage": "https://cardinity.com",
"support": {
"issues": "https://github.com/cardinity/cardinity-sdk-php/issues",
"source": "https://github.com/cardinity/cardinity-sdk-php/tree/v3.3.2"
"source": "https://github.com/cardinity/cardinity-sdk-php/tree/v3.3.3"
},
"install-path": "../cardinity/cardinity-sdk-php"
},
Expand Down
10 changes: 5 additions & 5 deletions upload/system/storage/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
'name' => 'opencart/opencart-3',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'ddccf79445f32010c18c63f2b2a037a41e34b99e',
'reference' => 'fb3356495459cd6a8e18d6b24484bfc35603aa5d',
'type' => 'project',
'install_path' => __DIR__ . '/../../../../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'cardinity/cardinity-sdk-php' => array(
'pretty_version' => 'v3.3.2',
'version' => '3.3.2.0',
'reference' => '234f9decdde3214134c2678146df93601e170c82',
'pretty_version' => 'v3.3.3',
'version' => '3.3.3.0',
'reference' => '9b6075208c6678d4d5f7e5a9f015a5c94959097c',
'type' => 'library',
'install_path' => __DIR__ . '/../cardinity/cardinity-sdk-php',
'aliases' => array(),
Expand Down Expand Up @@ -67,7 +67,7 @@
'opencart/opencart-3' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'ddccf79445f32010c18c63f2b2a037a41e34b99e',
'reference' => 'fb3356495459cd6a8e18d6b24484bfc35603aa5d',
'type' => 'project',
'install_path' => __DIR__ . '/../../../../../',
'aliases' => array(),
Expand Down

0 comments on commit ed32dfd

Please sign in to comment.