41 $this->_transKey = $transKey;
58 $merchantTransactionKey,
66 $merchantApiLoginId .
"^" . $fpSequence .
"^" . $fpTimestamp .
"^" .
$amount .
"^" . $currencyCode,
67 $merchantTransactionKey
79 $this->setXVersion(
'3.1')->setXDelimData(
'FALSE')->setXRelayResponse(
'TRUE');
81 $this->setXTestRequest($paymentMethod->getConfigData(
'test') ?
'TRUE' :
'FALSE');
83 $this->setXLogin($paymentMethod->getConfigData(
'login'))
85 ->setXRelayUrl($paymentMethod->getRelayUrl());
104 $this->setXType(
$payment->getAnetTransType());
105 $this->setXFpSequence(
$order->getQuoteId());
106 $this->setXInvoiceNum(
$order->getIncrementId());
107 $this->setXAmount(
$payment->getBaseAmountAuthorized());
108 $this->setXCurrencyCode(
$order->getBaseCurrencyCode());
110 sprintf(
'%.2F',
$order->getBaseTaxAmount())
112 sprintf(
'%.2F',
$order->getBaseShippingAmount())
117 $billing =
$order->getBillingAddress();
118 if (!empty($billing)) {
119 $this->setXFirstName((
string)$billing->getFirstname())
120 ->setXLastName((
string)$billing->getLastname())
121 ->setXCompany((
string)$billing->getCompany())
122 ->setXAddress((
string)$billing->getStreetLine(1))
123 ->setXCity((
string)$billing->getCity())
124 ->setXState((
string)$billing->getRegion())
125 ->setXZip((
string)$billing->getPostcode())
126 ->setXCountry((
string)$billing->getCountryId())
127 ->setXPhone((
string)$billing->getTelephone())
128 ->setXFax((
string)$billing->getFax())
129 ->setXCustId((
string)$billing->getCustomerId())
130 ->setXCustomerIp((
string)
$order->getRemoteIp())
131 ->setXCustomerTaxId((
string)$billing->getTaxId())
132 ->setXEmail((
string)
$order->getCustomerEmail())
133 ->setXEmailCustomer((
string)$paymentMethod->getConfigData(
'email_customer'))
134 ->setXMerchantEmail((
string)$paymentMethod->getConfigData(
'merchant_email'));
137 $shipping =
$order->getShippingAddress();
138 if (!empty($shipping)) {
139 $this->setXShipToFirstName(
140 (
string)$shipping->getFirstname()
141 )->setXShipToLastName(
142 (
string)$shipping->getLastname()
143 )->setXShipToCompany(
144 (
string)$shipping->getCompany()
145 )->setXShipToAddress(
146 (
string)$shipping->getStreetLine(1)
148 (
string)$shipping->getCity()
150 (
string)$shipping->getRegion()
152 (
string)$shipping->getPostcode()
153 )->setXShipToCountry(
154 (
string)$shipping->getCountryId()
158 $this->setXPoNum((
string)
$payment->getPoNumber());
171 $fpTimestamp =
time();
176 $this->getXCurrencyCode(),
177 $this->getXFpSequence(),
180 $this->setXFpTimestamp($fpTimestamp);
181 $this->setXFpHash($hash);
generateRequestSign( $merchantApiLoginId, $merchantTransactionKey, $amount, $currencyCode, $fpSequence, $fpTimestamp)
setDataFromOrder(\Magento\Sales\Model\Order $order, \Magento\Authorizenet\Model\Directpost $paymentMethod)
setConstantData(\Magento\Authorizenet\Model\Directpost $paymentMethod)
_setTransactionKey($transKey)