Skip to content

Commit 9d24edc

Browse files
author
Sunny Raj Rathod
authored
Merge pull request #173 from AuthorizeNet/future
Merging Future to master
2 parents e38aa75 + a378530 commit 9d24edc

File tree

74 files changed

+2425
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2425
-28
lines changed

classmap.php

+19
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
'Doctrine\Common\Annotations\SimpleAnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php',
3636
'Doctrine\Common\Annotations\TokenParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php',
3737
'Doctrine\Common\Lexer\AbstractLexer' => $vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php',
38+
'Doctrine\Instantiator\Instantiator' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php',
39+
'Doctrine\Instantiator\InstantiatorInterface' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php',
3840
'GoetasWebservices\Xsd\XsdToPhpRuntime\Jms\Handler\BaseTypesHandler' => $vendorDir . '/goetas-webservices/xsd2php-runtime/src/Jms/Handler/BaseTypesHandler.php',
3941
'GoetasWebservices\Xsd\XsdToPhpRuntime\Jms\Handler\XmlSchemaDateHandler' => $vendorDir . '/goetas-webservices/xsd2php-runtime/src/Jms/Handler/XmlSchemaDateHandler.php',
4042
'JMS\Parser\AbstractLexer' => $vendorDir . '/jms/parser-lib/src/JMS/Parser/AbstractLexer.php',
@@ -415,6 +417,20 @@
415417
'net\authorize\api\contract\v1\TransactionResponseType\ErrorsAType\ErrorAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/ErrorsAType/ErrorAType.php',
416418
'net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/MessagesAType/MessageAType.php',
417419
'net\authorize\api\contract\v1\TransactionResponseType\SplitTenderPaymentsAType\SplitTenderPaymentAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/SplitTenderPaymentsAType/SplitTenderPaymentAType.php',
420+
421+
'net\authorize\api\contract\v1\GetAUJobSummaryRequest' => $libDir . 'net/authorize/api/contract/v1/getAUJobSummaryRequest.php',
422+
'net\authorize\api\contract\v1\GetAUJobSummaryResponse' => $libDir . 'net/authorize/api/contract/v1/GetAUJobSummaryResponse.php',
423+
'net\authorize\api\contract\v1\GetAUJobDetailsRequest' => $libDir . 'net/authorize/api/contract/v1/GetAUJobDetailsRequest.php',
424+
'net\authorize\api\contract\v1\GetAUJobDetailsResponse' => $libDir . 'net/authorize/api/contract/v1/GetAUJobDetailsResponse.php',
425+
426+
'net\authorize\api\contract\v1\AuDeleteType' => $libDir . 'net/authorize/api/contract/v1/AuDeleteType.php',
427+
'net\authorize\api\contract\v1\AuDetailsType' => $libDir . 'net/authorize/api/contract/v1/AuDetailsType.php',
428+
'net\authorize\api\contract\v1\AuResponseType' => $libDir . 'net/authorize/api/contract/v1/AuResponseType.php',
429+
'net\authorize\api\contract\v1\AuUpdateType' => $libDir . 'net/authorize/api/contract/v1/AuUpdateType.php',
430+
431+
'net\authorize\api\contract\v1\ListOfAUDetailsType' => $libDir . 'net/authorize/api/contract/v1/ListOfAUDetailsType.php',
432+
'net\authorize\api\contract\v1\EmvTagType' => $libDir . 'net/authorize/api/contract/v1/EmvTagType.php',
433+
'net\authorize\api\contract\v1\PaymentEmvType' => $libDir . 'net/authorize/api/contract/v1/PaymentEmvType.php',
418434

419435

420436
//Controllers
@@ -457,4 +473,7 @@
457473
'net\authorize\api\controller\UpdateSplitTenderGroupController' => $libDir . 'net/authorize/api/controller/UpdateSplitTenderGroupController.php',
458474
'net\authorize\api\controller\ValidateCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/ValidateCustomerPaymentProfileController.php',
459475

