123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Vault\Model\Method;
- use Magento\Framework\DataObject;
- use Magento\Payment\Model\InfoInterface;
- use Magento\Payment\Model\MethodInterface;
- use Magento\Quote\Api\Data\CartInterface;
- class NullPaymentProvider implements MethodInterface
- {
- /**
- * Retrieve payment method code
- *
- * @return string
- *
- */
- public function getCode()
- {
- return null;
- }
- /**
- * Retrieve block type for method form generation
- *
- * @return string
- *
- * @deprecated 100.1.0
- */
- public function getFormBlockType()
- {
- return null;
- }
- /**
- * Retrieve payment method title
- *
- * @return string
- *
- */
- public function getTitle()
- {
- return null;
- }
- /**
- * Store id setter
- * @param int $storeId
- * @return void
- */
- public function setStore($storeId)
- {
- return null;
- }
- /**
- * Store id getter
- * @return int
- */
- public function getStore()
- {
- return null;
- }
- /**
- * Check order availability
- *
- * @return bool
- *
- */
- public function canOrder()
- {
- return false;
- }
- /**
- * Check authorize availability
- *
- * @return bool
- *
- */
- public function canAuthorize()
- {
- return false;
- }
- /**
- * Check capture availability
- *
- * @return bool
- *
- */
- public function canCapture()
- {
- return false;
- }
- /**
- * Check partial capture availability
- *
- * @return bool
- *
- */
- public function canCapturePartial()
- {
- return false;
- }
- /**
- * Check whether capture can be performed once and no further capture possible
- *
- * @return bool
- *
- */
- public function canCaptureOnce()
- {
- return false;
- }
- /**
- * Check refund availability
- *
- * @return bool
- *
- */
- public function canRefund()
- {
- return false;
- }
- /**
- * Check partial refund availability for invoice
- *
- * @return bool
- *
- */
- public function canRefundPartialPerInvoice()
- {
- return false;
- }
- /**
- * Check void availability
- * @return bool
- *
- */
- public function canVoid()
- {
- return false;
- }
- /**
- * Using internal pages for input payment data
- * Can be used in admin
- *
- * @return bool
- */
- public function canUseInternal()
- {
- return false;
- }
- /**
- * Can be used in regular checkout
- *
- * @return bool
- */
- public function canUseCheckout()
- {
- return false;
- }
- /**
- * Can be edit order (renew order)
- *
- * @return bool
- *
- */
- public function canEdit()
- {
- return false;
- }
- /**
- * Check fetch transaction info availability
- *
- * @return bool
- *
- */
- public function canFetchTransactionInfo()
- {
- return false;
- }
- /**
- * Fetch transaction info
- *
- * @param InfoInterface $payment
- * @param string $transactionId
- * @return array
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- *
- */
- public function fetchTransactionInfo(InfoInterface $payment, $transactionId)
- {
- return [];
- }
- /**
- * Retrieve payment system relation flag
- *
- * @return bool
- *
- */
- public function isGateway()
- {
- return false;
- }
- /**
- * Retrieve payment method online/offline flag
- *
- * @return bool
- *
- */
- public function isOffline()
- {
- return false;
- }
- /**
- * Flag if we need to run payment initialize while order place
- *
- * @return bool
- *
- */
- public function isInitializeNeeded()
- {
- return false;
- }
- /**
- * To check billing country is allowed for the payment method
- *
- * @param string $country
- * @return bool
- */
- public function canUseForCountry($country)
- {
- return false;
- }
- /**
- * Check method for processing with base currency
- *
- * @param string $currencyCode
- * @return bool
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function canUseForCurrency($currencyCode)
- {
- return false;
- }
- /**
- * Retrieve block type for display method information
- *
- * @return string
- *
- * @deprecated 100.1.0
- */
- public function getInfoBlockType()
- {
- return null;
- }
- /**
- * Retrieve payment information model object
- *
- * @return InfoInterface
- * @throws \Magento\Framework\Exception\LocalizedException
- *
- * @deprecated 100.1.0
- */
- public function getInfoInstance()
- {
- return null;
- }
- /**
- * Retrieve payment information model object
- *
- * @param InfoInterface $info
- * @return void
- *
- * @deprecated 100.1.0
- */
- public function setInfoInstance(InfoInterface $info)
- {
- return null;
- }
- /**
- * Validate payment method information object
- *
- * @return $this
- * @throws \Magento\Framework\Exception\LocalizedException
- *
- */
- public function validate()
- {
- return $this;
- }
- /**
- * Order payment method
- *
- * @param InfoInterface $payment
- * @param float $amount
- * @return $this
- *
- */
- public function order(\Magento\Payment\Model\InfoInterface $payment, $amount)
- {
- return $this;
- }
- /**
- * Authorize payment method
- *
- * @param InfoInterface $payment
- * @param float $amount
- * @return $this
- *
- */
- public function authorize(\Magento\Payment\Model\InfoInterface $payment, $amount)
- {
- return $this;
- }
- /**
- * Capture payment method
- *
- * @param InfoInterface $payment
- * @param float $amount
- * @return $this
- *
- */
- public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
- {
- return $this;
- }
- /**
- * Refund specified amount for payment
- *
- * @param InfoInterface $payment
- * @param float $amount
- * @return $this
- *
- */
- public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount)
- {
- return $this;
- }
- /**
- * Cancel payment method
- *
- * @param InfoInterface $payment
- * @return $this
- *
- */
- public function cancel(\Magento\Payment\Model\InfoInterface $payment)
- {
- return $this;
- }
- /**
- * Void payment method
- *
- * @param InfoInterface $payment
- * @return $this
- *
- */
- public function void(\Magento\Payment\Model\InfoInterface $payment)
- {
- return $this;
- }
- /**
- * Whether this method can accept or deny payment
- * @return bool
- *
- */
- public function canReviewPayment()
- {
- return false;
- }
- /**
- * Attempt to accept a payment that us under review
- *
- * @param InfoInterface $payment
- * @return false
- * @throws \Magento\Framework\Exception\LocalizedException
- *
- */
- public function acceptPayment(InfoInterface $payment)
- {
- return false;
- }
- /**
- * Attempt to deny a payment that us under review
- *
- * @param InfoInterface $payment
- * @return false
- * @throws \Magento\Framework\Exception\LocalizedException
- *
- */
- public function denyPayment(InfoInterface $payment)
- {
- return false;
- }
- /**
- * Retrieve information from payment configuration
- *
- * @param string $field
- * @param int|string|null|\Magento\Store\Model\Store $storeId
- *
- * @return mixed
- */
- public function getConfigData($field, $storeId = null)
- {
- return null;
- }
- /**
- * Assign data to info model instance
- *
- * @param DataObject $data
- * @return $this
- *
- */
- public function assignData(DataObject $data)
- {
- return $this;
- }
- /**
- * Check whether payment method can be used
- *
- * @param CartInterface|null $quote
- * @return bool
- */
- public function isAvailable(CartInterface $quote = null)
- {
- return false;
- }
- /**
- * Is active
- *
- * @param int|null $storeId
- * @return bool
- */
- public function isActive($storeId = null)
- {
- return false;
- }
- /**
- * Method that will be executed instead of authorize or capture
- * if flag isInitializeNeeded set to true
- *
- * @param string $paymentAction
- * @param object $stateObject
- *
- * @return $this
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- *
- * @deprecated 100.1.0
- */
- public function initialize($paymentAction, $stateObject)
- {
- return $this;
- }
- /**
- * Get config payment action url
- * Used to universalize payment actions when processing payment place
- *
- * @return string
- *
- */
- public function getConfigPaymentAction()
- {
- return null;
- }
- }
|