> */ public static function get_limits_per_currency(): array { return [ Currency_Code::CANADIAN_DOLLAR => [ Country_Code::CANADA => [ 'min' => 5000, 'max' => 3000000, ], ], Currency_Code::UNITED_STATES_DOLLAR => [ Country_Code::UNITED_STATES => [ 'min' => 5000, 'max' => 3000000, ], ], ]; } /** * Whether this payment method is available for the given currency and country * * @param string $currency The currency code to check. * @param string $account_country The merchant's account country. * * @return bool */ public static function is_available_for( string $currency, string $account_country ): bool { return PaymentMethodUtils::is_available_for( self::get_supported_currencies(), self::get_supported_countries( $account_country ), $currency, $account_country ); } /** * Get the minimum amount for this payment method for a given currency and country * * @param string $currency The currency code. * @param string $country The country code. * * @return int|null The minimum amount or null if no minimum. */ public static function get_minimum_amount( string $currency, string $country ): ?int { $limits = self::get_limits_per_currency(); if ( isset( $limits[ $currency ][ $country ]['min'] ) ) { return $limits[ $currency ][ $country ]['min']; } return null; } /** * Get the maximum amount for this payment method for a given currency and country * * @param string $currency The currency code. * @param string $country The country code. * * @return int|null The maximum amount or null if no maximum. */ public static function get_maximum_amount( string $currency, string $country ): ?int { $limits = self::get_limits_per_currency(); if ( isset( $limits[ $currency ][ $country ]['max'] ) ) { return $limits[ $currency ][ $country ]['max']; } return null; } }