Skip to content

Commit 8c34506

Browse files
20180424 deployment
1 parent 294a7fc commit 8c34506

File tree

15 files changed

+87
-21
lines changed

15 files changed

+87
-21
lines changed

src/Gateways/Gateway.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,25 @@ protected function sendRequest(
8484
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
8585
curl_setopt($request, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
8686
// curl_setopt($request, CURLOPT_VERBOSE, true);
87+
//For TLS 1.2
88+
$supportedCiphers = [
89+
'ECDHE-ECDSA-AES256-GCM-SHA384',
90+
'ECDHE-RSA-AES256-GCM-SHA384',
91+
'ECDHE-ECDSA-AES256-SHA384',
92+
'ECDHE-RSA-AES256-SHA384',
93+
'ECDHE-ECDSA-CHACHA20-POLY1305',
94+
'ECDHE-RSA-CHACHA20-POLY1305',
95+
'DHE-RSA-AES256-GCM-SHA384',
96+
'DHE-RSA-AES256-SHA256',
97+
'ECDHE-ECDSA-AES128-GCM-SHA256',
98+
'ECDHE-RSA-AES128-GCM-SHA256',
99+
'ECDHE-ECDSA-AES128-SHA256',
100+
'ECDHE-RSA-AES128-SHA256',
101+
'DHE-RSA-AES128-GCM-SHA256',
102+
'DHE-RSA-AES128-SHA256'
103+
];
104+
curl_setopt($request, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
105+
curl_setopt($request, CURLOPT_SSL_CIPHER_LIST, implode(':', $supportedCiphers));
87106

88107
// error_log($data);
89108
$curlResponse = curl_exec($request);

src/Gateways/RealexConnector.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,14 @@ public function processAuthorization(AuthorizationBuilder $builder)
134134
$cardElement->appendChild($xml->createElement("type", strtoupper($card->getCardType())));
135135

136136
if ($card->cvn !== null) {
137+
//if cvn number is not empty indicator should be PRESENT
138+
$cvnPresenceIndicator = (!empty($card->cvn)) ?
139+
CvnPresenceIndicator::PRESENT:
140+
$card->cvnPresenceIndicator;
141+
137142
$cvnElement = $xml->createElement("cvn");
138143
$cvnElement->appendChild($xml->createElement("number", $card->cvn));
139-
$cvnElement->appendChild($xml->createElement("presind", $card->cvnPresenceIndicator));
144+
$cvnElement->appendChild($xml->createElement("presind", $cvnPresenceIndicator));
140145
$cardElement->appendChild($cvnElement);
141146
}
142147
$request->appendChild($cardElement);

test/Integration/Gateways/PorticoConnector/AchTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class AchTest extends TestCase
1616
{
1717
protected $eCheck;
1818
protected $address;
19+
private $enableCryptoUrl = true;
1920

2021
public function setup()
2122
{
@@ -56,7 +57,9 @@ protected function getConfig()
5657
{
5758
$config = new ServicesConfig();
5859
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
59-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
60+
$config->serviceUrl = ($this->enableCryptoUrl) ?
61+
'https://cert.api2-c.heartlandportico.com/':
62+
'https://cert.api2.heartlandportico.com';
6063
return $config;
6164
}
6265
}

test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ class CheckTest extends TestCase
1616
{
1717
/** @var Address */
1818
private $address = null;
19+
private $enableCryptoUrl = true;
1920

2021
private function config()
2122
{
2223
$config = new ServicesConfig();
2324
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
24-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
25+
$config->serviceUrl = ($this->enableCryptoUrl) ?
26+
'https://cert.api2-c.heartlandportico.com/':
27+
'https://cert.api2.heartlandportico.com';
2528
return $config;
2629
}
2730

test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ class EcommerceCheckTest extends TestCase
1515
{
1616
/** @var Address */
1717
private $address = null;
18+
private $enableCryptoUrl = true;
1819

1920
private function config()
2021
{
2122
$config = new ServicesConfig();
2223
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
23-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
24+
$config->serviceUrl = ($this->enableCryptoUrl) ?
25+
'https://cert.api2-c.heartlandportico.com/':
26+
'https://cert.api2.heartlandportico.com';
2427
return $config;
2528
}
2629

test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ class EcommerceTest extends TestCase
4848

4949
/** @var string|null */
5050
public static $amexToken = null;
51+
52+
private $enableCryptoUrl = true;
5153

5254
private function config()
5355
{
5456
$config = new ServicesConfig();
5557
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
56-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
58+
$config->serviceUrl = ($this->enableCryptoUrl) ?
59+
'https://cert.api2-c.heartlandportico.com/':
60+
'https://cert.api2.heartlandportico.com';
5761
return $config;
5862
}
5963

test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ class MotoCheckTest extends TestCase
1515
{
1616
/** @var Address */
1717
private $address = null;
18+
private $enableCryptoUrl = true;
1819

1920
private function config()
2021
{
2122
$config = new ServicesConfig();
2223
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
23-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
24+
$config->serviceUrl = ($this->enableCryptoUrl) ?
25+
'https://cert.api2-c.heartlandportico.com/':
26+
'https://cert.api2.heartlandportico.com';
2427
return $config;
2528
}
2629

test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class MotoTest extends TestCase
4343

4444
/** @var string */
4545
public static $amexToken = null;
46+
47+
private $enableCryptoUrl = true;
4648

4749
/**
4850
* @return ServicesConfig
@@ -51,7 +53,9 @@ private function config()
5153
{
5254
$config = new ServicesConfig();
5355
$config->secretApiKey = 'skapi_cert_MRCQAQBC_VQACBE0rFaZlbDDPieMGP06JDAtjyS7NQ';
54-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
56+
$config->serviceUrl = ($this->enableCryptoUrl) ?
57+
'https://cert.api2-c.heartlandportico.com/':
58+
'https://cert.api2.heartlandportico.com';
5559
return $config;
5660
}
5761

test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class RecurringTest extends TestCase
5656

5757
/** @var Schedule */
5858
private static $scheduleCheckCcd = null;
59+
60+
private $enableCryptoUrl = true;
5961

6062
/**
6163
* @param string $identifier
@@ -74,7 +76,9 @@ private function config()
7476
{
7577
$config = new ServicesConfig();
7678
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
77-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
79+
$config->serviceUrl = ($this->enableCryptoUrl) ?
80+
'https://cert.api2-c.heartlandportico.com/':
81+
'https://cert.api2.heartlandportico.com';
7882
return $config;
7983
}
8084

test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@ class RetailTest extends TestCase
2626
private static $mastercardtoken;
2727
private static $discovertoken;
2828
private static $amextoken;
29+
private $enableCryptoUrl = true;
2930

3031
public function __construct()
3132
{
3233
$config = new ServicesConfig();
3334
$config->secretApiKey = 'skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw';
34-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
35+
$config->serviceUrl = ($this->enableCryptoUrl) ?
36+
'https://cert.api2-c.heartlandportico.com/':
37+
'https://cert.api2.heartlandportico.com';
3538
ServicesContainer::Configure($config);
3639
}
3740

0 commit comments

Comments
 (0)