Skip to content

Commit

Permalink
Merge pull request #173 from AuthorizeNet/future
Browse files Browse the repository at this point in the history
Merging Future to master
  • Loading branch information
Sunny Raj Rathod authored Aug 12, 2016
2 parents e38aa75 + a378530 commit 9d24edc
Show file tree
Hide file tree
Showing 74 changed files with 2,425 additions and 28 deletions.
19 changes: 19 additions & 0 deletions classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
'Doctrine\Common\Annotations\SimpleAnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php',
'Doctrine\Common\Annotations\TokenParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php',
'Doctrine\Common\Lexer\AbstractLexer' => $vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php',
'Doctrine\Instantiator\Instantiator' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php',
'Doctrine\Instantiator\InstantiatorInterface' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php',
'GoetasWebservices\Xsd\XsdToPhpRuntime\Jms\Handler\BaseTypesHandler' => $vendorDir . '/goetas-webservices/xsd2php-runtime/src/Jms/Handler/BaseTypesHandler.php',
'GoetasWebservices\Xsd\XsdToPhpRuntime\Jms\Handler\XmlSchemaDateHandler' => $vendorDir . '/goetas-webservices/xsd2php-runtime/src/Jms/Handler/XmlSchemaDateHandler.php',
'JMS\Parser\AbstractLexer' => $vendorDir . '/jms/parser-lib/src/JMS/Parser/AbstractLexer.php',
Expand Down Expand Up @@ -415,6 +417,20 @@
'net\authorize\api\contract\v1\TransactionResponseType\ErrorsAType\ErrorAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/ErrorsAType/ErrorAType.php',
'net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/MessagesAType/MessageAType.php',
'net\authorize\api\contract\v1\TransactionResponseType\SplitTenderPaymentsAType\SplitTenderPaymentAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/SplitTenderPaymentsAType/SplitTenderPaymentAType.php',

'net\authorize\api\contract\v1\GetAUJobSummaryRequest' => $libDir . 'net/authorize/api/contract/v1/getAUJobSummaryRequest.php',
'net\authorize\api\contract\v1\GetAUJobSummaryResponse' => $libDir . 'net/authorize/api/contract/v1/GetAUJobSummaryResponse.php',
'net\authorize\api\contract\v1\GetAUJobDetailsRequest' => $libDir . 'net/authorize/api/contract/v1/GetAUJobDetailsRequest.php',
'net\authorize\api\contract\v1\GetAUJobDetailsResponse' => $libDir . 'net/authorize/api/contract/v1/GetAUJobDetailsResponse.php',

'net\authorize\api\contract\v1\AuDeleteType' => $libDir . 'net/authorize/api/contract/v1/AuDeleteType.php',
'net\authorize\api\contract\v1\AuDetailsType' => $libDir . 'net/authorize/api/contract/v1/AuDetailsType.php',
'net\authorize\api\contract\v1\AuResponseType' => $libDir . 'net/authorize/api/contract/v1/AuResponseType.php',
'net\authorize\api\contract\v1\AuUpdateType' => $libDir . 'net/authorize/api/contract/v1/AuUpdateType.php',

'net\authorize\api\contract\v1\ListOfAUDetailsType' => $libDir . 'net/authorize/api/contract/v1/ListOfAUDetailsType.php',
'net\authorize\api\contract\v1\EmvTagType' => $libDir . 'net/authorize/api/contract/v1/EmvTagType.php',
'net\authorize\api\contract\v1\PaymentEmvType' => $libDir . 'net/authorize/api/contract/v1/PaymentEmvType.php',


//Controllers
Expand Down Expand Up @@ -457,4 +473,7 @@
'net\authorize\api\controller\UpdateSplitTenderGroupController' => $libDir . 'net/authorize/api/controller/UpdateSplitTenderGroupController.php',
'net\authorize\api\controller\ValidateCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/ValidateCustomerPaymentProfileController.php',

