Version Notes
Add: Consumer authentication (3DSecure)
Download this release
Release Info
| Developer | Heartland Payment Systems |
| Extension | Hps_Securesubmit |
| Version | 1.4.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.0 to 1.4.0
- app/code/community/Hps/Securesubmit/Block/Form.php +48 -0
- app/code/community/Hps/Securesubmit/Helper/Jwt.php +160 -0
- app/code/community/Hps/Securesubmit/Model/Payment.php +91 -37
- app/code/community/Hps/Securesubmit/etc/config.xml +1 -1
- app/code/community/Hps/Securesubmit/etc/system.xml +38 -0
- app/design/frontend/base/default/template/securesubmit/form.phtml +25 -2
- js/securesubmit/checkout-form.js +103 -42
- lib/SecureSubmit/Hps.php +9 -0
- lib/SecureSubmit/src/Abstractions/HpsAltPaymentServiceInterface.php +6 -6
- lib/SecureSubmit/src/Abstractions/HpsConfigInterface.php +1 -1
- lib/SecureSubmit/src/Abstractions/HpsGatewayServiceAbstract.php +25 -1
- lib/SecureSubmit/src/Abstractions/HpsGatewayServiceInterface.php +1 -1
- lib/SecureSubmit/src/Abstractions/HpsLoggerInterface.php +6 -0
- lib/SecureSubmit/src/Abstractions/HpsPayPlanResourceAbstract.php +4 -4
- lib/SecureSubmit/src/Entities/AltPayment/HpsAltPaymentSessionInfo.php +20 -22
- lib/SecureSubmit/src/Entities/Attachment/HpsAttachment.php +117 -0
- lib/SecureSubmit/src/Entities/Credit/HpsManageTokensResponse.php +22 -0
- lib/SecureSubmit/src/Entities/Credit/HpsReportTransactionDetails.php +2 -3
- lib/SecureSubmit/src/Entities/Credit/HpsSecureEcommerce.php +10 -0
- lib/SecureSubmit/src/Entities/HpsAddress.php +5 -6
- lib/SecureSubmit/src/Entities/HpsTokenData.php +3 -0
- lib/SecureSubmit/src/Entities/HpsTransaction.php +5 -1
- lib/SecureSubmit/src/Entities/PayPlan/HpsPayPlanSchedule.php +29 -13
- lib/SecureSubmit/src/Infrastructure/Enums/HpsAttachmentType.php +22 -0
- lib/SecureSubmit/src/Infrastructure/Enums/HpsExceptionCodes.php +2 -0
- lib/SecureSubmit/src/Infrastructure/HpsAuthenticationException.php +1 -1
- lib/SecureSubmit/src/Infrastructure/HpsCheckException.php +1 -1
- lib/SecureSubmit/src/Infrastructure/HpsEmptyLogger.php +9 -0
- lib/SecureSubmit/src/Infrastructure/HpsException.php +19 -3
- lib/SecureSubmit/src/Infrastructure/HpsGatewayException.php +1 -1
- lib/SecureSubmit/src/Infrastructure/HpsInvalidRequestException.php +1 -1
- lib/SecureSubmit/src/Infrastructure/HpsLogger.php +30 -0
- lib/SecureSubmit/src/Infrastructure/Validation/HpsGatewayResponseValidation.php +3 -1
- lib/SecureSubmit/src/Infrastructure/Validation/HpsInputValidation.php +6 -1
- lib/SecureSubmit/src/Infrastructure/Validation/HpsIssuerResponseValidation.php +2 -1
- lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceAuthorizeBuilder.php +6 -0
- lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceChargeBuilder.php +3 -3
- lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServicePrepaidAddValueBuilder.php +1 -3
- lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServicePrepaidBalanceInquiryBuilder.php +1 -3
- lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceRecurringBuilder.php +4 -6
- lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceUpdateTokenExpirationBuilder.php +96 -0
- lib/SecureSubmit/src/Services/Fluent/Gateway/HpsFluentCreditService.php +10 -0
- lib/SecureSubmit/src/Services/Gateway/AltPayment/HpsAltPaymentService.php +11 -26
- lib/SecureSubmit/src/Services/Gateway/AltPayment/HpsMasterPassService.php +40 -21
- lib/SecureSubmit/src/Services/Gateway/HpsAttachmentService.php +148 -0
- lib/SecureSubmit/src/Services/Gateway/HpsCreditService.php +62 -50
- lib/SecureSubmit/src/Services/Gateway/HpsRestGatewayService.php +1 -1
- lib/SecureSubmit/src/Services/Gateway/HpsSoapGatewayService.php +33 -8
- lib/SecureSubmit/src/Services/Gateway/PayPlan/HpsPayPlanScheduleService.php +3 -7
- lib/SecureSubmit/src/Services/HpsCentinelConfig.php +2 -1
- lib/SecureSubmit/src/Services/HpsServicesConfig.php +3 -2
- package.xml +7 -7
app/code/community/Hps/Securesubmit/Block/Form.php
CHANGED
|
@@ -8,9 +8,57 @@
|
|
| 8 |
|
| 9 |
class Hps_SecureSubmit_Block_Form extends Mage_Payment_Block_Form_Ccsave
|
| 10 |
{
|
|
|
|
|
|
|
| 11 |
protected function _construct()
|
| 12 |
{
|
| 13 |
parent::_construct();
|
| 14 |
$this->setTemplate('securesubmit/form.phtml');
|
| 15 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 8 |
|
| 9 |
class Hps_SecureSubmit_Block_Form extends Mage_Payment_Block_Form_Ccsave
|
| 10 |
{
|
| 11 |
+
protected $cca;
|
| 12 |
+
|
| 13 |
protected function _construct()
|
| 14 |
{
|
| 15 |
parent::_construct();
|
| 16 |
$this->setTemplate('securesubmit/form.phtml');
|
| 17 |
}
|
| 18 |
+
|
| 19 |
+
public function getCca()
|
| 20 |
+
{
|
| 21 |
+
if (!$this->getConfig('enable_threedsecure')) {
|
| 22 |
+
return false;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
if (null !== $this->cca) {
|
| 26 |
+
return $this->cca;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
$helper = Mage::helper('hps_securesubmit/jwt');
|
| 30 |
+
$orderNumber = str_shuffle('abcdefghijklmnopqrstuvwxyz');
|
| 31 |
+
$data = array(
|
| 32 |
+
'jti' => str_shuffle('abcdefghijklmnopqrstuvwxyz'),
|
| 33 |
+
'iat' => time(),
|
| 34 |
+
'iss' => $this->getConfig('threedsecure_api_identifier'),
|
| 35 |
+
'OrgUnitId' => $this->getConfig('threedsecure_org_unit_id'),
|
| 36 |
+
'Payload' => array(
|
| 37 |
+
'OrderDetails' => array(
|
| 38 |
+
'OrderNumber' => $orderNumber,
|
| 39 |
+
// Centinel requires amounts in pennies
|
| 40 |
+
'Amount' => 100 * Mage::getSingleton('checkout/cart')
|
| 41 |
+
->getQuote()
|
| 42 |
+
->getGrandTotal(),
|
| 43 |
+
'CurrencyCode' => '840',
|
| 44 |
+
),
|
| 45 |
+
),
|
| 46 |
+
);
|
| 47 |
+
error_log(print_r($data, true));
|
| 48 |
+
$jwt = $helper::encode(
|
| 49 |
+
$this->getConfig('threedsecure_api_key'),
|
| 50 |
+
$data
|
| 51 |
+
);
|
| 52 |
+
$this->cca = array(
|
| 53 |
+
'jwt' => $jwt,
|
| 54 |
+
'orderNumber' => $orderNumber,
|
| 55 |
+
);
|
| 56 |
+
|
| 57 |
+
return $this->cca;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
protected function getConfig($key)
|
| 61 |
+
{
|
| 62 |
+
return Mage::getStoreConfig(sprintf('payment/hps_securesubmit/%s', $key));
|
| 63 |
+
}
|
| 64 |
}
|
app/code/community/Hps/Securesubmit/Helper/Jwt.php
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* JWT encoding
|
| 5 |
+
*
|
| 6 |
+
* PHP Version 5.2+
|
| 7 |
+
*
|
| 8 |
+
* @category Authentication
|
| 9 |
+
* @package HPS
|
| 10 |
+
* @author Heartland Payment Systems <entapp_devportal@e-hps.com>
|
| 11 |
+
* @license Custom https://github.com/hps/heartland-php/blob/master/LICENSE.txt
|
| 12 |
+
* @link https://developer.heartlandpaymentsystems.com
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
/**
|
| 16 |
+
* JWT encoding
|
| 17 |
+
*
|
| 18 |
+
* PHP Version 5.2+
|
| 19 |
+
*
|
| 20 |
+
* @category Authentication
|
| 21 |
+
* @package HPS
|
| 22 |
+
* @author Heartland Payment Systems <entapp_devportal@e-hps.com>
|
| 23 |
+
* @license Custom https://github.com/hps/heartland-php/blob/master/LICENSE.txt
|
| 24 |
+
* @link https://developer.heartlandpaymentsystems.com
|
| 25 |
+
*/
|
| 26 |
+
class Hps_Securesubmit_Helper_Jwt extends Mage_Core_Helper_Abstract
|
| 27 |
+
{
|
| 28 |
+
/**
|
| 29 |
+
* Encodes a JWT with a `$key` and a `$payload`
|
| 30 |
+
*
|
| 31 |
+
* @param string $key key used to sign the JWT
|
| 32 |
+
* @param mixed $payload payload to be included
|
| 33 |
+
*
|
| 34 |
+
* @return string
|
| 35 |
+
*/
|
| 36 |
+
public static function encode($key = '', $payload = array())
|
| 37 |
+
{
|
| 38 |
+
$header = array('typ' => 'JWT', 'alg' => 'HS256');
|
| 39 |
+
|
| 40 |
+
$parts = array(
|
| 41 |
+
self::urlsafeBase64Encode(json_encode($header)),
|
| 42 |
+
self::urlsafeBase64Encode(json_encode($payload)),
|
| 43 |
+
);
|
| 44 |
+
$signingData = implode('.', $parts);
|
| 45 |
+
$signature = self::sign($key, $signingData);
|
| 46 |
+
$parts[] = self::urlsafeBase64Encode($signature);
|
| 47 |
+
|
| 48 |
+
return implode('.', $parts);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Signs a set of `$signingData` with a given `$key`
|
| 53 |
+
*
|
| 54 |
+
* @param string $key key used to sign the JWT
|
| 55 |
+
* @param string $signingData data to be signed
|
| 56 |
+
*
|
| 57 |
+
* @return string
|
| 58 |
+
*/
|
| 59 |
+
public static function sign($key, $signingData)
|
| 60 |
+
{
|
| 61 |
+
return hash_hmac('sha256', $signingData, $key, true);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/**
|
| 65 |
+
* Verify a JWT
|
| 66 |
+
*
|
| 67 |
+
* @param string $jwt JWT to be verified
|
| 68 |
+
* @param string $key signing key
|
| 69 |
+
*
|
| 70 |
+
* @return boolean
|
| 71 |
+
*/
|
| 72 |
+
public static function verify($jwt, $key)
|
| 73 |
+
{
|
| 74 |
+
$parts = explode('.', $jwt);
|
| 75 |
+
|
| 76 |
+
if (count($parts) !== 3) {
|
| 77 |
+
return false;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
list($header, $payload, $signature) = $parts;
|
| 81 |
+
$signingData = sprintf('%s.%s', $header, $payload);
|
| 82 |
+
$hash = hash_hmac('sha256', $signingData, $key, true);
|
| 83 |
+
$signature = self::urlsafeBase64Dencode($signature);
|
| 84 |
+
|
| 85 |
+
return self::hashEquals($signature, $hash);
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
/**
|
| 89 |
+
* Creates a url-safe base64 encoded value
|
| 90 |
+
*
|
| 91 |
+
* @param string $data data to be encoded
|
| 92 |
+
*
|
| 93 |
+
* @return string
|
| 94 |
+
*/
|
| 95 |
+
protected static function urlsafeBase64Encode($data)
|
| 96 |
+
{
|
| 97 |
+
return str_replace('=', '', strtr(base64_encode($data), '+/', '-_'));
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
/**
|
| 101 |
+
* Decodes a url-safe base64 encoded value
|
| 102 |
+
*
|
| 103 |
+
* @param string $data base64 encoded value
|
| 104 |
+
*
|
| 105 |
+
* @return string
|
| 106 |
+
*/
|
| 107 |
+
protected static function urlsafeBase64Dencode($data)
|
| 108 |
+
{
|
| 109 |
+
$remainder = strlen($data) % 4;
|
| 110 |
+
if ($remainder) {
|
| 111 |
+
$padlen = 4 - $remainder;
|
| 112 |
+
$data .= str_repeat('=', $padlen);
|
| 113 |
+
}
|
| 114 |
+
return base64_decode(strtr($data, '-_', '+/'));
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
/**
|
| 118 |
+
* Compares two hashes for equality
|
| 119 |
+
*
|
| 120 |
+
* @param string $signature previous value
|
| 121 |
+
* @param string $hash calculated value
|
| 122 |
+
*
|
| 123 |
+
* @return boolean
|
| 124 |
+
*/
|
| 125 |
+
protected static function hashEquals($signature, $hash)
|
| 126 |
+
{
|
| 127 |
+
if (function_exists('hash_equals')) {
|
| 128 |
+
return hash_equals($signature, $hash);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
if (self::safeStrLength($signature) !== self::safeStrLength($hash)) {
|
| 132 |
+
return false;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
$xor = $signature ^ $hash;
|
| 136 |
+
$result = 0;
|
| 137 |
+
|
| 138 |
+
for ($i = self::safeStrLength($xor) - 1; 0 <= $i; $i--) {
|
| 139 |
+
$result |= ord($xor[$i]);
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
return (0 === $result);
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/**
|
| 146 |
+
* Gets string length
|
| 147 |
+
*
|
| 148 |
+
* @param string $string value to check
|
| 149 |
+
*
|
| 150 |
+
* @return number
|
| 151 |
+
*/
|
| 152 |
+
protected static function safeStrLength($string)
|
| 153 |
+
{
|
| 154 |
+
if (function_exists('mb_strlen')) {
|
| 155 |
+
return mb_strlen($string);
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
return strlen($string);
|
| 159 |
+
}
|
| 160 |
+
}
|
app/code/community/Hps/Securesubmit/Model/Payment.php
CHANGED
|
@@ -101,6 +101,7 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 101 |
$giftService = $this->_getGiftService();
|
| 102 |
$giftCardNumber = $additionalData->getGiftcardNumber();
|
| 103 |
$giftCardPin = filter_var($additionalData->getGiftcardPin(),FILTER_VALIDATE_INT, ARRAY('default' => FILTER_NULL_ON_FAILURE));
|
|
|
|
| 104 |
|
| 105 |
if ($giftCardNumber) {
|
| 106 |
// 1. check balance
|
|
@@ -165,13 +166,13 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 165 |
}
|
| 166 |
}
|
| 167 |
|
|
|
|
| 168 |
if ($saveCreditCard) {
|
| 169 |
$multiToken = true;
|
| 170 |
$cardData = new HpsCreditCard();
|
| 171 |
$cardData->number = $payment->getCcLast4();
|
| 172 |
$cardData->expYear = $payment->getCcExpYear();
|
| 173 |
$cardData->expMonth = $payment->getCcExpMonth();
|
| 174 |
-
$cardType = $payment->getCcType();
|
| 175 |
}
|
| 176 |
|
| 177 |
$chargeService = $this->_getChargeService();
|
|
@@ -179,37 +180,42 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 179 |
$details = $this->_getTxnDetailsData($order);
|
| 180 |
$cardOrToken = new HpsTokenData();
|
| 181 |
$cardOrToken->tokenValue = $secureToken;
|
|
|
|
| 182 |
|
| 183 |
try {
|
| 184 |
$this->checkVelocity();
|
| 185 |
|
|
|
|
| 186 |
if ($capture) {
|
| 187 |
if ($payment->getCcTransId()) {
|
| 188 |
-
$
|
| 189 |
-
$payment->getCcTransId()
|
| 190 |
-
|
| 191 |
-
);
|
| 192 |
} else {
|
| 193 |
-
$
|
| 194 |
-
$amount
|
| 195 |
-
strtolower($order->getBaseCurrencyCode())
|
| 196 |
-
$cardOrToken
|
| 197 |
-
$cardHolder
|
| 198 |
-
$multiToken
|
| 199 |
-
$details
|
| 200 |
-
);
|
| 201 |
}
|
| 202 |
} else {
|
| 203 |
-
$
|
| 204 |
-
$amount
|
| 205 |
-
strtolower($order->getBaseCurrencyCode())
|
| 206 |
-
$cardOrToken
|
| 207 |
-
$cardHolder
|
| 208 |
-
$multiToken
|
| 209 |
-
$details
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
| 211 |
}
|
| 212 |
|
|
|
|
|
|
|
| 213 |
$this->_debugChargeService($chargeService);
|
| 214 |
// \Hps_Securesubmit_Model_Payment::closeTransaction
|
| 215 |
$this->closeTransaction($payment, $amount, $response);
|
|
@@ -328,6 +334,48 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 328 |
}
|
| 329 |
}
|
| 330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
protected function _formatAmount($amount)
|
| 332 |
{
|
| 333 |
return Mage::helper('core')->currency($amount, true, false);
|
|
@@ -541,7 +589,9 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 541 |
$chargeService = $this->_getChargeService();
|
| 542 |
|
| 543 |
try {
|
| 544 |
-
$voidResponse = $chargeService->void(
|
|
|
|
|
|
|
| 545 |
$payment
|
| 546 |
->setTransactionId($voidResponse->transactionId)
|
| 547 |
->setParentTransactionId($transactionId)
|
|
@@ -573,13 +623,13 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 573 |
$details = $this->_getTxnDetailsData($order);
|
| 574 |
|
| 575 |
try {
|
| 576 |
-
$refundResponse = $chargeService->refund(
|
| 577 |
-
$amount
|
| 578 |
-
strtolower($order->getBaseCurrencyCode())
|
| 579 |
-
$transactionId
|
| 580 |
-
$cardHolder
|
| 581 |
-
$details
|
| 582 |
-
|
| 583 |
$payment
|
| 584 |
->setTransactionId($refundResponse->transactionId)
|
| 585 |
->setParentTransactionId($transactionId)
|
|
@@ -620,13 +670,13 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 620 |
$chargeService = $this->_getChargeService();
|
| 621 |
$details = $this->_getTxnDetailsData($order);
|
| 622 |
try {
|
| 623 |
-
$reverseResponse = $chargeService->reverse(
|
| 624 |
-
$transactionId
|
| 625 |
-
$transactionDetails->authorizedAmount
|
| 626 |
-
strtolower($order->getBaseCurrencyCode())
|
| 627 |
-
$details
|
| 628 |
-
$newAuthAmount
|
| 629 |
-
|
| 630 |
$payment
|
| 631 |
->setTransactionId($reverseResponse->transactionId)
|
| 632 |
->setParentTransactionId($transactionId)
|
|
@@ -710,6 +760,10 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 710 |
$details['customer_id'] = $data->getData('customer_id');
|
| 711 |
}
|
| 712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
if (!empty($details)) {
|
| 714 |
$this->getInfoInstance()->setAdditionalData(serialize($details));
|
| 715 |
}
|
|
@@ -766,7 +820,7 @@ class Hps_Securesubmit_Model_Payment extends Mage_Payment_Model_Method_Cc
|
|
| 766 |
$config->versionNumber = '1573';
|
| 767 |
$config->developerId = '002914';
|
| 768 |
|
| 769 |
-
return new
|
| 770 |
}
|
| 771 |
|
| 772 |
protected function _getGiftService()
|
| 101 |
$giftService = $this->_getGiftService();
|
| 102 |
$giftCardNumber = $additionalData->getGiftcardNumber();
|
| 103 |
$giftCardPin = filter_var($additionalData->getGiftcardPin(),FILTER_VALIDATE_INT, ARRAY('default' => FILTER_NULL_ON_FAILURE));
|
| 104 |
+
$ccaData = $additionalData->getCcaData();
|
| 105 |
|
| 106 |
if ($giftCardNumber) {
|
| 107 |
// 1. check balance
|
| 166 |
}
|
| 167 |
}
|
| 168 |
|
| 169 |
+
$cardType = $payment->getCcType();
|
| 170 |
if ($saveCreditCard) {
|
| 171 |
$multiToken = true;
|
| 172 |
$cardData = new HpsCreditCard();
|
| 173 |
$cardData->number = $payment->getCcLast4();
|
| 174 |
$cardData->expYear = $payment->getCcExpYear();
|
| 175 |
$cardData->expMonth = $payment->getCcExpMonth();
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
$chargeService = $this->_getChargeService();
|
| 180 |
$details = $this->_getTxnDetailsData($order);
|
| 181 |
$cardOrToken = new HpsTokenData();
|
| 182 |
$cardOrToken->tokenValue = $secureToken;
|
| 183 |
+
$secureEcommerce = $this->getSecureEcommerce($ccaData, $cardType);
|
| 184 |
|
| 185 |
try {
|
| 186 |
$this->checkVelocity();
|
| 187 |
|
| 188 |
+
$builder = null;
|
| 189 |
if ($capture) {
|
| 190 |
if ($payment->getCcTransId()) {
|
| 191 |
+
$builder = $chargeService->capture()
|
| 192 |
+
->withTransactionId($payment->getCcTransId())
|
| 193 |
+
->withAmount();
|
|
|
|
| 194 |
} else {
|
| 195 |
+
$builder = $chargeService->charge()
|
| 196 |
+
->withAmount($amount)
|
| 197 |
+
->withCurrency(strtolower($order->getBaseCurrencyCode()))
|
| 198 |
+
->withToken($cardOrToken)
|
| 199 |
+
->withCardHolder($cardHolder)
|
| 200 |
+
->withRequestMultiUseToken($multiToken)
|
| 201 |
+
->withDetails($details);
|
|
|
|
| 202 |
}
|
| 203 |
} else {
|
| 204 |
+
$builder = $chargeService->authorize()
|
| 205 |
+
->withAmount($amount)
|
| 206 |
+
->withCurrency(strtolower($order->getBaseCurrencyCode()))
|
| 207 |
+
->withToken($cardOrToken)
|
| 208 |
+
->withCardHolder($cardHolder)
|
| 209 |
+
->withRequestMultiUseToken($multiToken)
|
| 210 |
+
->withDetails($details);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
if (null !== $secureEcommerce) {
|
| 214 |
+
$builder = $builder->withSecureEcommerce($secureEcommerce);
|
| 215 |
}
|
| 216 |
|
| 217 |
+
$response = $builder->execute();
|
| 218 |
+
|
| 219 |
$this->_debugChargeService($chargeService);
|
| 220 |
// \Hps_Securesubmit_Model_Payment::closeTransaction
|
| 221 |
$this->closeTransaction($payment, $amount, $response);
|
| 334 |
}
|
| 335 |
}
|
| 336 |
|
| 337 |
+
protected function getSecureEcommerce($ccaData, $cardType)
|
| 338 |
+
{
|
| 339 |
+
if ($this->getConfigData('enable_threedsecure')
|
| 340 |
+
&& false !== ($data = json_decode($ccaData))
|
| 341 |
+
&& isset($data) && isset($data->ActionCode)
|
| 342 |
+
&& 'SUCCESS' === $data->ActionCode
|
| 343 |
+
) {
|
| 344 |
+
$dataSource = '';
|
| 345 |
+
switch ($cardType) {
|
| 346 |
+
case 'visa':
|
| 347 |
+
$dataSource = 'Visa 3DSecure';
|
| 348 |
+
break;
|
| 349 |
+
case 'mastercard':
|
| 350 |
+
$dataSource = 'MasterCard 3DSecure';
|
| 351 |
+
break;
|
| 352 |
+
case 'discover':
|
| 353 |
+
$dataSource = 'Discover 3DSecure';
|
| 354 |
+
break;
|
| 355 |
+
case 'amex':
|
| 356 |
+
$dataSource = 'AMEX 3DSecure';
|
| 357 |
+
break;
|
| 358 |
+
}
|
| 359 |
+
$cavv = isset($data->Payment->ExtendedData->CAVV)
|
| 360 |
+
? $data->Payment->ExtendedData->CAVV
|
| 361 |
+
: '';
|
| 362 |
+
$eciFlag = isset($data->Payment->ExtendedData->ECIFlag)
|
| 363 |
+
? substr($data->Payment->ExtendedData->ECIFlag, 1)
|
| 364 |
+
: '';
|
| 365 |
+
$xid = isset($data->Payment->ExtendedData->XID)
|
| 366 |
+
? $data->Payment->ExtendedData->XID
|
| 367 |
+
: '';
|
| 368 |
+
$secureEcommerce = new HpsSecureEcommerce();
|
| 369 |
+
$secureEcommerce->type = '3DSecure';
|
| 370 |
+
$secureEcommerce->dataSource = $dataSource;
|
| 371 |
+
$secureEcommerce->data = $cavv;
|
| 372 |
+
$secureEcommerce->eciFlag = $eciFlag;
|
| 373 |
+
$secureEcommerce->xid = $xid;
|
| 374 |
+
return $secureEcommerce;
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
return false;
|
| 378 |
+
}
|
| 379 |
protected function _formatAmount($amount)
|
| 380 |
{
|
| 381 |
return Mage::helper('core')->currency($amount, true, false);
|
| 589 |
$chargeService = $this->_getChargeService();
|
| 590 |
|
| 591 |
try {
|
| 592 |
+
$voidResponse = $chargeService->void()
|
| 593 |
+
->withTransactionId($transactionId)
|
| 594 |
+
->execute();
|
| 595 |
$payment
|
| 596 |
->setTransactionId($voidResponse->transactionId)
|
| 597 |
->setParentTransactionId($transactionId)
|
| 623 |
$details = $this->_getTxnDetailsData($order);
|
| 624 |
|
| 625 |
try {
|
| 626 |
+
$refundResponse = $chargeService->refund()
|
| 627 |
+
->withAmount($amount)
|
| 628 |
+
->withCurrency(strtolower($order->getBaseCurrencyCode()))
|
| 629 |
+
->withTransactionId($transactionId)
|
| 630 |
+
->withCardHolder($cardHolder)
|
| 631 |
+
->withDetails($details)
|
| 632 |
+
->execute();
|
| 633 |
$payment
|
| 634 |
->setTransactionId($refundResponse->transactionId)
|
| 635 |
->setParentTransactionId($transactionId)
|
| 670 |
$chargeService = $this->_getChargeService();
|
| 671 |
$details = $this->_getTxnDetailsData($order);
|
| 672 |
try {
|
| 673 |
+
$reverseResponse = $chargeService->reverse()
|
| 674 |
+
->withTransactionId($transactionId)
|
| 675 |
+
->withAmount($transactionDetails->authorizedAmount)
|
| 676 |
+
->withCurrency(strtolower($order->getBaseCurrencyCode()))
|
| 677 |
+
->withDetails($details)
|
| 678 |
+
->withAuthAmount($newAuthAmount)
|
| 679 |
+
->execute();
|
| 680 |
$payment
|
| 681 |
->setTransactionId($reverseResponse->transactionId)
|
| 682 |
->setParentTransactionId($transactionId)
|
| 760 |
$details['customer_id'] = $data->getData('customer_id');
|
| 761 |
}
|
| 762 |
|
| 763 |
+
if ($data->getData('cca_data')) {
|
| 764 |
+
$details['cca_data'] = $data->getData('cca_data');
|
| 765 |
+
}
|
| 766 |
+
|
| 767 |
if (!empty($details)) {
|
| 768 |
$this->getInfoInstance()->setAdditionalData(serialize($details));
|
| 769 |
}
|
| 820 |
$config->versionNumber = '1573';
|
| 821 |
$config->developerId = '002914';
|
| 822 |
|
| 823 |
+
return new HpsFluentCreditService($config);
|
| 824 |
}
|
| 825 |
|
| 826 |
protected function _getGiftService()
|
app/code/community/Hps/Securesubmit/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Hps_Securesubmit>
|
| 5 |
-
<version>1.
|
| 6 |
</Hps_Securesubmit>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Hps_Securesubmit>
|
| 5 |
+
<version>1.4.0</version>
|
| 6 |
</Hps_Securesubmit>
|
| 7 |
</modules>
|
| 8 |
<global>
|
app/code/community/Hps/Securesubmit/etc/system.xml
CHANGED
|
@@ -99,6 +99,44 @@
|
|
| 99 |
<show_in_store>1</show_in_store>
|
| 100 |
<comment><![CDATA[Note: The customer will remain on your site throughout the checkout process, and there will be no redirect. This option only helps reduce your PCI scope.]]></comment>
|
| 101 |
</use_iframes>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
<!-- Gift -->
|
| 103 |
<allow_heartland_gift translate="label">
|
| 104 |
<label>Allow Heartland Gift Cards</label>
|
| 99 |
<show_in_store>1</show_in_store>
|
| 100 |
<comment><![CDATA[Note: The customer will remain on your site throughout the checkout process, and there will be no redirect. This option only helps reduce your PCI scope.]]></comment>
|
| 101 |
</use_iframes>
|
| 102 |
+
<!-- 3DSecure -->
|
| 103 |
+
<enable_threedsecure translate="label">
|
| 104 |
+
<label>Enable Cardholder Authentication</label>
|
| 105 |
+
<frontend_type>select</frontend_type>
|
| 106 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 107 |
+
<sort_order>35</sort_order>
|
| 108 |
+
<show_in_default>1</show_in_default>
|
| 109 |
+
<show_in_website>1</show_in_website>
|
| 110 |
+
<show_in_store>1</show_in_store>
|
| 111 |
+
<comment><![CDATA[Note: This requires additional setup on your merchant account. Please contact your Heartland representative for assistance.]]></comment>
|
| 112 |
+
</enable_threedsecure>
|
| 113 |
+
<threedsecure_api_identifier translate="label">
|
| 114 |
+
<label>Cardholder Authentication API Identifier</label>
|
| 115 |
+
<frontend_type>text</frontend_type>
|
| 116 |
+
<sort_order>36</sort_order>
|
| 117 |
+
<show_in_default>1</show_in_default>
|
| 118 |
+
<show_in_website>1</show_in_website>
|
| 119 |
+
<show_in_store>1</show_in_store>
|
| 120 |
+
<depends><enable_threedsecure>1</enable_threedsecure></depends>
|
| 121 |
+
</threedsecure_api_identifier>
|
| 122 |
+
<threedsecure_org_unit_id translate="label">
|
| 123 |
+
<label>Cardholder Authentication Org Unit ID</label>
|
| 124 |
+
<frontend_type>text</frontend_type>
|
| 125 |
+
<sort_order>37</sort_order>
|
| 126 |
+
<show_in_default>1</show_in_default>
|
| 127 |
+
<show_in_website>1</show_in_website>
|
| 128 |
+
<show_in_store>1</show_in_store>
|
| 129 |
+
<depends><enable_threedsecure>1</enable_threedsecure></depends>
|
| 130 |
+
</threedsecure_org_unit_id>
|
| 131 |
+
<threedsecure_api_key translate="label">
|
| 132 |
+
<label>Cardholder Authentication API Key</label>
|
| 133 |
+
<frontend_type>text</frontend_type>
|
| 134 |
+
<sort_order>38</sort_order>
|
| 135 |
+
<show_in_default>1</show_in_default>
|
| 136 |
+
<show_in_website>1</show_in_website>
|
| 137 |
+
<show_in_store>1</show_in_store>
|
| 138 |
+
<depends><enable_threedsecure>1</enable_threedsecure></depends>
|
| 139 |
+
</threedsecure_api_key>
|
| 140 |
<!-- Gift -->
|
| 141 |
<allow_heartland_gift translate="label">
|
| 142 |
<label>Allow Heartland Gift Cards</label>
|
app/design/frontend/base/default/template/securesubmit/form.phtml
CHANGED
|
@@ -6,6 +6,7 @@ $token_data_url = Mage::getUrl('securesubmit/storedcard/getTokenData', array('_s
|
|
| 6 |
$allow_card_saving = Mage::getModel('hps_securesubmit/payment')->getConfigData('allow_card_saving');
|
| 7 |
$allow_heartland_gift = Mage::getModel('hps_securesubmit/payment')->getConfigData('allow_heartland_gift');
|
| 8 |
$use_iframes = !!Mage::getModel('hps_securesubmit/payment')->getConfigData('use_iframes');
|
|
|
|
| 9 |
|
| 10 |
if ($_loggedIn && $allow_card_saving) {
|
| 11 |
$customerStoredCards = Mage::helper('hps_securesubmit')->getStoredCards( Mage::getSingleton('customer/session')->getCustomerId());
|
|
@@ -113,6 +114,22 @@ if ($_loggedIn && $allow_card_saving) {
|
|
| 113 |
<?php endif ?>
|
| 114 |
</div>
|
| 115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
<script type="text/javascript">
|
| 117 |
//<![CDATA[
|
| 118 |
SecureSubmitMagento.init({
|
|
@@ -123,14 +140,20 @@ SecureSubmitMagento.init({
|
|
| 123 |
tokenDataUrl: '<?= $token_data_url ?>',
|
| 124 |
allowGift: <?= $allow_heartland_gift ? 'true' : 'false' ?>,
|
| 125 |
giftBalanceUrl: '<?= Mage::getUrl('securesubmit/giftcard/getBalance', array('_secure' => true)) ?>',
|
| 126 |
-
useIframes: <?= $use_iframes ? 'true' : 'false'
|
| 127 |
<?php if ($use_iframes): ?>
|
| 128 |
-
iframeTargets: {
|
| 129 |
cardNumber: '<?= $_code ?>_cc_number_iframe',
|
| 130 |
cardExpiration: '<?= $_code ?>_cc_exp_iframe',
|
| 131 |
cardCvv: '<?= $_code ?>_cc_cvv_iframe'
|
| 132 |
}
|
| 133 |
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
});
|
| 135 |
//]]>
|
| 136 |
</script>
|
| 6 |
$allow_card_saving = Mage::getModel('hps_securesubmit/payment')->getConfigData('allow_card_saving');
|
| 7 |
$allow_heartland_gift = Mage::getModel('hps_securesubmit/payment')->getConfigData('allow_heartland_gift');
|
| 8 |
$use_iframes = !!Mage::getModel('hps_securesubmit/payment')->getConfigData('use_iframes');
|
| 9 |
+
$cca = $this->getCca();
|
| 10 |
|
| 11 |
if ($_loggedIn && $allow_card_saving) {
|
| 12 |
$customerStoredCards = Mage::helper('hps_securesubmit')->getStoredCards( Mage::getSingleton('customer/session')->getCustomerId());
|
| 114 |
<?php endif ?>
|
| 115 |
</div>
|
| 116 |
|
| 117 |
+
<?php if ($cca) : ?>
|
| 118 |
+
<?php
|
| 119 |
+
$url = -1 !== strpos($publicKey, '_cert_')
|
| 120 |
+
? 'https://includestest.ccdc02.com/cardinalcruise/v1/songbird.js'
|
| 121 |
+
: 'https://includes.ccdc02.com/cardinalcruise/v1/songbird.js';
|
| 122 |
+
?>
|
| 123 |
+
<script type="text/javascript">
|
| 124 |
+
(function () {
|
| 125 |
+
var el = document.createElement('script');
|
| 126 |
+
el.type = 'text/javascript';
|
| 127 |
+
el.src = '<?= $url ?>';
|
| 128 |
+
document.body.appendChild(el);
|
| 129 |
+
}());
|
| 130 |
+
</script>
|
| 131 |
+
<?php endif; ?>
|
| 132 |
+
|
| 133 |
<script type="text/javascript">
|
| 134 |
//<![CDATA[
|
| 135 |
SecureSubmitMagento.init({
|
| 140 |
tokenDataUrl: '<?= $token_data_url ?>',
|
| 141 |
allowGift: <?= $allow_heartland_gift ? 'true' : 'false' ?>,
|
| 142 |
giftBalanceUrl: '<?= Mage::getUrl('securesubmit/giftcard/getBalance', array('_secure' => true)) ?>',
|
| 143 |
+
useIframes: <?= $use_iframes ? 'true' : 'false' ?>
|
| 144 |
<?php if ($use_iframes): ?>
|
| 145 |
+
,iframeTargets: {
|
| 146 |
cardNumber: '<?= $_code ?>_cc_number_iframe',
|
| 147 |
cardExpiration: '<?= $_code ?>_cc_exp_iframe',
|
| 148 |
cardCvv: '<?= $_code ?>_cc_cvv_iframe'
|
| 149 |
}
|
| 150 |
<?php endif ?>
|
| 151 |
+
<?php if ($cca) : ?>
|
| 152 |
+
,cca: {
|
| 153 |
+
jwt: '<?= $cca['jwt'] ?>',
|
| 154 |
+
orderNumber: '<?= $cca['orderNumber'] ?>'
|
| 155 |
+
}
|
| 156 |
+
<?php endif; ?>
|
| 157 |
});
|
| 158 |
//]]>
|
| 159 |
</script>
|
js/securesubmit/checkout-form.js
CHANGED
|
@@ -44,7 +44,7 @@ function securesubmitMultishipping(multiForm) {
|
|
| 44 |
SecureSubmitMagento.hps.Messages.post({
|
| 45 |
accumulateData: true,
|
| 46 |
action: 'tokenize',
|
| 47 |
-
|
| 48 |
}, 'cardNumber');
|
| 49 |
} else {
|
| 50 |
var validator = new Validation(multiForm);
|
|
@@ -164,7 +164,7 @@ document.observe('dom:loaded', function () {
|
|
| 164 |
SecureSubmitMagento.hps.Messages.post({
|
| 165 |
accumulateData: true,
|
| 166 |
action: 'tokenize',
|
| 167 |
-
|
| 168 |
}, 'cardNumber');
|
| 169 |
} else {
|
| 170 |
var validator = new Validation(this.form);
|
|
@@ -221,14 +221,16 @@ document.observe('dom:loaded', function () {
|
|
| 221 |
lastFourField.value = response.card.number.substr(-4);
|
| 222 |
typeField.value = response.card_type;
|
| 223 |
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
|
|
|
|
|
|
| 232 |
} else {
|
| 233 |
alert('Unexpected error.');
|
| 234 |
}
|
|
@@ -251,7 +253,7 @@ document.observe('dom:loaded', function () {
|
|
| 251 |
SecureSubmitMagento.hps.Messages.post({
|
| 252 |
accumulateData: true,
|
| 253 |
action: 'tokenize',
|
| 254 |
-
|
| 255 |
}, 'cardNumber');
|
| 256 |
} else {
|
| 257 |
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
|
@@ -393,14 +395,9 @@ document.observe('dom:loaded', function () {
|
|
| 393 |
SecureSubmitMagento.hps.Messages.post({
|
| 394 |
accumulateData: true,
|
| 395 |
action: 'tokenize',
|
| 396 |
-
|
| 397 |
}, 'cardNumber');
|
| 398 |
} else {
|
| 399 |
-
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
| 400 |
-
var date = $('hps_securesubmit_exp_date').value.split('/');
|
| 401 |
-
$('hps_securesubmit_cc_exp_month').value = date[0].trim();
|
| 402 |
-
$('hps_securesubmit_cc_exp_year').value = date[1].trim();
|
| 403 |
-
}
|
| 404 |
(new Heartland.HPS({
|
| 405 |
publicKey: window.payment.secureSubmitPublicKeyOSC,
|
| 406 |
cardNumber: $('hps_securesubmit_cc_number').value,
|
|
@@ -422,8 +419,6 @@ document.observe('dom:loaded', function () {
|
|
| 422 |
secureSubmitUseStoredCardAOSC = function () {
|
| 423 |
var newRadio = $('hps_securesubmit_stored_card_select_new');
|
| 424 |
return !newRadio.checked;
|
| 425 |
-
var storedCheckbox = $('hps_securesubmit_stored_card_checkbox');
|
| 426 |
-
return storedCheckbox && storedCheckbox.checked;
|
| 427 |
};
|
| 428 |
|
| 429 |
secureSubmitResponseHandlerAOSC = function (response, btn) {
|
|
@@ -510,7 +505,7 @@ document.observe('dom:loaded', function () {
|
|
| 510 |
SecureSubmitMagento.hps.Messages.post({
|
| 511 |
accumulateData: true,
|
| 512 |
action: 'tokenize',
|
| 513 |
-
|
| 514 |
}, 'cardNumber');
|
| 515 |
} else {
|
| 516 |
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
|
@@ -588,8 +583,8 @@ document.observe('dom:loaded', function () {
|
|
| 588 |
// IWD OPC
|
| 589 |
if (typeof IWD !== 'undefined' && typeof IWD.OPC !== 'undefined') {
|
| 590 |
if (typeof IWD.OPC._secureSubmitOldSavePayment === 'undefined') {
|
| 591 |
-
var
|
| 592 |
-
IWD.OPC._secureSubmitOldSavePayment =
|
| 593 |
}
|
| 594 |
Object.extend(IWD.OPC, {
|
| 595 |
savePayment: function() {
|
|
@@ -606,7 +601,7 @@ document.observe('dom:loaded', function () {
|
|
| 606 |
SecureSubmitMagento.hps.Messages.post({
|
| 607 |
accumulateData: true,
|
| 608 |
action: 'tokenize',
|
| 609 |
-
|
| 610 |
}, 'cardNumber');
|
| 611 |
} else {
|
| 612 |
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
|
@@ -745,8 +740,8 @@ document.observe('dom:loaded', function () {
|
|
| 745 |
$j.ajax({
|
| 746 |
url: THIS.options.giftBalanceUrl,
|
| 747 |
type: 'GET',
|
| 748 |
-
data: "giftcard_number=" + $j('#' + THIS.options.code + '_giftcard_number').val()
|
| 749 |
-
|
| 750 |
success: function(data) {
|
| 751 |
if (data.error) {
|
| 752 |
alert('Error adding gift card: ' + data.message);
|
|
@@ -792,7 +787,7 @@ document.observe('dom:loaded', function () {
|
|
| 792 |
},
|
| 793 |
setupFields: function () {
|
| 794 |
if (THIS.options.useIframes) {
|
| 795 |
-
|
| 796 |
publicKey: THIS.options.publicKey,
|
| 797 |
type: 'iframe',
|
| 798 |
fields: {
|
|
@@ -828,13 +823,23 @@ document.observe('dom:loaded', function () {
|
|
| 828 |
}
|
| 829 |
},
|
| 830 |
onTokenSuccess: function (resp) {
|
| 831 |
-
|
| 832 |
-
$(THIS.options.code + '
|
| 833 |
-
$(THIS.options.code + '
|
| 834 |
-
$(THIS.options.code + '
|
| 835 |
-
$(THIS.options.code + '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 836 |
|
| 837 |
-
THIS.completeCheckout
|
| 838 |
},
|
| 839 |
onTokenError: function (response) {
|
| 840 |
if (THIS.skipCreditCard) {
|
|
@@ -854,7 +859,14 @@ document.observe('dom:loaded', function () {
|
|
| 854 |
checkout.setLoadWaiting(false);
|
| 855 |
}
|
| 856 |
}
|
| 857 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 858 |
|
| 859 |
if (document.getElementById('amscheckout-onepage')) {
|
| 860 |
|
|
@@ -885,18 +897,16 @@ document.observe('dom:loaded', function () {
|
|
| 885 |
completeCheckout: function () {
|
| 886 |
if (typeof OPC !== 'undefined') {
|
| 887 |
checkout.setLoadWaiting(true);
|
| 888 |
-
|
| 889 |
-
var request = new Ajax.Request(checkout.saveUrl, {
|
| 890 |
method: 'post',
|
| 891 |
-
parameters:
|
| 892 |
onSuccess: checkout.setResponse.bind(checkout),
|
| 893 |
onFailure: checkout.ajaxFailure.bind(checkout)
|
| 894 |
});
|
| 895 |
} else if (typeof IWD !== 'undefined' && typeof IWD.OPC !== 'undefined') {
|
| 896 |
-
var form = $j_opc('#co-payment-form').serializeArray();
|
| 897 |
IWD.OPC.Checkout.xhr = $j_opc.post(
|
| 898 |
IWD.OPC.Checkout.config.baseUrl + 'onepage/json/savePayment',
|
| 899 |
-
form,
|
| 900 |
IWD.OPC.preparePaymentResponse,
|
| 901 |
'json'
|
| 902 |
);
|
|
@@ -908,10 +918,9 @@ document.observe('dom:loaded', function () {
|
|
| 908 |
$('onestepcheckout-button-place-order').addClassName('place-order-loader');
|
| 909 |
oscPlaceOrderOriginal(btn);
|
| 910 |
} else if (typeof Payment !== 'undefined') {
|
| 911 |
-
|
| 912 |
-
var request = new Ajax.Request(payment.saveUrl, {
|
| 913 |
method: 'post',
|
| 914 |
-
parameters:
|
| 915 |
onComplete: payment.onComplete,
|
| 916 |
onSuccess: payment.onSave,
|
| 917 |
onFailure: checkout.ajaxFailure.bind(checkout)
|
|
@@ -920,7 +929,59 @@ document.observe('dom:loaded', function () {
|
|
| 920 |
document.getElementById('payment-continue').enable();
|
| 921 |
document.getElementById('multishipping-billing-form').submit();
|
| 922 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 923 |
}
|
| 924 |
};
|
| 925 |
window.SecureSubmitMagento = THIS;
|
| 926 |
-
}(window, window.document));
|
| 44 |
SecureSubmitMagento.hps.Messages.post({
|
| 45 |
accumulateData: true,
|
| 46 |
action: 'tokenize',
|
| 47 |
+
data: SecureSubmitMagento.tokenizeOptions
|
| 48 |
}, 'cardNumber');
|
| 49 |
} else {
|
| 50 |
var validator = new Validation(multiForm);
|
| 164 |
SecureSubmitMagento.hps.Messages.post({
|
| 165 |
accumulateData: true,
|
| 166 |
action: 'tokenize',
|
| 167 |
+
data: SecureSubmitMagento.tokenizeOptions
|
| 168 |
}, 'cardNumber');
|
| 169 |
} else {
|
| 170 |
var validator = new Validation(this.form);
|
| 221 |
lastFourField.value = response.card.number.substr(-4);
|
| 222 |
typeField.value = response.card_type;
|
| 223 |
|
| 224 |
+
SecureSubmitMagento.initializeCCA((function () {
|
| 225 |
+
// Continue Magento checkout steps
|
| 226 |
+
new Ajax.Request(this.saveUrl, {
|
| 227 |
+
method:'post',
|
| 228 |
+
onComplete: this.onComplete,
|
| 229 |
+
onSuccess: this.onSave,
|
| 230 |
+
onFailure: checkout.ajaxFailure.bind(checkout),
|
| 231 |
+
parameters: Form.serialize(this.form)
|
| 232 |
+
});
|
| 233 |
+
}).bind(this));
|
| 234 |
} else {
|
| 235 |
alert('Unexpected error.');
|
| 236 |
}
|
| 253 |
SecureSubmitMagento.hps.Messages.post({
|
| 254 |
accumulateData: true,
|
| 255 |
action: 'tokenize',
|
| 256 |
+
data: SecureSubmitMagento.tokenizeOptions
|
| 257 |
}, 'cardNumber');
|
| 258 |
} else {
|
| 259 |
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
| 395 |
SecureSubmitMagento.hps.Messages.post({
|
| 396 |
accumulateData: true,
|
| 397 |
action: 'tokenize',
|
| 398 |
+
data: SecureSubmitMagento.tokenizeOptions
|
| 399 |
}, 'cardNumber');
|
| 400 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 401 |
(new Heartland.HPS({
|
| 402 |
publicKey: window.payment.secureSubmitPublicKeyOSC,
|
| 403 |
cardNumber: $('hps_securesubmit_cc_number').value,
|
| 419 |
secureSubmitUseStoredCardAOSC = function () {
|
| 420 |
var newRadio = $('hps_securesubmit_stored_card_select_new');
|
| 421 |
return !newRadio.checked;
|
|
|
|
|
|
|
| 422 |
};
|
| 423 |
|
| 424 |
secureSubmitResponseHandlerAOSC = function (response, btn) {
|
| 505 |
SecureSubmitMagento.hps.Messages.post({
|
| 506 |
accumulateData: true,
|
| 507 |
action: 'tokenize',
|
| 508 |
+
data: SecureSubmitMagento.tokenizeOptions
|
| 509 |
}, 'cardNumber');
|
| 510 |
} else {
|
| 511 |
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
| 583 |
// IWD OPC
|
| 584 |
if (typeof IWD !== 'undefined' && typeof IWD.OPC !== 'undefined') {
|
| 585 |
if (typeof IWD.OPC._secureSubmitOldSavePayment === 'undefined') {
|
| 586 |
+
var oldIWDOPC = Object.clone(IWD.OPC);
|
| 587 |
+
IWD.OPC._secureSubmitOldSavePayment = oldIWDOPC.savePayment;
|
| 588 |
}
|
| 589 |
Object.extend(IWD.OPC, {
|
| 590 |
savePayment: function() {
|
| 601 |
SecureSubmitMagento.hps.Messages.post({
|
| 602 |
accumulateData: true,
|
| 603 |
action: 'tokenize',
|
| 604 |
+
data: SecureSubmitMagento.tokenizeOptions
|
| 605 |
}, 'cardNumber');
|
| 606 |
} else {
|
| 607 |
if ($('hps_securesubmit_exp_date') && $('hps_securesubmit_exp_date').value) {
|
| 740 |
$j.ajax({
|
| 741 |
url: THIS.options.giftBalanceUrl,
|
| 742 |
type: 'GET',
|
| 743 |
+
data: "giftcard_number=" + $j('#' + THIS.options.code + '_giftcard_number').val() +
|
| 744 |
+
"&giftcard_pin=" + $j('#' + THIS.options.code + '_giftcard_pin').val(),
|
| 745 |
success: function(data) {
|
| 746 |
if (data.error) {
|
| 747 |
alert('Error adding gift card: ' + data.message);
|
| 787 |
},
|
| 788 |
setupFields: function () {
|
| 789 |
if (THIS.options.useIframes) {
|
| 790 |
+
var options = {
|
| 791 |
publicKey: THIS.options.publicKey,
|
| 792 |
type: 'iframe',
|
| 793 |
fields: {
|
| 823 |
}
|
| 824 |
},
|
| 825 |
onTokenSuccess: function (resp) {
|
| 826 |
+
var heartland = resp.heartland || resp;
|
| 827 |
+
$(THIS.options.code + '_token').value = heartland.token_value;
|
| 828 |
+
$(THIS.options.code + '_cc_last_four').value = heartland.card.number.substr(-4);
|
| 829 |
+
$(THIS.options.code + '_cc_type').value = heartland.card_type;
|
| 830 |
+
$(THIS.options.code + '_cc_exp_month').value = heartland.exp_month.trim();
|
| 831 |
+
$(THIS.options.code + '_cc_exp_year').value = heartland.exp_year.trim();
|
| 832 |
+
|
| 833 |
+
if (resp.cardinal) {
|
| 834 |
+
var el = document.createElement('input');
|
| 835 |
+
el.value = resp.cardinal.token_value;
|
| 836 |
+
el.type = 'hidden';
|
| 837 |
+
el.name = 'payment[cardinal_token]';
|
| 838 |
+
el.id = THIS.options.code + '_cardinal_token';
|
| 839 |
+
$('payment_form_' + THIS.options.code).appendChild(el);
|
| 840 |
+
}
|
| 841 |
|
| 842 |
+
THIS.initializeCCA(THIS.completeCheckout);
|
| 843 |
},
|
| 844 |
onTokenError: function (response) {
|
| 845 |
if (THIS.skipCreditCard) {
|
| 859 |
checkout.setLoadWaiting(false);
|
| 860 |
}
|
| 861 |
}
|
| 862 |
+
};
|
| 863 |
+
|
| 864 |
+
if (THIS.options.cca) {
|
| 865 |
+
options.cca = THIS.options.cca;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
THIS.tokenizeOptions = options;
|
| 869 |
+
THIS.hps = new Heartland.HPS(options);
|
| 870 |
|
| 871 |
if (document.getElementById('amscheckout-onepage')) {
|
| 872 |
|
| 897 |
completeCheckout: function () {
|
| 898 |
if (typeof OPC !== 'undefined') {
|
| 899 |
checkout.setLoadWaiting(true);
|
| 900 |
+
new Ajax.Request(checkout.saveUrl, {
|
|
|
|
| 901 |
method: 'post',
|
| 902 |
+
parameters: Form.serialize(checkout.form),
|
| 903 |
onSuccess: checkout.setResponse.bind(checkout),
|
| 904 |
onFailure: checkout.ajaxFailure.bind(checkout)
|
| 905 |
});
|
| 906 |
} else if (typeof IWD !== 'undefined' && typeof IWD.OPC !== 'undefined') {
|
|
|
|
| 907 |
IWD.OPC.Checkout.xhr = $j_opc.post(
|
| 908 |
IWD.OPC.Checkout.config.baseUrl + 'onepage/json/savePayment',
|
| 909 |
+
$j_opc('#co-payment-form').serializeArray(),
|
| 910 |
IWD.OPC.preparePaymentResponse,
|
| 911 |
'json'
|
| 912 |
);
|
| 918 |
$('onestepcheckout-button-place-order').addClassName('place-order-loader');
|
| 919 |
oscPlaceOrderOriginal(btn);
|
| 920 |
} else if (typeof Payment !== 'undefined') {
|
| 921 |
+
new Ajax.Request(payment.saveUrl, {
|
|
|
|
| 922 |
method: 'post',
|
| 923 |
+
parameters: Form.serialize(payment.form),
|
| 924 |
onComplete: payment.onComplete,
|
| 925 |
onSuccess: payment.onSave,
|
| 926 |
onFailure: checkout.ajaxFailure.bind(checkout)
|
| 929 |
document.getElementById('payment-continue').enable();
|
| 930 |
document.getElementById('multishipping-billing-form').submit();
|
| 931 |
}
|
| 932 |
+
},
|
| 933 |
+
initializeCCA: function (callback) {
|
| 934 |
+
if (!THIS.options.cca) {
|
| 935 |
+
callback();
|
| 936 |
+
return;
|
| 937 |
+
}
|
| 938 |
+
|
| 939 |
+
Cardinal.__secureSubmitInitFrame = Cardinal.__secureSubmitInitFrame || false;
|
| 940 |
+
if (!Cardinal.__secureSubmitInitFrame) {
|
| 941 |
+
Cardinal.setup('init', {
|
| 942 |
+
jwt: THIS.options.cca.jwt
|
| 943 |
+
});
|
| 944 |
+
Cardinal.on('payments.validated', function (data, jwt) {
|
| 945 |
+
var el = document.createElement('input');
|
| 946 |
+
data.jwt = jwt;
|
| 947 |
+
el.value = Object.toJSON(data);
|
| 948 |
+
el.type = 'hidden';
|
| 949 |
+
el.name = 'payment[cca_data]';
|
| 950 |
+
$('payment_form_' + THIS.options.code).appendChild(el);
|
| 951 |
+
if (callback) {
|
| 952 |
+
callback();
|
| 953 |
+
}
|
| 954 |
+
});
|
| 955 |
+
Cardinal.__secureSubmitInitFrame = true;
|
| 956 |
+
}
|
| 957 |
+
|
| 958 |
+
Cardinal.trigger('jwt.update', THIS.options.cca.jwt);
|
| 959 |
+
|
| 960 |
+
var payload = {
|
| 961 |
+
OrderDetails: {
|
| 962 |
+
OrderNumber: THIS.options.cca.orderNumber + 'cca'
|
| 963 |
+
}
|
| 964 |
+
};
|
| 965 |
+
|
| 966 |
+
if (THIS.options.useIframes) {
|
| 967 |
+
payload.Token = {
|
| 968 |
+
Token: $(THIS.options.code + '_cardinal_token').value,
|
| 969 |
+
ExpirationMonth: $('hps_securesubmit_cc_exp_month').value.replace(/\D/g, ''),
|
| 970 |
+
ExpirationYear: $('hps_securesubmit_cc_exp_year').value.replace(/\D/g, '')
|
| 971 |
+
};
|
| 972 |
+
} else {
|
| 973 |
+
payload.Consumer = {
|
| 974 |
+
Account: {
|
| 975 |
+
AccountNumber: $('hps_securesubmit_cc_number').value.replace(/\D/g, ''),
|
| 976 |
+
CardCode: $('hps_securesubmit_cvv_number').value.replace(/\D/g, ''),
|
| 977 |
+
ExpirationMonth: $('hps_securesubmit_cc_exp_month').value.replace(/\D/g, ''),
|
| 978 |
+
ExpirationYear: $('hps_securesubmit_cc_exp_year').value.replace(/\D/g, '')
|
| 979 |
+
}
|
| 980 |
+
};
|
| 981 |
+
}
|
| 982 |
+
|
| 983 |
+
Cardinal.start('cca', payload);
|
| 984 |
}
|
| 985 |
};
|
| 986 |
window.SecureSubmitMagento = THIS;
|
| 987 |
+
}(window, window.document));
|
lib/SecureSubmit/Hps.php
CHANGED
|
@@ -22,6 +22,7 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 22 |
require_once 'Abstractions/HpsGatewayServiceInterface.php';
|
| 23 |
require_once 'Abstractions/HpsPayPlanResourceInterface.php';
|
| 24 |
require_once 'Abstractions/HpsPayPlanResourceAbstract.php';
|
|
|
|
| 25 |
|
| 26 |
// Infrastructure
|
| 27 |
require_once 'Infrastructure/HpsConfiguration.php';
|
|
@@ -37,6 +38,8 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 37 |
require_once 'Infrastructure/HpsProcessorError.php';
|
| 38 |
require_once 'Infrastructure/HpsProcessorException.php';
|
| 39 |
require_once 'Infrastructure/HpsProcessorExceptionDetails.php';
|
|
|
|
|
|
|
| 40 |
require_once 'Infrastructure/Enums/HpsAccountType.php';
|
| 41 |
require_once 'Infrastructure/Enums/HpsCheckType.php';
|
| 42 |
require_once 'Infrastructure/Enums/HpsDataEntryMode.php';
|
|
@@ -57,6 +60,7 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 57 |
require_once 'Infrastructure/Enums/HpsPayPlanScheduleFrequency.php';
|
| 58 |
require_once 'Infrastructure/Enums/HpsPayPlanScheduleStatus.php';
|
| 59 |
require_once 'Infrastructure/Enums/HpsCentinelCheckoutType.php';
|
|
|
|
| 60 |
require_once 'Infrastructure/Validation/HpsGatewayResponseValidation.php';
|
| 61 |
require_once 'Infrastructure/Validation/HpsInputValidation.php';
|
| 62 |
require_once 'Infrastructure/Validation/HpsIssuerResponseValidation.php';
|
|
@@ -73,6 +77,7 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 73 |
require_once 'Entities/HpsTransactionDetails.php';
|
| 74 |
require_once 'Entities/HpsTransactionHeader.php';
|
| 75 |
require_once 'Entities/HpsTransactionStatus.php';
|
|
|
|
| 76 |
require_once 'Entities/Batch/HpsBatch.php';
|
| 77 |
require_once 'Entities/Check/HpsCheck.php';
|
| 78 |
require_once 'Entities/Check/HpsCheckHolder.php';
|
|
@@ -90,9 +95,11 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 90 |
require_once 'Entities/Credit/HpsReportTransactionDetails.php';
|
| 91 |
require_once 'Entities/Credit/HpsReportTransactionSummary.php';
|
| 92 |
require_once 'Entities/Credit/HpsReversal.php';
|
|
|
|
| 93 |
require_once 'Entities/Credit/HpsCPCData.php';
|
| 94 |
require_once 'Entities/Credit/HpsCPCEdit.php';
|
| 95 |
require_once 'Entities/Credit/HpsVoid.php';
|
|
|
|
| 96 |
require_once 'Entities/Debit/HpsDebitAddValue.php';
|
| 97 |
require_once 'Entities/Debit/HpsDebitReturn.php';
|
| 98 |
require_once 'Entities/Debit/HpsDebitReversal.php';
|
|
@@ -151,6 +158,7 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 151 |
require_once 'Services/Gateway/HpsGiftCardService.php';
|
| 152 |
require_once 'Services/Gateway/HpsPayPlanService.php';
|
| 153 |
require_once 'Services/Gateway/HpsTokenService.php';
|
|
|
|
| 154 |
require_once 'Services/Gateway/AltPayment/HpsAltPaymentService.php';
|
| 155 |
require_once 'Services/Gateway/AltPayment/HpsPayPalService.php';
|
| 156 |
require_once 'Services/Gateway/AltPayment/HpsMasterPassService.php';
|
|
@@ -192,6 +200,7 @@ if (!defined('HPS_SDK_LOADED')) {
|
|
| 192 |
require_once 'Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceRewardBuilder.php';
|
| 193 |
require_once 'Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceSaleBuilder.php';
|
| 194 |
require_once 'Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceVoidBuilder.php';
|
|
|
|
| 195 |
require_once 'Services/Fluent/Gateway/HpsFluentCheckService.php';
|
| 196 |
require_once 'Services/Fluent/Gateway/HpsFluentCreditService.php';
|
| 197 |
require_once 'Services/Fluent/Gateway/HpsFluentDebitService.php';
|
| 22 |
require_once 'Abstractions/HpsGatewayServiceInterface.php';
|
| 23 |
require_once 'Abstractions/HpsPayPlanResourceInterface.php';
|
| 24 |
require_once 'Abstractions/HpsPayPlanResourceAbstract.php';
|
| 25 |
+
require_once 'Abstractions/HpsLoggerInterface.php';
|
| 26 |
|
| 27 |
// Infrastructure
|
| 28 |
require_once 'Infrastructure/HpsConfiguration.php';
|
| 38 |
require_once 'Infrastructure/HpsProcessorError.php';
|
| 39 |
require_once 'Infrastructure/HpsProcessorException.php';
|
| 40 |
require_once 'Infrastructure/HpsProcessorExceptionDetails.php';
|
| 41 |
+
require_once 'Infrastructure/HpsEmptyLogger.php';
|
| 42 |
+
require_once 'Infrastructure/HpsLogger.php';
|
| 43 |
require_once 'Infrastructure/Enums/HpsAccountType.php';
|
| 44 |
require_once 'Infrastructure/Enums/HpsCheckType.php';
|
| 45 |
require_once 'Infrastructure/Enums/HpsDataEntryMode.php';
|
| 60 |
require_once 'Infrastructure/Enums/HpsPayPlanScheduleFrequency.php';
|
| 61 |
require_once 'Infrastructure/Enums/HpsPayPlanScheduleStatus.php';
|
| 62 |
require_once 'Infrastructure/Enums/HpsCentinelCheckoutType.php';
|
| 63 |
+
require_once 'Infrastructure/Enums/HpsAttachmentType.php';
|
| 64 |
require_once 'Infrastructure/Validation/HpsGatewayResponseValidation.php';
|
| 65 |
require_once 'Infrastructure/Validation/HpsInputValidation.php';
|
| 66 |
require_once 'Infrastructure/Validation/HpsIssuerResponseValidation.php';
|
| 77 |
require_once 'Entities/HpsTransactionDetails.php';
|
| 78 |
require_once 'Entities/HpsTransactionHeader.php';
|
| 79 |
require_once 'Entities/HpsTransactionStatus.php';
|
| 80 |
+
require_once 'Entities/Attachment/HpsAttachment.php';
|
| 81 |
require_once 'Entities/Batch/HpsBatch.php';
|
| 82 |
require_once 'Entities/Check/HpsCheck.php';
|
| 83 |
require_once 'Entities/Check/HpsCheckHolder.php';
|
| 95 |
require_once 'Entities/Credit/HpsReportTransactionDetails.php';
|
| 96 |
require_once 'Entities/Credit/HpsReportTransactionSummary.php';
|
| 97 |
require_once 'Entities/Credit/HpsReversal.php';
|
| 98 |
+
require_once 'Entities/Credit/HpsSecureEcommerce.php';
|
| 99 |
require_once 'Entities/Credit/HpsCPCData.php';
|
| 100 |
require_once 'Entities/Credit/HpsCPCEdit.php';
|
| 101 |
require_once 'Entities/Credit/HpsVoid.php';
|
| 102 |
+
require_once 'Entities/Credit/HpsManageTokensResponse.php';
|
| 103 |
require_once 'Entities/Debit/HpsDebitAddValue.php';
|
| 104 |
require_once 'Entities/Debit/HpsDebitReturn.php';
|
| 105 |
require_once 'Entities/Debit/HpsDebitReversal.php';
|
| 158 |
require_once 'Services/Gateway/HpsGiftCardService.php';
|
| 159 |
require_once 'Services/Gateway/HpsPayPlanService.php';
|
| 160 |
require_once 'Services/Gateway/HpsTokenService.php';
|
| 161 |
+
require_once 'Services/Gateway/HpsAttachmentService.php';
|
| 162 |
require_once 'Services/Gateway/AltPayment/HpsAltPaymentService.php';
|
| 163 |
require_once 'Services/Gateway/AltPayment/HpsPayPalService.php';
|
| 164 |
require_once 'Services/Gateway/AltPayment/HpsMasterPassService.php';
|
| 200 |
require_once 'Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceRewardBuilder.php';
|
| 201 |
require_once 'Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceSaleBuilder.php';
|
| 202 |
require_once 'Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceVoidBuilder.php';
|
| 203 |
+
require_once 'Services/Fluent/Gateway/Credit/HpsCreditServiceUpdateTokenExpirationBuilder.php';
|
| 204 |
require_once 'Services/Fluent/Gateway/HpsFluentCheckService.php';
|
| 205 |
require_once 'Services/Fluent/Gateway/HpsFluentCreditService.php';
|
| 206 |
require_once 'Services/Fluent/Gateway/HpsFluentDebitService.php';
|
lib/SecureSubmit/src/Abstractions/HpsAltPaymentServiceInterface.php
CHANGED
|
@@ -41,8 +41,8 @@ interface HpsAltPaymentServiceInterface
|
|
| 41 |
$orderId,
|
| 42 |
$amount,
|
| 43 |
$currency,
|
| 44 |
-
HpsBuyerData $buyer,
|
| 45 |
-
HpsPaymentData $payment,
|
| 46 |
HpsShippingInfo $shippingAddress = null,
|
| 47 |
$lineItems = null,
|
| 48 |
HpsOrderData $orderData = null
|
|
@@ -80,8 +80,8 @@ interface HpsAltPaymentServiceInterface
|
|
| 80 |
public function createSession(
|
| 81 |
$amount,
|
| 82 |
$currency,
|
| 83 |
-
HpsBuyerData $buyer,
|
| 84 |
-
HpsPaymentData $payment,
|
| 85 |
HpsShippingInfo $shippingAddress = null,
|
| 86 |
$lineItems = null,
|
| 87 |
HpsOrderData $orderData = null
|
|
@@ -123,8 +123,8 @@ interface HpsAltPaymentServiceInterface
|
|
| 123 |
$orderId,
|
| 124 |
$amount,
|
| 125 |
$currency,
|
| 126 |
-
HpsBuyerData $buyer,
|
| 127 |
-
HpsPaymentData $payment,
|
| 128 |
HpsShippingInfo $shippingAddress = null,
|
| 129 |
$lineItems = null,
|
| 130 |
HpsOrderData $orderData = null
|
| 41 |
$orderId,
|
| 42 |
$amount,
|
| 43 |
$currency,
|
| 44 |
+
HpsBuyerData $buyer = null,
|
| 45 |
+
HpsPaymentData $payment = null,
|
| 46 |
HpsShippingInfo $shippingAddress = null,
|
| 47 |
$lineItems = null,
|
| 48 |
HpsOrderData $orderData = null
|
| 80 |
public function createSession(
|
| 81 |
$amount,
|
| 82 |
$currency,
|
| 83 |
+
HpsBuyerData $buyer = null,
|
| 84 |
+
HpsPaymentData $payment = null,
|
| 85 |
HpsShippingInfo $shippingAddress = null,
|
| 86 |
$lineItems = null,
|
| 87 |
HpsOrderData $orderData = null
|
| 123 |
$orderId,
|
| 124 |
$amount,
|
| 125 |
$currency,
|
| 126 |
+
HpsBuyerData $buyer = null,
|
| 127 |
+
HpsPaymentData $payment = null,
|
| 128 |
HpsShippingInfo $shippingAddress = null,
|
| 129 |
$lineItems = null,
|
| 130 |
HpsOrderData $orderData = null
|
lib/SecureSubmit/src/Abstractions/HpsConfigInterface.php
CHANGED
|
@@ -6,6 +6,6 @@ interface HpsConfigInterface
|
|
| 6 |
const KEY_TYPE_PUBLIC = 'public';
|
| 7 |
const KEY_TYPE_UNKNOWN = 'unknown';
|
| 8 |
public function serviceUri();
|
| 9 |
-
public function setServiceUri(
|
| 10 |
public function validate($keyType);
|
| 11 |
}
|
| 6 |
const KEY_TYPE_PUBLIC = 'public';
|
| 7 |
const KEY_TYPE_UNKNOWN = 'unknown';
|
| 8 |
public function serviceUri();
|
| 9 |
+
public function setServiceUri($value);
|
| 10 |
public function validate($keyType);
|
| 11 |
}
|
lib/SecureSubmit/src/Abstractions/HpsGatewayServiceAbstract.php
CHANGED
|
@@ -8,6 +8,7 @@ abstract class HpsGatewayServiceAbstract
|
|
| 8 |
protected $_amount = null;
|
| 9 |
protected $_currency = null;
|
| 10 |
protected $_filterBy = null;
|
|
|
|
| 11 |
|
| 12 |
public function __construct(HpsConfigInterface $config = null)
|
| 13 |
{
|
|
@@ -51,6 +52,8 @@ abstract class HpsGatewayServiceAbstract
|
|
| 51 |
);
|
| 52 |
}
|
| 53 |
|
|
|
|
|
|
|
| 54 |
try {
|
| 55 |
$request = curl_init();
|
| 56 |
curl_setopt($request, CURLOPT_URL, $url);
|
|
@@ -60,9 +63,11 @@ abstract class HpsGatewayServiceAbstract
|
|
| 60 |
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
| 61 |
curl_setopt($request, CURLOPT_SSL_VERIFYHOST, false);
|
| 62 |
if ($data != null) {
|
|
|
|
| 63 |
curl_setopt($request, CURLOPT_CUSTOMREQUEST, $httpVerb);
|
| 64 |
curl_setopt($request, CURLOPT_POSTFIELDS, $data);
|
| 65 |
}
|
|
|
|
| 66 |
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
|
| 67 |
curl_setopt($request, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
|
| 68 |
|
|
@@ -70,14 +75,33 @@ abstract class HpsGatewayServiceAbstract
|
|
| 70 |
curl_setopt($request, CURLOPT_PROXY, $this->_config->proxyOptions['proxy_host']);
|
| 71 |
curl_setopt($request, CURLOPT_PROXYPORT, $this->_config->proxyOptions['proxy_port']);
|
| 72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
$curlResponse = curl_exec($request);
|
| 74 |
$curlInfo = curl_getinfo($request);
|
| 75 |
$curlError = curl_errno($request);
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
throw new HpsException("gateway_time-out");
|
| 79 |
}
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
return $this->processResponse($curlResponse, $curlInfo, $curlError);
|
| 82 |
} catch (Exception $e) {
|
| 83 |
throw new HpsGatewayException(
|
| 8 |
protected $_amount = null;
|
| 9 |
protected $_currency = null;
|
| 10 |
protected $_filterBy = null;
|
| 11 |
+
const MIN_OPENSSL_VER = 268439615; //OPENSSL_VERSION_NUMBER openSSL 1.0.1c
|
| 12 |
|
| 13 |
public function __construct(HpsConfigInterface $config = null)
|
| 14 |
{
|
| 52 |
);
|
| 53 |
}
|
| 54 |
|
| 55 |
+
$logger = HpsLogger::getInstance();
|
| 56 |
+
|
| 57 |
try {
|
| 58 |
$request = curl_init();
|
| 59 |
curl_setopt($request, CURLOPT_URL, $url);
|
| 63 |
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
| 64 |
curl_setopt($request, CURLOPT_SSL_VERIFYHOST, false);
|
| 65 |
if ($data != null) {
|
| 66 |
+
$logger->log('Request data', $data);
|
| 67 |
curl_setopt($request, CURLOPT_CUSTOMREQUEST, $httpVerb);
|
| 68 |
curl_setopt($request, CURLOPT_POSTFIELDS, $data);
|
| 69 |
}
|
| 70 |
+
$logger->log('Request headers', $headers);
|
| 71 |
curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
|
| 72 |
curl_setopt($request, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
|
| 73 |
|
| 75 |
curl_setopt($request, CURLOPT_PROXY, $this->_config->proxyOptions['proxy_host']);
|
| 76 |
curl_setopt($request, CURLOPT_PROXYPORT, $this->_config->proxyOptions['proxy_port']);
|
| 77 |
}
|
| 78 |
+
|
| 79 |
+
if (
|
| 80 |
+
$this->_config->curlOptions != null
|
| 81 |
+
&& !empty($this->_config->curlOptions)
|
| 82 |
+
) {
|
| 83 |
+
curl_setopt_array($request, $this->_config->curlOptions);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
$curlResponse = curl_exec($request);
|
| 87 |
$curlInfo = curl_getinfo($request);
|
| 88 |
$curlError = curl_errno($request);
|
| 89 |
|
| 90 |
+
$logger->log('Response data', $curlResponse);
|
| 91 |
+
$logger->log('Curl info', $curlInfo);
|
| 92 |
+
$logger->log('Curl error', $curlError);
|
| 93 |
+
|
| 94 |
+
if ($curlError == 28) { //CURLE_OPERATION_TIMEOUTED
|
| 95 |
throw new HpsException("gateway_time-out");
|
| 96 |
}
|
| 97 |
|
| 98 |
+
if ($curlError == 35) { //CURLE_SSL_CONNECT_ERROR
|
| 99 |
+
$err_msg = 'PHP-SDK cURL TLS 1.2 handshake failed. If you have any questions, please contact Specialty Products Team at 866.802.9753.';
|
| 100 |
+
if ( extension_loaded('openssl') && OPENSSL_VERSION_NUMBER < self::MIN_OPENSSL_VER ) { // then you don't have openSSL 1.0.1c or greater
|
| 101 |
+
$err_msg .= 'Your current version of OpenSSL is ' . OPENSSL_VERSION_TEXT . 'You do not have the minimum version of OpenSSL 1.0.1c which is required for curl to use TLS 1.2 handshake.';
|
| 102 |
+
}
|
| 103 |
+
throw new HpsGatewayException($curlError,$err_msg);
|
| 104 |
+
}
|
| 105 |
return $this->processResponse($curlResponse, $curlInfo, $curlError);
|
| 106 |
} catch (Exception $e) {
|
| 107 |
throw new HpsGatewayException(
|
lib/SecureSubmit/src/Abstractions/HpsGatewayServiceInterface.php
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
|
| 3 |
interface HpsGatewayServiceInterface
|
| 4 |
{
|
| 5 |
-
public function doRequest($data, $options);
|
| 6 |
public function processResponse($curlResponse, $curlInfo, $curlError);
|
| 7 |
}
|
| 2 |
|
| 3 |
interface HpsGatewayServiceInterface
|
| 4 |
{
|
| 5 |
+
public function doRequest($data, $options = array());
|
| 6 |
public function processResponse($curlResponse, $curlInfo, $curlError);
|
| 7 |
}
|
lib/SecureSubmit/src/Abstractions/HpsLoggerInterface.php
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
interface HpsLoggerInterface
|
| 4 |
+
{
|
| 5 |
+
public function log($message, $object = null);
|
| 6 |
+
}
|
lib/SecureSubmit/src/Abstractions/HpsPayPlanResourceAbstract.php
CHANGED
|
@@ -11,17 +11,17 @@ abstract class HpsPayPlanResourceAbstract implements HpsPayPlanResourceInterface
|
|
| 11 |
/** @var string|null */
|
| 12 |
public $lastChangeDate = null;
|
| 13 |
|
| 14 |
-
protected function
|
| 15 |
{
|
| 16 |
-
return $value !== null;
|
| 17 |
}
|
| 18 |
|
| 19 |
public function getEditableFieldsWithValues($class, $params = array())
|
| 20 |
{
|
| 21 |
$array = array_intersect_key(
|
| 22 |
get_object_vars($this),
|
| 23 |
-
array_flip(
|
| 24 |
);
|
| 25 |
-
return array_filter($array, array($this, '
|
| 26 |
}
|
| 27 |
}
|
| 11 |
/** @var string|null */
|
| 12 |
public $lastChangeDate = null;
|
| 13 |
|
| 14 |
+
protected function isNotNullOrEmpty($value)
|
| 15 |
{
|
| 16 |
+
return $value !== null && !empty($value);
|
| 17 |
}
|
| 18 |
|
| 19 |
public function getEditableFieldsWithValues($class, $params = array())
|
| 20 |
{
|
| 21 |
$array = array_intersect_key(
|
| 22 |
get_object_vars($this),
|
| 23 |
+
array_flip(call_user_func($class.'::getEditableFields', $params))
|
| 24 |
);
|
| 25 |
+
return array_filter($array, array($this, 'isNotNullOrEmpty'));
|
| 26 |
}
|
| 27 |
}
|
lib/SecureSubmit/src/Entities/AltPayment/HpsAltPaymentSessionInfo.php
CHANGED
|
@@ -29,36 +29,34 @@ class HpsAltPaymentSessionInfo extends HpsAltPaymentResponse
|
|
| 29 |
$session->status = isset($sessionInfo->Status) ? (string)$sessionInfo->Status : null;
|
| 30 |
|
| 31 |
$session->buyer = new HpsBuyerData();
|
| 32 |
-
$session->buyer->emailAddress = isset($buyer['EmailAddress']) ?
|
| 33 |
-
$session->buyer->payerId = isset($buyer['BuyerId']) ?
|
| 34 |
-
$session->buyer->status = isset($buyer['Status']) ?
|
| 35 |
-
$session->buyer->countryCode = isset($buyer['CountryCode']) ?
|
| 36 |
-
$session->buyer->firstName = isset($buyer['FirstName']) ?
|
| 37 |
-
$session->buyer->lastName = isset($buyer['LastName']) ?
|
| 38 |
-
$session->buyer->phoneNumber = isset($buyer['PhoneNumber']) ? (string)$buyer['PhoneNumber'] : null;
|
| 39 |
|
| 40 |
$session->shipping = new HpsShippingInfo();
|
| 41 |
-
$session->shipping->name = isset($shipping['ShipName']) ?
|
| 42 |
$session->shipping->address = new HpsAddress();
|
| 43 |
-
$session->shipping->address->address = isset($shipping['ShipAddress']) ?
|
| 44 |
-
$session->shipping->address->
|
| 45 |
-
$session->shipping->address->
|
| 46 |
-
$session->shipping->address->
|
| 47 |
-
$session->shipping->address->
|
| 48 |
-
$session->shipping->address->country = isset($shipping['ShipCountryCode']) ? (string)$shipping['ShipCountryCode'] : null;
|
| 49 |
|
| 50 |
$session->payment = new HpsPaymentData();
|
| 51 |
-
$session->payment->subtotal = isset($payment['ItemAmount']) ?
|
| 52 |
-
$session->payment->shippingAmount = isset($payment['ShippingAmount']) ?
|
| 53 |
-
$session->payment->taxAmount = isset($payment['TaxAmount']) ?
|
| 54 |
|
| 55 |
$session->lineItems = array();
|
| 56 |
$lineItem = new HpsLineitem();
|
| 57 |
-
$lineItem->name = isset($lineItems['Name']) ?
|
| 58 |
-
$lineItem->amount = isset($lineItems['Amount']) ?
|
| 59 |
-
$lineItem->number = isset($lineItems['Number']) ?
|
| 60 |
-
$lineItem->quantity = isset($lineItems['Quantity']) ?
|
| 61 |
-
$lineItem->taxAmount = isset($lineItems['TaxAmount']) ?
|
| 62 |
|
| 63 |
return $session;
|
| 64 |
}
|
| 29 |
$session->status = isset($sessionInfo->Status) ? (string)$sessionInfo->Status : null;
|
| 30 |
|
| 31 |
$session->buyer = new HpsBuyerData();
|
| 32 |
+
$session->buyer->emailAddress = isset($buyer['EmailAddress']) ? $buyer['EmailAddress'] : null;
|
| 33 |
+
$session->buyer->payerId = isset($buyer['BuyerId']) ? $buyer['BuyerId'] : null;
|
| 34 |
+
$session->buyer->status = isset($buyer['Status']) ? $buyer['Status'] : null;
|
| 35 |
+
$session->buyer->countryCode = isset($buyer['CountryCode']) ? $buyer['CountryCode'] : null;
|
| 36 |
+
$session->buyer->firstName = isset($buyer['FirstName']) ? $buyer['FirstName'] : null;
|
| 37 |
+
$session->buyer->lastName = isset($buyer['LastName']) ? $buyer['LastName'] : null;
|
|
|
|
| 38 |
|
| 39 |
$session->shipping = new HpsShippingInfo();
|
| 40 |
+
$session->shipping->name = isset($shipping['ShipName']) ? $shipping['ShipName'] : null;
|
| 41 |
$session->shipping->address = new HpsAddress();
|
| 42 |
+
$session->shipping->address->address = isset($shipping['ShipAddress']) ? $shipping['ShipAddress'] : null;
|
| 43 |
+
$session->shipping->address->city = isset($shipping['ShipCity']) ? $shipping['ShipCity'] : null;
|
| 44 |
+
$session->shipping->address->state = isset($shipping['ShipState']) ? $shipping['ShipState'] : null;
|
| 45 |
+
$session->shipping->address->zip = isset($shipping['ShipZip']) ? $shipping['ShipZip'] : null;
|
| 46 |
+
$session->shipping->address->country = isset($shipping['ShipCountryCode']) ? $shipping['ShipCountryCode'] : null;
|
|
|
|
| 47 |
|
| 48 |
$session->payment = new HpsPaymentData();
|
| 49 |
+
$session->payment->subtotal = isset($payment['ItemAmount']) ? $payment['ItemAmount'] : null;
|
| 50 |
+
$session->payment->shippingAmount = isset($payment['ShippingAmount']) ? $payment['ShippingAmount'] : null;
|
| 51 |
+
$session->payment->taxAmount = isset($payment['TaxAmount']) ? $payment['TaxAmount'] : null;
|
| 52 |
|
| 53 |
$session->lineItems = array();
|
| 54 |
$lineItem = new HpsLineitem();
|
| 55 |
+
$lineItem->name = isset($lineItems['Name']) ? $lineItems['Name'] : null;
|
| 56 |
+
$lineItem->amount = isset($lineItems['Amount']) ? $lineItems['Amount'] : null;
|
| 57 |
+
$lineItem->number = isset($lineItems['Number']) ? $lineItems['Number'] : null;
|
| 58 |
+
$lineItem->quantity = isset($lineItems['Quantity']) ? $lineItems['Quantity'] : null;
|
| 59 |
+
$lineItem->taxAmount = isset($lineItems['TaxAmount']) ? $lineItems['TaxAmount'] : null;
|
| 60 |
|
| 61 |
return $session;
|
| 62 |
}
|
lib/SecureSubmit/src/Entities/Attachment/HpsAttachment.php
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Class HpsAttachment
|
| 4 |
+
* implements AttachmentRspDataType Complex Type
|
| 5 |
+
* @link https://posgateway.cert.secureexchange.net/Gateway/PorticoSOAPSchema/build/Default/webframe.html#Portico%20Schema_xsd~c-PosGetAttachmentsRspType~e-Details.html
|
| 6 |
+
* @package PHP-SDK/src/Entities/Attachment/HpsAttachment.php
|
| 7 |
+
* show off @property
|
| 8 |
+
*
|
| 9 |
+
* @property string $attachmentType
|
| 10 |
+
* @property string $attachmentData
|
| 11 |
+
* @property string $attachmentFormat
|
| 12 |
+
* @property int $height
|
| 13 |
+
* @property int $width
|
| 14 |
+
* @property string $attachmentName
|
| 15 |
+
* @property int $attachmentDataId
|
| 16 |
+
*/
|
| 17 |
+
class HpsAttachment extends HpsTransaction
|
| 18 |
+
{
|
| 19 |
+
// https://posgateway.cert.secureexchange.net/Gateway/PorticoSOAPSchema/build/Default/webframe.html#Portico%20Schema_xsd~s-attachmentTypeType.html
|
| 20 |
+
/**
|
| 21 |
+
* @var string
|
| 22 |
+
*/
|
| 23 |
+
private $attachmentType = ''; // string
|
| 24 |
+
/**
|
| 25 |
+
* @var string
|
| 26 |
+
*/
|
| 27 |
+
private $attachmentData = ''; // string Base64 encoded attachment data
|
| 28 |
+
/*https://posgateway.cert.secureexchange.net/Gateway/PorticoSOAPSchema/build/Default/webframe.html#Portico%20Schema_xsd~s-attachmentFormatType.html*/
|
| 29 |
+
/**
|
| 30 |
+
* @var string
|
| 31 |
+
*/
|
| 32 |
+
private $attachmentFormat = ''; // string
|
| 33 |
+
/**
|
| 34 |
+
* @var int
|
| 35 |
+
*/
|
| 36 |
+
private $height = 0; // int
|
| 37 |
+
/**
|
| 38 |
+
* @var int
|
| 39 |
+
*/
|
| 40 |
+
private $width = 0; // int
|
| 41 |
+
/*A merchant-assigned name for the associated attachment */
|
| 42 |
+
/**
|
| 43 |
+
* @var string
|
| 44 |
+
*/
|
| 45 |
+
private $attachmentName = ''; // string
|
| 46 |
+
/*Gateway-generated attachment identifier */
|
| 47 |
+
/**
|
| 48 |
+
* @var int
|
| 49 |
+
*/
|
| 50 |
+
private $attachmentDataId = 0; // int
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* @param \SimpleXMLElement $rsp
|
| 54 |
+
* @param null $txnType
|
| 55 |
+
* @param string $returnType
|
| 56 |
+
*
|
| 57 |
+
* @return HpsAttachment
|
| 58 |
+
*/
|
| 59 |
+
public static function fromDict($rsp, $txnType, $returnType = 'HpsAttachment')
|
| 60 |
+
{
|
| 61 |
+
$attResponse = $rsp->Transaction->$txnType->Details;
|
| 62 |
+
$transaction = parent::fromDict($rsp, $txnType, $returnType);
|
| 63 |
+
foreach (get_object_vars($attResponse) as $key => $prop) {
|
| 64 |
+
if (property_exists($transaction, lcfirst($key))) {
|
| 65 |
+
$transaction->__set(lcfirst($key), $prop);
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
return $transaction;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/**
|
| 72 |
+
* @param string $name
|
| 73 |
+
* @param float|string|int $value Never a Bool
|
| 74 |
+
* @throws HpsArgumentException
|
| 75 |
+
*/
|
| 76 |
+
public function __set($name, $value)
|
| 77 |
+
{
|
| 78 |
+
if (!$value instanceof stdClass) {
|
| 79 |
+
if (!property_exists(__CLASS__, $name)) {
|
| 80 |
+
$value = null;
|
| 81 |
+
}
|
| 82 |
+
switch ($name) {
|
| 83 |
+
case 'height':
|
| 84 |
+
case 'width':
|
| 85 |
+
case 'attachmentDataId':
|
| 86 |
+
$validator = FILTER_SANITIZE_NUMBER_INT;
|
| 87 |
+
break;
|
| 88 |
+
default:
|
| 89 |
+
$validator = FILTER_SANITIZE_STRING;
|
| 90 |
+
}
|
| 91 |
+
$value = filter_var($value, $validator);
|
| 92 |
+
|
| 93 |
+
if ($name === 'attachmentFormat' && preg_match(HpsAttachmentType::VALID_ATTACHMENT_FORMAT, $value) !== 1) {
|
| 94 |
+
throw new \HpsArgumentException('attachmentFormat not a valid enum', 1);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
if ($value === false) {
|
| 98 |
+
throw new \HpsArgumentException('invalid parameter for {' . __CLASS__ . '}', 1);
|
| 99 |
+
} //
|
| 100 |
+
$this->{$name} = $value;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
/**
|
| 106 |
+
* @param string $name
|
| 107 |
+
* @return float|string|int null
|
| 108 |
+
*/
|
| 109 |
+
public function __get($name)
|
| 110 |
+
{
|
| 111 |
+
$value = null;
|
| 112 |
+
if (property_exists(__CLASS__, $name)) {
|
| 113 |
+
$value = $this->{$name};
|
| 114 |
+
}
|
| 115 |
+
return $value;
|
| 116 |
+
}
|
| 117 |
+
}
|
lib/SecureSubmit/src/Entities/Credit/HpsManageTokensResponse.php
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Class HpsManageTokensResponse
|
| 5 |
+
*/
|
| 6 |
+
class HpsManageTokensResponse extends HpsTransaction
|
| 7 |
+
{
|
| 8 |
+
/**
|
| 9 |
+
* @param \SimpleXMLElement $rsp
|
| 10 |
+
* @param null $txnType
|
| 11 |
+
* @param string $returnType
|
| 12 |
+
*
|
| 13 |
+
* @return HpsManageTokensResponse
|
| 14 |
+
*/
|
| 15 |
+
public static function fromDict($rsp, $txnType = null, $returnType = 'HpsManageTokensResponse')
|
| 16 |
+
{
|
| 17 |
+
$transaction = parent::fromDict($rsp, $txnType, $returnType);
|
| 18 |
+
$transaction->responseCode = '00';
|
| 19 |
+
$transaction->responseText = '';
|
| 20 |
+
return $transaction;
|
| 21 |
+
}
|
| 22 |
+
}
|
lib/SecureSubmit/src/Entities/Credit/HpsReportTransactionDetails.php
CHANGED
|
@@ -37,7 +37,6 @@ class HpsReportTransactionDetails extends HpsAuthorization
|
|
| 37 |
$details->responseCode = (isset($reportResponse->Data->RspCode) ? (string)$reportResponse->Data->RspCode : null);
|
| 38 |
$details->responseText = (isset($reportResponse->Data->RspText) ? (string)$reportResponse->Data->RspText : null);
|
| 39 |
$details->transactionStatus = (isset($reportResponse->Data->TxnStatus) ? (string)$reportResponse->Data->TxnStatus : null);
|
| 40 |
-
$details->settlementAmt = (isset($reportResponse->Data->SettlementAmt) ? (string)$reportResponse->Data->SettlementAmt : null);
|
| 41 |
|
| 42 |
if (isset($reportResponse->Data->TokenizationMsg)) {
|
| 43 |
$details->tokenData = new HpsTokenData();
|
|
@@ -45,10 +44,10 @@ class HpsReportTransactionDetails extends HpsAuthorization
|
|
| 45 |
}
|
| 46 |
|
| 47 |
if (isset($reportResponse->Data->AdditionalTxnFields)) {
|
| 48 |
-
$additionalTxnFields = $reportResponse->Data->
|
| 49 |
$details->memo = (isset($additionalTxnFields->Description) ? (string)$additionalTxnFields->Description : null);
|
| 50 |
$details->invoiceNumber = (isset($additionalTxnFields->InvoiceNbr) ? (string)$additionalTxnFields->InvoiceNbr : null);
|
| 51 |
-
$details->customerId = (isset($additionalTxnFields->
|
| 52 |
}
|
| 53 |
|
| 54 |
if ((string)$reportResponse->Data->RspCode != '00') {
|
| 37 |
$details->responseCode = (isset($reportResponse->Data->RspCode) ? (string)$reportResponse->Data->RspCode : null);
|
| 38 |
$details->responseText = (isset($reportResponse->Data->RspText) ? (string)$reportResponse->Data->RspText : null);
|
| 39 |
$details->transactionStatus = (isset($reportResponse->Data->TxnStatus) ? (string)$reportResponse->Data->TxnStatus : null);
|
|
|
|
| 40 |
|
| 41 |
if (isset($reportResponse->Data->TokenizationMsg)) {
|
| 42 |
$details->tokenData = new HpsTokenData();
|
| 44 |
}
|
| 45 |
|
| 46 |
if (isset($reportResponse->Data->AdditionalTxnFields)) {
|
| 47 |
+
$additionalTxnFields = $reportResponse->Data->AdditionalTxnFields;
|
| 48 |
$details->memo = (isset($additionalTxnFields->Description) ? (string)$additionalTxnFields->Description : null);
|
| 49 |
$details->invoiceNumber = (isset($additionalTxnFields->InvoiceNbr) ? (string)$additionalTxnFields->InvoiceNbr : null);
|
| 50 |
+
$details->customerId = (isset($additionalTxnFields->CustomerID) ? (string)$additionalTxnFields->CustomerID : null);
|
| 51 |
}
|
| 52 |
|
| 53 |
if ((string)$reportResponse->Data->RspCode != '00') {
|
lib/SecureSubmit/src/Entities/Credit/HpsSecureEcommerce.php
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class HpsSecureEcommerce
|
| 4 |
+
{
|
| 5 |
+
public $dataSource = null;
|
| 6 |
+
public $type = null;
|
| 7 |
+
public $data = null;
|
| 8 |
+
public $eciFlag = null;
|
| 9 |
+
public $xid = null;
|
| 10 |
+
}
|
lib/SecureSubmit/src/Entities/HpsAddress.php
CHANGED
|
@@ -2,10 +2,9 @@
|
|
| 2 |
|
| 3 |
class HpsAddress
|
| 4 |
{
|
| 5 |
-
public $address
|
| 6 |
-
public $
|
| 7 |
-
public $
|
| 8 |
-
public $
|
| 9 |
-
public $
|
| 10 |
-
public $country = null;
|
| 11 |
}
|
| 2 |
|
| 3 |
class HpsAddress
|
| 4 |
{
|
| 5 |
+
public $address = null;
|
| 6 |
+
public $city = null;
|
| 7 |
+
public $state = null;
|
| 8 |
+
public $zip = null;
|
| 9 |
+
public $country = null;
|
|
|
|
| 10 |
}
|
lib/SecureSubmit/src/Entities/HpsTokenData.php
CHANGED
|
@@ -3,6 +3,9 @@
|
|
| 3 |
class HpsTokenData
|
| 4 |
{
|
| 5 |
public $tokenValue = null;
|
|
|
|
|
|
|
|
|
|
| 6 |
public $responseCode = null;
|
| 7 |
public $responseMessage = null;
|
| 8 |
|
| 3 |
class HpsTokenData
|
| 4 |
{
|
| 5 |
public $tokenValue = null;
|
| 6 |
+
public $expMonth = null;
|
| 7 |
+
public $expYear = null;
|
| 8 |
+
public $cvv = null;
|
| 9 |
public $responseCode = null;
|
| 10 |
public $responseMessage = null;
|
| 11 |
|
lib/SecureSubmit/src/Entities/HpsTransaction.php
CHANGED
|
@@ -26,7 +26,11 @@ class HpsTransaction
|
|
| 26 |
}
|
| 27 |
|
| 28 |
// Hydrate the body
|
| 29 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
if ($item != null) {
|
| 31 |
$transaction->responseCode = (isset($item->RspCode) ? (string)$item->RspCode : null);
|
| 32 |
$transaction->responseText = (isset($item->RspText) ? (string)$item->RspText : null);
|
| 26 |
}
|
| 27 |
|
| 28 |
// Hydrate the body
|
| 29 |
+
if (!isset($rsp->Transaction) || !isset($rsp->Transaction->{$txnType})) {
|
| 30 |
+
return $transaction;
|
| 31 |
+
}
|
| 32 |
+
// Hydrate the body
|
| 33 |
+
$item = $rsp->Transaction->{$txnType};
|
| 34 |
if ($item != null) {
|
| 35 |
$transaction->responseCode = (isset($item->RspCode) ? (string)$item->RspCode : null);
|
| 36 |
$transaction->responseText = (isset($item->RspText) ? (string)$item->RspText : null);
|
lib/SecureSubmit/src/Entities/PayPlan/HpsPayPlanSchedule.php
CHANGED
|
@@ -83,14 +83,20 @@ class HpsPayPlanSchedule extends HpsPayPlanResourceAbstract
|
|
| 83 |
/** @var string|null */
|
| 84 |
public $scheduleStarted = null;
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
public function __construct() {
|
| 87 |
$this->emailReceipt = 'Never';
|
| 88 |
$this->emailAdvanceNotice = 'No';
|
| 89 |
}
|
| 90 |
|
| 91 |
-
public static function getEditableFields()
|
| 92 |
{
|
| 93 |
-
|
| 94 |
'scheduleName',
|
| 95 |
'scheduleStatus',
|
| 96 |
'deviceId',
|
|
@@ -99,19 +105,25 @@ class HpsPayPlanSchedule extends HpsPayPlanResourceAbstract
|
|
| 99 |
'taxAmount',
|
| 100 |
'numberOfPaymentsRemaining',
|
| 101 |
'endDate',
|
| 102 |
-
'cancellationDate',
|
| 103 |
'reprocessingCount',
|
| 104 |
'emailReceipt',
|
| 105 |
'emailAdvanceNotice',
|
| 106 |
'processingDateInfo',
|
| 107 |
-
|
| 108 |
-
'
|
| 109 |
-
'startDate',
|
| 110 |
-
'frequency',
|
| 111 |
-
'duration',
|
| 112 |
-
// Only editable when scheduleStarted = true
|
| 113 |
-
'nextProcessingDate',
|
| 114 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
}
|
| 116 |
|
| 117 |
public static function getSearchableFields()
|
|
@@ -172,12 +184,16 @@ class HpsPayPlanSchedule extends HpsPayPlanResourceAbstract
|
|
| 172 |
$ret->creationDate = property_exists($obj, 'creationDate') ? $obj->creationDate : null;
|
| 173 |
$ret->lastChangeDate = property_exists($obj, 'lastChangeDate') ? $obj->lastChangeDate : null;
|
| 174 |
$ret->statusSetDate = property_exists($obj, 'statusSetDate') ? $obj->statusSetDate : null;
|
|
|
|
|
|
|
| 175 |
return $ret;
|
| 176 |
}
|
| 177 |
|
| 178 |
// Needs to be implemented to get name of child class
|
| 179 |
-
public function getEditableFieldsWithValues($class = ''
|
| 180 |
-
|
| 181 |
-
|
|
|
|
|
|
|
| 182 |
}
|
| 183 |
}
|
| 83 |
/** @var string|null */
|
| 84 |
public $scheduleStarted = null;
|
| 85 |
|
| 86 |
+
/** @var string|null */
|
| 87 |
+
public $invoiceNbr = null;
|
| 88 |
+
|
| 89 |
+
/** @var string|null */
|
| 90 |
+
public $description = null;
|
| 91 |
+
|
| 92 |
public function __construct() {
|
| 93 |
$this->emailReceipt = 'Never';
|
| 94 |
$this->emailAdvanceNotice = 'No';
|
| 95 |
}
|
| 96 |
|
| 97 |
+
public static function getEditableFields( HpsPayPlanSchedule $schedule = null )
|
| 98 |
{
|
| 99 |
+
$editableFields = array(
|
| 100 |
'scheduleName',
|
| 101 |
'scheduleStatus',
|
| 102 |
'deviceId',
|
| 105 |
'taxAmount',
|
| 106 |
'numberOfPaymentsRemaining',
|
| 107 |
'endDate',
|
|
|
|
| 108 |
'reprocessingCount',
|
| 109 |
'emailReceipt',
|
| 110 |
'emailAdvanceNotice',
|
| 111 |
'processingDateInfo',
|
| 112 |
+
'invoiceNbr',
|
| 113 |
+
'description',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
);
|
| 115 |
+
if ($schedule->scheduleStarted === 'true'){
|
| 116 |
+
$editableFields[] = 'cancellationDate';
|
| 117 |
+
$editableFields[] = 'nextProcessingDate';
|
| 118 |
+
}
|
| 119 |
+
// Only editable when scheduleStarted = false
|
| 120 |
+
else{
|
| 121 |
+
$editableFields[] = 'scheduleIdentifier';
|
| 122 |
+
$editableFields[] = 'startDate';
|
| 123 |
+
$editableFields[] = 'frequency';
|
| 124 |
+
$editableFields[] = 'duration';
|
| 125 |
+
}
|
| 126 |
+
return $editableFields;
|
| 127 |
}
|
| 128 |
|
| 129 |
public static function getSearchableFields()
|
| 184 |
$ret->creationDate = property_exists($obj, 'creationDate') ? $obj->creationDate : null;
|
| 185 |
$ret->lastChangeDate = property_exists($obj, 'lastChangeDate') ? $obj->lastChangeDate : null;
|
| 186 |
$ret->statusSetDate = property_exists($obj, 'statusSetDate') ? $obj->statusSetDate : null;
|
| 187 |
+
$ret->description = property_exists($obj, 'description') ? $obj->description : null;
|
| 188 |
+
$ret->invoiceNbr = property_exists($obj, 'invoiceNbr') ? $obj->invoiceNbr : null;
|
| 189 |
return $ret;
|
| 190 |
}
|
| 191 |
|
| 192 |
// Needs to be implemented to get name of child class
|
| 193 |
+
public function getEditableFieldsWithValues($params = null,$class = 'HpsPayPlanSchedule'){
|
| 194 |
+
if ($params===null){
|
| 195 |
+
$params=$this;
|
| 196 |
+
}
|
| 197 |
+
return parent::getEditableFieldsWithValues($class, $params);
|
| 198 |
}
|
| 199 |
}
|
lib/SecureSubmit/src/Infrastructure/Enums/HpsAttachmentType.php
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Created by PhpStorm.
|
| 5 |
+
* User: charles.simmons
|
| 6 |
+
* Date: 7/15/2016
|
| 7 |
+
* Time: 3:23 PM
|
| 8 |
+
*/
|
| 9 |
+
class HpsAttachmentType
|
| 10 |
+
{
|
| 11 |
+
const SIGNATURE = 'SIGNATURE_IMAGE';
|
| 12 |
+
const RECEIPT = 'RECEIPT_IMAGE';
|
| 13 |
+
const CUSTOMER = 'CUSTOMER_IMAGE';
|
| 14 |
+
const PRODUCT = 'PRODUCT_IMAGE';
|
| 15 |
+
const DOCUMENT = 'DOCUMENT';
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
// validation regex for AttachmentFormat
|
| 19 |
+
const VALID_ATTACHMENT_FORMAT = '/^(PNG|JPG|TIF|BMP|PDF|DOCX|DOC|TXT|XLS|XLSX)$/';
|
| 20 |
+
// validation regex for AttachmentType
|
| 21 |
+
const VALID_ATTACHMENT_TYPE = '/^(SIGNATURE_IMAGE|RECEIPT_IMAGE|CUSTOMER_IMAGE|PRODUCT_IMAGE|DOCUMENT)$/';
|
| 22 |
+
}
|
lib/SecureSubmit/src/Infrastructure/Enums/HpsExceptionCodes.php
CHANGED
|
@@ -23,6 +23,8 @@ abstract class HpsExceptionCodes
|
|
| 23 |
const GATEWAY_TIMEOUT = 12;
|
| 24 |
const UNEXPECTED_GATEWAY_RESPONSE = 13;
|
| 25 |
const GATEWAY_TIMEOUT_REVERSAL_ERROR = 14;
|
|
|
|
|
|
|
| 26 |
|
| 27 |
// credit issuer codes
|
| 28 |
const INCORRECT_NUMBER = 15;
|
| 23 |
const GATEWAY_TIMEOUT = 12;
|
| 24 |
const UNEXPECTED_GATEWAY_RESPONSE = 13;
|
| 25 |
const GATEWAY_TIMEOUT_REVERSAL_ERROR = 14;
|
| 26 |
+
const GATEWAY_ERROR = 31;
|
| 27 |
+
const UNEXPECTED_GATEWAY_ERROR = 32;
|
| 28 |
|
| 29 |
// credit issuer codes
|
| 30 |
const INCORRECT_NUMBER = 15;
|
lib/SecureSubmit/src/Infrastructure/HpsAuthenticationException.php
CHANGED
|
@@ -5,6 +5,6 @@ class HpsAuthenticationException extends HpsException
|
|
| 5 |
public function __construct($code, $message)
|
| 6 |
{
|
| 7 |
$this->code = $code;
|
| 8 |
-
$this->message = $message;
|
| 9 |
}
|
| 10 |
}
|
| 5 |
public function __construct($code, $message)
|
| 6 |
{
|
| 7 |
$this->code = $code;
|
| 8 |
+
$this->message = (string) $message;
|
| 9 |
}
|
| 10 |
}
|
lib/SecureSubmit/src/Infrastructure/HpsCheckException.php
CHANGED
|
@@ -11,6 +11,6 @@ class HpsCheckException extends HpsException
|
|
| 11 |
$this->transactionId = $transactionId;
|
| 12 |
$this->details = $details;
|
| 13 |
$this->code = $code;
|
| 14 |
-
$this->message = $message;
|
| 15 |
}
|
| 16 |
}
|
| 11 |
$this->transactionId = $transactionId;
|
| 12 |
$this->details = $details;
|
| 13 |
$this->code = $code;
|
| 14 |
+
$this->message = (string) $message;
|
| 15 |
}
|
| 16 |
}
|
lib/SecureSubmit/src/Infrastructure/HpsEmptyLogger.php
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class HpsEmptyLogger implements HpsLoggerInterface
|
| 4 |
+
{
|
| 5 |
+
public function log($message, $object = null)
|
| 6 |
+
{
|
| 7 |
+
return;
|
| 8 |
+
}
|
| 9 |
+
}
|
lib/SecureSubmit/src/Infrastructure/HpsException.php
CHANGED
|
@@ -1,18 +1,34 @@
|
|
| 1 |
<?php
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
class HpsException extends Exception
|
| 4 |
{
|
|
|
|
|
|
|
|
|
|
| 5 |
public $code = null;
|
|
|
|
|
|
|
|
|
|
| 6 |
public $innerException = null;
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
{
|
| 10 |
-
$this->message = $message;
|
| 11 |
if ($code != null) {
|
| 12 |
$this->code = $code;
|
| 13 |
}
|
| 14 |
if ($innerException != null) {
|
| 15 |
-
$this->innerException =
|
| 16 |
}
|
| 17 |
}
|
| 18 |
}
|
| 1 |
<?php
|
| 2 |
|
| 3 |
+
/**
|
| 4 |
+
* Class HpsException
|
| 5 |
+
*/
|
| 6 |
class HpsException extends Exception
|
| 7 |
{
|
| 8 |
+
/**
|
| 9 |
+
* @var int|null
|
| 10 |
+
*/
|
| 11 |
public $code = null;
|
| 12 |
+
/**
|
| 13 |
+
* @var null
|
| 14 |
+
*/
|
| 15 |
public $innerException = null;
|
| 16 |
|
| 17 |
+
/**
|
| 18 |
+
* HpsException constructor.
|
| 19 |
+
*
|
| 20 |
+
* @param string $message [optional] The Exception message to throw.
|
| 21 |
+
* @param $code [optional] The Exception code.
|
| 22 |
+
* @param Exception $innerException [optional] The previous exception used for the exception chaining. Since 5.3.0
|
| 23 |
+
*/
|
| 24 |
+
public function __construct($message = "", $code = null, $innerException = null)
|
| 25 |
{
|
| 26 |
+
$this->message = (string) $message;
|
| 27 |
if ($code != null) {
|
| 28 |
$this->code = $code;
|
| 29 |
}
|
| 30 |
if ($innerException != null) {
|
| 31 |
+
$this->innerException = $innerException;
|
| 32 |
}
|
| 33 |
}
|
| 34 |
}
|
lib/SecureSubmit/src/Infrastructure/HpsGatewayException.php
CHANGED
|
@@ -8,7 +8,7 @@ class HpsGatewayException extends HpsException
|
|
| 8 |
public function __construct($code, $message, $gatewayResponseCode = null, $gatewayResponseMessage = null, $innerException = null)
|
| 9 |
{
|
| 10 |
$this->code = $code;
|
| 11 |
-
$this->message = $message;
|
| 12 |
|
| 13 |
if ($gatewayResponseCode != null || $gatewayResponseMessage != null) {
|
| 14 |
$this->details = new HpsGatewayExceptionDetails();
|
| 8 |
public function __construct($code, $message, $gatewayResponseCode = null, $gatewayResponseMessage = null, $innerException = null)
|
| 9 |
{
|
| 10 |
$this->code = $code;
|
| 11 |
+
$this->message = (string) $message;
|
| 12 |
|
| 13 |
if ($gatewayResponseCode != null || $gatewayResponseMessage != null) {
|
| 14 |
$this->details = new HpsGatewayExceptionDetails();
|
lib/SecureSubmit/src/Infrastructure/HpsInvalidRequestException.php
CHANGED
|
@@ -8,7 +8,7 @@ class HpsInvalidRequestException extends HpsException
|
|
| 8 |
public function __construct($code, $message, $paramName = null)
|
| 9 |
{
|
| 10 |
$this->param = $paramName;
|
| 11 |
-
$this->message = $message;
|
| 12 |
$this->code = $code;
|
| 13 |
parent::__construct($message);
|
| 14 |
}
|
| 8 |
public function __construct($code, $message, $paramName = null)
|
| 9 |
{
|
| 10 |
$this->param = $paramName;
|
| 11 |
+
$this->message = (string) $message;
|
| 12 |
$this->code = $code;
|
| 13 |
parent::__construct($message);
|
| 14 |
}
|
lib/SecureSubmit/src/Infrastructure/HpsLogger.php
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class HpsLogger
|
| 4 |
+
{
|
| 5 |
+
private static $_instance = null;
|
| 6 |
+
private $_logger = null;
|
| 7 |
+
|
| 8 |
+
public function __construct()
|
| 9 |
+
{
|
| 10 |
+
$this->_logger = new HpsEmptyLogger();
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
public static function getInstance()
|
| 14 |
+
{
|
| 15 |
+
if (null === self::$_instance) {
|
| 16 |
+
self::$_instance = new HpsLogger();
|
| 17 |
+
}
|
| 18 |
+
return self::$_instance;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
public function useLogger(HpsLoggerInterface $logger)
|
| 22 |
+
{
|
| 23 |
+
$this->_logger = $logger;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
public function log($message, $object = null)
|
| 27 |
+
{
|
| 28 |
+
$this->_logger->log($message, $object);
|
| 29 |
+
}
|
| 30 |
+
}
|
lib/SecureSubmit/src/Infrastructure/Validation/HpsGatewayResponseValidation.php
CHANGED
|
@@ -11,7 +11,6 @@ class HpsGatewayResponseValidation
|
|
| 11 |
if ($e != null) {
|
| 12 |
throw $e;
|
| 13 |
}
|
| 14 |
-
|
| 15 |
if (!isset($response->Transaction) || !isset($response->Transaction->$expectedType)) {
|
| 16 |
throw new HpsGatewayException(
|
| 17 |
HpsExceptionCodes::UNEXPECTED_GATEWAY_ERROR,
|
|
@@ -57,6 +56,9 @@ class HpsGatewayResponseValidation
|
|
| 57 |
$responseText
|
| 58 |
);
|
| 59 |
break;
|
|
|
|
|
|
|
|
|
|
| 60 |
case '13':
|
| 61 |
$e = new HpsGatewayException(
|
| 62 |
HpsExceptionCodes::INVALID_CARD_DATA,
|
| 11 |
if ($e != null) {
|
| 12 |
throw $e;
|
| 13 |
}
|
|
|
|
| 14 |
if (!isset($response->Transaction) || !isset($response->Transaction->$expectedType)) {
|
| 15 |
throw new HpsGatewayException(
|
| 16 |
HpsExceptionCodes::UNEXPECTED_GATEWAY_ERROR,
|
| 56 |
$responseText
|
| 57 |
);
|
| 58 |
break;
|
| 59 |
+
case '27':
|
| 60 |
+
case '34':
|
| 61 |
+
case '26':
|
| 62 |
case '13':
|
| 63 |
$e = new HpsGatewayException(
|
| 64 |
HpsExceptionCodes::INVALID_CARD_DATA,
|
lib/SecureSubmit/src/Infrastructure/Validation/HpsInputValidation.php
CHANGED
|
@@ -6,7 +6,7 @@ class HpsInputValidation
|
|
| 6 |
|
| 7 |
public static function checkAmount($amount)
|
| 8 |
{
|
| 9 |
-
if ($amount < 0 || $amount
|
| 10 |
throw new HpsInvalidRequestException(
|
| 11 |
HpsExceptionCodes::INVALID_AMOUNT,
|
| 12 |
'Must be greater than or equal to 0.',
|
|
@@ -60,4 +60,9 @@ class HpsInputValidation
|
|
| 60 |
);
|
| 61 |
}
|
| 62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 6 |
|
| 7 |
public static function checkAmount($amount)
|
| 8 |
{
|
| 9 |
+
if ($amount < 0 || $amount === null) {
|
| 10 |
throw new HpsInvalidRequestException(
|
| 11 |
HpsExceptionCodes::INVALID_AMOUNT,
|
| 12 |
'Must be greater than or equal to 0.',
|
| 60 |
);
|
| 61 |
}
|
| 62 |
}
|
| 63 |
+
|
| 64 |
+
public static function cleanAscii($text)
|
| 65 |
+
{
|
| 66 |
+
return preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $text);
|
| 67 |
+
}
|
| 68 |
}
|
lib/SecureSubmit/src/Infrastructure/Validation/HpsIssuerResponseValidation.php
CHANGED
|
@@ -57,6 +57,7 @@ class HpsIssuerResponseValidation
|
|
| 57 |
'10' => HpsExceptionCodes::PROCESSING_ERROR,
|
| 58 |
'9' => HpsExceptionCodes::INVALID_AMOUNT,
|
| 59 |
'13' => HpsExceptionCodes::PARTIAL_APPROVAL,
|
|
|
|
| 60 |
);
|
| 61 |
|
| 62 |
public static $_creditExceptionCodeToMessage = array(
|
|
@@ -64,7 +65,7 @@ class HpsIssuerResponseValidation
|
|
| 64 |
HpsExceptionCodes::PROCESSING_ERROR => "An error occurred while processing the card.",
|
| 65 |
HpsExceptionCodes::INVALID_AMOUNT => "Must be greater than or equal 0.",
|
| 66 |
HpsExceptionCodes::EXPIRED_CARD => "The card has expired.",
|
| 67 |
-
HpsExceptionCodes::INVALID_PIN => "The
|
| 68 |
HpsExceptionCodes::PIN_ENTRIES_EXCEEDED => "Maximum number of pin retries exceeded.",
|
| 69 |
HpsExceptionCodes::INVALID_EXPIRY => "Card expiration date is invalid.",
|
| 70 |
HpsExceptionCodes::PIN_VERIFICATION => "Can't verify card pin number.",
|
| 57 |
'10' => HpsExceptionCodes::PROCESSING_ERROR,
|
| 58 |
'9' => HpsExceptionCodes::INVALID_AMOUNT,
|
| 59 |
'13' => HpsExceptionCodes::PARTIAL_APPROVAL,
|
| 60 |
+
'14' => HpsExceptionCodes::INVALID_PIN,
|
| 61 |
);
|
| 62 |
|
| 63 |
public static $_creditExceptionCodeToMessage = array(
|
| 65 |
HpsExceptionCodes::PROCESSING_ERROR => "An error occurred while processing the card.",
|
| 66 |
HpsExceptionCodes::INVALID_AMOUNT => "Must be greater than or equal 0.",
|
| 67 |
HpsExceptionCodes::EXPIRED_CARD => "The card has expired.",
|
| 68 |
+
HpsExceptionCodes::INVALID_PIN => "The pin is invalid.",
|
| 69 |
HpsExceptionCodes::PIN_ENTRIES_EXCEEDED => "Maximum number of pin retries exceeded.",
|
| 70 |
HpsExceptionCodes::INVALID_EXPIRY => "Card expiration date is invalid.",
|
| 71 |
HpsExceptionCodes::PIN_VERIFICATION => "Can't verify card pin number.",
|
lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceAuthorizeBuilder.php
CHANGED
|
@@ -83,6 +83,8 @@ class HpsCreditServiceAuthorizeBuilder extends HpsBuilderAbstract
|
|
| 83 |
/** @var HpsDirectMarketData|null */
|
| 84 |
protected $directMarketData = null;
|
| 85 |
|
|
|
|
|
|
|
| 86 |
/**
|
| 87 |
* Instatiates a new HpsCreditServiceAuthorizeBuilder
|
| 88 |
*
|
|
@@ -184,6 +186,10 @@ class HpsCreditServiceAuthorizeBuilder extends HpsBuilderAbstract
|
|
| 184 |
$hpsBlock1->appendChild($refElement);
|
| 185 |
}
|
| 186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
$hpsCreditAuth->appendChild($hpsBlock1);
|
| 188 |
$hpsTransaction->appendChild($hpsCreditAuth);
|
| 189 |
|
| 83 |
/** @var HpsDirectMarketData|null */
|
| 84 |
protected $directMarketData = null;
|
| 85 |
|
| 86 |
+
protected $secureEcommerce = null;
|
| 87 |
+
|
| 88 |
/**
|
| 89 |
* Instatiates a new HpsCreditServiceAuthorizeBuilder
|
| 90 |
*
|
| 186 |
$hpsBlock1->appendChild($refElement);
|
| 187 |
}
|
| 188 |
|
| 189 |
+
if ($this->secureEcommerce != null) {
|
| 190 |
+
$hpsBlock1->appendChild($this->service->_hydrateSecureEcommerce($this->secureEcommerce, $xml));
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
$hpsCreditAuth->appendChild($hpsBlock1);
|
| 194 |
$hpsTransaction->appendChild($hpsCreditAuth);
|
| 195 |
|
lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceChargeBuilder.php
CHANGED
|
@@ -66,7 +66,7 @@ class HpsCreditServiceChargeBuilder extends HpsBuilderAbstract
|
|
| 66 |
protected $readerPresent = false;
|
| 67 |
|
| 68 |
protected $originalTxnReferenceData = null;
|
| 69 |
-
protected $
|
| 70 |
|
| 71 |
/**
|
| 72 |
* Instatiates a new HpsCreditServiceChargeBuilder
|
|
@@ -168,8 +168,8 @@ class HpsCreditServiceChargeBuilder extends HpsBuilderAbstract
|
|
| 168 |
|
| 169 |
$hpsBlock1->appendChild($cardData);
|
| 170 |
|
| 171 |
-
if ($this->
|
| 172 |
-
$hpsBlock1->appendChild($this->service->_hydrateSecureEcommerce($this->
|
| 173 |
}
|
| 174 |
|
| 175 |
$hpsCreditSale->appendChild($hpsBlock1);
|
| 66 |
protected $readerPresent = false;
|
| 67 |
|
| 68 |
protected $originalTxnReferenceData = null;
|
| 69 |
+
protected $secureEcommerce = null;
|
| 70 |
|
| 71 |
/**
|
| 72 |
* Instatiates a new HpsCreditServiceChargeBuilder
|
| 168 |
|
| 169 |
$hpsBlock1->appendChild($cardData);
|
| 170 |
|
| 171 |
+
if ($this->secureEcommerce != null) {
|
| 172 |
+
$hpsBlock1->appendChild($this->service->_hydrateSecureEcommerce($this->secureEcommerce, $xml));
|
| 173 |
}
|
| 174 |
|
| 175 |
$hpsCreditSale->appendChild($hpsBlock1);
|
lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServicePrepaidAddValueBuilder.php
CHANGED
|
@@ -63,9 +63,7 @@ class HpsCreditServicePrepaidAddValueBuilder extends HpsBuilderAbstract
|
|
| 63 |
} else if ($this->trackData != null) {
|
| 64 |
$cardData->appendChild($this->service->_hydrateTrackData($this->trackData, $xml));
|
| 65 |
} else if ($this->token != null) {
|
| 66 |
-
$
|
| 67 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $this->token->tokenValue));
|
| 68 |
-
$cardData->appendChild($tokenData);
|
| 69 |
}
|
| 70 |
|
| 71 |
$hpsBlock1->appendChild($cardData);
|
| 63 |
} else if ($this->trackData != null) {
|
| 64 |
$cardData->appendChild($this->service->_hydrateTrackData($this->trackData, $xml));
|
| 65 |
} else if ($this->token != null) {
|
| 66 |
+
$cardData->appendChild($this->service->_hydrateTokenData($this->token, $xm));
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
|
| 69 |
$hpsBlock1->appendChild($cardData);
|
lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServicePrepaidBalanceInquiryBuilder.php
CHANGED
|
@@ -52,9 +52,7 @@ class HpsCreditServicePrepaidBalanceInquiryBuilder extends HpsBuilderAbstract
|
|
| 52 |
} else if ($this->trackData != null) {
|
| 53 |
$cardData->appendChild($this->service->_hydrateTrackData($this->trackData, $xml));
|
| 54 |
} else if ($this->token != null) {
|
| 55 |
-
$
|
| 56 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $this->token->tokenValue));
|
| 57 |
-
$cardData->appendChild($tokenData);
|
| 58 |
}
|
| 59 |
$hpsBlock1->appendChild($cardData);
|
| 60 |
|
| 52 |
} else if ($this->trackData != null) {
|
| 53 |
$cardData->appendChild($this->service->_hydrateTrackData($this->trackData, $xml));
|
| 54 |
} else if ($this->token != null) {
|
| 55 |
+
$cardData->appendChild($this->service->_hydrateTokenData($this->token, $xml));
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
$hpsBlock1->appendChild($cardData);
|
| 58 |
|
lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceRecurringBuilder.php
CHANGED
|
@@ -71,21 +71,19 @@ class HpsCreditServiceRecurringBuilder extends HpsBuilderAbstract
|
|
| 71 |
$hpsBlock1->appendChild($xml->createElement('hps:AllowDup', 'Y'));
|
| 72 |
$hpsBlock1->appendChild($xml->createElement('hps:Amt', $this->amount));
|
| 73 |
if ($this->cardHolder != null) {
|
| 74 |
-
$hpsBlock1->appendChild($this->_hydrateCardHolderData($this->cardHolder, $xml));
|
| 75 |
}
|
| 76 |
if ($this->details != null) {
|
| 77 |
-
$hpsBlock1->appendChild($this->_hydrateAdditionalTxnFields($this->details, $xml));
|
| 78 |
}
|
| 79 |
|
| 80 |
if ($this->card != null) {
|
| 81 |
$cardData = $xml->createElement('hps:CardData');
|
| 82 |
-
$cardData->appendChild($this->_hydrateManualEntry($this->card, $xml));
|
| 83 |
$hpsBlock1->appendChild($cardData);
|
| 84 |
} else if ($this->token != null) {
|
| 85 |
$cardData = $xml->createElement('hps:CardData');
|
| 86 |
-
$
|
| 87 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $this->token->tokenValue));
|
| 88 |
-
$cardData->appendChild($tokenData);
|
| 89 |
$hpsBlock1->appendChild($cardData);
|
| 90 |
} else if ($this->paymentMethodKey != null) {
|
| 91 |
$hpsBlock1->appendChild($xml->createElement('hps:PaymentMethodKey', $this->paymentMethodKey));
|
| 71 |
$hpsBlock1->appendChild($xml->createElement('hps:AllowDup', 'Y'));
|
| 72 |
$hpsBlock1->appendChild($xml->createElement('hps:Amt', $this->amount));
|
| 73 |
if ($this->cardHolder != null) {
|
| 74 |
+
$hpsBlock1->appendChild($this->service->_hydrateCardHolderData($this->cardHolder, $xml));
|
| 75 |
}
|
| 76 |
if ($this->details != null) {
|
| 77 |
+
$hpsBlock1->appendChild($this->service->_hydrateAdditionalTxnFields($this->details, $xml));
|
| 78 |
}
|
| 79 |
|
| 80 |
if ($this->card != null) {
|
| 81 |
$cardData = $xml->createElement('hps:CardData');
|
| 82 |
+
$cardData->appendChild($this->service->_hydrateManualEntry($this->card, $xml));
|
| 83 |
$hpsBlock1->appendChild($cardData);
|
| 84 |
} else if ($this->token != null) {
|
| 85 |
$cardData = $xml->createElement('hps:CardData');
|
| 86 |
+
$cardData->appendChild($this->service->_hydrateTokenData($this->token, $xml));
|
|
|
|
|
|
|
| 87 |
$hpsBlock1->appendChild($cardData);
|
| 88 |
} else if ($this->paymentMethodKey != null) {
|
| 89 |
$hpsBlock1->appendChild($xml->createElement('hps:PaymentMethodKey', $this->paymentMethodKey));
|
lib/SecureSubmit/src/Services/Fluent/Gateway/Credit/HpsCreditServiceUpdateTokenExpirationBuilder.php
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
* @method HpsCreditServiceChargeBuilder withToken( $token)
|
| 5 |
+
* @method HpsCreditServiceUpdateTokenExpirationBuilder withExpMonth(string $transactionId)
|
| 6 |
+
* @method HpsCreditServiceUpdateTokenExpirationBuilder withExpYear(string $transactionId)
|
| 7 |
+
*/
|
| 8 |
+
class HpsCreditServiceUpdateTokenExpirationBuilder extends HpsBuilderAbstract
|
| 9 |
+
{
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
/** @var HpsTokenData|null */
|
| 13 |
+
protected $token = null;
|
| 14 |
+
/**
|
| 15 |
+
* @var int
|
| 16 |
+
*/
|
| 17 |
+
protected $expMonth = 0;
|
| 18 |
+
/**
|
| 19 |
+
* @var int
|
| 20 |
+
*/
|
| 21 |
+
protected $expYear = 0;
|
| 22 |
+
/**
|
| 23 |
+
* Instatiates a new HpsCreditServiceEditBuilder
|
| 24 |
+
*
|
| 25 |
+
* @param HpsSoapGatewayService $service
|
| 26 |
+
*/
|
| 27 |
+
public function __construct(HpsSoapGatewayService $service)
|
| 28 |
+
{
|
| 29 |
+
parent::__construct($service);
|
| 30 |
+
$this->setUpValidations();
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* Creates an edit transaction through the HpsCreditService
|
| 35 |
+
*/
|
| 36 |
+
public function execute()
|
| 37 |
+
{
|
| 38 |
+
parent::execute();
|
| 39 |
+
$xml = new DOMDocument();
|
| 40 |
+
$hpsTransaction = $xml->createElement('hps:Transaction');
|
| 41 |
+
$hpsManageTokens = $xml->createElement('hps:ManageTokens');
|
| 42 |
+
|
| 43 |
+
$hpsManageTokens->appendChild($xml->createElement('hps:TokenValue', trim((string)$this->token)));
|
| 44 |
+
|
| 45 |
+
$hpsTokenActions = $xml->createElement('hps:TokenActions');
|
| 46 |
+
$hpsSet = $xml->createElement('hps:Set');
|
| 47 |
+
$hpsAttribute = $xml->createElement('hps:Attribute');
|
| 48 |
+
|
| 49 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Name', 'ExpMonth'));
|
| 50 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Value', (string)sprintf("%'.02d", (int)$this->expMonth)));
|
| 51 |
+
|
| 52 |
+
$hpsSet->appendChild($hpsAttribute);
|
| 53 |
+
|
| 54 |
+
$hpsAttribute = $xml->createElement('hps:Attribute');
|
| 55 |
+
|
| 56 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Name', 'ExpYear'));
|
| 57 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Value', (string)$this->expYear));
|
| 58 |
+
|
| 59 |
+
$hpsSet->appendChild($hpsAttribute);
|
| 60 |
+
|
| 61 |
+
$hpsTokenActions->appendChild($hpsSet);
|
| 62 |
+
|
| 63 |
+
$hpsManageTokens->appendChild($hpsTokenActions);
|
| 64 |
+
|
| 65 |
+
$hpsTransaction->appendChild($hpsManageTokens);
|
| 66 |
+
$trans = $this->service->_submitTransaction($hpsTransaction, 'ManageTokens', null);
|
| 67 |
+
|
| 68 |
+
$trans->responseCode = '00';
|
| 69 |
+
$trans->responseText = '';
|
| 70 |
+
|
| 71 |
+
return $trans;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
/**
|
| 75 |
+
* Setups up validations for building edits.
|
| 76 |
+
*
|
| 77 |
+
* @return null
|
| 78 |
+
*/
|
| 79 |
+
private function setUpValidations()
|
| 80 |
+
{
|
| 81 |
+
$this
|
| 82 |
+
->addValidation(array($this, 'tokenNotNull'), 'HpsArgumentException', 'Edit needs a multi use token value');
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
/**
|
| 86 |
+
* Ensures a token has been set.
|
| 87 |
+
*
|
| 88 |
+
* @param array $actionCounts
|
| 89 |
+
*
|
| 90 |
+
* @return bool
|
| 91 |
+
*/
|
| 92 |
+
protected function tokenNotNull($actionCounts)
|
| 93 |
+
{
|
| 94 |
+
return isset($actionCounts['token']);
|
| 95 |
+
}
|
| 96 |
+
}
|
lib/SecureSubmit/src/Services/Fluent/Gateway/HpsFluentCreditService.php
CHANGED
|
@@ -48,6 +48,13 @@ class HpsFluentCreditService extends HpsSoapGatewayService
|
|
| 48 |
return new HpsCreditServiceEditBuilder($this);
|
| 49 |
}
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
public function get($transactionId = null)
|
| 52 |
{
|
| 53 |
$builder = new HpsCreditServiceGetBuilder($this);
|
|
@@ -256,6 +263,9 @@ class HpsFluentCreditService extends HpsSoapGatewayService
|
|
| 256 |
case 'CreditOfflineAuth':
|
| 257 |
$rvalue = HpsOfflineAuthorization::fromDict($response, $txnType);
|
| 258 |
break;
|
|
|
|
|
|
|
|
|
|
| 259 |
default:
|
| 260 |
break;
|
| 261 |
}
|
| 48 |
return new HpsCreditServiceEditBuilder($this);
|
| 49 |
}
|
| 50 |
|
| 51 |
+
public function updateTokenExpiration()
|
| 52 |
+
{
|
| 53 |
+
$builder = new HpsCreditServiceUpdateTokenExpirationBuilder($this);
|
| 54 |
+
//print_r($builder);
|
| 55 |
+
return $builder;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
public function get($transactionId = null)
|
| 59 |
{
|
| 60 |
$builder = new HpsCreditServiceGetBuilder($this);
|
| 263 |
case 'CreditOfflineAuth':
|
| 264 |
$rvalue = HpsOfflineAuthorization::fromDict($response, $txnType);
|
| 265 |
break;
|
| 266 |
+
case 'ManageTokens':
|
| 267 |
+
$rvalue = HpsManageTokensResponse::fromDict($response, $txnType);
|
| 268 |
+
break;
|
| 269 |
default:
|
| 270 |
break;
|
| 271 |
}
|
lib/SecureSubmit/src/Services/Gateway/AltPayment/HpsAltPaymentService.php
CHANGED
|
@@ -5,7 +5,7 @@ class HpsAltPaymentService extends HpsSoapGatewayService
|
|
| 5 |
/** @var string|null */
|
| 6 |
protected $_transactionType = null;
|
| 7 |
|
| 8 |
-
public function authorize($sessionId, $amount, $currency, HpsBuyerData $buyer, HpsPaymentData $payment, HpsShippingInfo $shippingAddress = null, $lineItems = null)
|
| 9 |
{
|
| 10 |
HpsInputValidation::checkAmount($amount);
|
| 11 |
HpsInputValidation::checkCurrency($currency);
|
|
@@ -53,7 +53,7 @@ class HpsAltPaymentService extends HpsSoapGatewayService
|
|
| 53 |
return $this->_submitTransaction($transaction, 'AltPaymentCapture');
|
| 54 |
}
|
| 55 |
|
| 56 |
-
public function createSession($amount, $currency, HpsBuyerData $buyer, HpsPaymentData $payment, HpsShippingInfo $shippingAddress = null, $lineItems = null)
|
| 57 |
{
|
| 58 |
HpsInputValidation::checkAmount($amount);
|
| 59 |
HpsInputValidation::checkCurrency($currency);
|
|
@@ -101,7 +101,7 @@ class HpsAltPaymentService extends HpsSoapGatewayService
|
|
| 101 |
return $this->_submitTransaction($transaction, 'AltPaymentReturn');
|
| 102 |
}
|
| 103 |
|
| 104 |
-
public function sale($sessionId, $amount, $currency, HpsBuyerData $buyer, HpsPaymentData $payment, HpsShippingInfo $shippingAddress = null, $lineItems = null)
|
| 105 |
{
|
| 106 |
HpsInputValidation::checkAmount($amount);
|
| 107 |
HpsInputValidation::checkCurrency($currency);
|
|
@@ -226,7 +226,7 @@ class HpsAltPaymentService extends HpsSoapGatewayService
|
|
| 226 |
{
|
| 227 |
$nvp = $xml->createElement('hps:NameValuePair');
|
| 228 |
$nvp->appendChild($xml->createElement('hps:Name', $name));
|
| 229 |
-
$nvp->appendChild($xml->createElement('hps:Value', $value));
|
| 230 |
return $nvp;
|
| 231 |
}
|
| 232 |
|
|
@@ -254,27 +254,12 @@ class HpsAltPaymentService extends HpsSoapGatewayService
|
|
| 254 |
$shipping = $xml->createElement('hps:Shipping');
|
| 255 |
$address = $xml->createElement('hps:Address');
|
| 256 |
$address->appendChild($this->hydrateNameValuePair('AllowAddressOverride', 'false', $xml));
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
if (isset($info->address->address2)) {
|
| 264 |
-
$address->appendChild($this->hydrateNameValuePair('ShipAddress2', $info->address->address2, $xml));
|
| 265 |
-
}
|
| 266 |
-
if (isset($info->address->city)) {
|
| 267 |
-
$address->appendChild($this->hydrateNameValuePair('ShipCity', $info->address->city, $xml));
|
| 268 |
-
}
|
| 269 |
-
if (isset($info->address->state)) {
|
| 270 |
-
$address->appendChild($this->hydrateNameValuePair('ShipState', $info->address->state, $xml));
|
| 271 |
-
}
|
| 272 |
-
if (isset($info->address->zip)) {
|
| 273 |
-
$address->appendChild($this->hydrateNameValuePair('ShipZip', $info->address->zip, $xml));
|
| 274 |
-
}
|
| 275 |
-
if (isset($info->address->country)) {
|
| 276 |
-
$address->appendChild($this->hydrateNameValuePair('ShipCountryCode', $info->address->country, $xml));
|
| 277 |
-
}
|
| 278 |
$shipping->appendChild($address);
|
| 279 |
return $shipping;
|
| 280 |
}
|
|
@@ -290,7 +275,7 @@ class HpsAltPaymentService extends HpsSoapGatewayService
|
|
| 290 |
|
| 291 |
if ($gatewayRspCode == '30') {
|
| 292 |
try {
|
| 293 |
-
$this->
|
| 294 |
} catch (Exception $e) {
|
| 295 |
throw new HpsGatewayException(
|
| 296 |
HpsExceptionCodes::GATEWAY_TIMEOUT_REVERSAL_ERROR,
|
| 5 |
/** @var string|null */
|
| 6 |
protected $_transactionType = null;
|
| 7 |
|
| 8 |
+
public function authorize($sessionId, $amount, $currency, HpsBuyerData $buyer = null, HpsPaymentData $payment = null, HpsShippingInfo $shippingAddress = null, $lineItems = null)
|
| 9 |
{
|
| 10 |
HpsInputValidation::checkAmount($amount);
|
| 11 |
HpsInputValidation::checkCurrency($currency);
|
| 53 |
return $this->_submitTransaction($transaction, 'AltPaymentCapture');
|
| 54 |
}
|
| 55 |
|
| 56 |
+
public function createSession($amount, $currency, HpsBuyerData $buyer = null, HpsPaymentData $payment = null, HpsShippingInfo $shippingAddress = null, $lineItems = null)
|
| 57 |
{
|
| 58 |
HpsInputValidation::checkAmount($amount);
|
| 59 |
HpsInputValidation::checkCurrency($currency);
|
| 101 |
return $this->_submitTransaction($transaction, 'AltPaymentReturn');
|
| 102 |
}
|
| 103 |
|
| 104 |
+
public function sale($sessionId, $amount, $currency, HpsBuyerData $buyer = null, HpsPaymentData $payment = null, HpsShippingInfo $shippingAddress = null, $lineItems = null)
|
| 105 |
{
|
| 106 |
HpsInputValidation::checkAmount($amount);
|
| 107 |
HpsInputValidation::checkCurrency($currency);
|
| 226 |
{
|
| 227 |
$nvp = $xml->createElement('hps:NameValuePair');
|
| 228 |
$nvp->appendChild($xml->createElement('hps:Name', $name));
|
| 229 |
+
$nvp->appendChild($xml->createElement('hps:Value', HpsInputValidation::cleanAscii($value)));
|
| 230 |
return $nvp;
|
| 231 |
}
|
| 232 |
|
| 254 |
$shipping = $xml->createElement('hps:Shipping');
|
| 255 |
$address = $xml->createElement('hps:Address');
|
| 256 |
$address->appendChild($this->hydrateNameValuePair('AllowAddressOverride', 'false', $xml));
|
| 257 |
+
$address->appendChild($this->hydrateNameValuePair('ShipName', $info->name, $xml));
|
| 258 |
+
$address->appendChild($this->hydrateNameValuePair('ShipAddress', $info->address->address, $xml));
|
| 259 |
+
$address->appendChild($this->hydrateNameValuePair('ShipCity', $info->address->city, $xml));
|
| 260 |
+
$address->appendChild($this->hydrateNameValuePair('ShipState', $info->address->state, $xml));
|
| 261 |
+
$address->appendChild($this->hydrateNameValuePair('ShipZip', $info->address->zip, $xml));
|
| 262 |
+
$address->appendChild($this->hydrateNameValuePair('ShipCountryCode', $info->address->country, $xml));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
$shipping->appendChild($address);
|
| 264 |
return $shipping;
|
| 265 |
}
|
| 275 |
|
| 276 |
if ($gatewayRspCode == '30') {
|
| 277 |
try {
|
| 278 |
+
$this->void($transactionId);
|
| 279 |
} catch (Exception $e) {
|
| 280 |
throw new HpsGatewayException(
|
| 281 |
HpsExceptionCodes::GATEWAY_TIMEOUT_REVERSAL_ERROR,
|
lib/SecureSubmit/src/Services/Gateway/AltPayment/HpsMasterPassService.php
CHANGED
|
@@ -36,6 +36,8 @@ class HpsMasterPassService
|
|
| 36 |
*
|
| 37 |
* @param string $orderId order id from Cardinal
|
| 38 |
* @param HpsOrderData $orderData Cardinal/MasterPass specific data
|
|
|
|
|
|
|
| 39 |
*/
|
| 40 |
public function addOrderNumber(
|
| 41 |
$orderId,
|
|
@@ -84,16 +86,16 @@ class HpsMasterPassService
|
|
| 84 |
'TransactionType' => 'WT',
|
| 85 |
);
|
| 86 |
|
| 87 |
-
if ($orderData->checkoutType === HpsCentinelCheckoutType::PAIRING
|
| 88 |
-
$orderData->checkoutType === HpsCentinelCheckoutType::PAIRING_CHECKOUT
|
| 89 |
) {
|
| 90 |
$data['PairingToken'] = $orderData->pairingToken;
|
| 91 |
$data['PairingVerifier'] = $orderData->pairingVerifier;
|
| 92 |
}
|
| 93 |
|
| 94 |
-
if ($orderData->checkoutType === null
|
| 95 |
-
$orderData->checkoutType === HpsCentinelCheckoutType::LIGHTBOX
|
| 96 |
-
$orderData->checkoutType === HpsCentinelCheckoutType::PAIRING_CHECKOUT
|
| 97 |
) {
|
| 98 |
$data['CheckoutResourceUrl'] = $resourceUrl;
|
| 99 |
$data['OAuthToken'] = $oauthToken;
|
|
@@ -147,7 +149,10 @@ class HpsMasterPassService
|
|
| 147 |
$payload = array_merge($payload, $this->hydratePaymentData($payment));
|
| 148 |
}
|
| 149 |
if ($shippingAddress !== null) {
|
| 150 |
-
$payload = array_merge(
|
|
|
|
|
|
|
|
|
|
| 151 |
}
|
| 152 |
if ($lineItems !== null) {
|
| 153 |
$payload = array_merge($payload, $this->hydrateLineItems($lineItems));
|
|
@@ -174,7 +179,9 @@ class HpsMasterPassService
|
|
| 174 |
) {
|
| 175 |
$payload = array(
|
| 176 |
'Amount' => $this->formatAmount($amount),
|
| 177 |
-
'CurrencyCode' => $this->currencyStringToNumeric(
|
|
|
|
|
|
|
| 178 |
'OrderId' => $orderId,
|
| 179 |
'OrderNumber' => $orderData->orderNumber,
|
| 180 |
'TransactionType' => 'WT',
|
|
@@ -208,8 +215,8 @@ class HpsMasterPassService
|
|
| 208 |
public function createSession(
|
| 209 |
$amount,
|
| 210 |
$currency,
|
| 211 |
-
HpsBuyerData $buyer,
|
| 212 |
-
HpsPaymentData $payment,
|
| 213 |
HpsShippingInfo $shippingAddress = null,
|
| 214 |
$lineItems = null,
|
| 215 |
HpsOrderData $orderData = null
|
|
@@ -239,7 +246,10 @@ class HpsMasterPassService
|
|
| 239 |
$payload = array_merge($payload, $this->hydratePaymentData($payment));
|
| 240 |
}
|
| 241 |
if ($shippingAddress !== null) {
|
| 242 |
-
$payload = array_merge(
|
|
|
|
|
|
|
|
|
|
| 243 |
}
|
| 244 |
if ($lineItems !== null) {
|
| 245 |
$payload = array_merge($payload, $this->hydrateLineItems($lineItems));
|
|
@@ -273,10 +283,10 @@ class HpsMasterPassService
|
|
| 273 |
* settlement amount. Multiple refunds can be processed against the original
|
| 274 |
* capture transaction.
|
| 275 |
*
|
| 276 |
-
* @param string $orderId
|
| 277 |
-
* @param boolean $isPartial
|
| 278 |
-
* @param string $
|
| 279 |
-
* @param HpsOrderData $orderData
|
| 280 |
*
|
| 281 |
* @return object
|
| 282 |
*/
|
|
@@ -288,7 +298,9 @@ class HpsMasterPassService
|
|
| 288 |
) {
|
| 289 |
$payload = array(
|
| 290 |
'Amount' => $this->formatAmount($amount),
|
| 291 |
-
'CurrencyCode' => $this->currencyStringToNumeric(
|
|
|
|
|
|
|
| 292 |
'OrderId' => $orderId,
|
| 293 |
'TransactionType' => 'WT',
|
| 294 |
);
|
|
@@ -320,8 +332,8 @@ class HpsMasterPassService
|
|
| 320 |
$orderId,
|
| 321 |
$amount,
|
| 322 |
$currency,
|
| 323 |
-
HpsBuyerData $buyer,
|
| 324 |
-
HpsPaymentData $payment,
|
| 325 |
HpsShippingInfo $shippingAddress = null,
|
| 326 |
$lineItems = null,
|
| 327 |
HpsOrderData $orderData = null
|
|
@@ -384,9 +396,18 @@ class HpsMasterPassService
|
|
| 384 |
) {
|
| 385 |
}
|
| 386 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
protected function getCheckoutType(HpsOrderData $orderData)
|
| 388 |
{
|
| 389 |
-
return isset($orderData->checkoutType)
|
|
|
|
|
|
|
| 390 |
}
|
| 391 |
|
| 392 |
/**
|
|
@@ -419,7 +440,6 @@ class HpsMasterPassService
|
|
| 419 |
{
|
| 420 |
return array(
|
| 421 |
'BillingAddress1' => $buyer->address->address,
|
| 422 |
-
'BillingAddress2' => $buyer->address->address2,
|
| 423 |
'BillingCity' => $buyer->address->city,
|
| 424 |
'BillingCountryCode' => $buyer->countryCode,
|
| 425 |
'BillingFirstName' => $buyer->firstName,
|
|
@@ -487,7 +507,6 @@ class HpsMasterPassService
|
|
| 487 |
{
|
| 488 |
return array(
|
| 489 |
'ShippingAddress1' => $shipping->address->address,
|
| 490 |
-
'ShippingAddress2' => $shipping->address->address2,
|
| 491 |
'ShippingCity' => $shipping->address->city,
|
| 492 |
'ShippingCountryCode' => $shipping->countryCode,
|
| 493 |
'ShippingFirstName' => $shipping->firstName,
|
|
@@ -502,7 +521,7 @@ class HpsMasterPassService
|
|
| 502 |
/**
|
| 503 |
* Formats the amount in form of cents
|
| 504 |
*
|
| 505 |
-
* @param mixed $amount
|
| 506 |
*
|
| 507 |
* @return string
|
| 508 |
*/
|
| 36 |
*
|
| 37 |
* @param string $orderId order id from Cardinal
|
| 38 |
* @param HpsOrderData $orderData Cardinal/MasterPass specific data
|
| 39 |
+
*
|
| 40 |
+
* @return object
|
| 41 |
*/
|
| 42 |
public function addOrderNumber(
|
| 43 |
$orderId,
|
| 86 |
'TransactionType' => 'WT',
|
| 87 |
);
|
| 88 |
|
| 89 |
+
if ($orderData->checkoutType === HpsCentinelCheckoutType::PAIRING
|
| 90 |
+
|| $orderData->checkoutType === HpsCentinelCheckoutType::PAIRING_CHECKOUT
|
| 91 |
) {
|
| 92 |
$data['PairingToken'] = $orderData->pairingToken;
|
| 93 |
$data['PairingVerifier'] = $orderData->pairingVerifier;
|
| 94 |
}
|
| 95 |
|
| 96 |
+
if ($orderData->checkoutType === null
|
| 97 |
+
|| $orderData->checkoutType === HpsCentinelCheckoutType::LIGHTBOX
|
| 98 |
+
|| $orderData->checkoutType === HpsCentinelCheckoutType::PAIRING_CHECKOUT
|
| 99 |
) {
|
| 100 |
$data['CheckoutResourceUrl'] = $resourceUrl;
|
| 101 |
$data['OAuthToken'] = $oauthToken;
|
| 149 |
$payload = array_merge($payload, $this->hydratePaymentData($payment));
|
| 150 |
}
|
| 151 |
if ($shippingAddress !== null) {
|
| 152 |
+
$payload = array_merge(
|
| 153 |
+
$payload,
|
| 154 |
+
$this->hydrateShippingInfo($shippingAddress)
|
| 155 |
+
);
|
| 156 |
}
|
| 157 |
if ($lineItems !== null) {
|
| 158 |
$payload = array_merge($payload, $this->hydrateLineItems($lineItems));
|
| 179 |
) {
|
| 180 |
$payload = array(
|
| 181 |
'Amount' => $this->formatAmount($amount),
|
| 182 |
+
'CurrencyCode' => $this->currencyStringToNumeric(
|
| 183 |
+
$orderData->currencyCode
|
| 184 |
+
),
|
| 185 |
'OrderId' => $orderId,
|
| 186 |
'OrderNumber' => $orderData->orderNumber,
|
| 187 |
'TransactionType' => 'WT',
|
| 215 |
public function createSession(
|
| 216 |
$amount,
|
| 217 |
$currency,
|
| 218 |
+
HpsBuyerData $buyer = null,
|
| 219 |
+
HpsPaymentData $payment = null,
|
| 220 |
HpsShippingInfo $shippingAddress = null,
|
| 221 |
$lineItems = null,
|
| 222 |
HpsOrderData $orderData = null
|
| 246 |
$payload = array_merge($payload, $this->hydratePaymentData($payment));
|
| 247 |
}
|
| 248 |
if ($shippingAddress !== null) {
|
| 249 |
+
$payload = array_merge(
|
| 250 |
+
$payload,
|
| 251 |
+
$this->hydrateShippingInfo($shippingAddress)
|
| 252 |
+
);
|
| 253 |
}
|
| 254 |
if ($lineItems !== null) {
|
| 255 |
$payload = array_merge($payload, $this->hydrateLineItems($lineItems));
|
| 283 |
* settlement amount. Multiple refunds can be processed against the original
|
| 284 |
* capture transaction.
|
| 285 |
*
|
| 286 |
+
* @param string $orderId order id from Cardinal
|
| 287 |
+
* @param boolean $isPartial flag for partial refund
|
| 288 |
+
* @param string $amount amount to be refunded
|
| 289 |
+
* @param HpsOrderData $orderData Cardinal/MasterPass specific data
|
| 290 |
*
|
| 291 |
* @return object
|
| 292 |
*/
|
| 298 |
) {
|
| 299 |
$payload = array(
|
| 300 |
'Amount' => $this->formatAmount($amount),
|
| 301 |
+
'CurrencyCode' => $this->currencyStringToNumeric(
|
| 302 |
+
$orderData->currencyCode
|
| 303 |
+
),
|
| 304 |
'OrderId' => $orderId,
|
| 305 |
'TransactionType' => 'WT',
|
| 306 |
);
|
| 332 |
$orderId,
|
| 333 |
$amount,
|
| 334 |
$currency,
|
| 335 |
+
HpsBuyerData $buyer = null,
|
| 336 |
+
HpsPaymentData $payment = null,
|
| 337 |
HpsShippingInfo $shippingAddress = null,
|
| 338 |
$lineItems = null,
|
| 339 |
HpsOrderData $orderData = null
|
| 396 |
) {
|
| 397 |
}
|
| 398 |
|
| 399 |
+
/**
|
| 400 |
+
* Gets checkout type from `$orderData` or `lightbox` if not set
|
| 401 |
+
*
|
| 402 |
+
* @param HpsOrderData $orderData the order data
|
| 403 |
+
*
|
| 404 |
+
* @return string
|
| 405 |
+
*/
|
| 406 |
protected function getCheckoutType(HpsOrderData $orderData)
|
| 407 |
{
|
| 408 |
+
return isset($orderData->checkoutType)
|
| 409 |
+
? $orderData->checkoutType
|
| 410 |
+
: 'lightbox';
|
| 411 |
}
|
| 412 |
|
| 413 |
/**
|
| 440 |
{
|
| 441 |
return array(
|
| 442 |
'BillingAddress1' => $buyer->address->address,
|
|
|
|
| 443 |
'BillingCity' => $buyer->address->city,
|
| 444 |
'BillingCountryCode' => $buyer->countryCode,
|
| 445 |
'BillingFirstName' => $buyer->firstName,
|
| 507 |
{
|
| 508 |
return array(
|
| 509 |
'ShippingAddress1' => $shipping->address->address,
|
|
|
|
| 510 |
'ShippingCity' => $shipping->address->city,
|
| 511 |
'ShippingCountryCode' => $shipping->countryCode,
|
| 512 |
'ShippingFirstName' => $shipping->firstName,
|
| 521 |
/**
|
| 522 |
* Formats the amount in form of cents
|
| 523 |
*
|
| 524 |
+
* @param mixed $amount amount to be formatted
|
| 525 |
*
|
| 526 |
* @return string
|
| 527 |
*/
|
lib/SecureSubmit/src/Services/Gateway/HpsAttachmentService.php
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/*
|
| 3 |
+
* https://posgateway.cert.secureexchange.net/Gateway/PorticoSOAPSchema/build/Default/webframe.html#Portico%20Schema_xsd~e-PosRequest~e-Ver1.0~e-Transaction~e-AddAttachment.html
|
| 4 |
+
* Valid if the origional transaction ID is from
|
| 5 |
+
CreditAuth
|
| 6 |
+
CreditOfflineAuth
|
| 7 |
+
CreditSale
|
| 8 |
+
CreditOfflineSale
|
| 9 |
+
CreditReturn
|
| 10 |
+
DebitSale
|
| 11 |
+
GiftCardSale
|
| 12 |
+
GiftCardAddValue
|
| 13 |
+
PrePaidAddValue
|
| 14 |
+
CheckSale
|
| 15 |
+
OverrideFraudDecline
|
| 16 |
+
*/
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Class HpsAttachmentService
|
| 21 |
+
*/
|
| 22 |
+
class HpsAttachmentService extends HpsSoapGatewayService
|
| 23 |
+
{
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* HpsAttachmentService constructor.
|
| 28 |
+
* @param HpsServicesConfig $config
|
| 29 |
+
*/
|
| 30 |
+
public function __construct($config = null)
|
| 31 |
+
{
|
| 32 |
+
parent::__construct($config);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
public function AddAttachment(){
|
| 37 |
+
throw new Exception('Not implemented');
|
| 38 |
+
return null; // not implemented stub
|
| 39 |
+
}
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* @param float $GatewayTxnId this is actually a long but php handles long with float
|
| 44 |
+
* @param HpsAttachmentType $AttachmentType SIGNATURE_IMAGE|RECEIPT_IMAGE|CUSTOMER_IMAGE|PRODUCT_IMAGE|DOCUMENT
|
| 45 |
+
* @param bool $ReturnAttachmentTypesOnly
|
| 46 |
+
* @param null|int $AttachmentDataId
|
| 47 |
+
* @return HpsAttachment
|
| 48 |
+
* @throws HpsArgumentException
|
| 49 |
+
* @throws HpsException
|
| 50 |
+
*/
|
| 51 |
+
public function getAttachments($GatewayTxnId, $AttachmentType = 'all', $ReturnAttachmentTypesOnly = false, $AttachmentDataId = null)
|
| 52 |
+
{
|
| 53 |
+
$GatewayTxnId = filter_var($GatewayTxnId, FILTER_SANITIZE_NUMBER_FLOAT);
|
| 54 |
+
if (!$GatewayTxnId) {
|
| 55 |
+
throw new HpsArgumentException('Gateway Transaction ID required', HpsExceptionCodes::INVALID_NUMBER);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
$AttachmentTypeProvided = preg_match(HpsAttachmentType::VALID_ATTACHMENT_TYPE, $AttachmentType) === 1;
|
| 59 |
+
$AttachmentDataId = filter_var($AttachmentDataId, FILTER_SANITIZE_NUMBER_INT);
|
| 60 |
+
// this is a limitation of the gateway and we want to inform the user
|
| 61 |
+
if ($AttachmentTypeProvided && $AttachmentDataId) {
|
| 62 |
+
throw new HpsGatewayException(HpsExceptionCodes::GATEWAY_ERROR, "Since the AttachmentDataId was provided the AttachmentType was ignored by the server");
|
| 63 |
+
trigger_error("Since the AttachmentDataId was provided the AttachmentType was ignored by the server", E_USER_NOTICE);
|
| 64 |
+
}
|
| 65 |
+
$xml = new DOMDocument();
|
| 66 |
+
$hpsTransaction = $xml->createElement('hps:Transaction');
|
| 67 |
+
|
| 68 |
+
$hpsGetAttachments = $hpsTransaction
|
| 69 |
+
->appendChild($xml->createElement('hps:GetAttachments'));
|
| 70 |
+
|
| 71 |
+
$hpsGetAttachments->appendChild($xml->createElement('hps:GatewayTxnId', $GatewayTxnId));
|
| 72 |
+
|
| 73 |
+
if ($AttachmentTypeProvided) {
|
| 74 |
+
$hpsGetAttachments->appendChild($xml->createElement('hps:AttachmentType', $AttachmentType));
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
if ($ReturnAttachmentTypesOnly === true) {
|
| 78 |
+
$hpsGetAttachments->appendChild($xml->createElement('hps:ReturnAttachmentTypesOnly', 'true'));
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
if ($AttachmentDataId) {
|
| 82 |
+
$hpsGetAttachments->appendChild($xml->createElement('hps:AttachmentDataId', $AttachmentDataId));
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
return $this->_submitTransaction($hpsTransaction, 'GetAttachments');
|
| 86 |
+
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* @param \DOMElement $transaction
|
| 91 |
+
* @param string $txnType
|
| 92 |
+
*
|
| 93 |
+
* @return array|null
|
| 94 |
+
* @throws \HpsException
|
| 95 |
+
* @throws \HpsGatewayException
|
| 96 |
+
*/
|
| 97 |
+
private function _submitTransaction($transaction, $txnType)
|
| 98 |
+
{
|
| 99 |
+
|
| 100 |
+
try {
|
| 101 |
+
$response = $this->doRequest($transaction);
|
| 102 |
+
} catch (HpsException $e) {
|
| 103 |
+
if ($e->innerException != null && $e->innerException->getMessage() == 'gateway_time-out') {
|
| 104 |
+
throw new HpsException('An error occurred and the gateway has timed out', 'gateway_timeout', $e, 'gateway_timeout');
|
| 105 |
+
}
|
| 106 |
+
throw $e;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
$this->_processGatewayResponse($response, $txnType);
|
| 110 |
+
|
| 111 |
+
$rvalue = null;
|
| 112 |
+
switch ($txnType) {
|
| 113 |
+
case 'GetAttachments':
|
| 114 |
+
$rvalue = HpsAttachment::fromDict($response, $txnType);
|
| 115 |
+
break;
|
| 116 |
+
default:
|
| 117 |
+
break;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
return $rvalue;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
/**
|
| 124 |
+
* @param SimpleXMLElement $response raw XML response
|
| 125 |
+
* @param string $expectedType
|
| 126 |
+
* @throws HpsAuthenticationException
|
| 127 |
+
* @throws HpsGatewayException
|
| 128 |
+
* @throws null
|
| 129 |
+
*/
|
| 130 |
+
private function _processGatewayResponse($response, $expectedType)
|
| 131 |
+
{
|
| 132 |
+
$gatewayRspCode = (isset($response->Header->GatewayRspCode) ? $response->Header->GatewayRspCode : null);
|
| 133 |
+
$transactionId = (isset($response->Header->GatewayTxnId) ? (float)$response->Header->GatewayTxnId : null);
|
| 134 |
+
|
| 135 |
+
if ($gatewayRspCode == '0') {
|
| 136 |
+
return;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
if ($gatewayRspCode == '3') {
|
| 140 |
+
throw new HpsGatewayException(
|
| 141 |
+
HpsExceptionCodes::GATEWAY_ERROR,
|
| 142 |
+
'Image could not be retrieved for ' . $transactionId
|
| 143 |
+
);
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
HpsGatewayResponseValidation::checkResponse($response, $expectedType);
|
| 147 |
+
}
|
| 148 |
+
}
|
lib/SecureSubmit/src/Services/Gateway/HpsCreditService.php
CHANGED
|
@@ -35,9 +35,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 35 |
if ($cardOrToken instanceof HpsCreditCard) {
|
| 36 |
$cardData->appendChild($this->_hydrateManualEntry($cardOrToken, $xml));
|
| 37 |
} else {
|
| 38 |
-
$
|
| 39 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $cardOrToken->tokenValue));
|
| 40 |
-
$cardData->appendChild($tokenData);
|
| 41 |
}
|
| 42 |
$cardData->appendChild($xml->createElement('hps:TokenRequest', ($requestMultiUseToken) ? 'Y' : 'N'));
|
| 43 |
if ($cpcReq) {
|
|
@@ -109,9 +107,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 109 |
if ($cardOrToken instanceof HpsCreditCard) {
|
| 110 |
$cardData->appendChild($this->_hydrateManualEntry($cardOrToken, $xml));
|
| 111 |
} else {
|
| 112 |
-
$
|
| 113 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $cardOrToken->tokenValue));
|
| 114 |
-
$cardData->appendChild($tokenData);
|
| 115 |
}
|
| 116 |
if ($cpcReq) {
|
| 117 |
$hpsBlock1->appendChild($xml->createElement('hps:CPCReq', 'Y'));
|
|
@@ -153,9 +149,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 153 |
$hpsBlock1->appendChild($cardData);
|
| 154 |
} else if ($cardOrTokenOrPMKey instanceof HpsTokenData) {
|
| 155 |
$cardData = $xml->createElement('hps:CardData');
|
| 156 |
-
$
|
| 157 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $cardOrTokenOrPMKey->tokenValue));
|
| 158 |
-
$cardData->appendChild($tokenData);
|
| 159 |
$hpsBlock1->appendChild($cardData);
|
| 160 |
} else {
|
| 161 |
$hpsBlock1->appendChild($xml->createElement('hps:PaymentMethodKey', $cardOrTokenOrPMKey));
|
|
@@ -212,6 +206,48 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 212 |
return $trans;
|
| 213 |
}
|
| 214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
public function get($transactionId)
|
| 216 |
{
|
| 217 |
if ($transactionId <= 0) {
|
|
@@ -267,9 +303,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 267 |
$hpsBlock1->appendChild($cardDataElement);
|
| 268 |
} else if ($cardData instanceof HpsTokenData) {
|
| 269 |
$cardDataElement = $xml->createElement('hps:CardData');
|
| 270 |
-
$
|
| 271 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $cardData->tokenValue));
|
| 272 |
-
$cardDataElement->appendChild($tokenData);
|
| 273 |
$hpsBlock1->appendChild($cardDataElement);
|
| 274 |
} else {
|
| 275 |
$hpsBlock1->appendChild($xml->createElement('hps:GatewayTxnId', $cardData));
|
|
@@ -286,7 +320,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 286 |
|
| 287 |
return $this->_submitTransaction($hpsTransaction, 'CreditReturn', (isset($details->clientTransactionId) ? $details->clientTransationId : null));
|
| 288 |
}
|
| 289 |
-
|
| 290 |
* @param HpsCreditCard|HpsTokenData|int $cardData GatewayTxnId
|
| 291 |
* @param float $amount
|
| 292 |
* @param USD $currency
|
|
@@ -312,16 +346,13 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 312 |
if ($authAmount !== null){
|
| 313 |
$hpsBlock1->appendChild($xml->createElement('hps:AuthAmt', HpsInputValidation::checkAmount($authAmount)));
|
| 314 |
}
|
| 315 |
-
|
| 316 |
$cardDataElement = null;
|
| 317 |
if ($cardData instanceof HpsCreditCard) {
|
| 318 |
$cardDataElement = $xml->createElement('hps:CardData');
|
| 319 |
$cardDataElement->appendChild($this->_hydrateManualEntry($cardData, $xml));
|
| 320 |
} else if ($cardData instanceof HpsTokenData) {
|
| 321 |
$cardDataElement = $xml->createElement('hps:CardData');
|
| 322 |
-
$
|
| 323 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $cardData->tokenValue));
|
| 324 |
-
$cardDataElement->appendChild($tokenData);
|
| 325 |
} else {
|
| 326 |
$cardDataElement = $xml->createElement('hps:GatewayTxnId', $cardData);
|
| 327 |
}
|
|
@@ -332,36 +363,8 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 332 |
|
| 333 |
$hpsCreditReversal->appendChild($hpsBlock1);
|
| 334 |
$hpsTransaction->appendChild($hpsCreditReversal);
|
| 335 |
-
return $this->_submitTransaction($hpsTransaction, 'CreditReversal', (isset($details->clientTransactionId) ? $details->clientTransactionId : null));
|
| 336 |
-
}
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
public function updateTokenExpiration($multiUseToken, $newExpMonth, $newExpYear)
|
| 340 |
-
{
|
| 341 |
-
$xml = new DOMDocument();
|
| 342 |
-
$transaction = $xml->createElement('hps:Transaction');
|
| 343 |
-
|
| 344 |
-
$manageTokens = $xml->createElement('hps:ManageTokens');
|
| 345 |
-
$manageTokens->appendChild($xml->createElement('hps:TokenValue', $multiUseToken));
|
| 346 |
|
| 347 |
-
|
| 348 |
-
$setAction = $xml->createElement('hps:Set');
|
| 349 |
-
|
| 350 |
-
$expMonth = $xml->createElement('hps:Attribute');
|
| 351 |
-
$expMonth->appendChild($xml->createElement('hps:Name', 'ExpMonth'));
|
| 352 |
-
$expMonth->appendChild($xml->createElement('hps:Value', $newExpMonth));
|
| 353 |
-
$setAction->appendChild($expMonth);
|
| 354 |
-
|
| 355 |
-
$expYear = $xml->createElement('hps:Attribute');
|
| 356 |
-
$expYear->appendChild($xml->createElement('hps:Name', 'ExpYear'));
|
| 357 |
-
$expYear->appendChild($xml->createElement('hps:Value', $newExpYear));
|
| 358 |
-
$setAction->appendChild($expYear);
|
| 359 |
-
|
| 360 |
-
$tokenActions->appendChild($setAction);
|
| 361 |
-
$manageTokens->appendChild($tokenActions);
|
| 362 |
-
$transaction->appendChild($manageTokens);
|
| 363 |
-
|
| 364 |
-
return $this->_submitTransaction($transaction, 'ManageTokens');
|
| 365 |
}
|
| 366 |
|
| 367 |
public function verify($cardOrToken, $cardHolder = null, $requestMultiUseToken = false, $clientTransactionId = null)
|
|
@@ -379,9 +382,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 379 |
if ($cardOrToken instanceof HpsCreditCard) {
|
| 380 |
$cardData->appendChild($this->_hydrateManualEntry($cardOrToken, $xml));
|
| 381 |
} else {
|
| 382 |
-
$
|
| 383 |
-
$tokenData->appendChild($xml->createElement('hps:TokenValue', $cardOrToken->tokenValue));
|
| 384 |
-
$cardData->appendChild($tokenData);
|
| 385 |
}
|
| 386 |
$cardData->appendChild($xml->createElement('hps:TokenRequest', ($requestMultiUseToken) ? 'Y' : 'N'));
|
| 387 |
|
|
@@ -466,6 +467,17 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 466 |
}
|
| 467 |
}
|
| 468 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 469 |
private function _submitTransaction($transaction, $txnType, $clientTxnId = null, $cardData = null)
|
| 470 |
{
|
| 471 |
$options = array();
|
|
@@ -528,7 +540,7 @@ class HpsCreditService extends HpsSoapGatewayService
|
|
| 528 |
$rvalue = HpsRecurringBilling::fromDict($response, $txnType);
|
| 529 |
break;
|
| 530 |
case 'ManageTokens':
|
| 531 |
-
$rvalue =
|
| 532 |
break;
|
| 533 |
default:
|
| 534 |
break;
|
| 35 |
if ($cardOrToken instanceof HpsCreditCard) {
|
| 36 |
$cardData->appendChild($this->_hydrateManualEntry($cardOrToken, $xml));
|
| 37 |
} else {
|
| 38 |
+
$cardData->appendChild($this->_hydrateTokenData($cardOrToken, $xml));
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
$cardData->appendChild($xml->createElement('hps:TokenRequest', ($requestMultiUseToken) ? 'Y' : 'N'));
|
| 41 |
if ($cpcReq) {
|
| 107 |
if ($cardOrToken instanceof HpsCreditCard) {
|
| 108 |
$cardData->appendChild($this->_hydrateManualEntry($cardOrToken, $xml));
|
| 109 |
} else {
|
| 110 |
+
$cardData->appendChild($this->_hydrateTokenData($cardOrToken, $xml));
|
|
|
|
|
|
|
| 111 |
}
|
| 112 |
if ($cpcReq) {
|
| 113 |
$hpsBlock1->appendChild($xml->createElement('hps:CPCReq', 'Y'));
|
| 149 |
$hpsBlock1->appendChild($cardData);
|
| 150 |
} else if ($cardOrTokenOrPMKey instanceof HpsTokenData) {
|
| 151 |
$cardData = $xml->createElement('hps:CardData');
|
| 152 |
+
$cardData->appendChild($this->_hydrateTokenData($cardOrTokenOrPMKey, $xml));
|
|
|
|
|
|
|
| 153 |
$hpsBlock1->appendChild($cardData);
|
| 154 |
} else {
|
| 155 |
$hpsBlock1->appendChild($xml->createElement('hps:PaymentMethodKey', $cardOrTokenOrPMKey));
|
| 206 |
return $trans;
|
| 207 |
}
|
| 208 |
|
| 209 |
+
/** builds soap transaction for Portico so that expiration dates can be updated for expired cards with a new current issuance
|
| 210 |
+
* @param string $tokenValue
|
| 211 |
+
* @param int $expMonth 1-12 padding will be handled automatically
|
| 212 |
+
* @param int $expYear must be 4 digits.
|
| 213 |
+
*
|
| 214 |
+
* @return \HpsManageTokensResponse
|
| 215 |
+
* @throws \HpsException
|
| 216 |
+
* @throws \HpsGatewayException
|
| 217 |
+
*/
|
| 218 |
+
public function updateTokenExpiration($tokenValue, $expMonth, $expYear) {
|
| 219 |
+
// new DOM
|
| 220 |
+
$xml = new DOMDocument();
|
| 221 |
+
$hpsTransaction = $xml->createElement('hps:Transaction');
|
| 222 |
+
$hpsManageTokens = $xml->createElement('hps:ManageTokens');
|
| 223 |
+
|
| 224 |
+
$hpsManageTokens->appendChild($xml->createElement('hps:TokenValue', trim((string)$tokenValue)));
|
| 225 |
+
|
| 226 |
+
$hpsTokenActions = $xml->createElement('hps:TokenActions');
|
| 227 |
+
$hpsSet = $xml->createElement('hps:Set');
|
| 228 |
+
$hpsAttribute = $xml->createElement('hps:Attribute');
|
| 229 |
+
|
| 230 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Name', 'ExpMonth'));
|
| 231 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Value', (string)sprintf("%'.02d", (int)$expMonth)));
|
| 232 |
+
|
| 233 |
+
$hpsSet->appendChild($hpsAttribute);
|
| 234 |
+
|
| 235 |
+
$hpsAttribute = $xml->createElement('hps:Attribute');
|
| 236 |
+
|
| 237 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Name', 'ExpYear'));
|
| 238 |
+
$hpsAttribute->appendChild($xml->createElement('hps:Value', (string)$expYear));
|
| 239 |
+
|
| 240 |
+
$hpsSet->appendChild($hpsAttribute);
|
| 241 |
+
|
| 242 |
+
$hpsTokenActions->appendChild($hpsSet);
|
| 243 |
+
|
| 244 |
+
$hpsManageTokens->appendChild($hpsTokenActions);
|
| 245 |
+
|
| 246 |
+
$hpsTransaction->appendChild($hpsManageTokens);
|
| 247 |
+
|
| 248 |
+
return $this->_submitTransaction($hpsTransaction, 'ManageTokens');
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
public function get($transactionId)
|
| 252 |
{
|
| 253 |
if ($transactionId <= 0) {
|
| 303 |
$hpsBlock1->appendChild($cardDataElement);
|
| 304 |
} else if ($cardData instanceof HpsTokenData) {
|
| 305 |
$cardDataElement = $xml->createElement('hps:CardData');
|
| 306 |
+
$cardDataElement->appendChild($this->_hydrateTokenData($cardData, $xml));
|
|
|
|
|
|
|
| 307 |
$hpsBlock1->appendChild($cardDataElement);
|
| 308 |
} else {
|
| 309 |
$hpsBlock1->appendChild($xml->createElement('hps:GatewayTxnId', $cardData));
|
| 320 |
|
| 321 |
return $this->_submitTransaction($hpsTransaction, 'CreditReturn', (isset($details->clientTransactionId) ? $details->clientTransationId : null));
|
| 322 |
}
|
| 323 |
+
/**
|
| 324 |
* @param HpsCreditCard|HpsTokenData|int $cardData GatewayTxnId
|
| 325 |
* @param float $amount
|
| 326 |
* @param USD $currency
|
| 346 |
if ($authAmount !== null){
|
| 347 |
$hpsBlock1->appendChild($xml->createElement('hps:AuthAmt', HpsInputValidation::checkAmount($authAmount)));
|
| 348 |
}
|
|
|
|
| 349 |
$cardDataElement = null;
|
| 350 |
if ($cardData instanceof HpsCreditCard) {
|
| 351 |
$cardDataElement = $xml->createElement('hps:CardData');
|
| 352 |
$cardDataElement->appendChild($this->_hydrateManualEntry($cardData, $xml));
|
| 353 |
} else if ($cardData instanceof HpsTokenData) {
|
| 354 |
$cardDataElement = $xml->createElement('hps:CardData');
|
| 355 |
+
$cardDataElement->appendChild($this->_hydrateTokenData($cardData, $xml));
|
|
|
|
|
|
|
| 356 |
} else {
|
| 357 |
$cardDataElement = $xml->createElement('hps:GatewayTxnId', $cardData);
|
| 358 |
}
|
| 363 |
|
| 364 |
$hpsCreditReversal->appendChild($hpsBlock1);
|
| 365 |
$hpsTransaction->appendChild($hpsCreditReversal);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 366 |
|
| 367 |
+
return $this->_submitTransaction($hpsTransaction, 'CreditReversal', (isset($details->clientTransactionId) ? $details->clientTransactionId : null));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
}
|
| 369 |
|
| 370 |
public function verify($cardOrToken, $cardHolder = null, $requestMultiUseToken = false, $clientTransactionId = null)
|
| 382 |
if ($cardOrToken instanceof HpsCreditCard) {
|
| 383 |
$cardData->appendChild($this->_hydrateManualEntry($cardOrToken, $xml));
|
| 384 |
} else {
|
| 385 |
+
$cardData->appendChild($this->_hydrateTokenData($cardOrToken, $xml));
|
|
|
|
|
|
|
| 386 |
}
|
| 387 |
$cardData->appendChild($xml->createElement('hps:TokenRequest', ($requestMultiUseToken) ? 'Y' : 'N'));
|
| 388 |
|
| 467 |
}
|
| 468 |
}
|
| 469 |
|
| 470 |
+
/**
|
| 471 |
+
* @param $transaction
|
| 472 |
+
* @param $txnType
|
| 473 |
+
* @param null $clientTxnId
|
| 474 |
+
* @param null $cardData
|
| 475 |
+
*
|
| 476 |
+
* @return array|null
|
| 477 |
+
* @throws \HpsCreditException
|
| 478 |
+
* @throws \HpsException
|
| 479 |
+
* @throws \HpsGatewayException
|
| 480 |
+
*/
|
| 481 |
private function _submitTransaction($transaction, $txnType, $clientTxnId = null, $cardData = null)
|
| 482 |
{
|
| 483 |
$options = array();
|
| 540 |
$rvalue = HpsRecurringBilling::fromDict($response, $txnType);
|
| 541 |
break;
|
| 542 |
case 'ManageTokens':
|
| 543 |
+
$rvalue = HpsManageTokensResponse::fromDict($response);
|
| 544 |
break;
|
| 545 |
default:
|
| 546 |
break;
|
lib/SecureSubmit/src/Services/Gateway/HpsRestGatewayService.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
class HpsRestGatewayService extends HpsGatewayServiceAbstract
|
| 4 |
{
|
| 5 |
const CERT_URL = 'https://cert.api2.heartlandportico.com/Portico.PayPlan.v2';
|
| 6 |
-
const PROD_URL = 'https://
|
| 7 |
const UAT_URL = 'https://api-uat.heartlandportico.com/payplan.v2';
|
| 8 |
protected $limit = null;
|
| 9 |
protected $offset = null;
|
| 3 |
class HpsRestGatewayService extends HpsGatewayServiceAbstract
|
| 4 |
{
|
| 5 |
const CERT_URL = 'https://cert.api2.heartlandportico.com/Portico.PayPlan.v2';
|
| 6 |
+
const PROD_URL = 'https://api.heartlandportico.com/payplan.v2';
|
| 7 |
const UAT_URL = 'https://api-uat.heartlandportico.com/payplan.v2';
|
| 8 |
protected $limit = null;
|
| 9 |
protected $offset = null;
|
lib/SecureSubmit/src/Services/Gateway/HpsSoapGatewayService.php
CHANGED
|
@@ -16,7 +16,7 @@ class HpsSoapGatewayService extends HpsGatewayServiceAbstract implements HpsGate
|
|
| 16 |
$hpsHeader = $xml->createElement('hps:Header');
|
| 17 |
|
| 18 |
if ($this->_config->secretApiKey != null && $this->_config->secretApiKey != "") {
|
| 19 |
-
$hpsHeader->appendChild($xml->createElement('hps:SecretAPIKey', $this->_config->secretApiKey));
|
| 20 |
} else {
|
| 21 |
$hpsHeader->appendChild($xml->createElement('hps:SiteId', $this->_config->siteId));
|
| 22 |
$hpsHeader->appendChild($xml->createElement('hps:DeviceId', $this->_config->deviceId));
|
|
@@ -280,32 +280,57 @@ class HpsSoapGatewayService extends HpsGatewayServiceAbstract implements HpsGate
|
|
| 280 |
return $manualEntry;
|
| 281 |
}
|
| 282 |
|
| 283 |
-
public function _hydrateSecureEcommerce($
|
| 284 |
{
|
| 285 |
$secureEcommerce = $xml->createElement('hps:SecureECommerce');
|
| 286 |
-
$secureEcommerce->appendChild($xml->createElement('hps:
|
|
|
|
| 287 |
|
| 288 |
-
$paymentDataElement = $xml->createElement('hps:PaymentData', $
|
| 289 |
$paymentDataElementEncoding = $xml->createAttribute('encoding');
|
| 290 |
$paymentDataElementEncoding->value = 'base64';
|
| 291 |
$paymentDataElement->appendChild($paymentDataElementEncoding);
|
|
|
|
| 292 |
|
| 293 |
-
if ($
|
| 294 |
-
$secureEcommerce->appendChild($xml->createElement('hps:ECommerceIndicator', $
|
| 295 |
}
|
| 296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 297 |
return $secureEcommerce;
|
| 298 |
}
|
| 299 |
-
|
|
|
|
|
|
|
|
|
|
| 300 |
public function _hydrateTokenData($token, DOMDocument $xml, $cardPresent = false, $readerPresent = false)
|
| 301 |
{
|
| 302 |
if (!$token instanceof HpsTokenData) {
|
|
|
|
| 303 |
$token = new HpsTokenData();
|
| 304 |
-
$token->tokenValue = $
|
| 305 |
}
|
| 306 |
|
| 307 |
$tokenData = $xml->createElement('hps:TokenData');
|
| 308 |
$tokenData->appendChild($xml->createElement('hps:TokenValue', $token->tokenValue));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
$tokenData->appendChild($xml->createElement('hps:CardPresent', ($cardPresent ? 'Y' : 'N')));
|
| 310 |
$tokenData->appendChild($xml->createElement('hps:ReaderPresent', ($readerPresent ? 'Y' : 'N')));
|
| 311 |
return $tokenData;
|
| 16 |
$hpsHeader = $xml->createElement('hps:Header');
|
| 17 |
|
| 18 |
if ($this->_config->secretApiKey != null && $this->_config->secretApiKey != "") {
|
| 19 |
+
$hpsHeader->appendChild($xml->createElement('hps:SecretAPIKey', trim($this->_config->secretApiKey)));
|
| 20 |
} else {
|
| 21 |
$hpsHeader->appendChild($xml->createElement('hps:SiteId', $this->_config->siteId));
|
| 22 |
$hpsHeader->appendChild($xml->createElement('hps:DeviceId', $this->_config->deviceId));
|
| 280 |
return $manualEntry;
|
| 281 |
}
|
| 282 |
|
| 283 |
+
public function _hydrateSecureEcommerce($data, $xml)
|
| 284 |
{
|
| 285 |
$secureEcommerce = $xml->createElement('hps:SecureECommerce');
|
| 286 |
+
$secureEcommerce->appendChild($xml->createElement('hps:PaymentDataSource', $data->dataSource));
|
| 287 |
+
$secureEcommerce->appendChild($xml->createElement('hps:TypeOfPaymentData', $data->type));
|
| 288 |
|
| 289 |
+
$paymentDataElement = $xml->createElement('hps:PaymentData', $data->data);
|
| 290 |
$paymentDataElementEncoding = $xml->createAttribute('encoding');
|
| 291 |
$paymentDataElementEncoding->value = 'base64';
|
| 292 |
$paymentDataElement->appendChild($paymentDataElementEncoding);
|
| 293 |
+
$secureEcommerce->appendChild($paymentDataElement);
|
| 294 |
|
| 295 |
+
if ($data->eciFlag != null && $data->eciFlag != '') {
|
| 296 |
+
$secureEcommerce->appendChild($xml->createElement('hps:ECommerceIndicator', $data->eciFlag));
|
| 297 |
}
|
| 298 |
|
| 299 |
+
$xidElement = $xml->createElement('hps:XID', $data->xid);
|
| 300 |
+
$xidElementEncoding = $xml->createAttribute('encoding');
|
| 301 |
+
$xidElementEncoding->value = 'base64';
|
| 302 |
+
$xidElement->appendChild($xidElementEncoding);
|
| 303 |
+
$secureEcommerce->appendChild($xidElement);
|
| 304 |
+
|
| 305 |
return $secureEcommerce;
|
| 306 |
}
|
| 307 |
+
/*
|
| 308 |
+
* @link https://github.com/hps/heartland-php/pull/21
|
| 309 |
+
* @description resolves a recursion issue identified in the link above
|
| 310 |
+
*/
|
| 311 |
public function _hydrateTokenData($token, DOMDocument $xml, $cardPresent = false, $readerPresent = false)
|
| 312 |
{
|
| 313 |
if (!$token instanceof HpsTokenData) {
|
| 314 |
+
$tokenValue = $token;
|
| 315 |
$token = new HpsTokenData();
|
| 316 |
+
$token->tokenValue = $tokenValue;
|
| 317 |
}
|
| 318 |
|
| 319 |
$tokenData = $xml->createElement('hps:TokenData');
|
| 320 |
$tokenData->appendChild($xml->createElement('hps:TokenValue', $token->tokenValue));
|
| 321 |
+
|
| 322 |
+
if (isset($token->expMonth)) {
|
| 323 |
+
$tokenData->appendChild($xml->createElement('hps:ExpMonth', $token->expMonth));
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
if (isset($token->expYear)) {
|
| 327 |
+
$tokenData->appendChild($xml->createElement('hps:ExpYear', $token->expYear));
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
if (isset($token->cvv)) {
|
| 331 |
+
$tokenData->appendChild($xml->createElement('hps:CVV2', $token->cvv));
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
$tokenData->appendChild($xml->createElement('hps:CardPresent', ($cardPresent ? 'Y' : 'N')));
|
| 335 |
$tokenData->appendChild($xml->createElement('hps:ReaderPresent', ($readerPresent ? 'Y' : 'N')));
|
| 336 |
return $tokenData;
|
lib/SecureSubmit/src/Services/Gateway/PayPlan/HpsPayPlanScheduleService.php
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
|
| 3 |
class HpsPayPlanScheduleService extends HpsRestGatewayService
|
| 4 |
{
|
|
|
|
| 5 |
public function add(HpsPayPlanSchedule $schedule)
|
| 6 |
{
|
| 7 |
$data = $schedule->getEditableFieldsWithValues();
|
|
@@ -13,10 +14,9 @@ class HpsPayPlanScheduleService extends HpsRestGatewayService
|
|
| 13 |
));
|
| 14 |
return $this->hydrateObject($result, 'HpsPayPlanSchedule');
|
| 15 |
}
|
| 16 |
-
|
| 17 |
public function edit(HpsPayPlanSchedule $schedule)
|
| 18 |
{
|
| 19 |
-
$data = $schedule->getEditableFieldsWithValues();
|
| 20 |
$result = $this->doRequest($data, array(
|
| 21 |
'verb' => 'PUT',
|
| 22 |
'endpoint' => 'schedules/'.$schedule->scheduleKey,
|
|
@@ -34,10 +34,8 @@ class HpsPayPlanScheduleService extends HpsRestGatewayService
|
|
| 34 |
'verb' => 'POST',
|
| 35 |
'endpoint' => 'searchSchedules',
|
| 36 |
));
|
| 37 |
-
|
| 38 |
return $this->hydrateSearchResults($results, 'HpsPayPlanSchedule');
|
| 39 |
}
|
| 40 |
-
|
| 41 |
public function get($schedule)
|
| 42 |
{
|
| 43 |
$id = null;
|
|
@@ -52,7 +50,6 @@ class HpsPayPlanScheduleService extends HpsRestGatewayService
|
|
| 52 |
));
|
| 53 |
return $this->hydrateObject($result, 'HpsPayPlanSchedule');
|
| 54 |
}
|
| 55 |
-
|
| 56 |
public function delete($schedule, $forceDelete = false)
|
| 57 |
{
|
| 58 |
$id = null;
|
|
@@ -61,7 +58,6 @@ class HpsPayPlanScheduleService extends HpsRestGatewayService
|
|
| 61 |
} else {
|
| 62 |
$id = $schedule;
|
| 63 |
}
|
| 64 |
-
|
| 65 |
$data = array(
|
| 66 |
'forceDelete' => $forceDelete,
|
| 67 |
);
|
|
@@ -70,4 +66,4 @@ class HpsPayPlanScheduleService extends HpsRestGatewayService
|
|
| 70 |
'endpoint' => 'schedules/'.$id,
|
| 71 |
));
|
| 72 |
}
|
| 73 |
-
}
|
| 2 |
|
| 3 |
class HpsPayPlanScheduleService extends HpsRestGatewayService
|
| 4 |
{
|
| 5 |
+
|
| 6 |
public function add(HpsPayPlanSchedule $schedule)
|
| 7 |
{
|
| 8 |
$data = $schedule->getEditableFieldsWithValues();
|
| 14 |
));
|
| 15 |
return $this->hydrateObject($result, 'HpsPayPlanSchedule');
|
| 16 |
}
|
|
|
|
| 17 |
public function edit(HpsPayPlanSchedule $schedule)
|
| 18 |
{
|
| 19 |
+
$data = $schedule->getEditableFieldsWithValues( $schedule );
|
| 20 |
$result = $this->doRequest($data, array(
|
| 21 |
'verb' => 'PUT',
|
| 22 |
'endpoint' => 'schedules/'.$schedule->scheduleKey,
|
| 34 |
'verb' => 'POST',
|
| 35 |
'endpoint' => 'searchSchedules',
|
| 36 |
));
|
|
|
|
| 37 |
return $this->hydrateSearchResults($results, 'HpsPayPlanSchedule');
|
| 38 |
}
|
|
|
|
| 39 |
public function get($schedule)
|
| 40 |
{
|
| 41 |
$id = null;
|
| 50 |
));
|
| 51 |
return $this->hydrateObject($result, 'HpsPayPlanSchedule');
|
| 52 |
}
|
|
|
|
| 53 |
public function delete($schedule, $forceDelete = false)
|
| 54 |
{
|
| 55 |
$id = null;
|
| 58 |
} else {
|
| 59 |
$id = $schedule;
|
| 60 |
}
|
|
|
|
| 61 |
$data = array(
|
| 62 |
'forceDelete' => $forceDelete,
|
| 63 |
);
|
| 66 |
'endpoint' => 'schedules/'.$id,
|
| 67 |
));
|
| 68 |
}
|
| 69 |
+
}
|
lib/SecureSubmit/src/Services/HpsCentinelConfig.php
CHANGED
|
@@ -9,13 +9,14 @@ class HpsCentinelConfig implements HpsConfigInterface
|
|
| 9 |
public $useProxy = false;
|
| 10 |
public $proxyOptions = null;
|
| 11 |
public $serviceUri = 'https://centineltest.cardinalcommerce.com/maps/txns.asp';
|
|
|
|
| 12 |
|
| 13 |
public function serviceUri()
|
| 14 |
{
|
| 15 |
return $this->serviceUri;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
public function setServiceUri(
|
| 19 |
{
|
| 20 |
$this->serviceUri = $value;
|
| 21 |
}
|
| 9 |
public $useProxy = false;
|
| 10 |
public $proxyOptions = null;
|
| 11 |
public $serviceUri = 'https://centineltest.cardinalcommerce.com/maps/txns.asp';
|
| 12 |
+
public $curlOptions = null;
|
| 13 |
|
| 14 |
public function serviceUri()
|
| 15 |
{
|
| 16 |
return $this->serviceUri;
|
| 17 |
}
|
| 18 |
|
| 19 |
+
public function setServiceUri($value)
|
| 20 |
{
|
| 21 |
$this->serviceUri = $value;
|
| 22 |
}
|
lib/SecureSubmit/src/Services/HpsServicesConfig.php
CHANGED
|
@@ -17,13 +17,14 @@ class HpsServicesConfig implements HpsConfigInterface
|
|
| 17 |
public $proxyOptions = null;
|
| 18 |
public $soapServiceUri = "https://cert.api2.heartlandportico.com/Hps.Exchange.PosGateway/PosGatewayService.asmx";
|
| 19 |
public $payPlanBaseUri = null;
|
|
|
|
| 20 |
|
| 21 |
public function serviceUri()
|
| 22 |
{
|
| 23 |
return $this->soapServiceUri;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
public function setServiceUri(
|
| 27 |
{
|
| 28 |
$this->soapServiceUri = $value;
|
| 29 |
}
|
|
@@ -36,7 +37,7 @@ class HpsServicesConfig implements HpsConfigInterface
|
|
| 36 |
|
| 37 |
public function getKeyType($keyType)
|
| 38 |
{
|
| 39 |
-
$key = $keyType == self::KEY_TYPE_SECRET ? $this->secretApiKey : $this->publicApiKey;
|
| 40 |
switch (true) {
|
| 41 |
case substr($key, 0, 6) == 'skapi_':
|
| 42 |
return self::KEY_TYPE_SECRET;
|
| 17 |
public $proxyOptions = null;
|
| 18 |
public $soapServiceUri = "https://cert.api2.heartlandportico.com/Hps.Exchange.PosGateway/PosGatewayService.asmx";
|
| 19 |
public $payPlanBaseUri = null;
|
| 20 |
+
public $curlOptions = null;
|
| 21 |
|
| 22 |
public function serviceUri()
|
| 23 |
{
|
| 24 |
return $this->soapServiceUri;
|
| 25 |
}
|
| 26 |
|
| 27 |
+
public function setServiceUri($value)
|
| 28 |
{
|
| 29 |
$this->soapServiceUri = $value;
|
| 30 |
}
|
| 37 |
|
| 38 |
public function getKeyType($keyType)
|
| 39 |
{
|
| 40 |
+
$key = trim($keyType == self::KEY_TYPE_SECRET ? $this->secretApiKey : $this->publicApiKey);
|
| 41 |
switch (true) {
|
| 42 |
case substr($key, 0, 6) == 'skapi_':
|
| 43 |
return self::KEY_TYPE_SECRET;
|
package.xml
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Hps_Securesubmit</name>
|
| 4 |
-
<version>1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
-
<license uri="https://github.com/
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Take credit card payments and store cards in a PCI friendly way.</summary>
|
| 10 |
<description>Use Heartland Payment Systems SecureSubmit platform to charge, authorize, void, refund and partial refund credit cards.
|
| 11 |

|
| 12 |
-
|
| 13 |
-
<notes>
|
| 14 |
<authors><author><name>Heartland Payment Systems</name><user>markhagan</user><email>EntApp_DevPortal@e-hps.com</email></author></authors>
|
| 15 |
-
<date>2016-
|
| 16 |
-
<time>
|
| 17 |
-
<contents><target name="magecommunity"><dir name="Hps"><dir name="Securesubmit"><dir name="Block"><dir name="Adminhtml"><file name="Form.php" hash="ab296bcf9018c73690bb0f5ab381381d"/><dir name="Paypal"><dir name="Settlement"><dir name="Report"><dir name="Form"><file name="Form.php" hash="da5a943526a729a4e78def46c63d0109"/></dir><file name="Form.php" hash="ecc3101a2a399dc71ae544bbe7bb9595"/><file name="Grid.php" hash="35b62c9ab2fe5b5e9a9394e11167f50c"/></dir><file name="Report.php" hash="19171fb1fad872b0ebff9692de1415fd"/></dir></dir></dir><file name="Form.php" hash="031741c6abad215430305c3758b3a362"/><file name="Info.php" hash="f733311f2a666fdd481fb26f57f50b63"/><dir name="Masterpass"><dir name="Client"><file name="Js.php" hash="ed427387b93d2753d8e8ada51c0d8f37"/></dir><file name="Connect.php" hash="b5e362f21c219ec61c4df7dff561ace6"/><file name="Form.php" hash="6abc4c67143380fad13efec247a18af4"/><file name="Info.php" hash="b8f714200c8f74cd8a0a9547fafc3637"/><dir name="Review"><file name="Billing.php" hash="c5bc2f64c2dc30e8ca1458cd286a16ee"/><file name="Details.php" hash="c324f315b2dfda8263151612ec73f513"/><file name="Shipping.php" hash="aeb5f38aa185e9d3acbb7ce5d4c4b841"/></dir><file name="Review.php" hash="b6e4dbd308c44215e50fa94dd22a32b0"/></dir><dir name="Paypal"><dir name="Credit"><file name="Form.php" hash="68fc4811e8f2d9a1b502454533fe5bca"/></dir><file name="Form.php" hash="776d2aab11db7d212061ca9a30936af1"/><dir name="Incontext"><file name="Js.php" hash="d09bf9157c0b7c5f6dba16d8cdac557d"/></dir><file name="Info.php" hash="9c1948c538383376b1dc1b4c76c31e95"/><dir name="Review"><file name="Billing.php" hash="62a22e1f5bd65c4d9369b5794779ffe9"/><file name="Details.php" hash="57d97c8a2c3b7ddac7dc4cda43e4363f"/><file name="Shipping.php" hash="694374b68714b6d58d9af8b9fb15d502"/></dir><file name="Review.php" hash="87c8f3bf319799b33170bec9f42e2544"/><file name="Shortcut.php" hash="26f13ae7afac41ce88fb1cd4042b61b5"/></dir></dir><dir name="Helper"><dir name="Altpayment"><file name="Abstract.php" hash="5fc29e9d6355660415934426d0ee624e"/></dir><file name="Data.php" hash="35a26dab0e14154f2ee80a498f788d7c"/><file name="Masterpass.php" hash="69489b7cae8b99fe216f522b19f3d448"/><file name="Paypal.php" hash="74d1d0885349c432016bd04f3211c4c2"/></dir><dir name="Model"><dir name="Altpayment"><file name="Cart.php" hash="1dc83b97c44463e954efc8ee1c9e62b8"/></dir><file name="Masterpass.php" hash="063acd12e22bdc26d7591cbabf7e3005"/><file name="Payment.php" hash="3b39f69c6826960fe99215f086148090"/><dir name="Paypal"><file name="Credit.php" hash="3548d6c4308df9d377cc1dd0d40f0f4d"/></dir><file name="Paypal.php" hash="c3eb2058ff6860e85a9310944c989301"/><file name="Report.php" hash="7f5e5bf0c652b37cf8c42eb553c8b3e0"/><dir name="Resource"><dir name="Report"><file name="Collection.php" hash="5870728a842922bbbff9c50173a90bd4"/></dir><file name="Report.php" hash="59598e2958a864119925c6e847b66121"/><file name="Setup.php" hash="8bdfbde89d786809d8aa2637efb1d2ae"/><dir name="Storedcard"><file name="Collection.php" hash="756c3c2d6dd5384f37847a028ac12fee"/></dir><file name="Storedcard.php" hash="d43320b704eb1e37c77a5ac20401c557"/></dir><file name="Session.php" hash="136b4146cea2f596847f0b838ec3f532"/><dir name="Source"><file name="Cctype.php" hash="d2dfff6147dc5c2748c7e9767b1fd1cb"/><file name="PaymentAction.php" hash="3c900b82e9af73a372d9f5f36bc1c264"/></dir><file name="Storedcard.php" hash="50897a56669c5938d4613579b603df93"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Proxy.php" hash="29ea9cb11927cd1e43055a42101eea36"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Hps"><dir name="Paypal"><file name="ReportsController.php" hash="914711bc008ec9e240918be7e77d1d54"/></dir></dir><file name="StoredcardController.php" hash="1e968134bf3b60a5f49544ddd1df8f03"/></dir><file name="GiftcardController.php" hash="dd15a7709121a3149fb30f77c385b18f"/><file name="MasterpassController.php" hash="2fb95214db3d3d017dd022743636ec50"/><file name="PaypalController.php" hash="962ce3dc3e738689d6ec6b122ed46001"/><file name="StoredcardController.php" hash="57116e86203df6f24a12fcd93186b534"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8dc53c22d22cd633ebd6c06e7262c741"/><file name="config.xml" hash="0a91fa84cbaa63d4d9669784697a4911"/><file name="system.xml" hash="2b4c4f26b48cb72f408c1c97ec3e4c21"/></dir><dir name="sql"><dir name="hps_securesubmit_setup"><file name="install-1.0.0.php" hash="d424731dcb784aad59dad0bcce431375"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="510826261ea81ea6a09d4ea84c59d41d"/><file name="mysql4-upgrade-1.0.1-1.1.0.php" hash="01e948ea2939f9b0b69bb6748adc53f2"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="84cf1a359fc5a5600e1d98ba0089d911"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="securesubmit"><file name="admin-checkout.js" hash="14d970828f50bb463dc3f7cdaca97e1d"/><file name="checkout-form.js" hash="62d38a7cbcc240293500e1f105281d0b"/><dir name="masterpass"><file name="lightbox.js" hash="b534647c7c06b5ce90caf4cdd6166f91"/></dir><dir name="paypal"><file name="incontext.js" hash="e3810f12033fa9822db756a22622f799"/></dir><file name="secure.submit-1.0.1.js" hash="988d59dadbc272b869bc9e56cbd7518e"/></dir></dir></target><target name="magelib"><dir name="SecureSubmit"><file name="Hps.php" hash="aeeb39dae09306051eec2cf455fcb6a8"/><file name="LICENSE.txt" hash="de081f847a769f89be5a1f80862005ba"/><file name="PRIVACY.txt" hash="58cdc5fbbff24a84a838b0174b254f70"/><file name="README.md" hash="8320a396aa5544e61fe2e8f2adb09505"/><file name="index.php" hash="feabe5cc691b088d6ade3e04d6b120fc"/><dir name="src"><dir name="Abstractions"><file name="HpsAltPaymentServiceInterface.php" hash="bbbacdf42b798458ca46921b3ddb9eaf"/><file name="HpsBuilderAbstract.php" hash="6498e7b7e00716574a9dd238d1d7da5e"/><file name="HpsConfigInterface.php" hash="6541819ca5724269db6e1a9ed456d52e"/><file name="HpsGatewayServiceAbstract.php" hash="6e6631e0cfea0001a6fff4bf57d13068"/><file name="HpsGatewayServiceInterface.php" hash="c2b49802b328648d8510433b5c82f71f"/><file name="HpsPayPlanResourceAbstract.php" hash="df262df6345c4932626e60afecdeb478"/><file name="HpsPayPlanResourceInterface.php" hash="22dd33e354f46218d2872eab956d57c1"/></dir><dir name="Entities"><dir name="AltPayment"><file name="HpsAltPaymentAddToBatch.php" hash="1684714c0cd14d6d33288a44f43c9dd6"/><file name="HpsAltPaymentAuth.php" hash="4f2748e2b95cffed6bd0e62f75af71eb"/><file name="HpsAltPaymentCapture.php" hash="51a86062c15c6f8de15147b5b53f89a4"/><file name="HpsAltPaymentCreateSession.php" hash="4e83acd11a03e7dfcf904f2421d858b3"/><file name="HpsAltPaymentResponse.php" hash="860336d2015560f889c41773574b97ab"/><file name="HpsAltPaymentReturn.php" hash="0b9d8cb0f67ddf113b99ca64ab6019a3"/><file name="HpsAltPaymentSale.php" hash="f390a9a4af50f7a8a863c607f7e3357f"/><file name="HpsAltPaymentSessionInfo.php" hash="a5fdaea50db9f15eb762f4ca3512cae4"/><file name="HpsAltPaymentVoid.php" hash="429f0fbec31ae4842c494b0a8af47ddb"/><file name="HpsBuyerData.php" hash="4fd94d96a547378d2974fa386c89223f"/><file name="HpsCardinalMPIAddOrderNumberResponse.php" hash="a2f2c09eb9e7020e7af97819fe065dc3"/><file name="HpsCardinalMPIAuthenticateResponse.php" hash="6868b0bc55d8e3409684e795d1db92fc"/><file name="HpsCardinalMPIAuthorizeResponse.php" hash="566a64988246220b00da62078ae32068"/><file name="HpsCardinalMPIAuthresponseResponse.php" hash="a53fb4863feb909ccb0d2f2cc254562f"/><file name="HpsCardinalMPICaptureResponse.php" hash="29de876ce9bc632016fceab91dca22ac"/><file name="HpsCardinalMPILookupResponse.php" hash="7171aff90865b67db79559f7b2f579ba"/><file name="HpsCardinalMPIPreapprovalResponse.php" hash="e9408b385ca4f32de5f1adf96a36c42d"/><file name="HpsCardinalMPIRefundResponse.php" hash="71dbbff6f6383a19b0feb91f8771dbe5"/><file name="HpsCardinalMPIResponse.php" hash="d3729129967b1da049287e200e4d46e2"/><file name="HpsCardinalMPIVoidResponse.php" hash="2796de53634fccca806a4a4143779f81"/><file name="HpsLineItem.php" hash="4ff06a280975312365cf10a730636682"/><file name="HpsOrderData.php" hash="5d3ae0110d44f4786d4398861735a259"/><file name="HpsPaymentData.php" hash="2bd9ddc10ecdaebdbb5bf0e3cf71f642"/><file name="HpsShippingInfo.php" hash="63b621ebba4ae1711aca57073b0abec7"/></dir><dir name="Batch"><file name="HpsBatch.php" hash="d9af4664e64172cb8edaeaa1ea7c7337"/></dir><dir name="Check"><file name="HpsCheck.php" hash="8fb85bd4d608e72a9690285ec46fa6d2"/><file name="HpsCheckHolder.php" hash="58f865b34faf2790fef26066de775a15"/><file name="HpsCheckResponse.php" hash="ff3c752bc85554424e62ed7efbc053f2"/><file name="HpsCheckResponseDetails.php" hash="28928ceb2dea574603a376aed1691a90"/></dir><dir name="Credit"><file name="HpsAccountVerify.php" hash="527a69e5a39153b764e6c14e0d98bf34"/><file name="HpsAuthorization.php" hash="7ec1bbfa6efa5bc48432b5de81eda314"/><file name="HpsCPCData.php" hash="f246c4aa1eec482ba84966c563aeb970"/><file name="HpsCPCEdit.php" hash="f04b0089485ba9e7eacba8e15815ec97"/><file name="HpsCardHolder.php" hash="ffee4609a3ffa886a386a12dea3f4508"/><file name="HpsCharge.php" hash="512fb9e459b336a9e256d8f1e08e36b9"/><file name="HpsChargeExceptions.php" hash="c7df102696a205a4c5689c48878ac5f3"/><file name="HpsCreditCard.php" hash="6aa3d449b0648997c4c532c1e3603cbb"/><file name="HpsOfflineAuthorization.php" hash="6f11736d36cfde0d9d79c94e92f60c8b"/><file name="HpsRecurringBilling.php" hash="9da8f9b16179729b77615f04993b05bf"/><file name="HpsRefund.php" hash="aa4664916ebb94b8f2066fd7c17b0fd4"/><file name="HpsReportTransactionDetails.php" hash="f5bcb8f1532c9282760bb9b733107fac"/><file name="HpsReportTransactionSummary.php" hash="441b01c652db42213264980e6f693b40"/><file name="HpsReversal.php" hash="350191a2d38189ef8e098ed1f922c1d3"/><file name="HpsVoid.php" hash="bf6216cea2f130789a045fc226c54cd0"/></dir><dir name="Debit"><file name="HpsDebitAddValue.php" hash="9053c701093889f864dd36af208f4f71"/><file name="HpsDebitReturn.php" hash="519cb73c6fc4ce716453d5ff94f437a0"/><file name="HpsDebitReversal.php" hash="223f6db72f0219ef25eb0f0adec4e9be"/><file name="HpsDebitSale.php" hash="74fa1e1425cfe6294146c879a4049aa8"/></dir><dir name="Fluent"><file name="HpsBuilderAction.php" hash="8649cc2c53fd961f350070193fedb5c6"/><file name="HpsUnknownPropertyException.php" hash="d019e8645fae6f984ad7b7ea3cebb546"/></dir><dir name="Gift"><file name="HpsGiftCard.php" hash="c8bad2a5336689e3192ea223a97760bf"/><file name="HpsGiftCardActivate.php" hash="097ac7c36cae11b8c40a3f1414518e49"/><file name="HpsGiftCardAddValue.php" hash="131a9d7cbc711a4e3e85c66049028f30"/><file name="HpsGiftCardAlias.php" hash="133d2d4701c5aa88fa0eece6ee69de06"/><file name="HpsGiftCardBalance.php" hash="9b9fe395d218c79c55faf28fd736b431"/><file name="HpsGiftCardDeactivate.php" hash="323ca5a67c6ff0169925192952881db5"/><file name="HpsGiftCardReplace.php" hash="f122a7d924a56fcc406bc8b1c82ac2b2"/><file name="HpsGiftCardReversal.php" hash="88ba755e52f41311206add4fa8ee5e09"/><file name="HpsGiftCardReward.php" hash="f758e8c5462d336236ae0d257789cdaf"/><file name="HpsGiftCardSale.php" hash="0f758ef6653215be643abaea4964352a"/><file name="HpsGiftCardVoid.php" hash="f0294740f5b7f545167d5fb258f4dcdd"/></dir><file name="HpsAddress.php" hash="fcc67451ff9f1c483e2943cf6ee5c5fe"/><file name="HpsConsumer.php" hash="1254142dfa0821cbb0bf154cf51f34d2"/><file name="HpsDirectMarketData.php" hash="1925c204d19cb9233ec8178e3b5cdc50"/><file name="HpsEncryptionData.php" hash="1e4845abc6c42e8f0265e2679b05efb6"/><file name="HpsTokenData.php" hash="18ab9125315bb8e5f9cb272966dac22b"/><file name="HpsTrackData.php" hash="4656f37b7c4c777d0c63b4102efe5a1a"/><file name="HpsTransaction.php" hash="f109d2d26ba237afb2dc17bc287f63a9"/><file name="HpsTransactionDetails.php" hash="4e77261d0aced118b49e26ef786beace"/><file name="HpsTransactionHeader.php" hash="ebd21539f84425f0e2fc57c6049a26a1"/><file name="HpsTransactionStatus.php" hash="a5a67f8fe3780f66b045cc4314660dc5"/><dir name="PayPlan"><file name="HpsPayPlanAmount.php" hash="25706476e264124567d704f981745b13"/><file name="HpsPayPlanCustomer.php" hash="2714a7525fb3830fc018544ea0622ab5"/><file name="HpsPayPlanPaymentMethod.php" hash="fd3077d63e6f31c2d8a4c60c78a678ea"/><file name="HpsPayPlanSchedule.php" hash="4c9fe8bd7db0810fd108e51b81bdf590"/></dir><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/><file name=".DS_Store" hash="92d42bd310aa7f6dd74d14e6cdd2b9e9"/></dir><dir name="Infrastructure"><dir name="Enums"><file name="HpsACHType.php" hash="1ff5593689a404cb0179c2b5cb5fe19e"/><file name="HpsAccountType.php" hash="760d91e120f443c326e6c7586aa61092"/><file name="HpsCardBrand.php" hash="9532bb7c40811c114a1eeeffa8b9732c"/><file name="HpsCentinelCheckoutType.php" hash="7370920cb980bbfc54c741a981cd79bb"/><file name="HpsCheckType.php" hash="d60c676d93c8ada169deb14ddc8e64e7"/><file name="HpsDataEntryMode.php" hash="c323d884a7a305f9af647ea1d9a4177e"/><file name="HpsExceptionCodes.php" hash="95322648a2093ed3982c6bb724f3507a"/><file name="HpsGiftCardAliasAction.php" hash="ebcb27c6fb800e17693ed4af2e8a8943"/><file name="HpsItemChoiceTypePosResponseVer10Transaction.php" hash="686225a07738db2233a2228bec6baabf"/><file name="HpsPayPlanAccountType.php" hash="4d383c42a990fb077fae49386c08b870"/><file name="HpsPayPlanCustomerStatus.php" hash="3ff092e8dd97f2a2474fb64103cb238f"/><file name="HpsPayPlanPaymentMethodStatus.php" hash="b020c52de7987ed3011cb97e4d440c6a"/><file name="HpsPayPlanPaymentMethodType.php" hash="1f77c5c8528815f05803c1381cb4151a"/><file name="HpsPayPlanScheduleDuration.php" hash="05101e6fe3b725b43917b59770f2dbb1"/><file name="HpsPayPlanScheduleFrequency.php" hash="0b3f029c64315ee9c8701d23319941c1"/><file name="HpsPayPlanScheduleStatus.php" hash="3579b52ccf36e576fd2dfb36118716f6"/><file name="HpsSECCode.php" hash="551661613c127c068f139083338b92d1"/><file name="HpsTaxType.php" hash="ba0e05330880810e58370f2f3490ca81"/><file name="HpsTrackDataMethod.php" hash="446069e9786f9585c3490140b29ae52f"/><file name="HpsTransactionType.php" hash="a38b3f4c654a4fa3b2c2d64b8afacf24"/></dir><file name="HpsApiConnectionException.php" hash="ac5a8064a7c2a1616035a5702f36cd50"/><file name="HpsArgumentException.php" hash="855c43e88fc24b582cfe56875d7cff42"/><file name="HpsAuthenticationException.php" hash="6feb2fdc5499b460274524aa469d9a7d"/><file name="HpsCheckException.php" hash="94870f2438217b3275d05fb943a0a8c0"/><file name="HpsConfiguration.php" hash="010996727d89c485c1d11463e5c53a8e"/><file name="HpsCreditException.php" hash="a16bf1ecd6a2c866b7b40351aab3df34"/><file name="HpsCreditExceptionDetails.php" hash="d71c54b2846283a8f97aae74a747dfd9"/><file name="HpsException.php" hash="8d2025b7fae9f0f756341b876a0dab41"/><file name="HpsGatewayException.php" hash="cdd6db6c8436e3e78ee15cdd7a043a9d"/><file name="HpsGatewayExceptionDetails.php" hash="16dd36360e2237ca89e056c61766bcdd"/><file name="HpsInvalidRequestException.php" hash="7877e48463ef3f488bb92423ae445412"/><file name="HpsProcessorError.php" hash="ff7f1f2c5327417b4997f9e36fa7c887"/><file name="HpsProcessorException.php" hash="ba28a92f0e551053506dcc391c5bc431"/><file name="HpsProcessorExceptionDetails.php" hash="6a569aacf045c19ade6472a857a3a274"/><dir name="Validation"><file name="HpsGatewayResponseValidation.php" hash="06fb818263b18b58974a569d0c986667"/><file name="HpsInputValidation.php" hash="1f51837f70c322f2a7c1cc39df752b1a"/><file name="HpsIssuerResponseValidation.php" hash="613377f8ca249df078c909e4d7674bfb"/><file name="HpsProcessorResponseValidation.php" hash="ff19a569f8bdd6ef7b58a460cf06b4e8"/></dir><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><dir name="Services"><dir name="Fluent"><dir name="Gateway"><dir name="Check"><file name="HpsCheckServiceOverrideBuilder.php" hash="5b4a49a897f87d2a332182a1ccd67d0c"/><file name="HpsCheckServiceRecurringBuilder.php" hash="c86a2fd5165a65c78e38e3bbb1b9636c"/><file name="HpsCheckServiceReturnBuilder.php" hash="5ce46356468714f65ad827e1593977cc"/><file name="HpsCheckServiceSaleBuilder.php" hash="b823e74642e165772f5cb03beffacce7"/><file name="HpsCheckServiceVoidBuilder.php" hash="17305b04474285a8b64007c549180ba5"/></dir><dir name="Credit"><file name="HpsCreditServiceAuthorizeBuilder.php" hash="51997a17ee9a1aaacd40d9d2c8d69c17"/><file name="HpsCreditServiceCaptureBuilder.php" hash="fd6512f3b72f9051eaf7c3daeff2cb48"/><file name="HpsCreditServiceChargeBuilder.php" hash="3421b227fe594f0cb1533b4496c805bd"/><file name="HpsCreditServiceCpcEditBuilder.php" hash="7401c33a56c5a3c6a23f5f70101a4926"/><file name="HpsCreditServiceEditBuilder.php" hash="cdcf661c4182625212ec724b52eb8491"/><file name="HpsCreditServiceGetBuilder.php" hash="05b0cafe715a4d3ceb3c88b99b0c8dc1"/><file name="HpsCreditServiceListTransactionsBuilder.php" hash="a7765dfadc8e21177cc453a1e7dfd715"/><file name="HpsCreditServiceOfflineAuthBuilder.php" hash="d86d2425c6bbf28854a31d09a9f802b8"/><file name="HpsCreditServiceOfflineChargeBuilder.php" hash="0ee9ecf6b499a16f01fa2a7b94af00ca"/><file name="HpsCreditServicePrepaidAddValueBuilder.php" hash="997b48104fcdbd791a3b990515f2527e"/><file name="HpsCreditServicePrepaidBalanceInquiryBuilder.php" hash="7e7dd067d79281c32417b6d338825acd"/><file name="HpsCreditServiceRecurringBuilder.php" hash="560c8b86eeb9e4e468642eaa739ebe03"/><file name="HpsCreditServiceRefundBuilder.php" hash="4d5ab9c2a11c18a47e416bd90dffc5e8"/><file name="HpsCreditServiceReverseBuilder.php" hash="7960e9efa00ceb0d0c5368715c07d424"/><file name="HpsCreditServiceVerifyBuilder.php" hash="62027b344ee5444ccd1534358a405857"/><file name="HpsCreditServiceVoidBuilder.php" hash="0029756571343a1d8c6380874f6f5b6b"/></dir><dir name="Debit"><file name="HpsDebitServiceAddValueBuilder.php" hash="5f972b68a5afa062cbf911bfb3a946bc"/><file name="HpsDebitServiceChargeBuilder.php" hash="26aafce2a87bbbd8231a039209c49657"/><file name="HpsDebitServiceReturnBuilder.php" hash="2e11267e12bdd338b953db352a373961"/><file name="HpsDebitServiceReverseBuilder.php" hash="b088431d3ba0726d44cc418e92267958"/></dir><dir name="GiftCard"><file name="HpsGiftCardServiceActivateBuilder.php" hash="65e3ebd1c6ded3860b238d03e542fe3b"/><file name="HpsGiftCardServiceAddValueBuilder.php" hash="432582c9fd6617c86b373f5fe0b14fb1"/><file name="HpsGiftCardServiceAliasBuilder.php" hash="1b096debfa6678af2d6ddecfa82a638e"/><file name="HpsGiftCardServiceBalanceBuilder.php" hash="6bebaac04d059204a2408d693f77c449"/><file name="HpsGiftCardServiceDeactivateBuilder.php" hash="92b16b331414c40ea11de330bd447273"/><file name="HpsGiftCardServiceReplaceBuilder.php" hash="063e6b33a673c23553047a6f72927b2a"/><file name="HpsGiftCardServiceReverseBuilder.php" hash="2f7b96b1f9608cb7e3526ecb9b15558f"/><file name="HpsGiftCardServiceRewardBuilder.php" hash="242fbe42ab731b138e4d74be4cde4e9a"/><file name="HpsGiftCardServiceSaleBuilder.php" hash="8af2977da26e3707e42569ad7bf4c4a5"/><file name="HpsGiftCardServiceVoidBuilder.php" hash="fff556a586bb09d22f521a90d30fb809"/></dir><file name="HpsFluentCheckService.php" hash="e89511e006e914bdd4daf6765a49e97b"/><file name="HpsFluentCreditService.php" hash="58e0d0480066fec8c5c6e31eaa275d12"/><file name="HpsFluentDebitService.php" hash="63e86fe32a92c80cc5bd163283da6c64"/><file name="HpsFluentGiftCardService.php" hash="53697a755fc90256b940c74282693b0d"/></dir></dir><dir name="Gateway"><dir name="AltPayment"><file name="HpsAltPaymentService.php" hash="3d9cdbad50ccceb45d4d888018d2bab7"/><file name="HpsMasterPassService.php" hash="f5639448d09a38377f16434351201b09"/><file name="HpsPayPalService.php" hash="c91eebb0eca8bdda2505b78c4746db28"/></dir><file name="HpsBatchService.php" hash="2a4c11a4f7c78ec1e3b461b3803826c5"/><file name="HpsCentinelGatewayService.php" hash="40300a57982ccd5325b7bd0986a8bcc4"/><file name="HpsCheckService.php" hash="17eac57a5f3a6f24e31000325ad9ac1d"/><file name="HpsCreditService.php" hash="f7baf1cf04cd6024039ad90284f08db9"/><file name="HpsDebitService.php" hash="0ea76c01b3c817fcaea876bff28681b3"/><file name="HpsGiftCardService.php" hash="e1deb113c685845e2af2bb0ff793ea4d"/><file name="HpsPayPlanService.php" hash="ce5d2c003e72be8328634d92ab8ae6eb"/><file name="HpsRestGatewayService.php" hash="3a0b4217eb4e9d8c92d298914e539a04"/><file name="HpsSoapGatewayService.php" hash="969751eb742eeb7d7a99d5d61d2d2afb"/><file name="HpsTokenService.php" hash="b1dad4289201b399f89ad1d29a799d39"/><dir name="PayPlan"><file name="HpsPayPlanCustomerService.php" hash="cda074fca2230c26919a813cc2d71b5c"/><file name="HpsPayPlanPaymentMethodService.php" hash="61dd42308d203251f4483d68561c191b"/><file name="HpsPayPlanScheduleService.php" hash="e8c81640a7440a19ed3590894a31a1f1"/></dir></dir><file name="HpsCentinelConfig.php" hash="f43f7ea211a51883fb8a2173072027a8"/><file name="HpsServicesConfig.php" hash="f3d63dc7d089a8bcd248e4abc381e6a7"/><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/><file name=".DS_Store" hash="fb4d06cbd65ab29860d86984919afa4a"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="securesubmit.xml" hash="cc04e952cc17ea3462931a9e7a655316"/></dir><dir name="template"><dir name="securesubmit"><file name="form.phtml" hash="67a460ca8f034f4bfe3fbb8e7845f37f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="securesubmit.xml" hash="410fda5ef3920f893f5a17ec379aa2da"/></dir><dir name="template"><dir name="securesubmit"><file name="form.phtml" hash="78a8e941ab3164a7ee4c3bffacfc487d"/><dir name="masterpass"><file name="connect.phtml" hash="b5f47624447a44958ce4fa004c58c319"/><file name="form.phtml" hash="039d6a174ac24c45ece0d14b92b6c9c4"/><file name="js.phtml" hash="274e871b2d8270e3224b9ce12794c2c5"/><file name="mark.phtml" hash="fe27b341b5fb034e90ac35c92ef998d4"/><dir name="review"><file name="details.phtml" hash="0dc5e1201e7e424f089c15fc83a1c70f"/><dir name="shipping"><file name="method.phtml" hash="cc426553636aa08840bee1c4778d89e4"/></dir></dir><file name="review.phtml" hash="cfc643de65b962ba27306587357f45d3"/></dir><dir name="paypal"><dir name="incontext"><file name="js.phtml" hash="16b4ad23ea05464a55bb0390cd72e248"/><file name="payment.phtml" hash="b32d269057984f656422609015dd7d91"/></dir><dir name="review"><file name="details.phtml" hash="0dc5e1201e7e424f089c15fc83a1c70f"/><dir name="shipping"><file name="method.phtml" hash="cc426553636aa08840bee1c4778d89e4"/></dir></dir><file name="review.phtml" hash="cfc643de65b962ba27306587357f45d3"/><file name="shortcut.phtml" hash="268bfac86e653ec5981cd201075f4105"/></dir><file name="storedcards.phtml" hash="d083493f42af257cdb1949a8cbd8855b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Hps_Securesubmit.xml" hash="d5aed3f48a45f8e611b68d1e6f34c959"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="securesubmit"><dir name="css"><file name="hps-styles.css" hash="054fefd2b23342565da4a4b0d977fdb7"/></dir><dir name="images"><file name="ajax-loader.gif" hash="f48ee069890b16455c3ddcacee9b5f75"/><file name="arrow@2x.png" hash="ecc6766f32ae007e48f1cac2cefae87b"/><file name="bg_x.png" hash="c321c67f6929326129426c9e83207ea3"/><file name="cvv1.png" hash="0cba150037737255b0b750fd8b7aa3a8"/><file name="delete-hover.svg" hash="b50f601a53505660e093c126a84773b2"/><file name="delete.png" hash="0797e40a65fe0cf10252e788f40bee50"/><file name="delete.svg" hash="0793be8c20ffb397cc933d6c6de4df75"/><file name="heartland-logo.png" hash="0a15c70514f1449af4a98931b62d6844"/><file name="heartland-logo@1x.png" hash="d1982d3c613fee22120b06494aa92bfa"/><file name="heartland-logo@2x.png" hash="24daf8c6f920ed7b9c5aad79143f76b5"/><file name="icon_sprite.png" hash="e15f0103ef5ebe3baf48960bb9ccfaab"/><file name="icon_sprite@2x.png" hash="156b591cc9464429bc3b614cbbe636fd"/><file name="ss-input-amex@2x.png" hash="3a0311a7ae08337686031ee12d428b7b"/><file name="ss-inputcard-amex@2x.png" hash="a20df89111cf94aa5d653f44bf7e8cc8"/><file name="ss-inputcard-blank@2x.png" hash="1f84a3d28f8604a0ae1f019d10325c51"/><file name="ss-inputcard-discover@2x.png" hash="c17c70f6dc3908b1c066d0c0aa53a9bc"/><file name="ss-inputcard-jcb@2x.png" hash="bc353bc2e57fe2e2b689b69ce1826389"/><file name="ss-inputcard-mastercard@2x.png" hash="48cae147cae1ef0121e090df928632c0"/><file name="ss-inputcard-visa@2x.png" hash="c8bd7bf3aa1fff3226b5ce571ddefa42"/><file name="ss-lock.png" hash="430fbebc08387bcb43fed60ba14e5da1"/><file name="ss-lock@2x.png" hash="2772a5c4b0e7d622cb8773fd575108d2"/><file name="ss-logo.png" hash="a6e2017f773c3ebd82318cb5417a09dd"/><file name="ss-saved-amex@2x.png" hash="7aff4d28b217bceeb2d1fe139998e980"/><file name="ss-saved-discover@2x.png" hash="f5b5e76e49f3e02b677117068cd1d3fa"/><file name="ss-saved-jcb@2x.png" hash="58923ad29390b36556e61de061417fc8"/><file name="ss-saved-mastercard@2x.png" hash="19d69c364291adf7e87355fbe79ebd38"/><file name="ss-saved-visa@2x.png" hash="c3d935832dfcde4dba793e91665315b7"/><file name="ss-shield@1x.png" hash="473a87521ec93d14c906cd2415833f33"/><file name="ss-shield@2x.png" hash="ceada08d149bd9c2d63706e67eb7b1e9"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir></dir></dir></target></contents>
|
| 18 |
<compatible/>
|
| 19 |
<dependencies><required><php><min>5.2.0</min><max>5.6.28</max></php></required></dependencies>
|
| 20 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Hps_Securesubmit</name>
|
| 4 |
+
<version>1.4.0</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
+
<license uri="https://github.com/hps/heartland-magento-extension/blob/master/LICENSE">Custom</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Take credit card payments and store cards in a PCI friendly way.</summary>
|
| 10 |
<description>Use Heartland Payment Systems SecureSubmit platform to charge, authorize, void, refund and partial refund credit cards.
|
| 11 |

|
| 12 |
+
Allow customers to store their cards for reduced friction at next checkout using our multi-use card tokenization process which helps reduce PCI scope.</description>
|
| 13 |
+
<notes>Add: Consumer authentication (3DSecure)</notes>
|
| 14 |
<authors><author><name>Heartland Payment Systems</name><user>markhagan</user><email>EntApp_DevPortal@e-hps.com</email></author></authors>
|
| 15 |
+
<date>2016-12-07</date>
|
| 16 |
+
<time>20:27:36</time>
|
| 17 |
+
<contents><target name="magecommunity"><dir name="Hps"><dir name="Securesubmit"><dir name="Block"><dir name="Adminhtml"><file name="Form.php" hash="ab296bcf9018c73690bb0f5ab381381d"/><dir name="Paypal"><dir name="Settlement"><dir name="Report"><dir name="Form"><file name="Form.php" hash="da5a943526a729a4e78def46c63d0109"/></dir><file name="Form.php" hash="ecc3101a2a399dc71ae544bbe7bb9595"/><file name="Grid.php" hash="35b62c9ab2fe5b5e9a9394e11167f50c"/></dir><file name="Report.php" hash="19171fb1fad872b0ebff9692de1415fd"/></dir></dir></dir><file name="Form.php" hash="aeb858ef86b0253dc542a90cbda2b6af"/><file name="Info.php" hash="f733311f2a666fdd481fb26f57f50b63"/><dir name="Masterpass"><dir name="Client"><file name="Js.php" hash="ed427387b93d2753d8e8ada51c0d8f37"/></dir><file name="Connect.php" hash="b5e362f21c219ec61c4df7dff561ace6"/><file name="Form.php" hash="6abc4c67143380fad13efec247a18af4"/><file name="Info.php" hash="b8f714200c8f74cd8a0a9547fafc3637"/><dir name="Review"><file name="Billing.php" hash="c5bc2f64c2dc30e8ca1458cd286a16ee"/><file name="Details.php" hash="c324f315b2dfda8263151612ec73f513"/><file name="Shipping.php" hash="aeb5f38aa185e9d3acbb7ce5d4c4b841"/></dir><file name="Review.php" hash="b6e4dbd308c44215e50fa94dd22a32b0"/></dir><dir name="Paypal"><dir name="Credit"><file name="Form.php" hash="68fc4811e8f2d9a1b502454533fe5bca"/></dir><file name="Form.php" hash="776d2aab11db7d212061ca9a30936af1"/><dir name="Incontext"><file name="Js.php" hash="d09bf9157c0b7c5f6dba16d8cdac557d"/></dir><file name="Info.php" hash="9c1948c538383376b1dc1b4c76c31e95"/><dir name="Review"><file name="Billing.php" hash="62a22e1f5bd65c4d9369b5794779ffe9"/><file name="Details.php" hash="57d97c8a2c3b7ddac7dc4cda43e4363f"/><file name="Shipping.php" hash="694374b68714b6d58d9af8b9fb15d502"/></dir><file name="Review.php" hash="87c8f3bf319799b33170bec9f42e2544"/><file name="Shortcut.php" hash="26f13ae7afac41ce88fb1cd4042b61b5"/></dir></dir><dir name="Helper"><dir name="Altpayment"><file name="Abstract.php" hash="5fc29e9d6355660415934426d0ee624e"/></dir><file name="Data.php" hash="35a26dab0e14154f2ee80a498f788d7c"/><file name="Jwt.php" hash="095f17eda9a1831cf5f97e8806b65202"/><file name="Masterpass.php" hash="69489b7cae8b99fe216f522b19f3d448"/><file name="Paypal.php" hash="74d1d0885349c432016bd04f3211c4c2"/></dir><dir name="Model"><dir name="Altpayment"><file name="Cart.php" hash="1dc83b97c44463e954efc8ee1c9e62b8"/></dir><file name="Masterpass.php" hash="063acd12e22bdc26d7591cbabf7e3005"/><file name="Payment.php" hash="31b2565f2b2d0803506a8af2364001dc"/><dir name="Paypal"><file name="Credit.php" hash="3548d6c4308df9d377cc1dd0d40f0f4d"/></dir><file name="Paypal.php" hash="c3eb2058ff6860e85a9310944c989301"/><file name="Report.php" hash="7f5e5bf0c652b37cf8c42eb553c8b3e0"/><dir name="Resource"><dir name="Report"><file name="Collection.php" hash="5870728a842922bbbff9c50173a90bd4"/></dir><file name="Report.php" hash="59598e2958a864119925c6e847b66121"/><file name="Setup.php" hash="8bdfbde89d786809d8aa2637efb1d2ae"/><dir name="Storedcard"><file name="Collection.php" hash="756c3c2d6dd5384f37847a028ac12fee"/></dir><file name="Storedcard.php" hash="d43320b704eb1e37c77a5ac20401c557"/></dir><file name="Session.php" hash="136b4146cea2f596847f0b838ec3f532"/><dir name="Source"><file name="Cctype.php" hash="d2dfff6147dc5c2748c7e9767b1fd1cb"/><file name="PaymentAction.php" hash="3c900b82e9af73a372d9f5f36bc1c264"/></dir><file name="Storedcard.php" hash="50897a56669c5938d4613579b603df93"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Proxy.php" hash="29ea9cb11927cd1e43055a42101eea36"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Hps"><dir name="Paypal"><file name="ReportsController.php" hash="914711bc008ec9e240918be7e77d1d54"/></dir></dir><file name="StoredcardController.php" hash="1e968134bf3b60a5f49544ddd1df8f03"/></dir><file name="GiftcardController.php" hash="dd15a7709121a3149fb30f77c385b18f"/><file name="MasterpassController.php" hash="2fb95214db3d3d017dd022743636ec50"/><file name="PaypalController.php" hash="962ce3dc3e738689d6ec6b122ed46001"/><file name="StoredcardController.php" hash="57116e86203df6f24a12fcd93186b534"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8dc53c22d22cd633ebd6c06e7262c741"/><file name="config.xml" hash="4581a4347d7acdbb1cc482d090b29fdf"/><file name="system.xml" hash="657ee021e3b9bd9ceaae41328b16fe31"/></dir><dir name="sql"><dir name="hps_securesubmit_setup"><file name="install-1.0.0.php" hash="d424731dcb784aad59dad0bcce431375"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="510826261ea81ea6a09d4ea84c59d41d"/><file name="mysql4-upgrade-1.0.1-1.1.0.php" hash="01e948ea2939f9b0b69bb6748adc53f2"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="84cf1a359fc5a5600e1d98ba0089d911"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="securesubmit"><file name="admin-checkout.js" hash="14d970828f50bb463dc3f7cdaca97e1d"/><file name="checkout-form.js" hash="899cad514781c63fc6b6c1bf6e645494"/><dir name="masterpass"><file name="lightbox.js" hash="b534647c7c06b5ce90caf4cdd6166f91"/></dir><dir name="paypal"><file name="incontext.js" hash="e3810f12033fa9822db756a22622f799"/></dir><file name="secure.submit-1.0.1.js" hash="988d59dadbc272b869bc9e56cbd7518e"/></dir></dir></target><target name="magelib"><dir name="SecureSubmit"><file name="Hps.php" hash="c16cc4501127559a6b08594d14443e34"/><file name="LICENSE.txt" hash="de081f847a769f89be5a1f80862005ba"/><file name="PRIVACY.txt" hash="58cdc5fbbff24a84a838b0174b254f70"/><file name="README.md" hash="8320a396aa5544e61fe2e8f2adb09505"/><file name="index.php" hash="feabe5cc691b088d6ade3e04d6b120fc"/><dir name="src"><dir name="Abstractions"><file name="HpsAltPaymentServiceInterface.php" hash="ecd5ec9027af6c3998ac8cb9c5efe81a"/><file name="HpsBuilderAbstract.php" hash="6498e7b7e00716574a9dd238d1d7da5e"/><file name="HpsConfigInterface.php" hash="780f4506b58219cc706bd06ba7dce8af"/><file name="HpsGatewayServiceAbstract.php" hash="fab1e7552a4fa433328b35f7f2a78895"/><file name="HpsGatewayServiceInterface.php" hash="58a8c2e2dfe1b01382191ccd9ecc0d38"/><file name="HpsLoggerInterface.php" hash="94b90c78aa77c1a265a067486d98a769"/><file name="HpsPayPlanResourceAbstract.php" hash="f52b32fc7e2a6425b699050a3a2603a6"/><file name="HpsPayPlanResourceInterface.php" hash="22dd33e354f46218d2872eab956d57c1"/></dir><dir name="Entities"><dir name="AltPayment"><file name="HpsAltPaymentAddToBatch.php" hash="1684714c0cd14d6d33288a44f43c9dd6"/><file name="HpsAltPaymentAuth.php" hash="4f2748e2b95cffed6bd0e62f75af71eb"/><file name="HpsAltPaymentCapture.php" hash="51a86062c15c6f8de15147b5b53f89a4"/><file name="HpsAltPaymentCreateSession.php" hash="4e83acd11a03e7dfcf904f2421d858b3"/><file name="HpsAltPaymentResponse.php" hash="860336d2015560f889c41773574b97ab"/><file name="HpsAltPaymentReturn.php" hash="0b9d8cb0f67ddf113b99ca64ab6019a3"/><file name="HpsAltPaymentSale.php" hash="f390a9a4af50f7a8a863c607f7e3357f"/><file name="HpsAltPaymentSessionInfo.php" hash="3c50068d48634178a4259d789e1ddf1a"/><file name="HpsAltPaymentVoid.php" hash="429f0fbec31ae4842c494b0a8af47ddb"/><file name="HpsBuyerData.php" hash="4fd94d96a547378d2974fa386c89223f"/><file name="HpsCardinalMPIAddOrderNumberResponse.php" hash="a2f2c09eb9e7020e7af97819fe065dc3"/><file name="HpsCardinalMPIAuthenticateResponse.php" hash="6868b0bc55d8e3409684e795d1db92fc"/><file name="HpsCardinalMPIAuthorizeResponse.php" hash="566a64988246220b00da62078ae32068"/><file name="HpsCardinalMPIAuthresponseResponse.php" hash="a53fb4863feb909ccb0d2f2cc254562f"/><file name="HpsCardinalMPICaptureResponse.php" hash="29de876ce9bc632016fceab91dca22ac"/><file name="HpsCardinalMPILookupResponse.php" hash="7171aff90865b67db79559f7b2f579ba"/><file name="HpsCardinalMPIPreapprovalResponse.php" hash="e9408b385ca4f32de5f1adf96a36c42d"/><file name="HpsCardinalMPIRefundResponse.php" hash="71dbbff6f6383a19b0feb91f8771dbe5"/><file name="HpsCardinalMPIResponse.php" hash="d3729129967b1da049287e200e4d46e2"/><file name="HpsCardinalMPIVoidResponse.php" hash="2796de53634fccca806a4a4143779f81"/><file name="HpsLineItem.php" hash="4ff06a280975312365cf10a730636682"/><file name="HpsOrderData.php" hash="5d3ae0110d44f4786d4398861735a259"/><file name="HpsPaymentData.php" hash="2bd9ddc10ecdaebdbb5bf0e3cf71f642"/><file name="HpsShippingInfo.php" hash="63b621ebba4ae1711aca57073b0abec7"/></dir><dir name="Attachment"><file name="HpsAttachment.php" hash="2b65e1656a20e689258113edebef2839"/></dir><dir name="Batch"><file name="HpsBatch.php" hash="d9af4664e64172cb8edaeaa1ea7c7337"/></dir><dir name="Check"><file name="HpsCheck.php" hash="8fb85bd4d608e72a9690285ec46fa6d2"/><file name="HpsCheckHolder.php" hash="58f865b34faf2790fef26066de775a15"/><file name="HpsCheckResponse.php" hash="ff3c752bc85554424e62ed7efbc053f2"/><file name="HpsCheckResponseDetails.php" hash="28928ceb2dea574603a376aed1691a90"/></dir><dir name="Credit"><file name="HpsAccountVerify.php" hash="527a69e5a39153b764e6c14e0d98bf34"/><file name="HpsAuthorization.php" hash="7ec1bbfa6efa5bc48432b5de81eda314"/><file name="HpsCPCData.php" hash="f246c4aa1eec482ba84966c563aeb970"/><file name="HpsCPCEdit.php" hash="f04b0089485ba9e7eacba8e15815ec97"/><file name="HpsCardHolder.php" hash="ffee4609a3ffa886a386a12dea3f4508"/><file name="HpsCharge.php" hash="512fb9e459b336a9e256d8f1e08e36b9"/><file name="HpsChargeExceptions.php" hash="c7df102696a205a4c5689c48878ac5f3"/><file name="HpsCreditCard.php" hash="6aa3d449b0648997c4c532c1e3603cbb"/><file name="HpsManageTokensResponse.php" hash="47762f73bcda996033881861fcc7fb8a"/><file name="HpsOfflineAuthorization.php" hash="6f11736d36cfde0d9d79c94e92f60c8b"/><file name="HpsRecurringBilling.php" hash="9da8f9b16179729b77615f04993b05bf"/><file name="HpsRefund.php" hash="aa4664916ebb94b8f2066fd7c17b0fd4"/><file name="HpsReportTransactionDetails.php" hash="b2a92c5b66c4173ac4f98f7512bb1b62"/><file name="HpsReportTransactionSummary.php" hash="441b01c652db42213264980e6f693b40"/><file name="HpsReversal.php" hash="350191a2d38189ef8e098ed1f922c1d3"/><file name="HpsSecureEcommerce.php" hash="99fa819aa300477ef390c76fd04d0b69"/><file name="HpsVoid.php" hash="bf6216cea2f130789a045fc226c54cd0"/></dir><dir name="Debit"><file name="HpsDebitAddValue.php" hash="9053c701093889f864dd36af208f4f71"/><file name="HpsDebitReturn.php" hash="519cb73c6fc4ce716453d5ff94f437a0"/><file name="HpsDebitReversal.php" hash="223f6db72f0219ef25eb0f0adec4e9be"/><file name="HpsDebitSale.php" hash="74fa1e1425cfe6294146c879a4049aa8"/></dir><dir name="Fluent"><file name="HpsBuilderAction.php" hash="8649cc2c53fd961f350070193fedb5c6"/><file name="HpsUnknownPropertyException.php" hash="d019e8645fae6f984ad7b7ea3cebb546"/></dir><dir name="Gift"><file name="HpsGiftCard.php" hash="c8bad2a5336689e3192ea223a97760bf"/><file name="HpsGiftCardActivate.php" hash="097ac7c36cae11b8c40a3f1414518e49"/><file name="HpsGiftCardAddValue.php" hash="131a9d7cbc711a4e3e85c66049028f30"/><file name="HpsGiftCardAlias.php" hash="133d2d4701c5aa88fa0eece6ee69de06"/><file name="HpsGiftCardBalance.php" hash="9b9fe395d218c79c55faf28fd736b431"/><file name="HpsGiftCardDeactivate.php" hash="323ca5a67c6ff0169925192952881db5"/><file name="HpsGiftCardReplace.php" hash="f122a7d924a56fcc406bc8b1c82ac2b2"/><file name="HpsGiftCardReversal.php" hash="88ba755e52f41311206add4fa8ee5e09"/><file name="HpsGiftCardReward.php" hash="f758e8c5462d336236ae0d257789cdaf"/><file name="HpsGiftCardSale.php" hash="0f758ef6653215be643abaea4964352a"/><file name="HpsGiftCardVoid.php" hash="f0294740f5b7f545167d5fb258f4dcdd"/></dir><file name="HpsAddress.php" hash="8de2c8ea4a2b0a440d1b4bc0bf8321b8"/><file name="HpsConsumer.php" hash="1254142dfa0821cbb0bf154cf51f34d2"/><file name="HpsDirectMarketData.php" hash="1925c204d19cb9233ec8178e3b5cdc50"/><file name="HpsEncryptionData.php" hash="1e4845abc6c42e8f0265e2679b05efb6"/><file name="HpsTokenData.php" hash="c1d795a70b9082397dde41a8cc317ef0"/><file name="HpsTrackData.php" hash="4656f37b7c4c777d0c63b4102efe5a1a"/><file name="HpsTransaction.php" hash="e44e54a5a1ef736b0e63a76085deac75"/><file name="HpsTransactionDetails.php" hash="4e77261d0aced118b49e26ef786beace"/><file name="HpsTransactionHeader.php" hash="ebd21539f84425f0e2fc57c6049a26a1"/><file name="HpsTransactionStatus.php" hash="a5a67f8fe3780f66b045cc4314660dc5"/><dir name="PayPlan"><file name="HpsPayPlanAmount.php" hash="25706476e264124567d704f981745b13"/><file name="HpsPayPlanCustomer.php" hash="2714a7525fb3830fc018544ea0622ab5"/><file name="HpsPayPlanPaymentMethod.php" hash="fd3077d63e6f31c2d8a4c60c78a678ea"/><file name="HpsPayPlanSchedule.php" hash="889ff67177e343b37df11b3490822c72"/></dir><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/><file name=".DS_Store" hash="92d42bd310aa7f6dd74d14e6cdd2b9e9"/></dir><dir name="Infrastructure"><dir name="Enums"><file name="HpsACHType.php" hash="1ff5593689a404cb0179c2b5cb5fe19e"/><file name="HpsAccountType.php" hash="760d91e120f443c326e6c7586aa61092"/><file name="HpsAttachmentType.php" hash="0447e22804438c0235c273a880dd5cdd"/><file name="HpsCardBrand.php" hash="9532bb7c40811c114a1eeeffa8b9732c"/><file name="HpsCentinelCheckoutType.php" hash="7370920cb980bbfc54c741a981cd79bb"/><file name="HpsCheckType.php" hash="d60c676d93c8ada169deb14ddc8e64e7"/><file name="HpsDataEntryMode.php" hash="c323d884a7a305f9af647ea1d9a4177e"/><file name="HpsExceptionCodes.php" hash="65feb7be80853e0de9994037c9ffb834"/><file name="HpsGiftCardAliasAction.php" hash="ebcb27c6fb800e17693ed4af2e8a8943"/><file name="HpsItemChoiceTypePosResponseVer10Transaction.php" hash="686225a07738db2233a2228bec6baabf"/><file name="HpsPayPlanAccountType.php" hash="4d383c42a990fb077fae49386c08b870"/><file name="HpsPayPlanCustomerStatus.php" hash="3ff092e8dd97f2a2474fb64103cb238f"/><file name="HpsPayPlanPaymentMethodStatus.php" hash="b020c52de7987ed3011cb97e4d440c6a"/><file name="HpsPayPlanPaymentMethodType.php" hash="1f77c5c8528815f05803c1381cb4151a"/><file name="HpsPayPlanScheduleDuration.php" hash="05101e6fe3b725b43917b59770f2dbb1"/><file name="HpsPayPlanScheduleFrequency.php" hash="0b3f029c64315ee9c8701d23319941c1"/><file name="HpsPayPlanScheduleStatus.php" hash="3579b52ccf36e576fd2dfb36118716f6"/><file name="HpsSECCode.php" hash="551661613c127c068f139083338b92d1"/><file name="HpsTaxType.php" hash="ba0e05330880810e58370f2f3490ca81"/><file name="HpsTrackDataMethod.php" hash="446069e9786f9585c3490140b29ae52f"/><file name="HpsTransactionType.php" hash="a38b3f4c654a4fa3b2c2d64b8afacf24"/></dir><file name="HpsApiConnectionException.php" hash="ac5a8064a7c2a1616035a5702f36cd50"/><file name="HpsArgumentException.php" hash="855c43e88fc24b582cfe56875d7cff42"/><file name="HpsAuthenticationException.php" hash="ddfb78554d130dfa8c1d00418917f440"/><file name="HpsCheckException.php" hash="13f8764a73dbdc8b5ac4fa092d6f6790"/><file name="HpsConfiguration.php" hash="010996727d89c485c1d11463e5c53a8e"/><file name="HpsCreditException.php" hash="a16bf1ecd6a2c866b7b40351aab3df34"/><file name="HpsCreditExceptionDetails.php" hash="d71c54b2846283a8f97aae74a747dfd9"/><file name="HpsEmptyLogger.php" hash="c670a657abbe119467aee7bf58b7cb15"/><file name="HpsException.php" hash="e5757d0744e7bd1b8c0d2a17dc655267"/><file name="HpsGatewayException.php" hash="e8a5285067fe02528d9fb63fd205e3a3"/><file name="HpsGatewayExceptionDetails.php" hash="16dd36360e2237ca89e056c61766bcdd"/><file name="HpsInvalidRequestException.php" hash="d8205e32059164e0aead66bd90cb1784"/><file name="HpsLogger.php" hash="420c2fc7a2d48b05ebd6a659a60ef867"/><file name="HpsProcessorError.php" hash="ff7f1f2c5327417b4997f9e36fa7c887"/><file name="HpsProcessorException.php" hash="ba28a92f0e551053506dcc391c5bc431"/><file name="HpsProcessorExceptionDetails.php" hash="6a569aacf045c19ade6472a857a3a274"/><dir name="Validation"><file name="HpsGatewayResponseValidation.php" hash="92a6983b38d6127ffefe8157a774c47a"/><file name="HpsInputValidation.php" hash="2f3b9ddeedd641b6112a8d49cd538663"/><file name="HpsIssuerResponseValidation.php" hash="af9f575a0034685a7cef77f7cbe99342"/><file name="HpsProcessorResponseValidation.php" hash="ff19a569f8bdd6ef7b58a460cf06b4e8"/></dir><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><dir name="Services"><dir name="Fluent"><dir name="Gateway"><dir name="Check"><file name="HpsCheckServiceOverrideBuilder.php" hash="5b4a49a897f87d2a332182a1ccd67d0c"/><file name="HpsCheckServiceRecurringBuilder.php" hash="c86a2fd5165a65c78e38e3bbb1b9636c"/><file name="HpsCheckServiceReturnBuilder.php" hash="5ce46356468714f65ad827e1593977cc"/><file name="HpsCheckServiceSaleBuilder.php" hash="b823e74642e165772f5cb03beffacce7"/><file name="HpsCheckServiceVoidBuilder.php" hash="17305b04474285a8b64007c549180ba5"/></dir><dir name="Credit"><file name="HpsCreditServiceAuthorizeBuilder.php" hash="e640918f2a07d7217a601b5d01d4803e"/><file name="HpsCreditServiceCaptureBuilder.php" hash="fd6512f3b72f9051eaf7c3daeff2cb48"/><file name="HpsCreditServiceChargeBuilder.php" hash="8162a151298c67322d79f4d6514ac73b"/><file name="HpsCreditServiceCpcEditBuilder.php" hash="7401c33a56c5a3c6a23f5f70101a4926"/><file name="HpsCreditServiceEditBuilder.php" hash="cdcf661c4182625212ec724b52eb8491"/><file name="HpsCreditServiceGetBuilder.php" hash="05b0cafe715a4d3ceb3c88b99b0c8dc1"/><file name="HpsCreditServiceListTransactionsBuilder.php" hash="a7765dfadc8e21177cc453a1e7dfd715"/><file name="HpsCreditServiceOfflineAuthBuilder.php" hash="d86d2425c6bbf28854a31d09a9f802b8"/><file name="HpsCreditServiceOfflineChargeBuilder.php" hash="0ee9ecf6b499a16f01fa2a7b94af00ca"/><file name="HpsCreditServicePrepaidAddValueBuilder.php" hash="86b2cc263fb9b9646e756796d4db2f3e"/><file name="HpsCreditServicePrepaidBalanceInquiryBuilder.php" hash="c1af37b0b03758cd80efb2ac74082984"/><file name="HpsCreditServiceRecurringBuilder.php" hash="50a4e26c4e4eef5c7a83a98741009b5e"/><file name="HpsCreditServiceRefundBuilder.php" hash="4d5ab9c2a11c18a47e416bd90dffc5e8"/><file name="HpsCreditServiceReverseBuilder.php" hash="7960e9efa00ceb0d0c5368715c07d424"/><file name="HpsCreditServiceUpdateTokenExpirationBuilder.php" hash="7aa2531c6ca4d8ab9ce8a04fcfa2060a"/><file name="HpsCreditServiceVerifyBuilder.php" hash="62027b344ee5444ccd1534358a405857"/><file name="HpsCreditServiceVoidBuilder.php" hash="0029756571343a1d8c6380874f6f5b6b"/></dir><dir name="Debit"><file name="HpsDebitServiceAddValueBuilder.php" hash="5f972b68a5afa062cbf911bfb3a946bc"/><file name="HpsDebitServiceChargeBuilder.php" hash="26aafce2a87bbbd8231a039209c49657"/><file name="HpsDebitServiceReturnBuilder.php" hash="2e11267e12bdd338b953db352a373961"/><file name="HpsDebitServiceReverseBuilder.php" hash="b088431d3ba0726d44cc418e92267958"/></dir><dir name="GiftCard"><file name="HpsGiftCardServiceActivateBuilder.php" hash="65e3ebd1c6ded3860b238d03e542fe3b"/><file name="HpsGiftCardServiceAddValueBuilder.php" hash="432582c9fd6617c86b373f5fe0b14fb1"/><file name="HpsGiftCardServiceAliasBuilder.php" hash="1b096debfa6678af2d6ddecfa82a638e"/><file name="HpsGiftCardServiceBalanceBuilder.php" hash="6bebaac04d059204a2408d693f77c449"/><file name="HpsGiftCardServiceDeactivateBuilder.php" hash="92b16b331414c40ea11de330bd447273"/><file name="HpsGiftCardServiceReplaceBuilder.php" hash="063e6b33a673c23553047a6f72927b2a"/><file name="HpsGiftCardServiceReverseBuilder.php" hash="2f7b96b1f9608cb7e3526ecb9b15558f"/><file name="HpsGiftCardServiceRewardBuilder.php" hash="242fbe42ab731b138e4d74be4cde4e9a"/><file name="HpsGiftCardServiceSaleBuilder.php" hash="8af2977da26e3707e42569ad7bf4c4a5"/><file name="HpsGiftCardServiceVoidBuilder.php" hash="fff556a586bb09d22f521a90d30fb809"/></dir><file name="HpsFluentCheckService.php" hash="e89511e006e914bdd4daf6765a49e97b"/><file name="HpsFluentCreditService.php" hash="9d1a39abb596ed14a4e7a1e58a2015b3"/><file name="HpsFluentDebitService.php" hash="63e86fe32a92c80cc5bd163283da6c64"/><file name="HpsFluentGiftCardService.php" hash="53697a755fc90256b940c74282693b0d"/></dir></dir><dir name="Gateway"><dir name="AltPayment"><file name="HpsAltPaymentService.php" hash="18ccfae5ce40a88296f55969d31373ad"/><file name="HpsMasterPassService.php" hash="8cb56ffc62b91c4fdb14037515d3a10c"/><file name="HpsPayPalService.php" hash="c91eebb0eca8bdda2505b78c4746db28"/></dir><file name="HpsAttachmentService.php" hash="884cdaa820b99bcb5dfd7cb950c13b25"/><file name="HpsBatchService.php" hash="2a4c11a4f7c78ec1e3b461b3803826c5"/><file name="HpsCentinelGatewayService.php" hash="40300a57982ccd5325b7bd0986a8bcc4"/><file name="HpsCheckService.php" hash="17eac57a5f3a6f24e31000325ad9ac1d"/><file name="HpsCreditService.php" hash="ba6213fbc7babefc8206e992a3f68407"/><file name="HpsDebitService.php" hash="0ea76c01b3c817fcaea876bff28681b3"/><file name="HpsGiftCardService.php" hash="e1deb113c685845e2af2bb0ff793ea4d"/><file name="HpsPayPlanService.php" hash="ce5d2c003e72be8328634d92ab8ae6eb"/><file name="HpsRestGatewayService.php" hash="42f7053d3ba9f9b1f87cf9aac70d77a5"/><file name="HpsSoapGatewayService.php" hash="c2f52eb5f0f9e63f4eb2ae87dd94770b"/><file name="HpsTokenService.php" hash="b1dad4289201b399f89ad1d29a799d39"/><dir name="PayPlan"><file name="HpsPayPlanCustomerService.php" hash="cda074fca2230c26919a813cc2d71b5c"/><file name="HpsPayPlanPaymentMethodService.php" hash="61dd42308d203251f4483d68561c191b"/><file name="HpsPayPlanScheduleService.php" hash="e9afcd7adba7847ee5ad71f1f57249c1"/></dir></dir><file name="HpsCentinelConfig.php" hash="0f714106eb4fc4c2eb95c3fb27898018"/><file name="HpsServicesConfig.php" hash="bdc301430767bf25a4333dcdf6772aaa"/><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/></dir><file name="index.php" hash="ce407ff5715c837d02b1aba7975bf512"/><file name=".DS_Store" hash="fb4d06cbd65ab29860d86984919afa4a"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="securesubmit.xml" hash="cc04e952cc17ea3462931a9e7a655316"/></dir><dir name="template"><dir name="securesubmit"><file name="form.phtml" hash="67a460ca8f034f4bfe3fbb8e7845f37f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="securesubmit.xml" hash="410fda5ef3920f893f5a17ec379aa2da"/></dir><dir name="template"><dir name="securesubmit"><file name="form.phtml" hash="d2d68ae07e97339ce760e012de3cee95"/><dir name="masterpass"><file name="connect.phtml" hash="b5f47624447a44958ce4fa004c58c319"/><file name="form.phtml" hash="039d6a174ac24c45ece0d14b92b6c9c4"/><file name="js.phtml" hash="274e871b2d8270e3224b9ce12794c2c5"/><file name="mark.phtml" hash="fe27b341b5fb034e90ac35c92ef998d4"/><dir name="review"><file name="details.phtml" hash="0dc5e1201e7e424f089c15fc83a1c70f"/><dir name="shipping"><file name="method.phtml" hash="cc426553636aa08840bee1c4778d89e4"/></dir></dir><file name="review.phtml" hash="cfc643de65b962ba27306587357f45d3"/></dir><dir name="paypal"><dir name="incontext"><file name="js.phtml" hash="16b4ad23ea05464a55bb0390cd72e248"/><file name="payment.phtml" hash="b32d269057984f656422609015dd7d91"/></dir><dir name="review"><file name="details.phtml" hash="0dc5e1201e7e424f089c15fc83a1c70f"/><dir name="shipping"><file name="method.phtml" hash="cc426553636aa08840bee1c4778d89e4"/></dir></dir><file name="review.phtml" hash="cfc643de65b962ba27306587357f45d3"/><file name="shortcut.phtml" hash="268bfac86e653ec5981cd201075f4105"/></dir><file name="storedcards.phtml" hash="d083493f42af257cdb1949a8cbd8855b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Hps_Securesubmit.xml" hash="d5aed3f48a45f8e611b68d1e6f34c959"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="securesubmit"><dir name="css"><file name="hps-styles.css" hash="054fefd2b23342565da4a4b0d977fdb7"/></dir><dir name="images"><file name="ajax-loader.gif" hash="f48ee069890b16455c3ddcacee9b5f75"/><file name="arrow@2x.png" hash="ecc6766f32ae007e48f1cac2cefae87b"/><file name="bg_x.png" hash="c321c67f6929326129426c9e83207ea3"/><file name="cvv1.png" hash="0cba150037737255b0b750fd8b7aa3a8"/><file name="delete-hover.svg" hash="b50f601a53505660e093c126a84773b2"/><file name="delete.png" hash="0797e40a65fe0cf10252e788f40bee50"/><file name="delete.svg" hash="0793be8c20ffb397cc933d6c6de4df75"/><file name="heartland-logo.png" hash="0a15c70514f1449af4a98931b62d6844"/><file name="heartland-logo@1x.png" hash="d1982d3c613fee22120b06494aa92bfa"/><file name="heartland-logo@2x.png" hash="24daf8c6f920ed7b9c5aad79143f76b5"/><file name="icon_sprite.png" hash="e15f0103ef5ebe3baf48960bb9ccfaab"/><file name="icon_sprite@2x.png" hash="156b591cc9464429bc3b614cbbe636fd"/><file name="ss-input-amex@2x.png" hash="3a0311a7ae08337686031ee12d428b7b"/><file name="ss-inputcard-amex@2x.png" hash="a20df89111cf94aa5d653f44bf7e8cc8"/><file name="ss-inputcard-blank@2x.png" hash="1f84a3d28f8604a0ae1f019d10325c51"/><file name="ss-inputcard-discover@2x.png" hash="c17c70f6dc3908b1c066d0c0aa53a9bc"/><file name="ss-inputcard-jcb@2x.png" hash="bc353bc2e57fe2e2b689b69ce1826389"/><file name="ss-inputcard-mastercard@2x.png" hash="48cae147cae1ef0121e090df928632c0"/><file name="ss-inputcard-visa@2x.png" hash="c8bd7bf3aa1fff3226b5ce571ddefa42"/><file name="ss-lock.png" hash="430fbebc08387bcb43fed60ba14e5da1"/><file name="ss-lock@2x.png" hash="2772a5c4b0e7d622cb8773fd575108d2"/><file name="ss-logo.png" hash="a6e2017f773c3ebd82318cb5417a09dd"/><file name="ss-saved-amex@2x.png" hash="7aff4d28b217bceeb2d1fe139998e980"/><file name="ss-saved-discover@2x.png" hash="f5b5e76e49f3e02b677117068cd1d3fa"/><file name="ss-saved-jcb@2x.png" hash="58923ad29390b36556e61de061417fc8"/><file name="ss-saved-mastercard@2x.png" hash="19d69c364291adf7e87355fbe79ebd38"/><file name="ss-saved-visa@2x.png" hash="c3d935832dfcde4dba793e91665315b7"/><file name="ss-shield@1x.png" hash="473a87521ec93d14c906cd2415833f33"/><file name="ss-shield@2x.png" hash="ceada08d149bd9c2d63706e67eb7b1e9"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir></dir></dir></target></contents>
|
| 18 |
<compatible/>
|
| 19 |
<dependencies><required><php><min>5.2.0</min><max>5.6.28</max></php></required></dependencies>
|
| 20 |
</package>
|
