221 \
Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
227 \
Magento\Framework\Data\Collection\AbstractDb $resourceCollection =
null,
229 DirectoryHelper $directory =
null 240 $this->_paymentData = $paymentData;
241 $this->_scopeConfig = $scopeConfig;
255 if (!empty(
$data[
'formBlockType'])) {
256 $this->_formBlockType =
$data[
'formBlockType'];
275 return $this->
getData(
'store');
485 $availableCountries = explode(
',', $this->
getConfigData(
'specificcountry'));
486 if (!in_array($country, $availableCountries)) {
515 if (empty($this->_code)) {
516 throw new \Magento\Framework\Exception\LocalizedException(
517 __(
'We cannot retrieve the payment method code.')
556 $instance = $this->
getData(
'info_instance');
558 throw new \Magento\Framework\Exception\LocalizedException(
559 __(
'We cannot retrieve the payment information object instance.')
575 $this->
setData(
'info_instance', $info);
593 $billingCountry =
$paymentInfo->getOrder()->getBillingAddress()->getCountryId();
595 $billingCountry =
$paymentInfo->getQuote()->getBillingAddress()->getCountryId();
597 $billingCountry = $billingCountry ?: $this->directory->getDefaultCountry();
600 throw new \Magento\Framework\Exception\LocalizedException(
601 __(
'You can\'t use the payment type you selected to make payments to the billing country.')
622 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The order action is not available.'));
641 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The authorize action is not available.'));
660 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The capture action is not available.'));
680 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The refund action is not available.'));
712 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The void action is not available.'));
741 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The payment review action is unavailable.'));
759 throw new \Magento\Framework\Exception\LocalizedException(
__(
'The payment review action is unavailable.'));
786 if (
'order_place_redirect_url' === $field) {
787 return $this->getOrderPlaceRedirectUrl();
807 $this->_eventManager->dispatch(
808 'payment_method_assign_data_' . $this->
getCode(),
816 $this->_eventManager->dispatch(
817 'payment_method_assign_data',
842 $checkResult->setData(
'is_available',
true);
845 $this->_eventManager->dispatch(
846 'payment_method_is_active',
848 'result' => $checkResult,
849 'method_instance' => $this,
854 return $checkResult->getData(
'is_available');
908 $this->logger->debug(
938 $this->
_debug($debugData);
setInfoInstance(InfoInterface $info)
cancel(\Magento\Payment\Model\InfoInterface $payment)
$_canFetchTransactionInfo
acceptPayment(InfoInterface $payment)
authorize(\Magento\Payment\Model\InfoInterface $payment, $amount)
order(\Magento\Payment\Model\InfoInterface $payment, $amount)
fetchTransactionInfo(InfoInterface $payment, $transactionId)
getDebugReplacePrivateDataKeys()
$_canRefundInvoicePartial
canUseForCurrency($currencyCode)
capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
void(\Magento\Payment\Model\InfoInterface $payment)
getConfigData($field, $storeId=null)
$_debugReplacePrivateDataKeys
denyPayment(InfoInterface $payment)
initialize($paymentAction, $stateObject)
getData($key='', $index=null)
isAvailable(\Magento\Quote\Api\Data\CartInterface $quote=null)
refund(\Magento\Payment\Model\InfoInterface $payment, $amount)
setData($key, $value=null)
canUseForCountry($country)
canFetchTransactionInfo()
assignData(\Magento\Framework\DataObject $data)
foreach( $_productCollection as $_product)() ?>" class $info
__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\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[], DirectoryHelper $directory=null)
canRefundPartialPerInvoice()