'net\authorize\api\controller\GetAUJobDetailsController' => $libDir . 'net/authorize/api/controller/GetAUJobDetailsController.php',
'net\authorize\api\controller\GetAUJobSummaryController' => $libDir . 'net/authorize/api/controller/GetAUJobSummaryController.php',

);
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"ext-json": "*",
"ext-simplexml": "*",
"ext-xmlwriter": "*",
"goetas/xsd2php": "^2.0",
"goetas-webservices/xsd2php-runtime":"^0.2",
"goetas-webservices/xsd-reader": "^0.1",
"jms/serializer": "serializer-master-dev as 1.0"
"jms/serializer": "serializer-master-dev as 1.0",
"symfony/yaml": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
Expand Down
2 changes: 1 addition & 1 deletion lib/AuthorizeNetAIM.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public function __construct($response, $delimiter, $encap_char, $custom_fields)

// Set custom fields
if ($count = count($custom_fields)) {
$custom_fields_response = array_slice($this->_response_array, -$count, $count);
$custom_fields_response = array_slice($this->_response_array, -$count-1, $count);
$i = 0;
foreach ($custom_fields as $key => $value) {
$this->$key = $custom_fields_response[$i];
Expand Down
17 changes: 9 additions & 8 deletions lib/AuthorizeNetSIM.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,22 +197,23 @@ public function getHiddenFieldString()
/**
* Generates a fingerprint needed for a hosted order form or DPM.
*
* @param string $api_login_id Login ID.
* @param string $transaction_key API key.
* @param string $amount Amount of transaction.
* @param string $fp_sequence An invoice number or random number.
* @param string $fp_timestamp Timestamp.
* @param string $api_login_id Login ID.
* @param string $transaction_key API key.
* @param string $amount Amount of transaction.
* @param string $fp_sequence An invoice number or random number.
* @param string $fp_timestamp Timestamp.
* @param string $fp_currency_code Currency Code
*
* @return string The fingerprint.
*/
public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp)
public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp, $fp_currency_code = '')
{
$api_login_id = ($api_login_id ? $api_login_id : (defined('AUTHORIZENET_API_LOGIN_ID') ? AUTHORIZENET_API_LOGIN_ID : ""));
$transaction_key = ($transaction_key ? $transaction_key : (defined('AUTHORIZENET_TRANSACTION_KEY') ? AUTHORIZENET_TRANSACTION_KEY : ""));
if (function_exists('hash_hmac')) {
return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key);
return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^" . $fp_currency_code, $transaction_key);
}
return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key));
return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^" . $fp_currency_code, $transaction_key));
}

}
2 changes: 2 additions & 0 deletions lib/net/authorize/api/constants/ANetEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ class ANetEnvironment
const CUSTOM = "http://wwww.myendpoint.com";
const SANDBOX = "https://apitest.authorize.net";
const PRODUCTION = "https://api2.authorize.net";

const VERSION = "1.9.0";
}
27 changes: 27 additions & 0 deletions lib/net/authorize/api/contract/v1/ANetApiRequestType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ class ANetApiRequestType
*/
private $merchantAuthentication = null;

/**
* @property string $clientId
*/
private $clientId = null;

/**
* @property string $refId
*/
Expand Down Expand Up @@ -45,6 +50,28 @@ public function setMerchantAuthentication(\net\authorize\api\contract\v1\Merchan
return $this;
}

/**
* Gets as clientId
*
* @return string
*/
public function getClientId()
{
return $this->clientId;
}

/**
* Sets a new clientId
*
* @param string $clientId
* @return self
*/
public function setClientId($clientId)
{
$this->clientId = $clientId;
return $this;
}