476+
'net\authorize\api\controller\GetAUJobDetailsController' => $libDir . 'net/authorize/api/controller/GetAUJobDetailsController.php',
477+
'net\authorize\api\controller\GetAUJobSummaryController' => $libDir . 'net/authorize/api/controller/GetAUJobSummaryController.php',
478+
460479
);

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
"ext-json": "*",
1212
"ext-simplexml": "*",
1313
"ext-xmlwriter": "*",
14+
"goetas/xsd2php": "^2.0",
1415
"goetas-webservices/xsd2php-runtime":"^0.2",
1516
"goetas-webservices/xsd-reader": "^0.1",
16-
"jms/serializer": "serializer-master-dev as 1.0"
17+
"jms/serializer": "serializer-master-dev as 1.0",
18+
"symfony/yaml": "^3.1"
1719
},
1820
"require-dev": {
1921
"phpunit/phpunit": "~4.0",

lib/AuthorizeNetAIM.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ public function __construct($response, $delimiter, $encap_char, $custom_fields)
475475

476476
// Set custom fields
477477
if ($count = count($custom_fields)) {
478-
$custom_fields_response = array_slice($this->_response_array, -$count, $count);
478+
$custom_fields_response = array_slice($this->_response_array, -$count-1, $count);
479479
$i = 0;
480480
foreach ($custom_fields as $key => $value) {
481481
$this->$key = $custom_fields_response[$i];

lib/AuthorizeNetSIM.php

+9-8
Original file line numberDiff line numberDiff line change
@@ -197,22 +197,23 @@ public function getHiddenFieldString()
197197
/**
198198
* Generates a fingerprint needed for a hosted order form or DPM.
199199
*
200-
* @param string $api_login_id Login ID.
201-
* @param string $transaction_key API key.
202-
* @param string $amount Amount of transaction.
203-
* @param string $fp_sequence An invoice number or random number.
204-
* @param string $fp_timestamp Timestamp.
200+
* @param string $api_login_id Login ID.
201+
* @param string $transaction_key API key.
202+
* @param string $amount Amount of transaction.
203+
* @param string $fp_sequence An invoice number or random number.
204+
* @param string $fp_timestamp Timestamp.
205+
* @param string $fp_currency_code Currency Code
205206
*
206207
* @return string The fingerprint.
207208
*/
208-
public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp)
209+
public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp, $fp_currency_code = '')
209210
{
210211
$api_login_id = ($api_login_id ? $api_login_id : (defined('AUTHORIZENET_API_LOGIN_ID') ? AUTHORIZENET_API_LOGIN_ID : ""));
211212
$transaction_key = ($transaction_key ? $transaction_key : (defined('AUTHORIZENET_TRANSACTION_KEY') ? AUTHORIZENET_TRANSACTION_KEY : ""));
212213
if (function_exists('hash_hmac')) {
213-
return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key);
214+
return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^" . $fp_currency_code, $transaction_key);
214215
}
215-
return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key));
216+
return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^" . $fp_currency_code, $transaction_key));
216217
}
217218

218219
}

lib/net/authorize/api/constants/ANetEnvironment.php

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ class ANetEnvironment
66
const CUSTOM = "http://wwww.myendpoint.com";
77
const SANDBOX = "https://apitest.authorize.net";
88
const PRODUCTION = "https://api2.authorize.net";
9+
10+
const VERSION = "1.9.0";
911
}

lib/net/authorize/api/contract/v1/ANetApiRequestType.php

+27
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class ANetApiRequestType
1717
*/
1818
private $merchantAuthentication = null;
1919

20+
/**
21+
* @property string $clientId
22+
*/
23+
private $clientId = null;
24+
2025
/**
2126
* @property string $refId
2227
*/
@@ -45,6 +50,28 @@ public function setMerchantAuthentication(\net\authorize\api\contract\v1\Merchan
4550
return $this;
4651
}
4752

