| @@ -579,26 +579,8 @@ | ||
| 579 | 579 | } |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | 582 | /** |
| 583 | - * Get min and max for oney payment | |
| 584 | - * | |
| 585 | - * @return array | |
| 586 | - */ | |
| 587 | - public static function get_min_max_oney() | |
| 588 | - { | |
| 589 | - $account = self::get_account_data_from_options(); | |
| 590 | - if (!$account) { | |
| 591 | - return []; | |
| 592 | - } | |
| 593 | - | |
| 594 | - return [ | |
| 595 | - 'min' => floatval($account['configuration']['oney']['min_amounts']['EUR']) / 100, | |
| 596 | - 'max' => floatval($account['configuration']['oney']['max_amounts']['EUR']) / 100, | |
| 597 | - ]; | |
| 598 | - } | |
| 599 | - | |
| 600 | - /** | |
| 601 | 583 | * Check if oney is available with current settings |
| 602 | 584 | * |
| 603 | 585 | * @return bool |
| 604 | 586 | */ |
| @@ -662,25 +644,8 @@ | ||
| 662 | 644 | |
| 663 | 645 | return load_textdomain($domain, $path . '/' . $mofile); |
| 664 | 646 | } |
| 665 | 647 | |
| 666 | - /** | |
| 667 | - * Check and update value for oney simulation | |
| 668 | - * | |
| 669 | - * @return void | |
| 670 | - */ | |
| 671 | - public static function oney_simulation_values($keys_array, &$array): void | |
| 672 | - { | |
| 673 | - foreach ($keys_array as $key) { | |
| 674 | - if (array_key_exists($key, $array)) { | |
| 675 | - $array[$key]['down_payment_amount'] = floatval($array[$key]['down_payment_amount']) / 100; | |
| 676 | - foreach ($array[$key]['installments'] as $k => $value) { | |
| 677 | - $array[$key]['installments'][$k]['amount'] = floatval($value['amount']) / 100; | |
| 678 | - } | |
| 679 | - } | |
| 680 | - } | |
| 681 | - } | |
| 682 | - | |
| 683 | 648 | public static function getISOCountryCode() |
| 684 | 649 | { |
| 685 | 650 | preg_match('([a-z-]+)', get_locale(), $country); |
| 686 | 651 | |
| @@ -786,8 +751,21 @@ | ||
| 786 | 751 | */ |
| 787 | 752 | public static function get_secure_domain(): string |
| 788 | 753 | { |
| 789 | 754 | return SECURE_DOMAIN; |
| 755 | + } | |
| 756 | + | |
| 757 | + /** | |
| 758 | + * URL of the official Oney widget loader script. Depends on whether the connected | |
| 759 | + * merchant account is QA or production, which is a build-time distinction (see | |
| 760 | + * ONEY_LOADER_URL in payplug-config.php), not something this can derive from the | |
| 761 | + * Test/Live mode toggle at runtime. | |
| 762 | + * | |
| 763 | + * @return string | |
| 764 | + */ | |
| 765 | + public static function get_oney_loader_url(): string | |
| 766 | + { | |
| 767 | + return ONEY_LOADER_URL; | |
| 790 | 768 | } |
| 791 | 769 | |
| 792 | 770 | public static function payplug_logout(): void |
| 793 | 771 | { |