/**
* Gets as refId
*
Expand Down
43 changes: 43 additions & 0 deletions lib/net/authorize/api/contract/v1/AuDeleteType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

namespace net\authorize\api\contract\v1;

/**
* Class representing AuDeleteType
*
*
* XSD Type: auDeleteType
*/
class AuDeleteType extends AuDetailsType
{

/**
* @property \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
*/
private $creditCard = null;

/**
* Gets as creditCard
*
* @return \net\authorize\api\contract\v1\CreditCardMaskedType
*/
public function getCreditCard()
{
return $this->creditCard;
}

/**
* Sets a new creditCard
*
* @param \net\authorize\api\contract\v1\CreditCardMaskedType $creditCard
* @return self
*/
public function setCreditCard(\net\authorize\api\contract\v1\CreditCardMaskedType $creditCard)
{
$this->creditCard = $creditCard;
return $this;
}


}

205 changes: 205 additions & 0 deletions lib/net/authorize/api/contract/v1/AuDetailsType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
<?php

namespace net\authorize\api\contract\v1;

/**
* Class representing AuDetailsType
*
*
* XSD Type: auDetailsType
*/
class AuDetailsType
{

/**
* @property integer $customerProfileID
*/
private $customerProfileID = null;

/**
* @property integer $customerPaymentProfileID
*/
private $customerPaymentProfileID = null;

/**
* @property string $firstName
*/
private $firstName = null;

/**
* @property string $lastName
*/
private $lastName = null;

/**
* @property string $updateTimeUTC
*/
private $updateTimeUTC = null;

/**
* @property string $auReasonCode
*/
private $auReasonCode = null;

/**
* @property string $reasonDescription
*/
private $reasonDescription = null;

/**
* Gets as customerProfileID
*
* @return integer
*/
public function getCustomerProfileID()
{
return $this->customerProfileID;
}

/**
* Sets a new customerProfileID
*
* @param integer $customerProfileID
* @return self
*/
public function setCustomerProfileID($customerProfileID)
{
$this->customerProfileID = $customerProfileID;
return $this;
}

/**
* Gets as customerPaymentProfileID
*
* @return integer
*/
public function getCustomerPaymentProfileID()
{
return $this->customerPaymentProfileID;
}

/**
* Sets a new customerPaymentProfileID
*
* @param integer $customerPaymentProfileID
* @return self
*/
public function setCustomerPaymentProfileID($customerPaymentProfileID)
{
$this->customerPaymentProfileID = $customerPaymentProfileID;
return $this;
}

/**
* Gets as firstName
*
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}

/**
* Sets a new firstName
*
* @param string $firstName
* @return self
*/
public function setFirstName($firstName)
{
$this->firstName = $firstName;
return $this;
}

/**
* Gets as lastName
*
* @return string
*/
public function getLastName()
{
return $this->lastName;
}

/**
* Sets a new lastName
*
* @param string $lastName
* @return self
*/
public function setLastName($lastName)
{
$this->lastName = $lastName;
return $this;
}

/**
* Gets as updateTimeUTC
*
* @return string
*/
public function getUpdateTimeUTC()
{
return $this->updateTimeUTC;
}

/**
* Sets a new updateTimeUTC
*
* @param string $updateTimeUTC
* @return self
*/
public function setUpdateTimeUTC($updateTimeUTC)
{
$this->updateTimeUTC = $updateTimeUTC;
return $this;
}

/**
* Gets as auReasonCode
*
* @return string
*/
public function getAuReasonCode()
{
return $this->auReasonCode;
}

/**
* Sets a new auReasonCode
*
* @param string $auReasonCode
* @return self
*/
public function setAuReasonCode($auReasonCode)
{
$this->auReasonCode = $auReasonCode;
return $this;
}

/**
* Gets as reasonDescription
*
* @return string
*/
public function getReasonDescription()
{
return $this->reasonDescription;
}

/**
* Sets a new reasonDescription
*
* @param string $reasonDescription
* @return self
*/
public function setReasonDescription($reasonDescription)
{
$this->reasonDescription = $reasonDescription;
return $this;
}


}

Loading

0 comments on commit 9d24edc

Please sign in to comment.