<commit_before><?php

/**
 * Multibanco payment method class.
 *
 * @extends WC_Gateway_Checkout_Com_Alternative_Payments
 */
class WC_Gateway_Checkout_Com_Alternative_Payments_Multibanco extends WC_Gateway_Checkout_Com_Alternative_Payments {

	/**
	 * Payment method name.
	 *
	 * @var string
	 */
	const PAYMENT_METHOD = 'multibanco';

    /**
     * Constructor.
     */
	public function __construct() {
		$this->id                 = 'wc_checkout_com_alternative_payments_multibanco';
		$this->method_title       = __( 'Checkout.com', 'wc_checkout_com' );
		$this->method_description = __( 'The Checkout.com extension allows shop owners to process online payments through the <a href=\"https://www.checkout.com\">Checkout.com Payment Gateway.</a>', 'wc_checkout_com' );
		$this->title              = __( 'Multibanco', 'wc_checkout_com' );
		$this->supports           = array( 'products', 'refunds' );
		$this->has_fields         = true;

		$this->init_form_fields();

		add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
	}

	/**
	 * Payment form on checkout page.
	 */
	public function payment_fields() {
		// Get available apms depending on currency.
		$apm_available = WC_Checkoutcom_Utility::get_alternative_payment_methods();
		$message       = __( 'Pay with Multibanco', 'wc_checkout_com' );

		?>
        <p style="margin-bottom: 0;"> <?php echo $message ?> </p>
		<?php

		if ( ! in_array( self::PAYMENT_METHOD, $apm_available ) ) {
			?>
            <script>
				jQuery( '.payment_method_wc_checkout_com_alternative_payments_multibanco' ).hide();
            </script>
			<?php
		}
	}

	/**
	 * Process the payment and return the result.
	 *
	 * @param  int $order_id Order ID.
	 * @return array
	 */
	public function process_payment( $order_id ) {
		if ( ! session_id() ) {
			session_start();
		}<commit_msg>Update payment method name<commit_after><?php

/**
 * Multibanco payment method class.
 *
 * @extends WC_Gateway_Checkout_Com_Alternative_Payments
 */
class WC_Gateway_Checkout_Com_Alternative_Payments_Multibanco extends WC_Gateway_Checkout_Com_Alternative_Payments {

	/**
	 * Payment method name.
	 *
	 * @var string
	 */
	const PAYMENT_METHOD = 'multibanco';

    /**
     * Constructor.
     */
	public function __construct() {
		$this->id                 = 'wc_checkout_com_alternative_payments_multibanco';
		$this->method_title       = __( 'Checkout.com', 'wc_checkout_com' );
		$this->method_description = __( 'The Checkout.com extension allows shop owners to process online payments through the <a href=\"https://www.checkout.com\">Checkout.com Payment Gateway.</a>', 'wc_checkout_com' );
		$this->title              = __( 'Pay by Multibanco with Checkout.com', 'wc_checkout_com' );
		$this->supports           = array( 'products', 'refunds' );
		$this->has_fields         = true;

		$this->init_form_fields();

		add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
	}

	/**
	 * Payment form on checkout page.
	 */
	public function payment_fields() {
		// Get available apms depending on currency.
		$apm_available = WC_Checkoutcom_Utility::get_alternative_payment_methods();

		if ( ! in_array( self::PAYMENT_METHOD, $apm_available ) ) {
			?>
            <script>
				jQuery( '.payment_method_wc_checkout_com_alternative_payments_multibanco' ).hide();
            </script>
			<?php
		}
	}

	/**
	 * Process the payment and return the result.
	 *
	 * @param  int $order_id Order ID.
	 * @return array
	 */
	public function process_payment( $order_id ) {
		if ( ! session_id() ) {
			session_start();
		}
{'fraction_non_alphanumeric': 0.1285831285831286, 'fraction_numerical': 0.000273000273000273, 'mean_word_length': 3.457420924574209, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2374372', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1189, 'n_words': 238}