9 use Magento\Payment\Helper\Formatter;
12 use Magento\Sales\Api\Data\OrderPaymentExtensionInterfaceFactory;
17 use Magento\Payment\Model\Method\ConfigInterfaceFactory;
50 private $responseValidator;
55 private $paymentTokenFactory;
60 private $paymentExtensionFactory;
92 \
Magento\Framework\Module\ModuleListInterface $moduleList,
93 \
Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
100 OrderPaymentExtensionInterfaceFactory $paymentExtensionFactory,
109 $customAttributeFactory,
123 $this->responseValidator = $responseValidator;
124 $this->paymentTokenFactory = $paymentTokenFactory;
133 return $this->responseValidator;
158 $request = $this->buildBasicRequest();
166 $request->setData(
'trxtype', self::TRXTYPE_AUTH_ONLY);
170 $request->setData(
'taxamt', $this->formatPrice(
$order->getBaseTaxAmount()));
171 $request->setData(
'freightamt', $this->formatPrice(
$order->getBaseShippingAmount()));
177 $this->responseValidator->validate(
$response, $this);
180 $this->
void($payment);
181 throw new LocalizedException(
__(
"The payment couldn't be processed at this time. Please try again later."));
188 $payment->unsAdditionalInformation(self::CC_DETAILS);
189 $payment->unsAdditionalInformation(self::PNREF);
199 return parent::getConfig();
230 $expDate = new \DateTime(
238 new \DateTimeZone(
'UTC')
240 $expDate->add(
new \DateInterval(
'P1M'));
241 return $expDate->format(
'Y-m-d 00:00:00');
248 private function getPaymentExtensionAttributes(Payment
$payment)
capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Payment\Model\Method\Logger $logger, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Store\Model\StoreManagerInterface $storeManager, ConfigInterfaceFactory $configFactory, Gateway $gateway, HandlerInterface $errorHandler, ResponseValidator $responseValidator, PaymentTokenInterfaceFactory $paymentTokenFactory, OrderPaymentExtensionInterfaceFactory $paymentExtensionFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
fillCustomerContacts(DataObject $order, DataObject $request)
authorize(\Magento\Payment\Model\InfoInterface $payment, $amount)
addRequestOrderInfo(DataObject $request, Order $order)
void(\Magento\Payment\Model\InfoInterface $payment)
processErrors(DataObject $response)
postRequest(DataObject $request, ConfigInterface $config)
setTransStatus($payment, $response)
getAdditionalInformation($key=null)