Skip to content

Commit 2c07f3f

Browse files
20210126 deployment
1 parent bd7bc1a commit 2c07f3f

File tree

16 files changed

+114
-702
lines changed

16 files changed

+114
-702
lines changed

examples/consumer-authentication/cruise.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
require 'JWT.php';
44

55
use GlobalPayments\Api\PaymentMethods\CreditCardData;
6-
use GlobalPayments\Api\ServicesConfig;
76
use GlobalPayments\Api\ServicesContainer;
87
use GlobalPayments\Api\Entities\EcommerceInfo;
8+
use GlobalPayments\Api\ServiceConfigs\Gateways\PorticoConfig;
99

1010
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
1111
$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
@@ -19,11 +19,10 @@
1919
print_r($_GET);
2020
print '</code></pre>';
2121

22-
$config = new ServicesConfig();
22+
$config = new PorticoConfig();
2323
$config->secretApiKey = 'skapi_cert_MT2PAQB-9VQA5Z1mOXQbzZcH6O5PpdhjWtFhMBoL4A';
24-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
2524

26-
ServicesContainer::configure($config);
25+
ServicesContainer::configureService($config);
2726

2827
$card = new CreditCardData();
2928
$card->token = $_GET['heartlandToken'];

examples/echeck/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ <h2>Payment Information</h2>
107107

108108
<h2>Check Information</h2>
109109
<div class="form-group">
110-
<label for="check_accountnumber" class="col-sm-2 control-label">Check Number</label>
110+
<label for="check_accountnumber" class="col-sm-2 control-label">Account Number</label>
111111
<div class="col-sm-10">
112112
<input type="text" name="check_accountnumber" />
113113
</div>

examples/echeck/process.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,21 @@
33
require_once ('../../vendor/autoload.php');
44

55
use GlobalPayments\Api\Entities\Address;
6-
use GlobalPayments\Api\Entities\Enums\AccountType;
7-
use GlobalPayments\Api\Entities\Enums\CheckType;
86
use GlobalPayments\Api\Entities\Enums\EntryMethod;
97
use GlobalPayments\Api\Entities\Enums\SecCode;
108
use GlobalPayments\Api\PaymentMethods\ECheck;
11-
use GlobalPayments\Api\ServicesConfig;
9+
use GlobalPayments\Api\ServiceConfigs\Gateways\PorticoConfig;
1210
use GlobalPayments\Api\ServicesContainer;
1311

1412
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
1513
$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
1614

17-
$config = new ServicesConfig();
15+
$config = new PorticoConfig();
1816
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
19-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
2017
$config->versionNumber = '0000';
2118
$config->developerId = '000000';
2219

23-
ServicesContainer::configure($config);
20+
ServicesContainer::configureService($config);
2421

2522
$address = new Address();
2623
$address->address = $_POST['holder_address_address'];

examples/end-to-end/assets/heartland-styles.css

Lines changed: 0 additions & 167 deletions
This file was deleted.

examples/end-to-end/charge.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
require_once ('../../vendor/autoload.php');
44

55
use GlobalPayments\Api\PaymentMethods\CreditCardData;
6-
use GlobalPayments\Api\ServicesConfig;
6+
use GlobalPayments\Api\ServiceConfigs\Gateways\PorticoConfig;
77
use GlobalPayments\Api\ServicesContainer;
88
use GlobalPayments\Api\Entities\Address;
99

1010
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
1111
$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
1212

13-
$config = new ServicesConfig();
13+
$config = new PorticoConfig();
1414
$config->secretApiKey = 'skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A';
15-
$config->serviceUrl = 'https://cert.api2.heartlandportico.com';
16-
17-
ServicesContainer::configure($config);
15+
ServicesContainer::configureService($config);
1816

1917
$card = new CreditCardData();
2018
$card->token = $_GET['token_value'];
@@ -28,10 +26,12 @@
2826

2927
try {
3028
$response = $card->charge(15)
31-
->withCurrency('USD')
32-
->withAddress($address)
33-
->withAllowDuplicates(true)
34-
->execute();
29+
->withCurrency('USD')
30+
->withAddress($address)
31+
->withAllowDuplicates(true)
32+
->execute();
33+
34+
// print_r($response);
3535

3636
$body = '<h1>Success!</h1>';
3737
$body .= '<p>Thank you, ' . $_GET['FirstName'] . ', for your order of $15.</p>';

0 commit comments

Comments
 (0)