21 | get_columns();
16 | $hidden = $this->get_hidden_columns();
17 | $sortable = $this->get_sortable_columns();
18 |
19 | $data = $this->table_data();
20 | usort( $data, array( &$this, 'sort_data' ) );
21 |
22 | $per_page = 20;
23 | $current_page = $this->get_pagenum();
24 | $total_items = count( $data );
25 |
26 | $this->set_pagination_args(
27 | array(
28 | 'total_items' => $total_items,
29 | 'per_page' => $per_page,
30 | )
31 | );
32 |
33 | $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
34 |
35 | $this->_column_headers = array( $columns, $hidden, $sortable );
36 | $this->items = $data;
37 | }
38 |
39 | /**
40 | * Override the parent columns method. Defines the columns to use in your listing table
41 | *
42 | * @return Array
43 | */
44 | public function get_columns() {
45 | $columns = array(
46 | 'id' => 'ID',
47 | 'transaction_id' => 'Transaction ID',
48 | 'response_code' => 'Response Code',
49 | 'response_code_desc' => 'Response Code Description',
50 | 'amount' => 'Amount',
51 | 'or_date' => 'Date',
52 | 'status' => 'Status',
53 | );
54 |
55 | return $columns;
56 | }
57 |
58 | /**
59 | * Define which columns are hidden
60 | *
61 | * @return Array
62 | */
63 | public function get_hidden_columns() {
64 | return array();
65 | }
66 |
67 | /**
68 | * Define the sortable columns
69 | *
70 | * @return Array
71 | */
72 | public function get_sortable_columns() {
73 | return array( 'title' => array( 'title', false ) );
74 | }
75 |
76 | /**
77 | * Get the table data
78 | *
79 | * @return Array
80 | */
81 | private function table_data() {
82 | global $wpdb;
83 |
84 | $res = array();
85 |
86 | $table_name = $wpdb->prefix . 'tpayway_ipg';
87 |
88 | $res = $wpdb->get_results( 'SELECT * FROM ' . $table_name, ARRAY_A );
89 |
90 | return $res;
91 | }
92 |
93 | /**
94 | * Define what data to show on each column of the table
95 | *
96 | * @param Array $item Data
97 | * @param String $column_name - Current column name
98 | *
99 | * @return Mixed
100 | */
101 | public function column_default( $item, $column_name ) {
102 | switch ( $column_name ) {
103 | case 'id':
104 | case 'transaction_id':
105 | case 'response_code':
106 | case 'response_code_desc':
107 | case 'amount':
108 | case 'or_date':
109 | case 'status':
110 | return $item[ $column_name ];
111 |
112 | default:
113 | return print_r( $item, true );
114 | }
115 | }
116 |
117 | /**
118 | * Allows you to sort the data by the variables set in the $_GET
119 | *
120 | * @return Mixed
121 | */
122 | private function sort_data( $a, $b ) {
123 | // Set defaults
124 | $orderby = 'transaction_id';
125 | $order = 'desc';
126 |
127 | // If orderby is set, use this as the sort column
128 | if ( ! empty( $_GET['orderby'] ) ) {
129 | $orderby = $_GET['orderby'];
130 | }
131 |
132 | // If order is set use this as the order
133 | if ( ! empty( $_GET['order'] ) ) {
134 | $order = $_GET['order'];
135 | }
136 |
137 | $result = strnatcmp( $a[ $orderby ], $b[ $orderby ] );
138 |
139 | if ( 'asc' === $order ) {
140 | return $result;
141 | }
142 |
143 | return -$result;
144 | }
145 | }
146 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 |
3 | ## Info
4 |
5 | Most recent latest changes is defined on every major, minor and bug fixes.
6 |
7 | ## Versions
8 |
9 | ### 1.8.6
10 |
11 | * bugfixing on undefined $_SERVER request method REQUEST_METHOD to clear logs
12 | * simply determine language code determine_language() function
13 |
14 | ### 1.8.5
15 |
16 | * fix redirection of t-com payway
17 |
18 | ### 1.8.3
19 |
20 | * Cleanup a code
21 | * Support for PHP 8.2/8.3
22 | * Added property missing in class
23 |
24 | ### 1.8.2
25 |
26 | * Fix isset issue when value is 0 or is not Amount
27 |
28 | ### 1.7.2
29 |
30 | * Hotfix on on cancelling order will not empty cart
31 |
32 | ### 1.7.1
33 |
34 | * Change HNB URL tecajna to v3
35 |
36 | ### 1.7
37 |
38 | Use since 01.01.2023 as EUR mandatory currency:
39 |
40 | * EUR as main currency set 1.1.2022., removed unnecessary codes for conversion from HRK to EUR
41 | * Added Currency code 978 and sent mandatory as `CurrencyCode` property [ISO 4217 HR](https://www.six-group.com/en/products-services/financial-information/data-standards.html)
42 | * IntCurrency/IntAmount set as HRK currency for informative calculation
43 |
44 | > Na svim Vašim shopID-evima će se sa 01.01.2023 od strane PayWay-a automatski postaviti EUR valuta, a na platnoj formi će i dalje biti dvojni prikaz cijena, no sa EUR valutom kao osnovnom i informativnim iznosom u HRK.
45 |
46 | ### 1.6.1
47 |
48 | * Curl module load checks
49 |
50 | ### 1.6
51 |
52 | * IntlCurrency and IntAmount added
53 | * API 2.0 Support
54 | * Production and testing API
55 | * Removed T-Com brand names
56 | * Added other languages support
57 | * Removed Woo Multi Currency Support
58 | * HNB auto conversion support
59 | * added gitignore file
60 | * removed old readme file
61 | * Replace banner image of PayWay on checkout with smaller 250px width
62 |
63 | ### 1.3.3
64 |
65 | * fixing minor bugs
66 | * changelog added and linked
67 |
68 | ### 1.3.2
69 |
70 | * Signatures typo issues fixed
71 | * Resolved description settings that is not shown
72 |
73 | ### 1.3
74 |
75 | * Complete code review and files reorganisation
76 | * Added textdomain and translations
77 | * Applied WP Coding Standards
78 | * Fixed deprecated WC Order methods
79 |
80 | ### 1.2
81 |
82 | * Added WPML support to supply the currency rate
83 | * Keep support for Woo Multi Currency
84 |
85 | ### 1.1
86 |
87 | * Fix receipment class
88 | * Added wiki documenatation
89 |
90 | ### 1.0
91 |
92 | * Fix pgw result code
93 | * Fix response code, parsing $id variable
94 | * Clean unneeded codes
95 | * Timeout 3 seconds so that user can read notice on redirecting page
96 | * Pending status after successful payment
97 | * Order note with code status when is status code 3, returning to cart and empty cart (cancelled status)
98 | * User already receive email notifications for successful transactions, translated to Croatian
99 |
100 | ### 0.9b
101 |
102 | * Removed unused code, added include plugin, fix name class
103 |
104 | ### 0.9a
105 |
106 | * Fix 3D Secure with response code 4 as success with pending status
107 |
108 | ### 0.9
109 |
110 | * Added data list table to show PayWay transaction status on administration page [Example](https://github.com/marinsagovac/woocommerce-tcom-payway/blob/master/docs/DataList.jpg)
111 |
112 | ### 0.8a
113 |
114 | * Fixed Woocommerce declined, successfull or failed status to Order status
115 | * Support with Woo Multi Currency plugin to handle multi currency with PayWay (default is deactivated)
116 | * Added reason code and reason response text received from PayWay, showing to client status message
117 | * Fix unused codes, rebuild database table to persist response code
118 | * Remove and cleanup code
119 |
120 | ### 0.7
121 |
122 | * Added locale language on PayWay based on language in Wordpress locale
123 |
124 | ### 0.6
125 |
126 | * Fix currency by billing Country (not language localization URI)
127 | * Remove unused code
128 | * Cleaning up
129 |
--------------------------------------------------------------------------------
/tcom-payway-woocommerce.php:
--------------------------------------------------------------------------------
1 | prefix . 'tpayway_ipg';
74 | $charset_collate = '';
75 |
76 | if (! empty($wpdb->charset)) {
77 | $charset_collate = "DEFAULT CHARACTER SET {$wpdb->charset}";
78 | }
79 |
80 | if (! empty($wpdb->collate)) {
81 | $charset_collate .= " COLLATE {$wpdb->collate}";
82 | }
83 |
84 | $sql = "CREATE TABLE IF NOT EXISTS $table_name (
85 | id int(9) NOT NULL AUTO_INCREMENT,
86 | transaction_id int(9) NOT NULL,
87 | response_code int(6) NOT NULL,
88 | response_code_desc VARCHAR(20) NOT NULL,
89 | reason_code VARCHAR(20) NOT NULL,
90 | amount VARCHAR(20) NOT NULL,
91 | or_date DATE NOT NULL,
92 | status int(6) NOT NULL,
93 | UNIQUE KEY id (id)
94 | ) $charset_collate;";
95 |
96 | require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
97 | dbDelta($sql);
98 |
99 | add_option('jal_db_version', $jal_db_version);
100 | }
101 | register_activation_hook(__FILE__, 'jal_install_tpayway');
102 |
103 | function jal_install_data_tpayway()
104 | {
105 | global $wpdb;
106 |
107 | $welcome_name = 'PayWay Hrvatski Telekom';
108 | $welcome_text = 'Congratulations, you just completed the installation!';
109 |
110 | $table_name = $wpdb->prefix . 'tpayway_ipg';
111 | }
112 | register_activation_hook(__FILE__, 'jal_install_data_tpayway');
113 |
114 | add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'jal_add_plugin_page_settings_link');
115 | function jal_add_plugin_page_settings_link($links)
116 | {
117 | $links[] = '' . __('Settings', 'tcom-payway-wc') . '';
120 | return $links;
121 | }
122 |
123 | if (is_admin()) {
124 | require_once TCOM_PAYWAY_DIR . 'classes/admin/class-payway-wp-list-table.php';
125 | new Payway_Wp_List_Table();
126 | }
127 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Woocommerce HT PayWay
2 |
3 | [](https://github.com/marinsagovac/woocommerce-tcom-payway/actions/workflows/wordpress-plugin-check.yml)
4 |
5 | 
6 |
7 | ---
8 | **Wordpress Woocommerce plugin** (payment gateway for Croatia)
9 |
10 | Support payment gateway for PayWay HT payment gateway.
11 |
12 | 
13 |
14 | ## API
15 |
16 | API 2.x.x support updated to latest IntlCurrency and IntAmount
17 |
18 | Official Croatia Hrvatski Telekom [PayWay](https://www.hrvatskitelekom.hr/poslovni/ict/poslovna-rjesenja/web-shop#payway).
19 |
20 | PayWayForm Documentation revision supported: 7.1.10
21 |
22 | ## FEATURES
23 |
24 | Features
25 | * EUR mandatory currency, HRK set as IntAmount from 1.1.2023.
26 | * Added Currency code 978 and sent mandatory as `CurrencyCode` property [ISO 4217 HR](https://www.six-group.com/en/products-services/financial-information/data-standards.html)
27 | * IntlCurrency and IntAmount added
28 | * API 2.0 Support
29 | * Production and testing API
30 | * Added other languages with automation language switching on PayWay form
31 | * PayWay transaction admin page lists
32 | * WPML support conversion rate
33 | * Locale support based on WP locale settings (EN/HR)
34 | * Multilanguage support using po/mo translation
35 | * Replace banner image of PayWay on checkout with smaller 250px width
36 | * Not needle IntAmount and IntCurrency from 1.1.2024.
37 | * Support PHP 8.x
38 |
39 | Removed
40 | * Removed woo-multi-currency support and integration
41 | * Removed T-Com names
42 | * Removed HRK to EUR conversion
43 |
44 | ## RELEASES
45 |
46 | ### OFFICIAL RELEASES
47 |
48 | Latest version:
49 |
50 | * Version [1.8.6](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.8.6) December/2024
51 |
52 | API 2.x.x:
53 |
54 | * Version [1.8.6](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.8.6) December/2024
55 | * Version [1.8.5](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.8.5) November/2024
56 | * Version [1.8.3](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.8.3) November/2024
57 | * Version [1.8.1](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.8.1) February/2024
58 | * Version [1.7.3](https://github.com/marinsagovac/woocommerce-tcom-payway/archive/refs/tags/1.7.3.zip) January/2023
59 |
60 | Old releases (deprecated):
61 |
62 | * Version [1.7.1](https://github.com/marinsagovac/woocommerce-tcom-payway/archive/refs/tags/1.7.1.zip) January/2023
63 | * Version [1.7](https://github.com/marinsagovac/woocommerce-tcom-payway/archive/refs/tags/1.7.zip) December/2022
64 | * Version [1.6.1](https://github.com/marinsagovac/woocommerce-tcom-payway/archive/refs/tags/1.6.1.zip) September/2022
65 | * Version [1.5](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tags/1.5.zip) November/2021
66 | * Version [1.4](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tags/1.4.zip) June/2021
67 | * Version [1.3.3](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.3.3) January/2021
68 | * Version [1.3](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.3) December/2019
69 | * Release [1.2](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.2)
70 | * Release [1.1](https://github.com/marinsagovac/woocommerce-tcom-payway/releases/tag/1.1)
71 |
72 | ## INSTALLATION
73 |
74 | Download ZIP archive, upload via plugin page and apply package. Activate plugin. Change settings under Woocomerce settings page on the checkout page.
75 |
76 | ## CHANGELOG
77 |
78 | Changelog is now moved [here](https://github.com/marinsagovac/woocommerce-tcom-payway/blob/master/CHANGELOG.md).
79 |
80 | ## HELP
81 |
82 | Click here to go to [WIKI Help page](https://github.com/marinsagovac/woocommerce-tcom-payway/wiki/Common-issues-and-helps) for more common mistakes and helps.
83 |
84 | ## CONTRIBUTING
85 |
86 | Thank you for considering contributing and developing features on our repository.
87 | We're continuing to improving, upgrading and fixing our repository using open source directive so specially thanks to contributors.
88 |
89 | ## LICENSE
90 |
91 | A source code is an open-sourced and is under [MIT license](http://opensource.org/licenses/MIT) and is possible to change or improve code.
92 |
93 | 
94 |
95 | ## DEPRECATED DOCUMENTATIONS
96 |
97 | Under wiki are screenshots of settings and admin preview of payments: [here](https://github.com/marinsagovac/woocommerce-tcom-payway/wiki/Deprecated-docs)
98 | `docs` folder has been removed from 1.8.7 version.
99 |
100 | ## TIP
101 |
102 | You can buy me a coffe https://ko-fi.com/msagovac.
103 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | email.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/languages/tcom-payway-wc.pot:
--------------------------------------------------------------------------------
1 | #, fuzzy
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: WooCommerce PayWay Hrvatski Telekom\n"
5 | "Report-Msgid-Bugs-To: \n"
6 | "POT-Creation-Date: 2019-11-27 20:52+0000\n"
7 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8 | "Last-Translator: FULL NAME \n"
9 | "Language-Team: \n"
10 | "Language: \n"
11 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12 | "MIME-Version: 1.0\n"
13 | "Content-Type: text/plain; charset=UTF-8\n"
14 | "Content-Transfer-Encoding: 8bit\n"
15 | "X-Generator: Loco https://localise.biz/\n"
16 | "X-Loco-Version: 2.3.1; wp-5.3"
17 |
18 | #: classes/class-wc-tpayway.php:44 classes/class-wc-tpayway.php:51
19 | msgid "Use Woo Multi Currency conversion"
20 | msgstr ""
21 |
22 | #: classes/class-wc-tpayway.php:46 classes/class-wc-tpayway.php:54
23 | msgid ""
24 | "Enable currency auto conversion for Woo Multi Currency plugin. Make sure "
26 | "that is checked \"Allow Multi Currency\" in plugin page."
27 | msgstr ""
28 |
29 | #: classes/class-wc-tpayway.php:61
30 | msgid "Enable/Disable"
31 | msgstr ""
32 |
33 | #: classes/class-wc-tpayway.php:63
34 | msgid "Enable PayWay Hrvatski Telekom Module."
35 | msgstr ""
36 |
37 | #: classes/class-wc-tpayway.php:67
38 | msgid "Title:"
39 | msgstr ""
40 |
41 | #: classes/class-wc-tpayway.php:69
42 | msgid "This controls the title which the user sees during checkout."
43 | msgstr ""
44 |
45 | #: classes/class-wc-tpayway.php:70
46 | msgid "PayWay Hrvatski Telekom"
47 | msgstr ""
48 |
49 | #: classes/class-wc-tpayway.php:73
50 | msgid "Description:"
51 | msgstr ""
52 |
53 | #: classes/class-wc-tpayway.php:75
54 | msgid "This controls the description which the user sees during checkout."
55 | msgstr ""
56 |
57 | #: classes/class-wc-tpayway.php:76
58 | msgid ""
59 | "Payway Hrvatski Telekom is secure payment gateway in Croatia and you can pay using this "
60 | "payment in other currency."
61 | msgstr ""
62 |
63 | #: classes/class-wc-tpayway.php:79
64 | msgid "Authorize URL:"
65 | msgstr ""
66 |
67 | #: classes/class-wc-tpayway.php:81
68 | msgid "PayWay Hrvatski Telekom data submitting to this URL. Use Prod Mode to live set."
69 | msgstr ""
70 |
71 | #: classes/class-wc-tpayway.php:82
72 | msgid "https://pgw.ht.hr/services/payment/api/authorize-form"
73 | msgstr ""
74 |
75 | #: classes/class-wc-tpayway.php:85
76 | msgid "Shop ID:"
77 | msgstr ""
78 |
79 | #: classes/class-wc-tpayway.php:87
80 | msgid "Unique id for the merchant acc, given by bank."
81 | msgstr ""
82 |
83 | #: classes/class-wc-tpayway.php:91
84 | msgid "Secret Key:"
85 | msgstr ""
86 |
87 | #: classes/class-wc-tpayway.php:97
88 | msgid "Response URL success"
89 | msgstr ""
90 |
91 | #: classes/class-wc-tpayway.php:103
92 | msgid "Response URL fail:"
93 | msgstr ""
94 |
95 | #: classes/class-wc-tpayway.php:109
96 | msgid "Message redirect:"
97 | msgstr ""
98 |
99 | #: classes/class-wc-tpayway.php:111
100 | msgid "Message to client when redirecting to PayWay page"
101 | msgstr ""
102 |
103 | #. Description of the plugin
104 | #: classes/class-wc-tpayway.php:119
105 | msgid "PayWay Hrvatski Telekom payment gateway"
106 | msgstr ""
107 |
108 | #: classes/class-wc-tpayway.php:120
109 | msgid ""
110 | "PayWay Hrvatski Telekom is "
111 | "payment gateway from telecom Hrvatski Telekom who provides payment gateway services as "
112 | "dedicated services to clients in Croatia."
113 | msgstr ""
114 |
115 | #: classes/class-wc-tpayway.php:318
116 | msgid "Pay via PayWay"
117 | msgstr ""
118 |
119 | #: classes/class-wc-tpayway.php:319
120 | msgid "Cancel order & restore cart"
121 | msgstr ""
122 |
123 | #: classes/class-wc-tpayway.php:340
124 | msgid "Action successful"
125 | msgstr ""
126 |
127 | #: classes/class-wc-tpayway.php:341
128 | msgid "Action unsuccessful"
129 | msgstr ""
130 |
131 | #: classes/class-wc-tpayway.php:342
132 | msgid "Error processing"
133 | msgstr ""
134 |
135 | #: classes/class-wc-tpayway.php:343
136 | msgid "Action cancelled"
137 | msgstr ""
138 |
139 | #: classes/class-wc-tpayway.php:344
140 | msgid "Action unsuccessful (3D Secure MPI)"
141 | msgstr ""
142 |
143 | #: classes/class-wc-tpayway.php:345
144 | msgid "Incorrect signature (pwg_signature)"
145 | msgstr ""
146 |
147 | #: classes/class-wc-tpayway.php:346
148 | msgid "Incorrect store ID (pgw_shop_id)"
149 | msgstr ""
150 |
151 | #: classes/class-wc-tpayway.php:347
152 | msgid "Incorrect transaction ID (pgw_transaction_id)"
153 | msgstr ""
154 |
155 | #: classes/class-wc-tpayway.php:348
156 | msgid "Incorrect amount (pgw_amount)"
157 | msgstr ""
158 |
159 | #: classes/class-wc-tpayway.php:349
160 | msgid "Incorrect authorization_type (pgw_authorization_type)"
161 | msgstr ""
162 |
163 | #: classes/class-wc-tpayway.php:350
164 | msgid "Incorrect announcement duration (pgw_announcement_duration)"
165 | msgstr ""
166 |
167 | #: classes/class-wc-tpayway.php:351
168 | msgid "Incorrect installments number (pgw_installments)"
169 | msgstr ""
170 |
171 | #: classes/class-wc-tpayway.php:352
172 | msgid "Incorrect language (pgw_language)"
173 | msgstr ""
174 |
175 | #: classes/class-wc-tpayway.php:353
176 | msgid "Incorrect authorization token (pgw_authorization_token)"
177 | msgstr ""
178 |
179 | #: classes/class-wc-tpayway.php:354
180 | msgid "Incorrect card number (pgw_card_number)"
181 | msgstr ""
182 |
183 | #: classes/class-wc-tpayway.php:355
184 | msgid "Incorrect card expiration date (pgw_card_expiration_date)"
185 | msgstr ""
186 |
187 | #: classes/class-wc-tpayway.php:356
188 | msgid "Incorrect card verification data (pgw_card_verification_data)"
189 | msgstr ""
190 |
191 | #: classes/class-wc-tpayway.php:357
192 | msgid "Incorrect order ID (pgw_order_id)"
193 | msgstr ""
194 |
195 | #: classes/class-wc-tpayway.php:358
196 | msgid "Incorrect order info (pgw_order_info)"
197 | msgstr ""
198 |
199 | #: classes/class-wc-tpayway.php:359
200 | msgid "Incorrect order items (pgw_order_items)"
201 | msgstr ""
202 |
203 | #: classes/class-wc-tpayway.php:360
204 | msgid "Incorrect return method (pgw_return_method)"
205 | msgstr ""
206 |
207 | #: classes/class-wc-tpayway.php:361
208 | msgid "Incorrect success store url (pgw_success_url)"
209 | msgstr ""
210 |
211 | #: classes/class-wc-tpayway.php:362
212 | msgid "Incorrect error store url (pgw_failure_url)"
213 | msgstr ""
214 |
215 | #: classes/class-wc-tpayway.php:363
216 | msgid "Incorrect merchant data (pgw_merchant_data)"
217 | msgstr ""
218 |
219 | #: classes/class-wc-tpayway.php:364
220 | msgid "Incorrect buyer's name (pgw_first_name)"
221 | msgstr ""
222 |
223 | #: classes/class-wc-tpayway.php:365
224 | msgid "Incorrect buyer's last name (pgw_last_name)"
225 | msgstr ""
226 |
227 | #: classes/class-wc-tpayway.php:366
228 | msgid "Incorrect address (pgw_street)"
229 | msgstr ""
230 |
231 | #: classes/class-wc-tpayway.php:367
232 | msgid "Incorrect city (pgw_city)"
233 | msgstr ""
234 |
235 | #: classes/class-wc-tpayway.php:368
236 | msgid "Incorrect ZIP code (pgw_post_code)"
237 | msgstr ""
238 |
239 | #: classes/class-wc-tpayway.php:369
240 | msgid "Incorrect country (pgw_country)"
241 | msgstr ""
242 |
243 | #: classes/class-wc-tpayway.php:370
244 | msgid "Incorrect contact phone (pgw_telephone)"
245 | msgstr ""
246 |
247 | #: classes/class-wc-tpayway.php:371
248 | msgid "Incorrect contact e-mail address (pgw_email)"
249 | msgstr ""
250 |
251 | #: classes/class-wc-tpayway.php:404
252 | msgid "PayWay Hrvatski Telekom payment successful. Unique Id: "
253 | msgstr ""
254 |
255 | #: classes/class-wc-tpayway.php:409
256 | msgid "Awaiting payment"
257 | msgstr ""
258 |
259 | #: classes/class-wc-tpayway.php:416
260 | msgid "Payment successful"
261 | msgstr ""
262 |
263 | #: classes/class-wc-tpayway.php:418
264 | msgid ""
265 | "Payment on PayWay Hrvatski Telekom is successfully completeted and order status is "
266 | "processed."
267 | msgstr ""
268 |
269 | #: classes/class-wc-tpayway.php:425
270 | #, php-format
271 | msgid "Payment for order no. %s was sucessful."
272 | msgstr ""
273 |
274 | #: classes/class-wc-tpayway.php:466
275 | msgid "A payment was not successfull or declined"
276 | msgstr ""
277 |
278 | #: classes/class-wc-tpayway.php:467
279 | msgid "Reason: "
280 | msgstr ""
281 |
282 | #: classes/class-wc-tpayway.php:469
283 | msgid "Order Id: "
284 | msgstr ""
285 |
286 | #: classes/class-wc-tpayway.php:471
287 | msgid "Redirecting..."
288 | msgstr ""
289 |
290 | #. Name of the plugin
291 | msgid "WooCommerce PayWay Hrvatski Telekom"
292 | msgstr ""
293 |
294 | #. URI of the plugin
295 | msgid "https://github.com/marinsagovac/woocommerce-tcom-payway"
296 | msgstr ""
297 |
298 | #. Author of the plugin
299 | msgid "Marin Sagovac (Marin Šagovac)"
300 | msgstr ""
301 |
--------------------------------------------------------------------------------
/languages/tcom-payway-wc-hr.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: WooCommerce Hrvatski Telekom PayWay\n"
4 | "Report-Msgid-Bugs-To: \n"
5 | "POT-Creation-Date: 2019-11-27 20:52+0000\n"
6 | "PO-Revision-Date: 2019-11-27 21:17+0000\n"
7 | "Last-Translator: Haddad.hr Admin \n"
8 | "Language-Team: Hrvatski\n"
9 | "Language: hr\n"
10 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && "
11 | "n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2;\n"
12 | "MIME-Version: 1.0\n"
13 | "Content-Type: text/plain; charset=UTF-8\n"
14 | "Content-Transfer-Encoding: 8bit\n"
15 | "X-Generator: Loco https://localise.biz/\n"
16 | "X-Loco-Version: 2.3.1; wp-5.3"
17 |
18 | #: classes/class-wc-tpayway.php:44 classes/class-wc-tpayway.php:51
19 | msgid "Use Woo Multi Currency conversion"
20 | msgstr "Koristi Woo Multi Currency konverziju "
21 |
22 | #: classes/class-wc-tpayway.php:46 classes/class-wc-tpayway.php:54
23 | msgid ""
24 | "Enable currency auto conversion for Woo Multi Currency plugin. Make sure "
26 | "that is checked \"Allow Multi Currency\" in plugin page."
27 | msgstr ""
28 | "Omogućiti autokonverziju za dodatak \"Woo Multi Currency\". Provjerite je "
30 | "li \"Dozvoliti viševalutnost\" označena na stranici dodatka"
31 |
32 | #: classes/class-wc-tpayway.php:61
33 | msgid "Enable/Disable"
34 | msgstr "Omogući/Onemogući"
35 |
36 | #: classes/class-wc-tpayway.php:63
37 | msgid "Enable Hrvatski Telekom PayWay Module."
38 | msgstr "Omogući Hrvatski Telekom PayWay modul."
39 |
40 | #: classes/class-wc-tpayway.php:67
41 | msgid "Title:"
42 | msgstr "Naslov:"
43 |
44 | #: classes/class-wc-tpayway.php:69
45 | msgid "This controls the title which the user sees during checkout."
46 | msgstr "Ovo kontrolira naslov koji će kupac koristi prilikom procesa naplate."
47 |
48 | #: classes/class-wc-tpayway.php:70
49 | msgid "Hrvatski Telekom PayWay"
50 | msgstr "Hrvatski Telekom PayWay"
51 |
52 | #: classes/class-wc-tpayway.php:73
53 | msgid "Description:"
54 | msgstr "Opis:"
55 |
56 | #: classes/class-wc-tpayway.php:75
57 | msgid "This controls the description which the user sees during checkout."
58 | msgstr "Ovo kontrolira opis koji će kupac koristiti prilikom procesa naplate."
59 |
60 | #: classes/class-wc-tpayway.php:76
61 | msgid ""
62 | "Payway Hrvatski Telekom is secure payment gateway in Croatia and you can pay using this "
63 | "payment in other currency."
64 | msgstr ""
65 | "PayWay Hrvatski Telekom je siguran pristupnik plaćanja u Hrvatskoj u kojem se može "
66 | "izvršiti plaćanja i u drugim valutama."
67 |
68 | #: classes/class-wc-tpayway.php:79
69 | msgid "Authorize URL:"
70 | msgstr "URL adresa autorizacije"
71 |
72 | #: classes/class-wc-tpayway.php:81
73 | msgid "PayWay Hrvatski Telekom data submiting to this URL"
74 | msgstr "Podaci PayWay Hrvatski Telekom poslani na ovaj URL"
75 |
76 | #: classes/class-wc-tpayway.php:82
77 | msgid "https://pgw.ht.hr/services/payment/api/authorize-form"
78 | msgstr "https://pgw.ht.hr/services/payment/api/authorize-form"
79 |
80 | #: classes/class-wc-tpayway.php:85
81 | msgid "Shop ID:"
82 | msgstr "ID broj trgovine:"
83 |
84 | #: classes/class-wc-tpayway.php:87
85 | msgid "Unique id for the merchant acc, given by bank."
86 | msgstr "Jedinstveni ID za račun trgovca koji omogućava banka."
87 |
88 | #: classes/class-wc-tpayway.php:91
89 | msgid "Secret Key:"
90 | msgstr "Tajni ključ:"
91 |
92 | #: classes/class-wc-tpayway.php:97
93 | msgid "Response URL success"
94 | msgstr "URL adresa za uspješnu transakciju"
95 |
96 | #: classes/class-wc-tpayway.php:103
97 | msgid "Response URL fail:"
98 | msgstr "URL adresa za neuspješnu transakciju"
99 |
100 | #: classes/class-wc-tpayway.php:109
101 | msgid "Message redirect:"
102 | msgstr "Poruka za redirekciju:"
103 |
104 | #: classes/class-wc-tpayway.php:111
105 | msgid "Message to client when redirecting to PayWay page"
106 | msgstr "Poruka kupcu kod redirekcije na stranicu PayWay"
107 |
108 | #. Description of the plugin
109 | #: classes/class-wc-tpayway.php:119
110 | msgid "PayWay Hrvatski Telekom payment gateway"
111 | msgstr "PayWay Hrvatski Telekom pristupnik plaćanja"
112 |
113 | #: classes/class-wc-tpayway.php:120
114 | msgid ""
115 | "PayWay Hrvatski Telekom is "
116 | "payment gateway from telecom Hrvatski Telekom who provides payment gateway services as "
117 | "dedicated services to clients in Croatia."
118 | msgstr ""
119 | "PayWay Hrvatski Telekom je "
120 | "pristupnik plaćanja Hrvatski Telekom koji omogućava usluge proces naplate kao "
121 | "dedicated usluge klijentima u Hrvatskoj."
122 |
123 | #: classes/class-wc-tpayway.php:318
124 | msgid "Pay via PayWay"
125 | msgstr "Plati putem PayWaya"
126 |
127 | #: classes/class-wc-tpayway.php:319
128 | msgid "Cancel order & restore cart"
129 | msgstr "Otkazivanje narudžbe i vraćanje na košaricu"
130 |
131 | #: classes/class-wc-tpayway.php:340
132 | msgid "Action successful"
133 | msgstr "Akcija uspješna"
134 |
135 | #: classes/class-wc-tpayway.php:341
136 | msgid "Action unsuccessful"
137 | msgstr "Akcija neuspješna"
138 |
139 | #: classes/class-wc-tpayway.php:342
140 | msgid "Error processing"
141 | msgstr "Greška u procesiranju"
142 |
143 | #: classes/class-wc-tpayway.php:343
144 | msgid "Action cancelled"
145 | msgstr "Akcija je otkazana"
146 |
147 | #: classes/class-wc-tpayway.php:344
148 | msgid "Action unsuccessful (3D Secure MPI)"
149 | msgstr "Akcija neuspješna (3D Secure MPI)"
150 |
151 | #: classes/class-wc-tpayway.php:345
152 | msgid "Incorrect signature (pwg_signature)"
153 | msgstr "Neispravan potpis (pwg_signature)"
154 |
155 | #: classes/class-wc-tpayway.php:346
156 | msgid "Incorrect store ID (pgw_shop_id)"
157 | msgstr "Neispravan ID trgovine (pgw_shop_id)"
158 |
159 | #: classes/class-wc-tpayway.php:347
160 | msgid "Incorrect transaction ID (pgw_transaction_id)"
161 | msgstr "Neispravan ID transakcije (pgw_transaction_id)"
162 |
163 | #: classes/class-wc-tpayway.php:348
164 | msgid "Incorrect amount (pgw_amount)"
165 | msgstr "Neispavan iznos (pgw_amount)"
166 |
167 | #: classes/class-wc-tpayway.php:349
168 | msgid "Incorrect authorization_type (pgw_authorization_type)"
169 | msgstr "Neispravna vrsta autorizacije (pgw_authorization_type)"
170 |
171 | #: classes/class-wc-tpayway.php:350
172 | msgid "Incorrect announcement duration (pgw_announcement_duration)"
173 | msgstr "Neispravno trajanje najave (pgw_announcement_duration)"
174 |
175 | #: classes/class-wc-tpayway.php:351
176 | msgid "Incorrect installments number (pgw_installments)"
177 | msgstr "Neispravan broj rata (pgw_installments)"
178 |
179 | #: classes/class-wc-tpayway.php:352
180 | msgid "Incorrect language (pgw_language)"
181 | msgstr "Neispravan jezik (pgw_language)"
182 |
183 | #: classes/class-wc-tpayway.php:353
184 | msgid "Incorrect authorization token (pgw_authorization_token)"
185 | msgstr "Neispravan autorizacijski kod (pgw_authorization_token)"
186 |
187 | #: classes/class-wc-tpayway.php:354
188 | msgid "Incorrect card number (pgw_card_number)"
189 | msgstr "Neispravan broj kartice (pgw_card_number)"
190 |
191 | #: classes/class-wc-tpayway.php:355
192 | msgid "Incorrect card expiration date (pgw_card_expiration_date)"
193 | msgstr "Neispravan datum isteka kartice (pgw_card_expiration_date)"
194 |
195 | #: classes/class-wc-tpayway.php:356
196 | msgid "Incorrect card verification data (pgw_card_verification_data)"
197 | msgstr "Neispravni podaci verifikacije kartice (pgw_card_verification_data)"
198 |
199 | #: classes/class-wc-tpayway.php:357
200 | msgid "Incorrect order ID (pgw_order_id)"
201 | msgstr "Neispravan broj narudžbe (pgw_order_id)"
202 |
203 | #: classes/class-wc-tpayway.php:358
204 | msgid "Incorrect order info (pgw_order_info)"
205 | msgstr "Neispravan info narudžbe (pgw_order_info)"
206 |
207 | #: classes/class-wc-tpayway.php:359
208 | msgid "Incorrect order items (pgw_order_items)"
209 | msgstr "Neispravni artikli narudžbe (pgw_order_items)"
210 |
211 | #: classes/class-wc-tpayway.php:360
212 | msgid "Incorrect return method (pgw_return_method)"
213 | msgstr "Neispravna povratna metoda (pgw_return_method)"
214 |
215 | #: classes/class-wc-tpayway.php:361
216 | msgid "Incorrect success store url (pgw_success_url)"
217 | msgstr "Neispravna URL adresa povratka na trgovinu (pgw_success_url)"
218 |
219 | #: classes/class-wc-tpayway.php:362
220 | msgid "Incorrect error store url (pgw_failure_url)"
221 | msgstr "Neispravna URL adresa trgovine za grešku (pgw_failure_url)"
222 |
223 | #: classes/class-wc-tpayway.php:363
224 | msgid "Incorrect merchant data (pgw_merchant_data)"
225 | msgstr "Neispravni podaci trgovca (pgw_merchant_data)"
226 |
227 | #: classes/class-wc-tpayway.php:364
228 | msgid "Incorrect buyer's name (pgw_first_name)"
229 | msgstr "Neispravno ime kupca (pgw_first_name)"
230 |
231 | #: classes/class-wc-tpayway.php:365
232 | msgid "Incorrect buyer's last name (pgw_last_name)"
233 | msgstr "Neispravno prezime (pgw_last_name)"
234 |
235 | #: classes/class-wc-tpayway.php:366
236 | msgid "Incorrect address (pgw_street)"
237 | msgstr "Neispravna adresa (pgw_street)"
238 |
239 | #: classes/class-wc-tpayway.php:367
240 | msgid "Incorrect city (pgw_city)"
241 | msgstr "Neispravan grad (pgw_city)"
242 |
243 | #: classes/class-wc-tpayway.php:368
244 | msgid "Incorrect ZIP code (pgw_post_code)"
245 | msgstr "Neispravan poštanski broj (pgw_post_code)"
246 |
247 | #: classes/class-wc-tpayway.php:369
248 | msgid "Incorrect country (pgw_country)"
249 | msgstr "Neispravna zemlja (pgw_country)"
250 |
251 | #: classes/class-wc-tpayway.php:370
252 | msgid "Incorrect contact phone (pgw_telephone)"
253 | msgstr "Neispravni kontakt telefon (pgw_telephone)"
254 |
255 | #: classes/class-wc-tpayway.php:371
256 | msgid "Incorrect contact e-mail address (pgw_email)"
257 | msgstr "Neispravna e-mail adresa (pgw_email)"
258 |
259 | #: classes/class-wc-tpayway.php:404
260 | msgid "PayWay Hrvatski Telekom payment successful. Unique Id: "
261 | msgstr "PayWay Hrvatski Telekom plaćanje uspješno. Jedinstveni ID:"
262 |
263 | #: classes/class-wc-tpayway.php:409
264 | msgid "Awaiting payment"
265 | msgstr "Čekanje plaćanja"
266 |
267 | #: classes/class-wc-tpayway.php:416
268 | msgid "Payment successful"
269 | msgstr "Plaćanje uspješno"
270 |
271 | #: classes/class-wc-tpayway.php:418
272 | msgid ""
273 | "Payment on PayWay Hrvatski Telekom is successfully completeted and order status is "
274 | "processed."
275 | msgstr ""
276 | "Plaćanje na PayWayu Hrvatski Telekom je uspješno završeno i status narudžbe je "
277 | "procesiran."
278 |
279 | #: classes/class-wc-tpayway.php:425
280 | #, php-format
281 | msgid "Payment for order no. %s was sucessful."
282 | msgstr "Plaćanje za narudžbu broj %s je bilo uspješno."
283 |
284 | #: classes/class-wc-tpayway.php:466
285 | msgid "A payment was not successfull or declined"
286 | msgstr "Plaćanje nije uspjelo ili je odbijeno"
287 |
288 | #: classes/class-wc-tpayway.php:467
289 | msgid "Reason: "
290 | msgstr "Razlog:"
291 |
292 | #: classes/class-wc-tpayway.php:469
293 | msgid "Order Id: "
294 | msgstr "Broj narudžbe:"
295 |
296 | #: classes/class-wc-tpayway.php:471
297 | msgid "Redirecting..."
298 | msgstr "Preusmjeravanje ..."
299 |
300 | #. Name of the plugin
301 | msgid "WooCommerce PayWay Hrvatski Telekom"
302 | msgstr "WooCommerce PayWay Hrvatski Telekom"
303 |
304 | #. URI of the plugin
305 | msgid "https://github.com/marinsagovac/woocommerce-tcom-payway"
306 | msgstr "https://github.com/marinsagovac/woocommerce-tcom-payway"
307 |
308 | #. Author of the plugin
309 | msgid "Marin Sagovac (Marin Šagovac)"
310 | msgstr "Marin Sagovac (Marin Šagovac)"
311 |
--------------------------------------------------------------------------------
/classes/class-wc-tpayway.php:
--------------------------------------------------------------------------------
1 | id = 'WC_TPAYWAY';
36 | $this->domain = 'tcom-payway-wc';
37 | $this->icon = apply_filters('woocommerce_payway_icon', TCOM_PAYWAY_URL . 'assets/images/payway.png');
38 | $this->method_title = 'PayWay Hrvatski Telekom Woocommerce Payment Gateway';
39 | $this->has_fields = false;
40 |
41 | $this->curlExtension = extension_loaded('curl');
42 |
43 | $this->ratehrkfixed = 7.53450;
44 | $this->tecajnaHnbApi = "https://api.hnb.hr/tecajn-eur/v3";
45 |
46 | $this->api_version = '2.0';
47 |
48 | $this->init_form_fields();
49 | $this->init_settings();
50 |
51 | $settings = $this->settings;
52 |
53 | $this->title = isset($settings['title']) ? $settings['title'] : '';
54 | $this->shop_id = isset($settings['mer_id']) ? $settings['mer_id'] : '';
55 | $this->acq_id = isset($settings['acq_id']) ? $settings['acq_id'] : '';
56 | $this->pg_domain = $this->get_option('pg_domain');
57 | $this->checkout_msg = isset($settings['checkout_msg']) ? $settings['checkout_msg'] : '';
58 | $this->description = isset($settings['description']) ? $settings['description'] : '';
59 |
60 | $this->msg['message'] = '';
61 | $this->msg['class'] = '';
62 |
63 | add_action('init', array(&$this, 'check_tcompayway_response'));
64 |
65 | // Hook to load textdomain during 'init'
66 | add_action('init', array($this, 'load_textdomain'));
67 |
68 | if (version_compare(WOOCOMMERCE_VERSION, '2.0.0', '>=')) {
69 | add_action('woocommerce_update_options_payment_gateways_' . $this->id, array(&$this, 'process_admin_options'));
70 | } else {
71 | add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
72 | }
73 | add_action('woocommerce_receipt_WC_TPAYWAY', array(&$this, 'receipt_page'));
74 |
75 | $this->update_hnb_currency();
76 | }
77 |
78 | /**
79 | * Load plugin textdomain.
80 | */
81 | public function load_textdomain()
82 | {
83 | load_plugin_textdomain(
84 | 'tcom-payway-wc', // Textdomain
85 | false, // Deprecated argument, set to false
86 | dirname(plugin_basename(__FILE__)) . '/languages/' // Path to language files
87 | );
88 | }
89 |
90 |
91 | function init_form_fields()
92 | {
93 | include_once(ABSPATH . 'wp-admin/includes/plugin.php');
94 |
95 | $this->form_fields = array(
96 | 'enabled' => array(
97 | 'title' => __('Enable/Disable', $this->domain),
98 | 'type' => 'checkbox',
99 | 'label' => __('Enable PayWay Hrvatski Telekom Module.', 'tcom-payway-wc'),
100 | 'default' => 'no',
101 | ),
102 | 'title' => array(
103 | 'title' => __('Title:', $this->domain),
104 | 'type' => 'text',
105 | 'description' => __('This controls the title which the user sees during checkout.', 'tcom-payway-wc'),
106 | 'default' => __('PayWay Hrvatski Telekom', 'tcom-payway-wc'),
107 | ),
108 | 'description' => array(
109 | 'title' => __('Description:', $this->domain),
110 | 'type' => 'textarea',
111 | 'description' => __('This controls the description which the user sees during checkout.', 'tcom-payway-wc'),
112 | 'default' => __('Payway Hrvatski Telekom is a secure payment gateway in Croatia and you can pay using this payment in other currencies.', 'tcom-payway-wc'),
113 | ),
114 | 'pg_domain' => array(
115 | 'title' => __('Authorize URL', $this->domain),
116 | 'type' => 'select',
117 | 'class' => 'wc-enhanced-select',
118 | 'description' => __('PayWay Hrvatski Telekom data submitting to this URL. Use Prod Mode to live set.', $this->domain),
119 | 'default' => 'prod',
120 | 'desc_tip' => true,
121 | 'options' => array(
122 | 'test' => __('Test Mode', 'woocommerce'),
123 | 'prod' => __('Prod Mode', 'woocommerce'),
124 | ),
125 | ),
126 | 'mer_id' => array(
127 | 'title' => __('Shop ID:', $this->domain),
128 | 'type' => 'text',
129 | 'description' => __('ShopID represents a unique identification of the web shop. ShopID is received from PayWay after signing the request for using PayWay service.', 'tcom-payway-wc'),
130 | 'default' => '',
131 | ),
132 | 'acq_id' => array(
133 | 'title' => __('Secret Key:', $this->domain),
134 | 'type' => 'password',
135 | 'description' => '',
136 | 'default' => '',
137 | ),
138 | 'checkout_msg' => array(
139 | 'title' => __('Message redirect:', $this->domain),
140 | 'type' => 'textarea',
141 | 'description' => __('Message to client when redirecting to PayWay page', 'tcom-payway-wc'),
142 | 'default' => 'Nakon potvrde biti ćete preusmjereni na plaćanje.',
143 | ),
144 | );
145 | }
146 |
147 |
148 | public function admin_options()
149 | {
150 | $hnbRatesUri = "tecajnaHnbApi) . "\">HNB rates";
151 |
152 | echo '
' . __('PayWay Hrvatski Telekom payment gateway', 'tcom-payway-wc') . '
';
153 | echo '
' . __('PayWay Hrvatski Telekom is a payment gateway from Hrvatski Telekom that provides payment gateway services as dedicated services to clients in Croatia.', 'tcom-payway-wc') . '
' . esc_html__( 'Preferred currency will be EUR. Make sure that the default currency on your webshop is set to EUR.', 'tcom-payway-wc' ) . '
';
160 | echo '
' . __('Other currencies will be automatically calculated and sent to PayWay using HNB rates: USD (WordPress) to HRK (PayWay) using ', 'tcom-payway-wc') . $hnbRatesUri . '