53+
/**
54+
* Gets as clientId
55+
*
56+
* @return string
57+
*/
58+
public function getClientId()
59+
{
60+
return $this->clientId;
61+
}
62+
63+
/**
64+
* Sets a new clientId
65+
*
66+
* @param string $clientId
67+
* @return self
68+
*/
69+
public function setClientId($clientId)
70+
{
71+
$this->clientId = $clientId;
72+
return $this;
73+
}
74+
4875
/**
4976
* Gets as refId
5077
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
namespace net\authorize\api\contract\v1;
4+
5+
/**
6+
* Class representing AuDeleteType
7+
*
8+
*
9+
* XSD Type: auDeleteType
10+
*/
11+
class AuDeleteType extends AuDetailsType
12+
{
13+
14+
/**
15+
* @property \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
16+
*/
17+
private $creditCard = null;
18+
19+
/**
20+
* Gets as creditCard
21+
*
22+
* @return \net\authorize\api\contract\v1\CreditCardMaskedType
23+
*/
24+
public function getCreditCard()
25+
{
26+
return $this->creditCard;
27+
}
28+
29+
/**
30+
* Sets a new creditCard
31+
*
32+
* @param \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
33+
* @return self
34+
*/
35+
public function setCreditCard(\net\authorize\api\contract\v1\CreditCardMaskedType $creditCard)
36+
{
37+
$this->creditCard = $creditCard;
38+
return $this;
39+
}
40+
41+
42+
}
43+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
<?php
2+
3+
namespace net\authorize\api\contract\v1;
4+
5+
/**
6+
* Class representing AuDetailsType
7+
*
8+
*
9+
* XSD Type: auDetailsType
10+
*/
11+
class AuDetailsType
12+
{
13+
14+
/**
15+
* @property integer $customerProfileID
16+
*/
17+
private $customerProfileID = null;
18+
19+
/**
20+
* @property integer $customerPaymentProfileID
21+
*/
22+
private $customerPaymentProfileID = null;
23+
24+
/**
25+
* @property string $firstName
26+
*/
27+
private $firstName = null;
28+
29+
/**
30+
* @property string $lastName
31+
*/
32+
private $lastName = null;
33+
34+
/**
35+
* @property string $updateTimeUTC
36+
*/
37+
private $updateTimeUTC = null;
38+
39+
/**
40+
* @property string $auReasonCode
41+
*/
42+
private $auReasonCode = null;
43+
44+
/**
45+
* @property string $reasonDescription
46+
*/
47+
private $reasonDescription = null;
48+
49+
/**
50+
* Gets as customerProfileID
51+
*
52+
* @return integer
53+
*/
54+
public function getCustomerProfileID()
55+
{
56+
return $this->customerProfileID;
57+
}
58+
59+
/**
60+
* Sets a new customerProfileID
61+
*
62+
* @param integer $customerProfileID
63+
* @return self
64+
*/
65+
public function setCustomerProfileID($customerProfileID)
66+
{
67+
$this->customerProfileID = $customerProfileID;
68+
return $this;
69+
}
70+
71+
/**
72+
* Gets as customerPaymentProfileID
73+
*
74+
* @return integer
75+
*/
76+
public function getCustomerPaymentProfileID()
77+
{
78+
return $this->customerPaymentProfileID;
79+
}
80+
81+
/**
82+
* Sets a new customerPaymentProfileID
83+
*
84+
* @param integer $customerPaymentProfileID
85+
* @return self
86+
*/
87+
public function setCustomerPaymentProfileID($customerPaymentProfileID)
88+
{
89+
$this->customerPaymentProfileID = $customerPaymentProfileID;
90+
return $this;
91+
}
92+
93+
/**
94+
* Gets as firstName
95+
*
96+
* @return string
97+
*/
98+
public function getFirstName()
99+
{
100+
return $this->firstName;
101+
}
102+
103+
/**
104+
* Sets a new firstName
105+
*
106+
* @param string $firstName
107+
* @return self
108+
*/
109+
public function setFirstName($firstName)
110+
{
111+
$this->firstName = $firstName;
112+
return $this;
113+
}
114+
115+
/**
116+
* Gets as lastName
117+
*
118+
* @return string
119+
*/
120+
public function getLastName()
121+
{
122+
return $this->lastName;
123+
}
124+
125+
/**
126+
* Sets a new lastName
127+
*
128+
* @param string $lastName
129+
* @return self
130+
*/
131+
public function setLastName($lastName)
132+
{
133+
$this->lastName = $lastName;
134+
return $this;
135+
}
136+
137+
/**
138+
* Gets as updateTimeUTC
139+
*
140+
* @return string
141+
*/
142+
public function getUpdateTimeUTC()
143+
{
144+
return $this->updateTimeUTC;
145+
}
146+
147+
/**
148+
* Sets a new updateTimeUTC
149+
*
150+
* @param string $updateTimeUTC
151+
* @return self
152+
*/
153+
public function setUpdateTimeUTC($updateTimeUTC)
154+
{
155+
$this->updateTimeUTC = $updateTimeUTC;
156+
return $this;
157+
}
158+
159+
/**
160+
* Gets as auReasonCode
161+
*
162+
* @return string
163+
*/
164+
public function getAuReasonCode()
165+
{
166+
return $this->auReasonCode;
167+
}
168+
169+
/**
170+
* Sets a new auReasonCode
171+
*
172+
* @param string $auReasonCode
173+
* @return self
174+
*/
175+
public function setAuReasonCode($auReasonCode)
176+
{
177+
$this->auReasonCode = $auReasonCode;
178+
return $this;
179+
}
180+
181+
/**
182+
* Gets as reasonDescription
183+
*
184+
* @return string
185+
*/
186+
public function getReasonDescription()
187+
{
188+
return $this->reasonDescription;
189+
}
190+
191+
/**
192+
* Sets a new reasonDescription
193+
*
194+
* @param string $reasonDescription
195+
* @return self
196+
*/
197+
public function setReasonDescription($reasonDescription)
198+
{
199+
$this->reasonDescription = $reasonDescription;
200+
return $this;
201+
}
202+
203+
204+
}
205+

0 commit comments

Comments
 (0)