Hide custom payment method based off product attribute

I’m using a custom module which already hides a payment method based off the quote grand total and a variable defined in the backend. But I need to also do another check, which will see if the product in the session quote contains a certain attribute and then show/hide the payment method.

This is what the file that determines this currently looks like:

class Pay4Later extends \Magento\Payment\Model\Method\AbstractMethod {  /**  * Payment code  *  * @var string  */ protected $  _code = 'pay4later';  /**  * Availability option  *  * @var bool  */ protected $  _isOffline = true;  protected $  _isInitializeNeeded = true;  public function isAvailable(\Magento\Quote\Api\Data\CartInterface $  quote = null){     $  required_cart = round(($  this->getConfigData('min_loan')/90)*100);     if($  quote && $  quote->getBaseGrandTotal() > $  required_cart) {         return true;     } else {          return false;      } }  public function getConfigPaymentAction() {     return ($  this->getConfigData('order_status') == 'pending_payment')? null : parent::getConfigPaymentAction(); } } 

I’ve tried to dump the $ quote variable, but nothing happens.

monthly payment and single payment in the same place

Good morning, I’m doing a payment area, where the user can buy a monthly product and a single purchase product, the project owner demands that the payment be the same for both forms, it can be on credit card or Bank slip. But it does not make sense to pay a product that is paid every month in installments with a single purchase. Would anyone have any suggestions?

enter image description here

[GET][NULLED] – WP Cost Estimation & Payment Forms Builder v9.681

[​IMG]
[​IMG]

[GET][NULLED] – WP Cost Estimation & Payment Forms Builder v9.681

Nagento 2 “No Payment Methods” in Admin New Order

In a Magento 2.3.1 site, I have two third-party payment methods and PayPal Express Checkout enabled. On the frontend, the three works perfectly. But, when I am trying to create a new order on admin panel, the payment methods are not displayed when I click on Get shipping methods and rates

enter image description here

I tested enabled the method Check / Money Order in my developer environment, and this is displayed correctly:

enter image description here

What could be causing the other three not are displayed?

Thanks.

How make a custom variable to get Payment ticket bank (Boleto in PT-BR) in Magento 2

How can i get payment ticket link in Magento 2 and set this value in a “Custom Variable” to use in my emails Templates. I know how to get a transaction and i think the ticket is a string inside “transaction object”

Ex: $ transactions = $ this->transactions->create()->addOrderIdFilter($ orderId); $ transaction->exampleGetTiketLink();

But i don’t know how define this in my custom variable in this dashboard. enter image description here