diff --git a/.github/ISSUE_TEMPLATE/bug---feature-.md b/.github/ISSUE_TEMPLATE/bug---feature-.md new file mode 100644 index 000000000..9cd595889 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug---feature-.md @@ -0,0 +1,29 @@ +--- +name: 'Bug / Feature ' +about: Create a report to help us improve +title: '' +labels: '' +assignees: thrijith + +--- + +**User Story** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behaviour: +1. Go to '...' +2. Click on '....' +3. See error + +**Acceptance Criteria** +A clear and concise description of what you expected to happen. + +**Mockup** +If applicable, add mockup. + +**Technical Documentation** +If applicable, add any technical documentation. + +**Additional context** +Add any other context about the problem here. diff --git a/composer.json b/composer.json index 83278aa04..3cf39d196 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "laterpay/laterpay-wordpress-plugin", "description": "This is the official LaterPay plugin for selling digital content with WordPress", "license": "MIT", - "version": "2.6.5", + "version": "2.7.0", "config": { "vendor-dir": "laterpay/vendor", "secure-http": true diff --git a/composer.lock b/composer.lock index 1744cc1b3..96b7bc247 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "525db3c9672314b3f5abefe5402b8f30", + "content-hash": "62bbedd6869ada8fb9f8c194d2dd1abe", "packages": [ { "name": "laterpay/laterpay-client-php", @@ -12,7 +12,7 @@ "source": { "type": "git", "url": "https://github.com/laterpay/laterpay-client-php.git", - "reference": "786f40fdb91b53eb338cc25347227b2697608178" + "reference": "714fce9b46a2843da58e45ab673f627fae17672c" }, "type": "library", "autoload": { @@ -26,7 +26,7 @@ "MIT" ], "description": "LaterPay PHP Client", - "time": "2019-06-18T11:25:21+00:00" + "time": "2019-10-21T15:56:56+00:00" } ], "packages-dev": [ @@ -146,16 +146,16 @@ }, { "name": "phpcompatibility/php-compatibility", - "version": "9.3.1", + "version": "9.3.2", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196" + "reference": "bfca2be3992f40e92206e5a7ebe5eaee37280b58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196", - "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/bfca2be3992f40e92206e5a7ebe5eaee37280b58", + "reference": "bfca2be3992f40e92206e5a7ebe5eaee37280b58", "shasum": "" }, "require": { @@ -200,20 +200,20 @@ "phpcs", "standards" ], - "time": "2019-09-05T18:36:49+00:00" + "time": "2019-10-16T21:24:24+00:00" }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936" + "reference": "94b2388c4fe99e9e2ef0772e280fa0eafa1d0603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936", - "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/94b2388c4fe99e9e2ef0772e280fa0eafa1d0603", + "reference": "94b2388c4fe99e9e2ef0772e280fa0eafa1d0603", "shasum": "" }, "require": { @@ -252,7 +252,7 @@ "polyfill", "standards" ], - "time": "2019-08-28T15:58:19+00:00" + "time": "2019-10-16T21:41:26+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", @@ -306,16 +306,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.0", + "version": "3.5.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "0afebf16a2e7f1e434920fa976253576151effe9" + "reference": "82cd0f854ceca17731d6d019c7098e3755c45060" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/0afebf16a2e7f1e434920fa976253576151effe9", - "reference": "0afebf16a2e7f1e434920fa976253576151effe9", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/82cd0f854ceca17731d6d019c7098e3755c45060", + "reference": "82cd0f854ceca17731d6d019c7098e3755c45060", "shasum": "" }, "require": { @@ -353,7 +353,7 @@ "phpcs", "standards" ], - "time": "2019-09-26T23:12:26+00:00" + "time": "2019-10-16T21:14:26+00:00" }, { "name": "wp-coding-standards/wpcs", diff --git a/gulpfile.js b/gulpfile.js index 43b6ab902..8fdce2223 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -38,7 +38,7 @@ var gulp = require('gulp'), // OPTIONS ------------------------------------------------------------------------------------------------------------- var gulpKnownOptions = { string: 'version', - default: { version: '2.6.5' } + default: { version: '2.7.0' } }; var gulpOptions = minimist(process.argv.slice(2), gulpKnownOptions); gulpOptions.svn = {}; diff --git a/laterpay/README.txt b/laterpay/README.txt index eeafcc463..32628cf20 100644 --- a/laterpay/README.txt +++ b/laterpay/README.txt @@ -4,8 +4,9 @@ Contributors: laterpay, dominik-rodler, mihail-turalenka, avahura, ahryb Donate link: https://laterpay.net Tags: laterpay, accept micropayments, accept payments, access control, billing, buy now pay later, content monetization, creditcard, debitcard, free to read, laterpay for wordpress, laterpay payment, laterpay plugin, micropayments, monetize, paid content, pay button, pay per use, payments, paywall, PPU, sell digital content, sell digital goods, single sale, wordpress laterpay, Payments, Content Monetization, Paywall, Paid Content, Publisher, Blogger, conversion, paygate, monetization Requires at least: 4.6 -Tested up to: 5.2.3 -Stable tag: 2.6.5 +Tested up to: 5.3 +Requires PHP: 5.6 +Stable tag: 2.7.0 Author URI: https://laterpay.net Plugin URI: https://github.com/laterpay/laterpay-wordpress-plugin License: MIT @@ -88,6 +89,11 @@ Yes! 6. The plugin provides a variety of advanced settings to customize the LaterPay plugin and adjust it to your needs. == Changelog == += 2.7.0 ( October 24, 2019 ) = +* Add `[laterpay_contribution]` shortcode for publishers to accept Contributions. +* Add Contributions tab, to allow publishers to generate Contribution shortcode dynamically. +* Remove Free Items from Purchase Overlay. + = 2.6.5 ( September 30, 2019 ) Hotfix Release = * Fix issue with Global Pricing behaviour override. @@ -672,8 +678,8 @@ KNOWN BUGS: == Upgrade notice == -= 2.6.5 ( September 30, 2019 ) = -Fix issue with Global Pricing behaviour override. += 2.7.0 ( October 24, 2019 ) = +New shortocde that allows publishers to accept Contributions, brand new Contributions tab to generate Contributions shortcode and minor bug fix in Purchase Overlay. == Arbitrary section == diff --git a/laterpay/application/Controller/Admin.php b/laterpay/application/Controller/Admin.php index 40384d499..e52cb0822 100644 --- a/laterpay/application/Controller/Admin.php +++ b/laterpay/application/Controller/Admin.php @@ -207,6 +207,12 @@ public function run( $tab = '' ) { $pricing_controller->render_page(); break; + // render contributions tab + case 'contributions': + $contributions_controller = new LaterPay_Controller_Admin_Contributions( $this->config ); + $contributions_controller->render_page(); + break; + // render appearance tab case 'appearance': $appearance_controller = new LaterPay_Controller_Admin_Appearance( $this->config ); @@ -814,7 +820,13 @@ public function get_admin_menu( LaterPay_Core_Event $event ) { $menu['pricing'] = array( 'url' => 'laterpay-pricing-tab', - 'title' => __( 'Pricing', 'laterpay' ), + 'title' => __( 'Paywall', 'laterpay' ), + 'cap' => 'activate_plugins', + ); + + $menu['contributions'] = array( + 'url' => 'laterpay-contributions-tab', + 'title' => esc_html__( 'Contributions', 'laterpay' ), 'cap' => 'activate_plugins', ); @@ -881,7 +893,7 @@ public static function register_common_scripts( $page, $data_for_localize = [] ) } // Allowed pages for notice and instruction. - $lp_update_notice_allowed_page = [ 'pricing', 'appearance', 'advanced', 'account' ]; + $lp_update_notice_allowed_page = [ 'pricing', 'appearance', 'advanced', 'account', 'contributions' ]; // Check if current page is in allowed page. if ( in_array( $page, $lp_update_notice_allowed_page, true ) ) { @@ -891,7 +903,7 @@ public static function register_common_scripts( $page, $data_for_localize = [] ) if ( ! empty( $ga_data['update_highlights']['version'] ) ) { $version_update_number = $ga_data['update_highlights']['version']; $ga_data['update_highlights']['version'] = sprintf( esc_html__( 'Version %s Highlights:', 'laterpay' ), $version_update_number ); - $ga_data['update_highlights']['notice'] = sprintf( esc_html__( 'Have you seen our Contextual Help? Click the Help box in the upper right corner of any page to get relevant information.', 'laterpay' ) ); + $ga_data['update_highlights']['notice'] = sprintf( esc_html__( 'At long last, one of our most highly requested features is here! Check out the new Contributions tab to explore our newest feature.', 'laterpay' ) ); $ga_data['update_highlights_nonce'] = wp_create_nonce( 'update_highlights_nonce' ); } @@ -900,15 +912,16 @@ public static function register_common_scripts( $page, $data_for_localize = [] ) $data_for_localize['learn_more'] = __( 'Learn More', 'laterpay' ); $tab_information = [ - 'appearance' => sprintf( __( '%sOptional%s Use the appearance tab to configure your payment button colors and how your pricing options are displayed.', 'laterpay' ), '', '' ), - 'pricing' => sprintf( __( '%sREQUIRED%s Use this tab to configure your default prices. Prices can also be set for an individual post on the edit post page.', 'laterpay' ), '', '' ), - 'advanced' => sprintf( __( '%sOptional%s Here we highlight advanced features & settings like selling downloadable content and promoting your subscriptions. Scroll through to learn more!', 'laterpay' ), '', '' ), + 'appearance' => sprintf( __( '%sOptional%s Use the appearance tab to configure your payment button colors and how your pricing options are displayed.', 'laterpay' ), '', '' ), + 'pricing' => sprintf( __( '%sREQUIRED%s Use this tab to configure your default prices. Prices can also be set for an individual post on the edit post page.', 'laterpay' ), '', '' ), + 'advanced' => sprintf( __( '%sOptional%s Here we highlight advanced features & settings like selling downloadable content and promoting your subscriptions. Scroll through to learn more!', 'laterpay' ), '', '' ), + 'contributions' => sprintf( __( '%sOptional%s To request contributions, use the editor below to configure your contributions request then copy the shortcode anywhere on your site.', 'laterpay' ), '', '' ), ]; $tab_information_status = get_option( 'lp_tabular_info' ); foreach ( $tab_information as $key => $value ) { - if ( 1 === absint( $tab_information_status[ $key ] ) ) { + if ( isset( $tab_information_status[ $key ] ) && 1 === absint( $tab_information_status[ $key ] ) ) { $data_for_localize['lp_instructional_info'][ $key ] = $value; } } diff --git a/laterpay/application/Controller/Admin/Contributions.php b/laterpay/application/Controller/Admin/Contributions.php new file mode 100644 index 000000000..d4855aa5b --- /dev/null +++ b/laterpay/application/Controller/Admin/Contributions.php @@ -0,0 +1,247 @@ + array( + array( 'laterpay_on_admin_view', 200 ), + array( 'process_ajax_requests' ), + array( 'laterpay_on_ajax_user_can_activate_plugins', 200 ), + ) + ); + } + + /** + * @see LaterPay_Core_View::load_assets + */ + public function load_assets() { + parent::load_assets(); + + LaterPay_Controller_Admin::register_common_scripts( 'contributions' ); + + // load page-specific JS + wp_register_script( + 'laterpay-backend-contributions', + $this->config->js_url . 'laterpay-backend-contributions.js', + array( 'jquery', 'laterpay-common' ), + $this->config->version, + true + ); + + // Enqueue the contributions script. + wp_enqueue_script( 'laterpay-backend-contributions' ); + + // Get data for GA. + $merchant_key = LaterPay_Controller_Admin::get_merchant_id_for_ga(); + + // pass localized strings and variables to script + wp_localize_script( + 'laterpay-backend-contributions', + 'lpVars', + array( + 'ajaxUrl' => admin_url( 'admin-ajax.php' ), + 'locale' => get_locale(), + 'currency' => LaterPay_Helper_Config::get_currency_config(), + 'gaData' => array( // GA Data value. + 'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? $merchant_key : '', + ), + 'i18n' => [ // Info/Warning/Error messages. + 'contribute' => esc_html__( 'Contribute', 'laterpay' ), + 'now' => esc_html__( 'now', 'laterpay' ), + 'nowOrPayLater' => esc_html__( 'now, pay later', 'laterpay' ), + 'errorCampaignName' => esc_html__( 'Please enter a Campaign Name above.', 'laterpay' ), + 'errorCampaignThanks' => esc_html__( 'Please enter a valid URL.', 'laterpay' ), + 'errorCustomAmount' => esc_html__( 'Custom contribution amounts are only available when Show multiple contribution amounts is enabled.', 'laterpay' ), + 'errorNoAmount' => esc_html__( 'Please enter a valid contribution amount above.', 'laterpay' ), + 'errorNoAmountMultiple' => esc_html__( 'Please enter at least two valid contribution amounts above. If you would like to only allow one amount, simply un-check Show multiple contribution amounts.', 'laterpay' ), + ], + ) + ); + } + + /** + * @see LaterPay_Core_View::render_page + */ + public function render_page() { + $this->load_assets(); + + // View data for laterpay/views/backend/contributions.php. + $view_args = array( + 'plugin_is_in_live_mode' => $this->config->get( 'is_in_live_mode' ), + 'admin_menu' => LaterPay_Helper_View::get_admin_menu(), + 'contributions_obj' => $this, + 'live_key' => get_option( 'laterpay_live_merchant_id', '' ), + 'currency' => LaterPay_Helper_Config::get_currency_config(), + ); + + // Load the contributions page for Merchant. + $this->assign( 'laterpay', $view_args ); + $this->render( 'backend/contributions' ); + } + + /** + * Process Ajax requests from contributions tab. + * + * @param LaterPay_Core_Event $event + * + * @return void + * @throws LaterPay_Core_Exception_InvalidIncomingData + * + */ + public static function process_ajax_requests( LaterPay_Core_Event $event ) { + $event->set_result( + array( + 'success' => false, + 'message' => __( 'An error occurred when trying to save your settings. Please try again.', 'laterpay' ), + ) + ); + + $submitted_form_value = filter_input( INPUT_POST, 'form', FILTER_SANITIZE_STRING ); + if ( null === $submitted_form_value ) { + // invalid request + throw new LaterPay_Core_Exception_InvalidIncomingData( 'form' ); + } + + // Verify form validity. + if ( function_exists( 'check_admin_referer' ) ) { + check_admin_referer( 'laterpay_form' ); + } + + // Handle contribution generation form submission. + switch ( $submitted_form_value ) { + case 'single_contribution': + + $single_contribution_form = new LaterPay_Form_ContributionSingle( $_POST ); // phpcs:ignore + + // Response for invalid data. + $event->set_result( + array( + 'success' => false, + 'errors' => $single_contribution_form->get_errors(), + 'message' => __( 'An error occurred when trying to generate the shortcode. Please try again.', 'laterpay' ), + ) + ); + + if ( ! $single_contribution_form->is_valid() ) { + throw new LaterPay_Core_Exception_FormValidation( get_class( $single_contribution_form ), $single_contribution_form->get_errors() ); + } + + // Skip form name, action and nonce value. + $form_data = $single_contribution_form->get_form_values( true, null, [ 'form', 'action', '_wpnonce' ] ); + + // Generate the shortcode. + $result = LaterPay_Controller_Frontend_Shortcode::generator( 'contribution', [ + 'name' => sanitize_text_field( $form_data['contribution_name'] ), + 'thank_you' => esc_url_raw( $form_data['thank_you_page'] ), + 'type' => 'single', + 'single_amount' => (float) $form_data['single_amount'] * 100, + 'single_revenue' => sanitize_text_field( $form_data['single_revenue'] ), + ] ); + $message = __( 'Successfully generated code, please paste at desired location.', 'laterpay' ); + + // Send response. + $event->set_result( + [ + 'success' => $result['success'], + 'message' => true === $result['success'] ? $message : $result['message'], + 'code' => isset( $result['code'] ) ? $result['code'] : '' + ] + ); + break; + + case 'multiple_contribution': + + $multiple_contribution_form = new LaterPay_Form_ContributionMultiple( $_POST ); // phpcs:ignore + + // Response for invalid data. + $event->set_result( + array( + 'success' => false, + 'errors' => $multiple_contribution_form->get_errors(), + 'message' => __( 'An error occurred when trying to generate the shortcode. Please try again.', 'laterpay' ), + ) + ); + + if ( ! $multiple_contribution_form->is_valid() ) { + throw new LaterPay_Core_Exception_FormValidation( get_class( $multiple_contribution_form ), $multiple_contribution_form->get_errors() ); + } + + // Skip form name, action and nonce value. + $form_data = $multiple_contribution_form->get_form_values( true, null, [ + 'form', + 'action', + '_wpnonce' + ] ); + + // Sanitize the all amounts input. + $filters = [ + 'price' => FILTER_SANITIZE_STRING, + 'revenue' => FILTER_SANITIZE_STRING, + 'is_selected' => FILTER_VALIDATE_BOOLEAN, + ]; + $options = [ + 'price' => [ + 'flags' => FILTER_NULL_ON_FAILURE + ], + 'revenue' => [ + 'flags' => FILTER_NULL_ON_FAILURE + ], + 'is_selected' => [ + 'flags' => FILTER_NULL_ON_FAILURE + ], + ]; + + // Get all amounts. + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Each value is sanitized below. + $all_amounts = ! empty( $_POST['all_amounts'] ) ? json_decode( wp_unslash( $_POST['all_amounts'] ), true ) : []; + $filtered_prices = []; + + $selected_amount = 1; + // Loop through the user input an build an array to be processed by shortcode generator. + foreach ( $all_amounts as $id => $amount_array ) { + foreach ( $amount_array as $key => $value ) { + $filtered_prices[$id][ $key ] = filter_var( $value, $filters[ $key ], $options[ $key ] ); + if ( true === $amount_array['is_selected'] ) { + $selected_amount = $id + 1; + } + } + } + + // Generate the shortcode. + $result = LaterPay_Controller_Frontend_Shortcode::generator( 'contribution', [ + 'name' => sanitize_text_field( $form_data['contribution_name'] ), + 'thank_you' => esc_url_raw( $form_data['thank_you_page'] ), + 'type' => 'multiple', + 'custom_amount' => isset ( $_POST['custom_amount'] ) ? (float) $form_data['custom_amount'] * 100 : 'none', + 'all_amounts' => array_column( $filtered_prices, 'price' ), + 'all_revenues' => array_column( $filtered_prices, 'revenue' ), + 'selected_amount' => $selected_amount + ] ); + $message = __( 'Successfully generated code, please paste at desired location.', 'laterpay' ); + + // Send response. + $event->set_result( + [ + 'success' => $result['success'], + 'message' => true === $result['success'] ? $message : $result['message'], + 'code' => isset( $result['code'] ) ? $result['code'] : '' + ] + ); + break; + + default: + break; + } + } +} diff --git a/laterpay/application/Controller/Frontend/Shortcode.php b/laterpay/application/Controller/Frontend/Shortcode.php index d04724c53..78677aec6 100644 --- a/laterpay/application/Controller/Frontend/Shortcode.php +++ b/laterpay/application/Controller/Frontend/Shortcode.php @@ -38,6 +38,10 @@ public static function get_subscribed_events() { array( 'laterpay_on_plugin_is_working', 200 ), array( 'laterpay_access_manage_content', 200 ), ), + 'laterpay_shortcode_contribution' => array( + array( 'laterpay_on_plugin_is_working', 200 ), + array( 'render_contribution_dialog', 200 ), + ), 'wp_ajax_laterpay_get_premium_shortcode_link' => array( array( 'laterpay_on_plugin_is_working', 200 ), array( 'ajax_get_premium_shortcode_link' ), @@ -670,4 +674,233 @@ public function laterpay_access_manage_content( LaterPay_Core_Event $event ) { // If user has no access then show content. $event->set_result( $content ); } + + /** + * Generate the shortcode string based on provide attributes and their values. + * + * @param $config_array array Shortcode attribute and value data. + * + * @return mixed + */ + private static function get_shortcode_string( $config_array ) { + return array_reduce( + array_keys( $config_array ), + function ( $carry, $key ) use ( $config_array ) { + $value = $config_array[ $key ]; + if ( in_array( $key, ['all_amounts', 'all_revenues'], true ) ) { + $value = implode( ',', $config_array[ $key ] ); + } + return $carry . ' ' . $key . '="' . $value . '"'; + }, + '' + ); + } + + /** + * Generate shortcode based on provided config. + * + * @param $type string Type of shortcode. + * @param $config_array array Shortcode configuration data. + * + * @return array|bool + */ + public static function generator( $type, $config_array ) { + // Handle contribution shortcode generation. + if ( 'contribution' === $type ) { + // Validate the configuration. + $result = self::is_contribution_config_valid( $config_array ); + if ( false === $result['success'] ) { + return $result; + } else { + if ( 'multiple' === $config_array['type'] && 'none' === $config_array['custom_amount'] ) { + unset( $config_array['custom_amount'] ); + } + // Create the shortcode string. + $built_shortcode = sprintf( '[laterpay_contribution %s]', self::get_shortcode_string( $config_array ) ); + return [ + 'success' => true, + 'code' => $built_shortcode + ]; + } + } + + return [ + 'success' => false, + 'message' => esc_html__( 'Something went wrong.', 'laterpay' ) + ]; + } + + /** + * Check if the provided shortcode configuration for Contribution is valid or now. + * + * @param $config_array array Contribution configuration data. + * + * @return array|bool + */ + private static function is_contribution_config_valid( $config_array ) { + + // Check if campaign name is set. + if ( empty( $config_array['name'] ) ) { + return [ + 'success' => false, + 'message' => esc_html__( 'Please enter a Campaign Name above.', 'laterpay' ), + ]; + } + + // Check if campaign amount is empty. + if ( 'single' === $config_array['type'] ) { + if ( floatval( $config_array['single_amount'] ) === floatval(0.0) ) { + return [ + 'success' => false, + 'message' => esc_html__( 'Please enter a valid contribution amount above.', 'laterpay' ), + ]; + } + return true; + } + + return true; + } + + /** + * Display Contribution dialog for multiple amounts and Contribution amount button for single amount shortcode. + * + * The shortcode [laterpay_contribution] accepts these parameters: + * - type: Type of the Contribution, i.e Single / Multiple. + * - name: Name of the Campaign. + * - thank_you: URL to which the user has to be redirected to, if empty redirect to shortcode page. + * - single_amount: Amount of Contribution, value in cents.. + * - single_revenue: Revenue of the single amount, i.e Pay Now / Pay Later. + * - custom_amount: Custom Amount for Contribution dialog, if set amount will be pre-filled else empty. + * - all_amounts: A comma separated string containing configured amounts. + * - all_revenues: A comma separated string containing configured revenues. + * - selected_amount: Indicates default selected amount in the Contribution Dialog for Multiple Contributions. + * + * Basic example: + * [laterpay_contribution name="Kerala Floods Relief" thank_you="" type="single" single_amount="400" single_revenue="ppu"] + * or: + * [laterpay_contribution name="Dharamsala Animal Rescue" thank_you="" type="multiple" all_amounts="300,500,800" all_revenues="ppu,sis,sis" selected_amount="1"] + * or: + * [laterpay_contribution name="Dharamsala Animal Rescue" thank_you="https://dharamsalaanimalrescue.org/" type="multiple" custom_amount="1000" all_amounts="300,500" all_revenues="ppu,sis" selected_amount="1"] + * + * @param LaterPay_Core_Event $event + */ + public function render_contribution_dialog( LaterPay_Core_Event $event ) { + list( $atts) = $event->get_arguments() + array( array() ); + + $config_data = shortcode_atts( array( + 'type' => 'multiple', + 'name' => null, + 'thank_you' => null, + 'single_amount' => null, + 'single_revenue' => null, + 'custom_amount' => null, + 'all_amounts' => null, + 'all_revenues' => null, + 'selected_amount' => null, + ), $atts ); + + // Show error to current user? + $show_error = is_user_logged_in() && current_user_can( 'manage_options' ); + + // Template for error message. + $template = '
%s
'; + + // Validate shortcode attributes. + $validation_result = self::is_contribution_config_valid( $config_data ); + + // Display error if something went wrong. + if ( $show_error && false === $validation_result['success'] ) { + $error_message = sprintf( + $template, + sprintf( esc_html__( '%1$s', 'laterpay' ), $validation_result['message'] ) + ); + $event->set_result( $error_message ); + return; + } + + // Set redirect URL, if empty use current page where shortcode resides. + if ( ! empty( $config_data['thank_you'] ) ) { + $current_url = $config_data['thank_you']; + } else { + global $wp; + $current_url = trailingslashit( home_url( add_query_arg( [], $wp->request ) ) ); + } + + // Configure contribution values. + $payment_config = []; + $contribution_urls = ''; + $currency_config = LaterPay_Helper_Config::get_currency_config(); + $campaign_name = $config_data['name']; + $campaign_id = str_replace( ' ', '-', strtolower( $campaign_name ) ) . '-' . (string) time(); + $client_options = LaterPay_Helper_Config::get_php_client_options(); + $client = new LaterPay_Client( + $client_options['cp_key'], + $client_options['api_key'], + $client_options['api_root'], + $client_options['web_root'], + $client_options['token_name'] + ); + + if ( 'single' === $config_data['type'] ) { + // Configure single amount contribution. + $lp_revenue = empty( $config_data['single_revenue'] ) ? 'ppu' : $config_data['single_revenue']; + $payment_config = [ + 'amount' => $config_data['single_amount'], + 'revenue' => $lp_revenue, + 'url' => $client->get_single_contribution_url( [ + 'revenue' => $lp_revenue, + 'campaign_id' => $campaign_id, + 'title' => $campaign_name, + 'url' => $current_url, + ] ) + ]; + } else { + // Get all amounts and revenues from shortcode. + $multiple_amounts = explode( ',', $config_data['all_amounts'] ); + $multiple_revenues = explode( ',', $config_data['all_revenues'] ); + + // Loop through each amount and configure amount attributes. + foreach ( $multiple_amounts as $key => $value ) { + $contribute_url = $client->get_single_contribution_url( [ + 'revenue' => $multiple_revenues[ $key ], + 'campaign_id' => $campaign_id, + 'title' => $campaign_name, + 'url' => $current_url + ] ); + + $payment_config['amounts'][ $key ]['amount'] = $multiple_amounts[ $key ]; + $payment_config['amounts'][ $key ]['revenue'] = $multiple_revenues[ $key ]; + $payment_config['amounts'][ $key ]['selected'] = absint( $config_data['selected_amount'] ) === $key + 1; + $payment_config['amounts'][ $key ]['url'] = $contribute_url . '&custom_pricing=' . $currency_config['code'] . $multiple_amounts[ $key ]; + } + + // Only add custom amount if it was checked in backend. + if ( isset( $config_data['custom_amount'] ) ) { + $payment_config['custom_amount'] = $config_data['custom_amount']; + + // Generate contribution URL's for Pay Now and Pay Later revenue to handle custom amount. + $contribution_urls = $client->get_contribution_urls( [ + 'campaign_id' => $campaign_id, + 'title' => $campaign_name, + 'url' => $current_url + ] ); + } + } + + // View data for laterpay/views/frontend/partials/widget/contribution-dialog.php. + $view_args = array( + 'symbol' => 'USD' === $currency_config['code'] ? '$' : '€', + 'id' => $campaign_id, + 'type' => $config_data['type'], + 'name' => $campaign_name, + 'thank_you' => empty( $config_data['thank_you'] ) ? '' : $config_data['thank_you'], + 'contribution_urls' => $contribution_urls, + 'payment_config' => $payment_config, + ); + + // Load the contributions dialog for User. + $this->assign( 'contribution', $view_args ); + $html = $this->get_text_view( 'frontend/partials/widget/contribution-dialog' ); + $event->set_result( $html ); + } } diff --git a/laterpay/application/Controller/Install.php b/laterpay/application/Controller/Install.php index 0814d3c17..f35529d78 100644 --- a/laterpay/application/Controller/Install.php +++ b/laterpay/application/Controller/Install.php @@ -686,7 +686,7 @@ public function add_update_highlights() { if ( ! empty( $current_version ) ) { $update_highlights = [ - 'version' => '2.6.4', + 'version' => '2.7.0', ]; update_option( 'lp_update_highlights', $update_highlights ); @@ -706,11 +706,24 @@ public function add_tabular_info_option() { // If `1` then show notice. update_option( 'lp_tabular_info', [ - 'appearance' => 1, - 'pricing' => 1, - 'advanced' => 1, + 'appearance' => 1, + 'pricing' => 1, + 'advanced' => 1, + 'contributions' => 1, ] ); + } else { + $all_lp_tabs = [ 'appearance', 'pricing', 'advanced', 'contributions' ]; + // For adding new data, if option exists already, check if all tab option exists, if not add it. + $current_lp_tab_info = get_option( 'lp_tabular_info', [] ); + if ( ! empty( $current_lp_tab_info ) ) { + foreach ( $all_lp_tabs as $lp_tab ) { + if ( ! isset( $current_lp_tab_info[$lp_tab] ) ) { + $current_lp_tab_info[$lp_tab] = 1; + } + } + } + update_option( 'lp_tabular_info', $current_lp_tab_info ); } } diff --git a/laterpay/application/Core/Bootstrap.php b/laterpay/application/Core/Bootstrap.php index 00d28d912..37445fa98 100644 --- a/laterpay/application/Core/Bootstrap.php +++ b/laterpay/application/Core/Bootstrap.php @@ -123,6 +123,7 @@ private function register_shortcodes() { LaterPay_Hooks::add_wp_shortcode( 'laterpay_time_pass_purchase', 'laterpay_shortcode_time_pass_purchase' ); LaterPay_Hooks::add_wp_shortcode( 'laterpay_subscription_purchase', 'laterpay_shortcode_subsription_purchase' ); LaterPay_Hooks::add_wp_shortcode( 'laterpay_check_access', 'laterpay_shortcode_check_access' ); + LaterPay_Hooks::add_wp_shortcode( 'laterpay_contribution', 'laterpay_shortcode_contribution' ); laterpay_event_dispatcher()->add_subscriber( $shortcode_controller ); } @@ -158,6 +159,8 @@ private function register_admin_actions() { $controller = self::get_controller( 'Admin_Advanced' ); laterpay_event_dispatcher()->add_subscriber( $controller ); + laterpay_event_dispatcher()->add_subscriber( self::get_controller( 'Admin_Contributions' ) ); + // register callbacks for adding meta_boxes $post_metabox_controller = self::get_controller( 'Admin_Post_Metabox' ); laterpay_event_dispatcher()->add_subscriber( $post_metabox_controller ); diff --git a/laterpay/application/Form/ContributionMultiple.php b/laterpay/application/Form/ContributionMultiple.php new file mode 100644 index 000000000..fdc04cd54 --- /dev/null +++ b/laterpay/application/Form/ContributionMultiple.php @@ -0,0 +1,125 @@ +set_field( + 'form', + array( + 'validators' => array( + 'is_string', + 'cmp' => array( + array( + 'like' => 'multiple_contribution', + ), + ), + ), + ) + ); + + $this->set_field( + 'action', + array( + 'validators' => array( + 'is_string', + 'cmp' => array( + array( + 'eq' => 'laterpay_contributions', + ), + ), + ), + ) + ); + + $this->set_field( + '_wpnonce', + array( + 'validators' => array( + 'is_string', + 'cmp' => array( + array( + 'ne' => null, + ), + ), + ), + ) + ); + + $this->set_field( + 'contribution_name', + array( + 'validators' => array( + 'is_string', + ), + 'filters' => array( + 'to_string', + 'unslash', + ) + ) + ); + + $this->set_field( + 'thank_you_page', + array( + 'validators' => array( + 'is_string', + ), + 'filters' => array( + 'to_string', + 'unslash', + ) + ) + ); + + $this->set_field( + 'all_amounts', + array( + 'validators' => array( + 'is_string', + ), + ) + ); + + $this->set_field( + 'custom_amount', + array( + 'validators' => array( + 'is_float', + 'cmp' => array( + array( + 'lte' => $currency['sis_max'], + 'gte' => $currency['ppu_min'], + ), + array( + 'eq' => 0.00, + ), + ), + ), + 'filters' => array( + 'delocalize', + 'format_num' => array( + 'decimals' => 2, + 'dec_sep' => '.', + 'thousands_sep' => '' + ), + 'to_float' + ), + ) + ); + } +} diff --git a/laterpay/application/Form/ContributionSingle.php b/laterpay/application/Form/ContributionSingle.php new file mode 100644 index 000000000..cc1c0a2a2 --- /dev/null +++ b/laterpay/application/Form/ContributionSingle.php @@ -0,0 +1,159 @@ +set_field( + 'form', + array( + 'validators' => array( + 'is_string', + 'cmp' => array( + array( + 'like' => 'single_contribution', + ), + ), + ), + ) + ); + + $this->set_field( + 'action', + array( + 'validators' => array( + 'is_string', + 'cmp' => array( + array( + 'eq' => 'laterpay_contributions', + ), + ), + ), + ) + ); + + $this->set_field( + '_wpnonce', + array( + 'validators' => array( + 'is_string', + 'cmp' => array( + array( + 'ne' => null, + ), + ), + ), + ) + ); + + $this->set_field( + 'contribution_name', + array( + 'validators' => array( + 'is_string', + ), + 'filters' => array( + 'to_string', + 'unslash', + ) + ) + ); + + $this->set_field( + 'thank_you_page', + array( + 'validators' => array( + 'is_string', + ), + 'filters' => array( + 'to_string', + 'unslash', + ) + ) + ); + + $this->set_field( + 'single_amount', + array( + 'validators' => array( + 'is_float', + 'cmp' => array( + array( + 'lte' => $currency['sis_max'], + 'gte' => $currency['ppu_min'], + ), + array( + 'eq' => 0.00, + ), + ), + ), + 'filters' => array( + 'delocalize', + 'format_num' => array( + 'decimals' => 2, + 'dec_sep' => '.', + 'thousands_sep' => '' + ), + 'to_float' + ), + ) + ); + + $this->set_field( + 'single_revenue', + array( + 'validators' => array( + 'is_string', + 'in_array' => array( 'ppu', 'sis' ), + 'depends' => array( + array( + 'field' => 'single_amount', + 'value' => 'sis', + 'conditions' => array( + 'cmp' => array( + array( + 'lte' => $currency['sis_max'], + 'gte' => $currency['sis_min'], + ), + ), + ), + ), + array( + 'field' => 'single_amount', + 'value' => 'ppu', + 'conditions' => array( + 'cmp' => array( + array( + 'lte' => $currency['ppu_max'], + 'gte' => $currency['ppu_min'], + ), + array( + 'eq' => 0.00, + ), + ), + ), + ), + ), + ), + 'filters' => array( + 'to_string', + ), + 'can_be_null' => true, + ) + ); + } +} diff --git a/laterpay/application/Helper/Pricing.php b/laterpay/application/Helper/Pricing.php index 9e4e9316a..870276534 100644 --- a/laterpay/application/Helper/Pricing.php +++ b/laterpay/application/Helper/Pricing.php @@ -90,7 +90,7 @@ public static function is_purchasable( $post_id = null ) { $is_global_price_type = LaterPay_Helper_Pricing::is_price_type_global( $post_price_type ); - if ( empty( $post_price_type ) || $is_global_price_type ) { + if ( empty( $post_price_type ) || $is_global_price_type || ( $is_price_zero && $is_time_pass_subscription_count_zero ) ) { return null; } } elseif ( $post_price_type_one ) { @@ -99,8 +99,7 @@ public static function is_purchasable( $post_id = null ) { return null; } } elseif ( 2 === $post_price_behaviour ) { - if ( ( $is_price_zero && self::is_post_price_type_two_price_zero() - && $is_time_pass_subscription_count_zero ) || $is_post_type_not_supported ) { + if ( $is_post_type_not_supported || ( $is_price_zero && $is_time_pass_subscription_count_zero ) ) { // returns null for this case return null; } diff --git a/laterpay/application/Module/Purchase.php b/laterpay/application/Module/Purchase.php index fbd873458..b80f41b8e 100644 --- a/laterpay/application/Module/Purchase.php +++ b/laterpay/application/Module/Purchase.php @@ -681,8 +681,10 @@ public function on_purchase_layout( LaterPay_Core_Event $event ) { // Add article to combined purchase options. if ( ! empty( $article_individual_price ) ) { - $article_individual_price['type'] = 'article'; - $final_purchase_options[] = $article_individual_price; + if ( floatval( 0.00 !== $article_individual_price['actual_price'] ) && ( ! empty( $article_time_passes ) || ! empty( $article_subscriptions ) ) ) { + $article_individual_price['type'] = 'article'; + $final_purchase_options[] = $article_individual_price; + } } // Add time pass to combined purchase options. @@ -713,26 +715,31 @@ public function on_purchase_layout( LaterPay_Core_Event $event ) { // Make default purchase option selection. if ( ! empty( $final_purchase_options ) ) { $purchase_options_order = $final_purchase_options; - $found_selection = false; - - // Check all options and add 'selected' if conditions match. - foreach ( $purchase_options_order as $key => $single_purchase_option ) { - if ( - ( 1 === $purchase_option_selection && 'article' === $single_purchase_option['type'] ) || - ( 2 === $purchase_option_selection && 'timepass' === $single_purchase_option['type'] ) || - ( 3 === $purchase_option_selection && 'subscription' === $single_purchase_option['type'] ) - ) { - $purchase_options_order[ $key ]['selected'] = true; - $found_selection = true; - break; - } + } elseif ( empty( $article_time_passes ) && empty( $article_subscriptions ) && ! empty( $article_individual_price ) ) { + $purchase_options_order = []; + $article_individual_price['type'] = 'article'; + $purchase_options_order[] = $article_individual_price; + } + // Set default selection to false initially. + $found_selection = false; + + // Check all options and add 'selected' if conditions match. + foreach ( $purchase_options_order as $key => $single_purchase_option ) { + if ( + ( 1 === $purchase_option_selection && 'article' === $single_purchase_option['type'] ) || + ( 2 === $purchase_option_selection && 'timepass' === $single_purchase_option['type'] ) || + ( 3 === $purchase_option_selection && 'subscription' === $single_purchase_option['type'] ) + ) { + $purchase_options_order[ $key ]['selected'] = true; + $found_selection = true; + break; } + } - // Select the first option if that is the chosen option or no conditions matched above. - if ( 0 === $purchase_option_selection || ! $found_selection ) { - $purchase_options_order[0]['selected'] = true; - } + // Select the first option if that is the chosen option or no conditions matched above. + if ( 0 === $purchase_option_selection || ! $found_selection ) { + $purchase_options_order[0]['selected'] = true; } $view_args['title'] = ! empty( $overlay_title ) ? $overlay_title : LaterPay_Helper_Appearance::get_current_options( 'header_title' ); diff --git a/laterpay/asset_sources/img/laterpay-icon-contribute.svg b/laterpay/asset_sources/img/laterpay-icon-contribute.svg new file mode 100644 index 000000000..1cbb33a07 --- /dev/null +++ b/laterpay/asset_sources/img/laterpay-icon-contribute.svg @@ -0,0 +1 @@ + diff --git a/laterpay/asset_sources/js/laterpay-backend-contributions.js b/laterpay/asset_sources/js/laterpay-backend-contributions.js new file mode 100644 index 000000000..458e43903 --- /dev/null +++ b/laterpay/asset_sources/js/laterpay-backend-contributions.js @@ -0,0 +1,538 @@ +/* globals lpGlobal */ + +(function ($) { + $(function () { + + // encapsulate all LaterPay Javascript in function laterPayBackendContributions + function laterPayBackendContributions() { + var $o = { + body : $('body'), + revenueModelInput : '.lp_js_revenueModelInput', + revenueModelContainer : '.post_price_revenue_model', + priceInput : '.lp_js_priceInput', + presetButtonAmount : '.lp-amount-preset-button', + customAmountWrapper : '.lp-custom-amount-wrapper', + selectedButton : '.lp-amount-preset-button-selected', + singleRevenueModel : $('#lp_single_contribution_revenue_model'), + revenueModelMultiple : $('#lp_multiple_contribution_ul'), + revenueModelMultipleItems: $('#lp_multiple_contribution_ul li'), + revenueMultipleRadio : $('input:radio', '#lp_multiple_contribution_ul'), + + // Elements on the current page. + navigation : $('.lp_navigation'), + contributionAllowMultiple : $('#lp_contribution_allow_multiple_amount'), + contributionMultiplePurchaseOptions: $('.all_purchase_options'), + contributionSinglePurchaseOption : $('.lp_single_contribution_dialog_options'), + contributionCustom : $('#lp_contribution_allow_custom_amount'), + contributionSingleButtonWrapper : $('.lp-dialog-single-button-wrapper'), + contributionSinglePreviewButton : $('#lp_jsLinkSingle'), + contributionMultipleWrapper : $('.lp-dialog-multiple-contribution-wrapper'), + contributionGenerateCode : $('#lp_js_contributionGenerateCode'), + customAmountInput : $('#lp_custom_amount_input'), + contributionName : $('#lp_contribution_name'), + thankYouPage : $('#lp_thank_you_page'), + singleContributionPrice : $('#lp_single_contribution_price'), + singleContributionForm : $('#lp_single_contribution_form'), + contributionErrorMessageWrapper : $('.lp-contribution-error-wrapper'), + contributionErrorMessage : '.lp-contribution-error-message', + contributionCustomErrorMessage : '.lp-contribution-custom-error-message', + payPerUse : 'ppu', + singleSale : 'sis', + disabled : 'lp_is-disabled', + selected : 'lp_is-selected', + }, + + bindEvents = function () { + + // validate price and revenue model when entering a price + // (function is only triggered 1500ms after the keyup) + $o.body.on('keyup', $o.priceInput, debounce(function () { + resetGenerateButton(); + var formId = $(this).parents('form').attr('id'); + var contribType = 'single'; + if ('lp_multiple_contribution_form' === formId) { + contribType = 'multiple'; + } + var price = validatePrice($(this).parents('form'), false, contribType, $(this)); + updateLivePreview(price, $(this).parents('form'), contribType); + }, 1500) + ); + + + // Event handler for default amount selection in multiple contribution. + $($o.presetButtonAmount).on('click', function () { + resetGenerateButton(); + var presetId = $(this).parent().attr('id').slice(-1); + $('#lp_js_multiple_amounts .lp-amount-preset-button') + .removeClass('lp-amount-preset-button-selected'); + $(this).addClass('lp-amount-preset-button-selected'); + var price = $('#lp_multiple_contribution_input_' + presetId).val(); + updateLivePreview(price, $(this).parents('form'), 'multiple'); + }); + + // validate choice of revenue model (validating the price switches the revenue model if required) + $('input:radio', $o.singleRevenueModel).add($o.revenueMultipleRadio).change(function () { + resetGenerateButton(); + var formId = $(this).parents('form').attr('id'); + var inputElement = $(this); + var contribType = 'single'; + if ('lp_multiple_contribution_form' === formId) { + contribType = 'multiple'; + inputElement = $(this).parents('.post_price_revenue_model') + .siblings().find('.lp_js_priceInput'); + } + var price = validatePrice($(this).parents('form'), false, contribType, inputElement); + updateLivePreview(price, $(this).parents('form'), contribType); + }); + + // Event handler for contribution type check. + $o.contributionAllowMultiple.change(function () { + resetGenerateButton(); + $($o.contributionCustomErrorMessage).hide(); + if ($(this).prop('checked')) { + $(this).val(1); + $o.contributionMultiplePurchaseOptions.show(); + $o.contributionMultipleWrapper.show(); + $o.contributionSinglePurchaseOption.hide(); + $o.contributionSingleButtonWrapper.hide(); + $o.contributionCustom.attr('disabled', false); + } else { + $(this).val(0); + $o.contributionSinglePurchaseOption.show(); + $o.contributionSingleButtonWrapper.show(); + $o.contributionMultiplePurchaseOptions.hide(); + $o.contributionMultipleWrapper.hide(); + $o.contributionCustom.attr('disabled', true); + } + }); + + // Event handler for custom amount checkbox. + $o.contributionCustom.change(function () { + resetGenerateButton(); + if ($(this).prop('checked')) { + if ($o.contributionAllowMultiple.prop('checked')) { + $(this).val(1); + $($o.customAmountWrapper).show(); + $($o.contributionCustomErrorMessage).hide(); + } else { + $($o.contributionCustomErrorMessage).text(lpVars.i18n.errorCustomAmount); + $($o.contributionCustomErrorMessage).show(); + $(this).attr('disabled', 'disabled'); + return false; + } + } else { + $(this).val(0); + $($o.customAmountWrapper).hide(); + } + }); + + // Event handler for campaign name. + $o.contributionName.on('keyup', debounce(function () { + resetGenerateButton(); + validateContributionConfig(); + }, 1000)); + + // Event handler for campaign thank you page. + $o.thankYouPage.on('keyup', debounce(function () { + resetGenerateButton(); + if ($(this).val().trim().length) { + if (!isValidURL($(this).val())) { + $(this).next($o.contributionErrorMessage).text(lpVars.i18n.errorCampaignThanks); + $(this).next($o.contributionErrorMessage).show(); + } else { + $(this).next($o.contributionErrorMessage).text(''); + $(this).next($o.contributionErrorMessage).hide(); + } + } else { + $(this).next($o.contributionErrorMessage).text(''); + $(this).next($o.contributionErrorMessage).hide(); + } + }, 1000)); + + //Event handler for custom amount. + $o.customAmountInput.on('focus input', debounce(function () { + resetGenerateButton(); + var price = validatePrice($(this).parents('form'), false, + 'multiple', $(this)); + $(this).val(price); + }, 1500)); + + // Handle Generate Shortcode Button. + $o.contributionGenerateCode.on('click', function (e) { + e.preventDefault(); + + // Proceed if not disabled. + if (!$(this).attr('disabled')) { + + var contributionName, thankYouPage, contributionType, singleAmount, countOfAmounts = 1, + singleRevenue, customAmount = '0.00', amountsArray = [], formData = {}, presetId, + isCustomAllowed = 1; + + // Common data to process submission. + contributionName = $o.contributionName.val().length ? $o.contributionName.val() : ''; + thankYouPage = $o.thankYouPage.val().length ? $o.thankYouPage.val() : ''; + contributionType = $o.contributionAllowMultiple.val() === '1' ? 'multiple' : 'single'; + + if (!contributionName.trim().length) { + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage) + .text(lpVars.i18n.errorCampaignName); + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage).show(); + return false; + } + + if ('single' === contributionType) { + singleAmount = $o.singleContributionPrice.val(); + + if (!singleAmount.length || 0.00 === parseFloat(singleAmount)) { + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage) + .text(lpVars.i18n.errorNoAmount); + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage).show(); + return false; + } + + singleRevenue = $('input:radio:checked', $o.singleContributionForm).val(); + // Get clean data, remove unwanted form data and rebuild final array. + formData = getCleanFormData($('#lp_single_contribution_form').serializeArray()); + formData + .push( + {name: 'contribution_name', value: contributionName}, + {name: 'thank_you_page', value: thankYouPage}, + {name: 'single_amount', value: singleAmount}, + {name: 'single_revenue', value: singleRevenue} + ); + isCustomAllowed = 0; + } else { + + // Loop through each multiple contribution input and build data array. + $($o.revenueModelMultipleItems).each(function (idx) { + var inputId = idx + 1; + var $inputElement = $('#lp_multiple_contribution_input_' + inputId); + var price = $inputElement.val().length ? $inputElement.val() : 0.00; + var revenueModel = $('#post_price_revenue_model_' + inputId) + .find('input:checked').val(); + + var $currentButton = $('.lp-amount-presets-wrapper').find($o.selectedButton); + if ($currentButton.length) { + presetId = $currentButton.parent().attr('id').slice(-1); + } else { + presetId = 1; + } + + // Only add if price is greater than 0.00 + if (parseFloat(price) > 0.00) { + var priceInfo = { + price : price * 100, + revenue : revenueModel, + is_selected: parseInt(inputId) === parseInt(presetId) + }; + amountsArray.push(priceInfo); + } + }); + + if (amountsArray.length < 2) { + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage) + .text(lpVars.i18n.errorNoAmountMultiple); + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage).show(); + return false; + } + + // For GA event. + countOfAmounts = amountsArray.length; + isCustomAllowed = $o.contributionCustom.val(); + + // Get clean data, remove unwanted form data and rebuild final array. + formData = getCleanFormData($('#lp_multiple_contribution_form').serializeArray()); + formData + .push( + {name: 'contribution_name', value: contributionName}, + {name: 'thank_you_page', value: thankYouPage}, + {name: 'all_amounts', value: JSON.stringify(amountsArray)} + ); + + if ($o.contributionCustom.val() === '1') { + customAmount = $o.customAmountInput.val(); + formData + .push({name: 'custom_amount', value: customAmount}); + } + } + + $o.contributionErrorMessageWrapper.find($o.contributionErrorMessage).hide(); + + // Submit the form and send GA event if shortcode is generated successfully. + makeAjaxRequest(formData, countOfAmounts, isCustomAllowed); + } + }); + }, + + // Remove unwanted data from final data to be sent for generating shortcode. + getCleanFormData = function (formData) { + var allowedKeys = ['form', 'action', '_wpnonce', '_wp_http_referer']; + $.each(formData, function (i, v) { + if (typeof v !== 'undefined' && allowedKeys.indexOf(v.name) === -1) { + delete formData[i]; + } + }); + formData = formData.slice(0, 4); + return formData; + }, + + //Validate provided input and fix the price if not valid. + validatePrice = function ($form, disableRevenueValidation, contribType, $element) { + var $priceInput, price; + if ('multiple' === contribType) { + $priceInput = $('#' + $element.attr('id'), $form); + } else { + $priceInput = $('.lp_js_priceInput', $form); + } + + price = $priceInput.val(); + + // strip non-number characters + price = price.replace(/[^0-9\,\.]/g, ''); + + // convert price to proper float value + price = parseFloat(price.replace(',', '.')).toFixed(2); + + // prevent non-number prices + if (isNaN(price)) { + price = 0; + } + + // prevent negative prices + price = Math.abs(price); + + // correct prices outside the allowed range of 0.05 - 149.99 + if (price > lpVars.currency.sis_max) { + price = lpVars.currency.sis_max; + } else if (price > 0 && price < lpVars.currency.ppu_min) { + price = lpVars.currency.ppu_min; + } + + if (!disableRevenueValidation) { + validateRevenueModel(price, $form, contribType, $element); + } + + // format price with two digits + price = price.toFixed(2); + + // localize price + if (lpVars.locale.indexOf('de_DE') !== -1) { + price = price.replace('.', ','); + } + + // update price input + $priceInput.val(price); + + return price; + }, + + // Validate the current prices' revenue model, correct if necessary. + validateRevenueModel = function (price, $form, contribType, $element) { + + var currentRevenueModel, postRevenueContainer, $priceInput, $payPerUse, $singleSale, + input = $o.revenueModelInput; + + if ('multiple' === contribType) { + $priceInput = $('#' + $element.attr('id'), $form); + postRevenueContainer = $priceInput.parent().siblings($o.revenueModelContainer); + $payPerUse = $(postRevenueContainer).find('input[value=' + $o.payPerUse + ']'); + $singleSale = $(postRevenueContainer).find('input[value=' + $o.singleSale + ']'); + currentRevenueModel = $(postRevenueContainer).find('input:radio:checked').val(); + } else { + $payPerUse = $(input + '[value=' + $o.payPerUse + ']', $form); + $singleSale = $(input + '[value=' + $o.singleSale + ']', $form); + currentRevenueModel = $('input:radio:checked', $form).val(); + } + + if (price === 0 || (price >= lpVars.currency.ppu_min && price < lpVars.currency.ppu_max)) { + // enable Pay-per-Use + $payPerUse.removeProp('disabled') + .parent('label').removeClass($o.disabled); + } else { + // disable Pay-per-Use + $payPerUse.prop('disabled', 'disabled') + .parent('label').addClass($o.disabled); + } + + if (price >= lpVars.currency.sis_min) { + // enable Single Sale for prices + // (prices > 149.99 Euro are fixed by validatePrice already) + $singleSale.removeProp('disabled') + .parent('label').removeClass($o.disabled); + } else { + // disable Single Sale + $singleSale.prop('disabled', 'disabled') + .parent('label').addClass($o.disabled); + } + + // switch revenue model, if combination of price and revenue model is not allowed + if (price >= lpVars.currency.ppu_max && currentRevenueModel === $o.payPerUse) { + // Pay-per-Use purchases are not allowed for prices > 5.00 Euro + $singleSale.prop('checked', 'checked'); + } else if (price < lpVars.currency.sis_min && currentRevenueModel === $o.singleSale) { + // Single Sale purchases are not allowed for prices < 1.49 Euro + $payPerUse.prop('checked', 'checked'); + } + + // highlight current revenue model + if ('multiple' === contribType) { + $(postRevenueContainer).find('label').removeClass($o.selected); + $(postRevenueContainer).find('input:checked').parent('label').addClass($o.selected); + } else { + $('label', $form).removeClass($o.selected); + $(input + ':checked', $form).parent('label').addClass($o.selected); + } + }, + + // Update the preview box based on user actions and contribution type. + updateLivePreview = function (price, $form, contributionType) { + + var buttonText, currencySymbol; + currencySymbol = 'USD' === lpVars.currency.code ? ' $' : ' €'; + + if ('multiple' === contributionType) { + $($o.revenueModelMultipleItems).each(function (idx) { + // Get next id to work with hidden elements mainly. + var inputId = idx + 1; + var $inputElement = $('#lp_multiple_contribution_input_' + inputId); + var $amountPreset = $('#lp_js_multiple_amount_' + inputId); + + // Find and update update preview div. + var buttonDiv = $amountPreset.find('.lp-amount-preset-button'); + var price = $inputElement.val().length ? $inputElement.val() : '0.00'; + buttonDiv.text(currencySymbol + price); + + // Display hidden input elements. + if (2 === inputId || 3 === inputId || 4 === inputId) { + if ($inputElement.val().length) { + var targetWrapper = inputId + 1; + $('#lp_multiple_contribution_li_' + targetWrapper).show(); + buttonDiv.show(); + } + } + + // Check if current inputs are the hidden one's and update preview accordingly. + if (3 === inputId || 4 === inputId || 5 === inputId) { + if (price !== '0.00') { + $amountPreset.show(); + } else { + $amountPreset.hide(); + } + } + }); + } else { + var revenue = $('input:radio:checked', $form).val(); + + // Check current revenue and update preview accordingly. + if ('ppu' === revenue) { + buttonText = lpVars.i18n.contribute + + currencySymbol + price + ' ' + lpVars.i18n.nowOrPayLater; + } else { + buttonText = lpVars.i18n.contribute + currencySymbol + price + ' ' + lpVars.i18n.now; + } + + // Update the contribution button text in preview. + $o.contributionSinglePreviewButton.text(buttonText); + } + + }, + + // If the selected config is invalid or missing input disable the generate button. + validateContributionConfig = function () { + var isConfigValid = true; + if (!$o.contributionName.val().trim().length) { + isConfigValid = false; + } + + if (!isConfigValid) { + $o.contributionGenerateCode.attr('disabled', true); + } else { + $o.contributionGenerateCode.attr('disabled', false); + } + }, + + // Load preview for first page load. + loadPreview = function () { + $o.contributionAllowMultiple.trigger('change'); + $o.contributionCustom.trigger('change'); + $o.contributionGenerateCode.attr('disabled', true); + }, + + // To handle "form submission". + makeAjaxRequest = function (data, countOfAmounts, customAmount) { + $.ajax({ + url : lpVars.ajaxUrl, + method : 'POST', + data : data, + dataType: 'json', + }).done(function (r) { + $o.navigation.showMessage(r); + if (r.success) { + // Copy the shortcode. + copyToClipboard(r.code); + + // Let the user know. + $o.contributionGenerateCode.attr('data-icon', 'f'); + $o.contributionGenerateCode.css('opacity', '0.4'); + + var eventCategory = 'LP WP Contributions'; + var commonLabel = lpVars.gaData.sandbox_merchant_id; + lpGlobal.sendLPGAEvent('Contribution Options', eventCategory, + commonLabel, countOfAmounts); + lpGlobal.sendLPGAEvent('Custom contribution amount', eventCategory, + commonLabel, customAmount); + } + }); + }, + + // Reset the Generate and Copy Code button. + resetGenerateButton = function () { + $o.contributionGenerateCode.removeAttr('data-icon'); + $o.contributionGenerateCode.css('opacity', '1'); + }, + + // Check if provided URL is valid or not. + isValidURL = function (string) { + var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g); // jshint ignore:line + return (res !== null); + }, + + // Copy provided text to clipboard. + copyToClipboard = function (codeText) { + var $temp = $(''); + $('body').append($temp); + $temp.val(codeText).select(); + document.execCommand('copy'); + $temp.remove(); + }, + + // Throttle the execution of a function by a given delay. + debounce = function (fn, delay) { + var timer; + return function () { + var context = this, + args = arguments; + + clearTimeout(timer); + + timer = setTimeout(function () { + fn.apply(context, args); + }, delay); + }; + }, + + // Functions to be executed on page load. + initializePage = function () { + bindEvents(); + loadPreview(); + }; + + // Go.. Go.. Go.. + initializePage(); + } + + // initialize page + laterPayBackendContributions(); + + }); +})(jQuery); diff --git a/laterpay/asset_sources/js/laterpay-post-view.js b/laterpay/asset_sources/js/laterpay-post-view.js index cbd96e656..307bf2d79 100755 --- a/laterpay/asset_sources/js/laterpay-post-view.js +++ b/laterpay/asset_sources/js/laterpay-post-view.js @@ -61,7 +61,13 @@ overlayMessageContainer : '.lp_js_purchaseOverlayMessageContainer', overlayTimePassPrice : '.lp_js_timePassPrice', - lp_already_bought : '.lp_bought_notification' + lp_already_bought : '.lp_bought_notification', + + // Contribution elements. + lp_preset_buttons : '.lp-amount-preset-button', + lp_custom_amount : $('.lp-custom-amount-input'), + lp_custom_amount_wrapper : $('.lp-custom-input-wrapper'), + lp_singleContribution : $('.lp-link-single'), }, // Messages templates @@ -235,6 +241,7 @@ flipTimePass(this); }); }, + bindAlreadyPurchasedEvents = function() { // handle clicks on already bought link. $o.body @@ -249,6 +256,105 @@ window.location.href = $(this).attr( 'href' ); }); }, + + // Binding events for contribution dialog. + bindContributionEvents = function () { + + // Event handler for clicking on the amounts in contribution dialog. + $($o.lp_preset_buttons).click(function () { + $(this).parents('.lp-amount-presets').find('.lp-amount-preset-button') + .removeClass('lp-amount-preset-button-selected'); + $(this).addClass('lp-amount-preset-button-selected'); + changeButtonText(null, null, $(this).data('revenue')); + }); + + // Handle custom amount input. + $o.lp_custom_amount.keyup( + debounce(function () { + $(this).parents('.lp-body-wrapper').find('.lp-amount-preset-button') + .removeClass('lp-amount-preset-button-selected'); + var validatedPrice = validatePrice($(this).val()); + $(this).val(validatedPrice); + /* + * get selected amount. Value needs to be in cents, + * so multiply by 100 and round to avoid floating point errors + */ + var lp_amount = Math.round($(this).val() * 100); + changeButtonText('custom', lp_amount); + }, 800) + ); + + // Handle multiple contribution button click. + $('.lp-contribution-button').click(function () { + var currentAmount = $(this).parents('.lp-body-wrapper').find('.lp-amount-preset-button-selected'), + payurl; + if (currentAmount.length) { + payurl = currentAmount.data('url'); + } else { + var customAmount = $o.lp_custom_amount.val() * 100; + if (customAmount > 300) { + payurl = $o.lp_custom_amount_wrapper.data('sis-url') + '&custom_pricing=' + + lpVars.default_currency + customAmount; + } else { + payurl = $o.lp_custom_amount_wrapper.data('ppu-url') + '&custom_pricing=' + + lpVars.default_currency + customAmount; + } + } + // Open payment url in new tab. + window.open(payurl); + }); + + // Handle multiple contribution button click. + $o.lp_singleContribution.click(function () { + window.open($(this).data('url') + '&custom_pricing=' + + lpVars.default_currency + $(this).data('amount')); + }); + }, + + // Change the contribution button text based on selection. + changeButtonText = function (type, lp_amount, revenue) { + if ('custom' === type) { + if (lp_amount > 300) { + revenue = 'sis'; + } else { + revenue = 'ppu'; + } + } + }, + + // Validate custom input price. + validatePrice = function (price) { + // strip non-number characters + price = price.toString().replace(/[^0-9\,\.]/g, ''); + + // convert price to proper float value + if (typeof price === 'string' && price.indexOf(',') > -1) { + price = parseFloat(price.replace(',', '.')).toFixed(2); + } else { + price = parseFloat(price).toFixed(2); + } + + // prevent non-number prices + if (isNaN(price)) { + price = 0.05; + } + + // prevent negative prices + price = Math.abs(price); + + // correct prices outside the allowed range of 0.05 - 1000.00 + if (price > 1000.00) { + price = 1000.00; + } else if (price < 0.05) { + price = 0.05; + } + + // format price with two digits + price = price.toFixed(2); + + return price; + }, + purchaseOverlaySubmit = function (action) { if (action === 'buy') { // phpcs:ignore WordPressVIPMinimum.JS.Window.location -- Safe value is assigned here. @@ -561,6 +667,22 @@ new RegExp('(?:^|; )' + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + '=([^;]*)')); return matches ? decodeURIComponent(matches[1]) : undefined; }, + + // Throttle the execution of a function by a given delay. + debounce = function(fn, delay) { + var timer; + return function() { + var context = this, + args = arguments; + + clearTimeout(timer); + + timer = setTimeout(function() { + fn.apply(context, args); + }, delay); + }; + }, + initializePage = function() { if ($o.previewModePlaceholder.length === 1) { @@ -574,6 +696,7 @@ bindPurchaseEvents(); bindTimePassesEvents(); bindAlreadyPurchasedEvents(); + bindContributionEvents(); }; initializePage(); diff --git a/laterpay/asset_sources/scss/components/_contributions.scss b/laterpay/asset_sources/scss/components/_contributions.scss new file mode 100644 index 000000000..606f257c6 --- /dev/null +++ b/laterpay/asset_sources/scss/components/_contributions.scss @@ -0,0 +1,224 @@ +// LaterPay contribution elements + +.lp-button-wrapper { + display: flex; + flex-flow: row nowrap; + flex: 1 1 0; + align-items: center; + justify-content: center; + -webkit-box-align: center; + -webkit-box-pack: center; +} + +.lp-button { + margin-top: 0.5em; + cursor: pointer; + color: rgb(255, 255, 255); + background-color: #01a99d; + border-radius: 8px; + padding: 0 8px; +} + +.lp-link { + text-decoration: none; + padding: 13px 18px 13px 40px; + font-weight: 600; + font-size: 16px; +} + + +.lp-dialog-wrapper { + z-index: 2; + -webkit-font-smoothing: antialiased; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + font-size: 16px; + + .lp-dialog { + background: rgb(255, 255, 255); + border-radius: 8px; + box-shadow: rgba(0, 0, 0, 0.25) 0 0 10px -1px; + box-sizing: border-box; + color: rgb(34, 34, 34); + font-size: 14px; + font-style: normal; + font-weight: normal; + line-height: 1.2; + margin: 1em auto; + max-width: calc(448px); + padding: 0; + text-align: center; + text-decoration: none; + text-shadow: none; + text-transform: none; + } + + .lp-header-wrapper { + border-radius: 8px 15px 0px 0px; + padding-bottom: calc(10.5px); + box-sizing: inherit; + font-family: inherit; + color: rgb(34,34,34); + background-color: #fff; + + .lp-header-padding { + background-color: transparent; + max-width: 100%; + height: auto; + padding: calc(10.5px) calc(10.5px) 0; + font-weight: normal; + margin-left: auto; + margin-right: auto; + box-sizing: inherit; + font-family: inherit; + } + + .lp-header-text { + font-size: calc(26.25px); + font-weight: 600; + letter-spacing: -.015em; + line-height: 1.4; + padding: 32px 21px 0; + box-sizing: inherit; + font-family: inherit; + } + } + + .lp-body-wrapper { + .lp-amount-text { + display: block; + font-size: 17px; + color: #888; + font-weight: 600; + letter-spacing: 0.15px; + margin: 0 0 30px 0; + } + + .lp-amount-presets-wrapper { + position: relative; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + max-width: 320px; + margin: 0 auto; + + .lp-amount-presets { + border: thin solid rgb(238, 239, 238); + border-radius: 8px; + + .lp-amount-preset-wrapper { + cursor: pointer; + box-sizing: border-box; + display: block; + float: left; + padding: 0 5px; + + &:first-child, &:last-child { + padding: 0; + } + + .lp-amount-preset-button { + text-align: center; + line-height: 50px; + width: 55px; + font-size: 16px; + border-radius: 8px; + color: rgb(93, 93, 93); + } + + .lp-amount-preset-button-selected { + background-color: rgb(1, 169, 157); + font-weight: 600; + color: rgb(255, 255, 255); + } + } + } + } + + .lp-custom-amount-wrapper { + + .lp-custom-amount { + display: inline-block; + font-size: 16px; + margin: 0.3em auto; + float: none; + left: 0; + right: 0; + + .lp-custom-input-wrapper { + position: relative; + + i { + position: absolute; + display: block; + top: 11px; + pointer-events: none; + width: 30px; + text-align: center; + font-style: normal; + left: 5px; + } + } + + .lp-custom-amount-label { + width: 100%; + line-height: inherit; + margin: auto; + padding: 4px 6px; + box-sizing: border-box; + color: rgb(74, 74, 74); + vertical-align: middle; + font-weight: 700; + font-size: 0.95em; + display: block; + cursor: default; + + .lp-custom-amount-text { + font-size: 14px; + margin-top: 2px; + margin-bottom: 5px; + color: #888; + font-weight: 600; + letter-spacing: 0.15px; + } + } + + .lp-custom-amount-input { + font-family: inherit; + line-height: inherit; + font-size: 16px; + width: 120px; + text-align:left; + border: thin solid rgb(238, 239, 238); + border-radius: 8px; + padding-left: 30px; + height: 40px; + } + } + } + + .lp-dialog-button-wrapper { + display: inline-flex; + margin-top: 10px; + } + } + + .lp-powered-by { + padding-bottom: 18px; + color: rgb(65, 65, 65); + font-size: 14px; + text-align: center; + vertical-align: top; + + .lp-powered-by-link { + color: inherit; + font-family: inherit; + position: relative; + font-size: 85px; + top: 25px; + left: 5px; + box-shadow: none; + outline: 0 none; + } + } +} diff --git a/laterpay/asset_sources/scss/laterpay-backend.scss b/laterpay/asset_sources/scss/laterpay-backend.scss index 55c4facc0..538b0881c 100644 --- a/laterpay/asset_sources/scss/laterpay-backend.scss +++ b/laterpay/asset_sources/scss/laterpay-backend.scss @@ -18,6 +18,7 @@ @import 'objects/_dropdown'; @import 'objects/_backend_layout'; @import 'objects/_button_group'; +@import 'objects/_lp_heart'; @import 'components/_toggle'; @import 'components/_purchase_button'; @@ -30,3 +31,4 @@ @import 'pages/_appearance'; @import 'pages/_account'; @import 'pages/_advanced'; +@import 'pages/_contributions'; diff --git a/laterpay/asset_sources/scss/laterpay-post-view.scss b/laterpay/asset_sources/scss/laterpay-post-view.scss index c99baba2e..a1e905e76 100644 --- a/laterpay/asset_sources/scss/laterpay-post-view.scss +++ b/laterpay/asset_sources/scss/laterpay-post-view.scss @@ -9,12 +9,14 @@ @import 'objects/_utilities'; @import 'objects/_kpi'; @import 'objects/_vector_icons'; +@import 'objects/_lp_heart'; @import 'components/_toggle'; @import 'components/_post_preview_mode'; @import 'components/_purchase_button'; @import 'components/_purchase_overlay'; @import 'components/_time_pass'; +@import 'components/_contributions'; @import 'pages/_post_view'; diff --git a/laterpay/asset_sources/scss/objects/_lp_heart.scss b/laterpay/asset_sources/scss/objects/_lp_heart.scss new file mode 100644 index 000000000..f540e3f8c --- /dev/null +++ b/laterpay/asset_sources/scss/objects/_lp_heart.scss @@ -0,0 +1,14 @@ +/** + * Heart SVG for Contribution buttons. + */ + +.lp-cart { + height: 19px; + width: 19px; + z-index: 1; + transform: translate(16px, 19.5px); + float: left; + position: relative; + top: -6px; + background-image: url('../img/laterpay-icon-contribute.svg') !important; +} diff --git a/laterpay/asset_sources/scss/pages/_contributions.scss b/laterpay/asset_sources/scss/pages/_contributions.scss new file mode 100644 index 000000000..1dbff11cf --- /dev/null +++ b/laterpay/asset_sources/scss/pages/_contributions.scss @@ -0,0 +1,471 @@ +// 'Contributions' tab in plugin backend + +.lp_pagewrap { + overflow-x: unset; +} + +.lp_main_area { + + div.lp_contribution_form { + text-align: center; + height: 500px; + display: inline-block; + padding-top: 20px; + + label.lp_contribution_label { + font-weight: bold; + vertical-align: unset; + } + + .input-icon { + float: left; + margin-right: 5px; + margin-top: 5px; + position: relative; + + i { + position: absolute; + display: block; + top: 12px; + pointer-events: none; + width: 30px; + text-align: center; + font-style: normal; + } + + input { + padding-left: 25px; + height: 40px; + } + } + + p.lp_tooltip_contribution { + font-size: 20px; + margin: 0; + } + + .lp_tooltip { + span { + &:before { + top: 5px; + } + } + + &:hover { + &:before { + left: 10%; + } + + &:after { + width: 20em; + left: 10%; + } + } + } + + div.lp_contributions_options { + text-align: left; + + div.contributions_option_single { + margin-bottom: 15px; + + .lp_input { + width: 250px; + } + } + } + + div.lp_contributions_single_amount_options { + text-align: left; + margin-top: 25px; + + .lp_contributions_custom_amount_label { + font-size: 15px; + } + + input[type=checkbox] { + margin: 0; + + &:before { + color: #00AAA2; + } + } + + div.lp_single_contribution_dialog_options { + position: relative; + + .lp_post-price-input { + float: left; + width: 200px; + height: 40px; + } + + .post_price_revenue_model { + + .lp_badge--revenue-model { + width: 60px; + } + + .lp_badge { + font-size: 10px; + } + } + } + + } + + div.lp_multiple_contribution_dialog_options { + text-align: left; + + label { + vertical-align: unset; + } + + #lp_contribution_allow_multiple_amount { + margin: 10px 0; + } + + div.contributions_option_single { + label.dialog_input { + display: inline-block; + width: 130px; + } + + #lp_contribution_dialog_description { + text-overflow: ellipsis; + } + } + + div.purchase_options { + + .all_purchase_options { + .lp_input { + width: 100px; + height: 40px; + float: left; + } + + ul { + margin: 0; + list-style: none; + + li { + display: inline-block; + + .post_price_revenue_model { + position: relative; + left: 5px; + bottom: 3px; + float: left; + margin-right: 30px; + + .lp_badge--revenue-model { + width: 60px; + } + + .lp_badge { + font-size: 10px; + padding: 1px 0; + } + + .lp_mt- { + margin-top: 5px; + } + } + + span.lp_js_currency { + margin-left: 5px; + } + + .lp_js_optionPrice { + width: 60%; + float: left; + + label { + margin-right: 15px; + } + } + + input.lp_default_contribution_input { + margin-left: 5px; + + &:before { + color: #00AAA2; + } + } + } + } + + a.lp_js_addPurchaseOption { + float: right; + } + } + } + } + + .lp_contribution_preview { + .lp_contribution_live_preview { + border: 3px solid #eaeaea; + min-height: 200px; + text-align: center; + position: relative; + display: flex; + justify-content: center; + align-items: center; + } + + p.lp_contribution_preview_info { + padding: 0 10%; + color: #5f5f5f; + } + + .lp-dialog-single-button-wrapper { + display: none; + height: 150px; + -webkit-font-smoothing: antialiased; + } + + .lp-dialog-multiple-contribution-wrapper { + height: auto; + padding: 30px 0; + -webkit-font-smoothing: antialiased; + width: 90%; + + .lp-dialog-wrapper { + z-index: 2; + -webkit-font-smoothing: antialiased; + font-size: 16px; + + .lp-dialog { + background: #fff; + border-radius: 8px; + box-shadow: rgba(0, 0, 0, 0.25) 0 0 10px -1px; + box-sizing: border-box; + color: rgb(34, 34, 34); + font-size: 14px; font-style: normal; + font-weight: normal; + line-height: 1.2; + margin: 1em auto; + max-width: calc(448px); + padding: 0; + text-align: center; + text-decoration: none; + text-shadow: none; text-transform: none; + + .lp-header-wrapper { + border-radius: 8px 15px 0px 0px; + padding-bottom: calc(10.5px); + box-sizing: inherit; + color: rgb(34,34,34); + background-color: #fff; + + .lp-header-padding { + background-color: transparent; + max-width: 100%; + height: auto; + padding: calc(10.5px) calc(10.5px) 0px; + font-weight: normal; + margin-left: auto; + margin-right: auto; + box-sizing: inherit; + font-family: inherit; + } + + .lp-header-text { + font-size: calc(26.25px); + font-weight: 600; + letter-spacing: -.015em; + line-height: 1.4; + padding: 32px 21px 0px; + box-sizing: inherit; + font-family: inherit; + } + } + + .lp-amount-text { + display: block; + font-size: 17px; + color: #888; + font-weight: 600; + letter-spacing: 0.15px; + margin: 0 0 30px 0; + } + + .lp-amount-presets-wrapper { + position: relative; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + max-width: 300px; + margin: 0 auto; + + .lp-amount-presets { + border: thin solid rgb(238, 239, 238); + border-radius: 8px; + + .lp-amount-preset-wrapper { + cursor: pointer; + box-sizing: border-box; + display: block; + float: left; + padding: 0 5px; + + &:first-child, &:last-child { + padding: 0; + } + + .lp-amount-preset-button { + text-align: center; + line-height: 50px; + width: 50px; + font-size: 16px; + border-radius: 8px; + color: rgb(93, 93, 93); + } + + .lp-amount-preset-button-selected { + background-color: rgb(1, 169, 157); + font-weight: 600; + color: rgb(255, 255, 255); + } + } + } + } + + .lp-custom-amount-wrapper { + + .lp-custom-amount { + font-size: 16px; + margin: 0.3em auto; + float: none; + left: 0; + right: 0; + + .lp-custom-input-wrapper { + position: relative; + + i { + position: absolute; + display: block; + top: 12px; + pointer-events: none; + width: 30px; + text-align: center; + font-style: normal; + left: 40%; + } + } + + .lp-custom-amount-label { + width: 100%; + line-height: inherit; + margin: auto; + padding: 4px 6px; + box-sizing: border-box; + color: rgb(74, 74, 74); + vertical-align: middle; + font-weight: 700; + font-size: 0.95em; + display: block; + cursor: default; + + .lp-custom-amount-text { + font-size: 14px; + margin-top: 2px; + margin-bottom: 5px; + color: #888; + font-weight: 600; + letter-spacing: 0.15px; + } + } + + .lp-custom-amount-input { + font-family: inherit; + line-height: inherit; + font-size: 16px; + width: 100px; + text-align:left; + border: thin solid rgb(238, 239, 238); + border-radius: 8px; + padding-left: 30px; + height: 40px; + } + } + } + + .lp-dialog-button-wrapper { + display: inline-flex; + margin-top: 10px; + } + + .lp-powered-by { + padding-bottom: 18px; + color: rgb(65, 65, 65); + font-size: 14px; + text-align: center; + vertical-align: top; + + .lp-powered-by-link { + color: inherit; + font-family: inherit; + position: relative; + font-size: 85px; + top: 25px; + left: 5px; + } + } + } + } + } + + .lp-button-wrapper { + display: flex; + flex-flow: row nowrap; + flex: 1 1 0; + align-items: center; + justify-content: center; + + .lp-button { + margin-top: 50px; + cursor: pointer; + color: #fff; + background-color: #01a99d; + border-radius: 8px; + padding: 0 8px; + + .lp-link { + text-decoration: none; + padding: 13px 18px 13px 40px; + font-weight: 600; + font-size: 16px; + } + } + } + } + + .lp-contribution-generate-code { + a { + font-size: 20px; + height: 50px; + width: 300px; + padding: 10px; + border-radius: 5px; + } + } + + p.lp-contribution-error-message, p.lp-contribution-custom-error-message { + display: none; + color: #FF0000; + } + } + +} + +.lp_main_contribution { + margin: 0; + border-width: 0; + min-height: 600px; + width: 50% !important; + padding: 0 25%; +} diff --git a/laterpay/built_assets/fonts/laterpay-wordpress-icons_v099.svg b/laterpay/built_assets/fonts/laterpay-wordpress-icons_v099.svg index 344fe8246..fc7a91864 100644 --- a/laterpay/built_assets/fonts/laterpay-wordpress-icons_v099.svg +++ b/laterpay/built_assets/fonts/laterpay-wordpress-icons_v099.svg @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/laterpay/languages/laterpay-de_CH.mo b/laterpay/languages/laterpay-de_CH.mo index a7d4b6d14..01b206f8b 100644 Binary files a/laterpay/languages/laterpay-de_CH.mo and b/laterpay/languages/laterpay-de_CH.mo differ diff --git a/laterpay/languages/laterpay-de_CH_informal.mo b/laterpay/languages/laterpay-de_CH_informal.mo index a7d4b6d14..01b206f8b 100644 Binary files a/laterpay/languages/laterpay-de_CH_informal.mo and b/laterpay/languages/laterpay-de_CH_informal.mo differ diff --git a/laterpay/languages/laterpay-de_DE.mo b/laterpay/languages/laterpay-de_DE.mo index a7d4b6d14..6c0cc4904 100644 Binary files a/laterpay/languages/laterpay-de_DE.mo and b/laterpay/languages/laterpay-de_DE.mo differ diff --git a/laterpay/languages/laterpay-de_DE.po b/laterpay/languages/laterpay-de_DE.po index 8042c3c3c..c0b3d9d3d 100644 --- a/laterpay/languages/laterpay-de_DE.po +++ b/laterpay/languages/laterpay-de_DE.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: LaterPay 0.9.6\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/laterpay\n" -"POT-Creation-Date: 2019-09-30 13:47+0530\n" -"PO-Revision-Date: 2019-09-30 13:49+0530\n" +"POT-Creation-Date: 2019-10-23 19:23+0530\n" +"PO-Revision-Date: 2019-10-23 19:24+0530\n" "Last-Translator: Sample Blogger \n" "Language-Team: German\n" "Language: de_DE\n" @@ -12,7 +12,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-SourceCharset: UTF-8\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 2.2.4\n" "X-Poedit-Basepath: ..\n" "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;" "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;" @@ -95,11 +95,11 @@ msgstr "Migrationsbereinigung abgeschlossen" msgid "LaterPay Plugin Settings" msgstr "LaterPay-Plugin-Einstellungen" -#: application/Controller/Admin.php:270 +#: application/Controller/Admin.php:276 msgid "LaterPay" msgstr "LaterPay" -#: application/Controller/Admin.php:271 +#: application/Controller/Admin.php:277 msgid "" "\n" "

\n" @@ -216,11 +216,11 @@ msgstr "" "(einschließlich) 149,99.\n" "

" -#: application/Controller/Admin.php:321 views/backend/pricing.php:59 +#: application/Controller/Admin.php:327 views/backend/pricing.php:59 msgid "LaterPay Content" msgstr "LaterPay Inhalt" -#: application/Controller/Admin.php:323 +#: application/Controller/Admin.php:329 #, php-format msgid "" "%1$sUse the LaterPay Content section to select what types of WordPress " @@ -244,11 +244,11 @@ msgstr "" "Über uns Seite, etc.) frei verfügbar bleiben, während Sie den Großteil Ihrer " "anderen Inhalte (Beiträge usw.) monetarisieren können.%2$s" -#: application/Controller/Admin.php:338 views/backend/pricing.php:208 +#: application/Controller/Admin.php:344 views/backend/pricing.php:208 msgid "Global Default Price" msgstr "Globaler Standardpreis" -#: application/Controller/Admin.php:340 +#: application/Controller/Admin.php:346 #, php-format msgid "" "%1$sSetting the Global Default Price will determine the standard behavior of " @@ -292,11 +292,11 @@ msgstr "" "individuellen Artikelpreis auf der Beitragsseite überschrieben.%3$s%3$s\n" "%7$s" -#: application/Controller/Admin.php:367 views/backend/pricing.php:366 +#: application/Controller/Admin.php:373 views/backend/pricing.php:366 msgid "Category Default Prices" msgstr "Kategoriespezifische Standardpreise" -#: application/Controller/Admin.php:369 +#: application/Controller/Admin.php:375 #, php-format msgid "" "%1$sA category default price is applied to all posts in a given category " @@ -322,11 +322,11 @@ msgstr "" "Standardpreis von 0,30 Euro gehört, dann wird dieser Beitrag für 0,30 Euro " "verkauft.%2$s" -#: application/Controller/Admin.php:382 views/backend/pricing.php:609 +#: application/Controller/Admin.php:388 views/backend/pricing.php:609 msgid "Time Passes" msgstr "Zeitpässe" -#: application/Controller/Admin.php:384 +#: application/Controller/Admin.php:390 #, php-format msgid "" "%1$sWith time passes, you can offer your users time-limited access to your " @@ -370,12 +370,12 @@ msgstr "" "Bitte beachten Sie, gelöschte Zeitpässe können nicht wiederhergestellt " "werden.%2$s" -#: application/Controller/Admin.php:410 +#: application/Controller/Admin.php:416 #: application/Controller/Admin/Pricing.php:51 views/backend/pricing.php:812 msgid "Subscriptions" msgstr "Abos" -#: application/Controller/Admin.php:412 +#: application/Controller/Admin.php:418 #, php-format msgid "" "%1$sSubscriptions work exactly like time passes, with a simple difference: " @@ -402,11 +402,11 @@ msgstr "" "Zugriff auf die Inhalte innerhalb des Abonnements. Neu hinzugekommene Nutzer " "können das Abonnement jedoch nicht mehr kaufen.%2$s" -#: application/Controller/Admin.php:429 +#: application/Controller/Admin.php:435 msgid "Vouchers" msgstr "Gutscheine" -#: application/Controller/Admin.php:431 +#: application/Controller/Admin.php:437 #, php-format msgid "" "%1$sVoucher codes can be generated for time passes and subscriptions. To " @@ -463,11 +463,11 @@ msgstr "" "Gutscheincode für dieses Abonnement anmeldet, kontinuierlich 5 Euro " "monatlich bezahlen.%2$s" -#: application/Controller/Admin.php:456 +#: application/Controller/Admin.php:462 msgid "Additional Ways to Monetize Content" msgstr "Weitere Möglichkeiten zur Monetarisierung von Inhalten" -#: application/Controller/Admin.php:458 +#: application/Controller/Admin.php:464 #, php-format msgid "" "%4$sIndividual Article Price%5$s\n" @@ -507,20 +507,20 @@ msgstr "" " Weitere Preisoptionen finden Sie auf der " "%10$sRegisterkarte Erweitert.%11$s" -#: application/Controller/Admin.php:484 application/Controller/Admin.php:694 +#: application/Controller/Admin.php:490 application/Controller/Admin.php:700 msgid "Need additional help?" msgstr "Benötigen Sie zusätzliche Hilfe?" -#: application/Controller/Admin.php:485 +#: application/Controller/Admin.php:491 #, php-format msgid "For more instruction on setting up Pricing, %sclick here%s." msgstr "Für mehr Infos zum Einrichten von Preisen: %sBitte hier klicken%s." -#: application/Controller/Admin.php:500 +#: application/Controller/Admin.php:506 msgid "Configure Appearance" msgstr "Darstellung konfigurieren" -#: application/Controller/Admin.php:502 +#: application/Controller/Admin.php:508 #, php-format msgid "" "%1$sThe top portion of this page allows you to customize how your pricing " @@ -650,11 +650,11 @@ msgstr "" " %9$s\n" " %5$s " -#: application/Controller/Admin.php:561 +#: application/Controller/Admin.php:567 msgid "Customize Colors" msgstr "Farben anpassen" -#: application/Controller/Admin.php:563 +#: application/Controller/Admin.php:569 #, php-format msgid "" "%1$sUse the lower half of this page to customize the colors of the LaterPay " @@ -794,11 +794,11 @@ msgstr "" " %5$s\n" " " -#: application/Controller/Admin.php:636 +#: application/Controller/Admin.php:642 msgid "API Credentials" msgstr "API-Anmeldeinformationen" -#: application/Controller/Admin.php:638 +#: application/Controller/Admin.php:644 #, php-format msgid "" "%1$sIn order to receive payments, you first need a LaterPay account. " @@ -823,11 +823,11 @@ msgstr "" "%4$sBesuchen Sie unsere Website, um mehr darüber zu erfahren, wie Sie " "Anbieter von Inhalten werden oder sich bei LaterPay anmelden können.%5$s" -#: application/Controller/Admin.php:663 +#: application/Controller/Admin.php:669 msgid "Plugin Mode" msgstr "Plugin-Modus" -#: application/Controller/Admin.php:665 +#: application/Controller/Admin.php:671 #, php-format msgid "" "%1$sYou can run the LaterPay plugin in two modes:%2$s\n" @@ -874,46 +874,50 @@ msgstr "" "auf einem Testsystem zu installieren, zu konfigurieren und ausgiebig zu " "testen, bevor Sie es auf Ihrem Live-System aktivieren.%2$s" -#: application/Controller/Admin.php:695 +#: application/Controller/Admin.php:701 #, php-format msgid "Check out the %sLaterPay WordPress Plugin Knowledge Base here.%s" msgstr "%sHier geht es zur LaterPay WordPress Plugin Knowledge Base.%s" -#: application/Controller/Admin.php:817 -msgid "Pricing" -msgstr "Preise" +#: application/Controller/Admin.php:823 +msgid "Paywall" +msgstr "" + +#: application/Controller/Admin.php:829 +msgid "Contributions" +msgstr "Contributions" -#: application/Controller/Admin.php:823 views/backend/advanced.php:257 +#: application/Controller/Admin.php:835 views/backend/advanced.php:257 msgid "Appearance" msgstr "Darstellung" -#: application/Controller/Admin.php:829 +#: application/Controller/Admin.php:841 msgid "Account" msgstr "Konto" -#: application/Controller/Admin.php:840 +#: application/Controller/Admin.php:852 msgid "Advanced" msgstr "Erweitert" -#: application/Controller/Admin.php:893 +#: application/Controller/Admin.php:905 #, php-format msgid "Version %s Highlights:" msgstr "Highlights der Version %s:" -#: application/Controller/Admin.php:894 +#: application/Controller/Admin.php:906 msgid "" -"Have you seen our Contextual Help? Click the Help box in the upper right " -"corner of any page to get relevant information." +"At long last, one of our most highly requested features is here! Check out " +"the new Contributions tab to explore our newest feature." msgstr "" -"Haben Sie unsere kontextuelle Hilfe schon kennengelernt? Klicken Sie auf das " -"Feld Hilfe in der oberen rechten Ecke der jeweiligen Seite, um weitere " -"nützliche Informationen zu erhalten." +"Endlich ist eines unserer meist angefragten Features live! Schauen Sie sich " +"die neue Registerkarte Contributions an und entdecken Sie die " +"Funktionsmöglichkeiten der Freiwilligen Beitragszahlungen (Contributions)." -#: application/Controller/Admin.php:900 +#: application/Controller/Admin.php:912 msgid "Learn More" msgstr "Erfahren Sie mehr" -#: application/Controller/Admin.php:903 +#: application/Controller/Admin.php:915 #, php-format msgid "" "%sOptional%s Use the appearance tab to configure your payment button colors " @@ -922,7 +926,7 @@ msgstr "" "%sOptional%s Verwenden Sie die Registerkarte Aussehen, um die Farben Ihrer " "Zahlungstasten zu konfigurieren und wie Ihre Preisoptionen angezeigt werden." -#: application/Controller/Admin.php:904 +#: application/Controller/Admin.php:916 #, php-format msgid "" "%sREQUIRED%s Use this tab to configure your default prices. Prices can also " @@ -932,7 +936,7 @@ msgstr "" "konfigurieren. Die Preise können auch für einen einzelnen Beitrag auf der " "Seite Beitrag bearbeiten festgelegt werden." -#: application/Controller/Admin.php:905 +#: application/Controller/Admin.php:917 #, php-format msgid "" "%sOptional%s Here we highlight advanced features & settings like selling " @@ -943,6 +947,16 @@ msgstr "" "Verkauf von herunterladbaren Inhalten und die Werbung für Ihre Abonnements " "hervor!" +#: application/Controller/Admin.php:918 +#, php-format +msgid "" +"%sOptional%s To request contributions, use the editor below to configure " +"your contributions request then copy the shortcode anywhere on your site." +msgstr "" +"%sOptional.%s Um Contributions anzulegen, verwenden Sie den untenstehenden " +"Editor, um Ihre Contributions-Aufforderung zu konfigurieren und kopieren Sie " +"dann den Shortcode an eine beliebige Stelle auf Ihrer Website." + #: application/Controller/Admin/Account.php:67 msgid "The API key you entered is not a valid LaterPay API key!" msgstr "Der eingegebene API Key ist kein gültiger LaterPay API Key!" @@ -958,6 +972,7 @@ msgstr "LaterPay funktioniert nicht ohne gültige API Zugangsdaten." #: application/Controller/Admin/Account.php:121 #: application/Controller/Admin/Advanced.php:121 #: application/Controller/Admin/Appearance.php:116 +#: application/Controller/Admin/Contributions.php:106 #: application/Controller/Admin/Pricing.php:290 #: application/Controller/Admin/Pricing.php:568 #: application/Controller/Admin/Pricing.php:650 @@ -1096,6 +1111,66 @@ msgstr "Kauf-Overlay Einstellungen erfolgreich gespeichert." msgid "Color scheme saved successfully." msgstr "Kauf-Overlay Einstellungen erfolgreich gespeichert." +#: application/Controller/Admin/Contributions.php:60 +#: views/frontend/partials/widget/contribution-dialog.php:26 +#: views/frontend/partials/widget/contribution-dialog.php:28 +msgid "Contribute" +msgstr "Jetzt" + +#: application/Controller/Admin/Contributions.php:61 +#: views/frontend/partials/widget/contribution-dialog.php:28 +msgid "now" +msgstr "spenden" + +#: application/Controller/Admin/Contributions.php:62 +msgid "now, pay later" +msgstr "spenden, später zahlen" + +#: application/Controller/Admin/Contributions.php:63 +#: application/Controller/Frontend/Shortcode.php:746 +msgid "Please enter a Campaign Name above." +msgstr "Bitte geben Sie oben einen Kampagnennamen ein." + +#: application/Controller/Admin/Contributions.php:64 +msgid "Please enter a valid URL." +msgstr "Bitte geben Sie eine gültige URL ein." + +#: application/Controller/Admin/Contributions.php:65 +msgid "" +"Custom contribution amounts are only available when Show multiple " +"contribution amounts is enabled." +msgstr "" +"Benutzerdefinierte Contribution-Beträge sind nur verfügbar, wenn “Mehrere " +"Contribution-Beträge anzeigen” aktiviert ist." + +#: application/Controller/Admin/Contributions.php:66 +#: application/Controller/Frontend/Shortcode.php:755 +msgid "Please enter a valid contribution amount above." +msgstr "Bitte geben Sie oben einen gültigen Contribution-Betrag ein." + +#: application/Controller/Admin/Contributions.php:67 +msgid "" +"Please enter at least two valid contribution amounts above. If you would " +"like to only allow one amount, simply un-check Show multiple contribution " +"amounts." +msgstr "" +"Bitte geben Sie oben mindestens zwei gültige Contribution-Beträge ein. Wenn " +"Sie nur einen Betrag zulassen möchten, deaktivieren Sie einfach das " +"Kontrollkästchen Mehrere Contribution-Beträge anzeigen." + +#: application/Controller/Admin/Contributions.php:132 +#: application/Controller/Admin/Contributions.php:172 +msgid "" +"An error occurred when trying to generate the shortcode. Please try again." +msgstr "" +"Beim Versuch, den Shortcode zu generieren, ist ein Fehler aufgetreten. Bitte " +"versuche es erneut." + +#: application/Controller/Admin/Contributions.php:151 +#: application/Controller/Admin/Contributions.php:231 +msgid "Successfully generated code, please paste at desired location." +msgstr "" + #: application/Controller/Admin/Notice.php:58 msgid "Please contact WPEngine customer service to bypass the required cookies" msgstr "" @@ -1165,7 +1240,10 @@ msgstr "KOSTENLOS" #: application/Controller/Admin/Post/Column.php:125 #: application/Controller/Admin/Post/Metabox.php:155 -#: application/Helper/Pricing.php:950 +#: application/Helper/Pricing.php:949 views/backend/contributions.php:76 +#: views/backend/contributions.php:108 views/backend/contributions.php:125 +#: views/backend/contributions.php:142 views/backend/contributions.php:159 +#: views/backend/contributions.php:176 #: views/backend/partials/post-pricing-form.php:172 #: views/backend/partials/post-pricing-form.php:195 #: views/backend/partials/post-pricing-form.php:274 @@ -1177,7 +1255,10 @@ msgstr "Sofort zahlen" #: application/Controller/Admin/Post/Column.php:126 #: application/Controller/Admin/Post/Metabox.php:154 #: application/Controller/Admin/Post/Metabox.php:166 -#: application/Helper/Pricing.php:953 application/Module/Purchase.php:653 +#: application/Helper/Pricing.php:952 application/Module/Purchase.php:653 +#: views/backend/contributions.php:71 views/backend/contributions.php:103 +#: views/backend/contributions.php:120 views/backend/contributions.php:137 +#: views/backend/contributions.php:154 views/backend/contributions.php:171 #: views/backend/partials/post-pricing-form.php:168 #: views/backend/partials/post-pricing-form.php:191 #: views/backend/partials/post-pricing-form.php:250 @@ -1302,7 +1383,7 @@ msgstr "" #: application/Controller/Admin/Pricing.php:52 #: application/Controller/Admin/Pricing.php:135 -#: application/Controller/Frontend/Shortcode.php:565 +#: application/Controller/Frontend/Shortcode.php:569 #: views/backend/pricing.php:182 msgid "Subscription" msgstr "Abo" @@ -1442,7 +1523,7 @@ msgid "Single Purchase" msgstr "Einzelkauf" #: application/Controller/Admin/Pricing.php:134 -#: application/Controller/Frontend/Shortcode.php:565 +#: application/Controller/Frontend/Shortcode.php:569 #: views/backend/pricing.php:177 msgid "Time Pass" msgstr "Zeitpass" @@ -1951,13 +2032,13 @@ msgid "An error occurred. Please try again." msgstr "Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut." #: application/Controller/Frontend/Post.php:652 -#: application/Controller/Frontend/Shortcode.php:577 +#: application/Controller/Frontend/Shortcode.php:581 #: application/Module/Purchase.php:598 msgid "Buy Now, Pay Later" msgstr "Jetzt kaufen, später zahlen" #: application/Controller/Frontend/Post.php:653 -#: application/Controller/Frontend/Shortcode.php:579 +#: application/Controller/Frontend/Shortcode.php:583 #: application/Module/Purchase.php:591 application/Module/Purchase.php:630 #: application/Module/Purchase.php:643 #: views/backend/partials/purchase-overlay.php:32 @@ -1965,7 +2046,7 @@ msgid "Buy Now" msgstr "Jetzt kaufen" #: application/Controller/Frontend/Post.php:654 -#: application/Controller/Frontend/Shortcode.php:585 +#: application/Controller/Frontend/Shortcode.php:589 #: application/Module/Purchase.php:594 msgid "Subscribe Now" msgstr "Jetzt abonnieren" @@ -1988,34 +2069,34 @@ msgstr "Aktualisiert." msgid "You don't have sufficient user capabilities to do this." msgstr "Sie haben nicht die erforderlichen Berechtigungen für diese Aktion." -#: application/Controller/Frontend/Shortcode.php:98 +#: application/Controller/Frontend/Shortcode.php:102 msgid "Additional Premium Content" msgstr "Zusätzlicher Premium-Inhalt" -#: application/Controller/Frontend/Shortcode.php:119 +#: application/Controller/Frontend/Shortcode.php:123 #, php-format msgid "We couldn't find a page for target_post_id=\"%s\" on this site." msgstr "" "Wir konnten keine Seite für target_post_id=\"%s\" auf dieser Webseite finden." -#: application/Controller/Frontend/Shortcode.php:131 +#: application/Controller/Frontend/Shortcode.php:135 #, php-format msgid "We couldn't find a page for target_post_title=\"%s\" on this site." msgstr "" "Wir konnten keine Seite für target_post_title=\"%s\" auf dieser Webseite " "finden." -#: application/Controller/Frontend/Shortcode.php:138 -#: application/Controller/Frontend/Shortcode.php:152 +#: application/Controller/Frontend/Shortcode.php:142 +#: application/Controller/Frontend/Shortcode.php:156 #: application/Helper/View.php:249 msgid "Problem with inserted shortcode:" msgstr "Es gibt ein Problem mit dem eingefügten Shortcode:" -#: application/Controller/Frontend/Shortcode.php:150 +#: application/Controller/Frontend/Shortcode.php:154 msgid "LaterPay has been disabled for the post type of the target page." msgstr "LaterPay wurde für den Post-Type der Zielseite deaktiviert." -#: application/Controller/Frontend/Shortcode.php:220 +#: application/Controller/Frontend/Shortcode.php:224 #: views/backend/partials/subscription.php:32 #: views/backend/partials/time-pass.php:31 #: views/frontend/partials/widget/purchase-button.php:18 @@ -2023,42 +2104,51 @@ msgstr "LaterPay wurde für den Post-Type der Zielseite deaktiviert." msgid "Buy now with LaterPay" msgstr "Jetzt mit LaterPay kaufen" -#: application/Controller/Frontend/Shortcode.php:316 +#: application/Controller/Frontend/Shortcode.php:320 msgid "Download now" msgstr "Jetzt herunterladen" -#: application/Controller/Frontend/Shortcode.php:320 +#: application/Controller/Frontend/Shortcode.php:324 msgid "Watch now" msgstr "Jetzt ansehen" -#: application/Controller/Frontend/Shortcode.php:324 +#: application/Controller/Frontend/Shortcode.php:328 msgid "View now" msgstr "Jetzt ansehen" -#: application/Controller/Frontend/Shortcode.php:329 +#: application/Controller/Frontend/Shortcode.php:333 msgid "Listen now" msgstr "Jetzt anhören" -#: application/Controller/Frontend/Shortcode.php:333 +#: application/Controller/Frontend/Shortcode.php:337 msgid "Read now" msgstr "Jetzt lesen" -#: application/Controller/Frontend/Shortcode.php:424 +#: application/Controller/Frontend/Shortcode.php:428 msgid "Wrong time pass id." msgstr "Ungültige Zeitpass-ID." -#: application/Controller/Frontend/Shortcode.php:565 +#: application/Controller/Frontend/Shortcode.php:569 #, php-format msgid "We couldn't find a %s with id=\"%s\" on this site." msgstr "Wir konnten kein %s mit id=“%s” auf dieser Seite finden." -#: application/Controller/Frontend/Shortcode.php:655 +#: application/Controller/Frontend/Shortcode.php:659 #, php-format msgid "" "%1$s\"all\"%2$s cannot be used for both %1$s\"timepasses\"%2$s and %1$s" "\"subscriptions\"%2$s at the same time." msgstr "" +#: application/Controller/Frontend/Shortcode.php:729 +msgid "Something went wrong." +msgstr "" + +#: application/Controller/Frontend/Shortcode.php:815 +#, php-format +msgid "%1$s" +msgstr "" + #: application/Controller/Install.php:76 #, php-format msgid "" @@ -2226,7 +2316,7 @@ msgstr "Alle Inhalte in Kategorie" msgid "k" msgstr "t" -#: application/Module/Purchase.php:111 application/Module/Purchase.php:750 +#: application/Module/Purchase.php:111 application/Module/Purchase.php:757 #: views/backend/partials/purchase-overlay.php:56 #: views/backend/partials/purchase-overlay.php:121 #: views/frontend/partials/widget/purchase-identity-url.php:12 @@ -2471,21 +2561,21 @@ msgid "Just Deactivate" msgstr "" #: views/backend/account.php:24 views/backend/advanced.php:29 -#: views/backend/appearance.php:38 +#: views/backend/appearance.php:38 views/backend/contributions.php:24 #: views/backend/partials/post-pricing-form.php:67 views/backend/pricing.php:19 #: views/frontend/partials/post/select-preview-mode-tab.php:23 msgid "Test mode" msgstr "Test-Modus" #: views/backend/account.php:25 views/backend/advanced.php:30 -#: views/backend/appearance.php:39 +#: views/backend/appearance.php:39 views/backend/contributions.php:25 #: views/backend/partials/post-pricing-form.php:71 views/backend/pricing.php:23 #: views/frontend/partials/post/select-preview-mode-tab.php:27 msgid "Earn money in" msgstr "Geld verdienen im" #: views/backend/account.php:25 views/backend/advanced.php:30 -#: views/backend/appearance.php:39 +#: views/backend/appearance.php:39 views/backend/contributions.php:25 #: views/backend/partials/post-pricing-form.php:71 views/backend/pricing.php:23 #: views/frontend/partials/post/select-preview-mode-tab.php:27 msgid "live mode" @@ -2845,7 +2935,7 @@ msgstr "" "Preisgestaltung hinzufügen\". Nun können Sie die Punkte in der Grafik " "verschieben, um die Preise anzupassen." -#: views/backend/advanced.php:181 views/backend/appearance.php:294 +#: views/backend/advanced.php:181 msgid "Advanced Settings" msgstr "Erweiterte Funktionen (Advanced)" @@ -3005,7 +3095,7 @@ msgstr "" "Wählen Sie ein Fallback-Verhalten für den Fall, dass die LaterPay-API nicht " "antwortet" -#: views/backend/advanced.php:361 +#: views/backend/advanced.php:361 views/backend/appearance.php:294 msgid "TIPS & TRICKS" msgstr "TIPPS & TRICKS" @@ -3102,7 +3192,7 @@ msgstr "Gültige Zahlungsoptionen anzeigen" msgid "Save" msgstr "Speichern" -#: views/backend/appearance.php:156 +#: views/backend/appearance.php:156 views/backend/contributions.php:194 msgid "Preview" msgstr "Vorschau" @@ -3177,6 +3267,115 @@ msgstr "" "generiert werden, oder die Länge der Inhaltsvorschau, die hinter unserer " "Paywall verschwimmt." +#: views/backend/contributions.php:46 +msgid "Campaign name" +msgstr "Name des Rechnungspostens" + +#: views/backend/contributions.php:47 +msgid "" +"Enter the name you would like to appear on your customers' invoice. We " +"recommend including your organization's name as well as something to remind " +"them of this specific contribution." +msgstr "" +"Geben Sie die Beschreibung ein, die auf der Rechnung Ihrer Kunden erscheinen " +"soll. Wir empfehlen Ihnen, den Namen Ihrer Organisation anzugeben und etwas, " +"das sie an diese individuelle Spende erinnert." + +#: views/backend/contributions.php:50 +msgid "Contributions for..." +msgstr "Spenden für…" + +#: views/backend/contributions.php:53 +msgid "Thank you page (optional)" +msgstr "Dankeschön-Seite (optional)" + +#: views/backend/contributions.php:54 +msgid "" +"Optional. After the button is clicked, we can redirect the visitor to a page " +"of your choice (for example, a dedicated \"thank you\" page on your website)." +msgstr "" +"Optional. Nachdem der Button geklickt wurde, können wir den Besucher auf " +"eine Seite Ihrer Wahl (beispielsweise eine dedizierte “Dankeschön-Seite” auf " +"Ihrer Website) weiterleiten." + +#: views/backend/contributions.php:62 +msgid "Amount" +msgstr "Betrag" + +#: views/backend/contributions.php:88 +msgid "Show multiple contribution amounts" +msgstr "Mehrere Contribution-Beträge anzeigen" + +#: views/backend/contributions.php:89 +msgid "" +"Use this checkbox to toggle between a contributions button which allows one " +"static contribution amount or a dialog which allows users to choose between " +"several contribution amounts." +msgstr "" +"Verwenden Sie dieses Kontrollkästchen, um zwischen einem Contribution-" +"Button, der einen fixen Betrag erlaubt, und einem Dialog, der es dem " +"Benutzer ermöglicht, zwischen mehreren Contributions-Beträgen zu wählen, " +"umzuschalten." + +#: views/backend/contributions.php:185 +msgid "Allow custom contribution amount" +msgstr "Benutzerdefinierten Contribution-Betrag erlauben" + +#: views/backend/contributions.php:186 +msgid "" +"Only available if \"Show multiple contribution amounts\" is checked, this " +"feature will add an input box to your contribution dialog allowing users to " +"contribute custom amounts." +msgstr "" +"Nur verfügbar, wenn “Mehrere Contribution-Beträge anzeigen” aktiviert ist. " +"Ihrem Contribution-Dialog wird ein Eingabefeld hinzugefügt, in dem Nutzer " +"benutzerdefinierte Beträge eingeben können." + +#: views/backend/contributions.php:200 +msgid "Contribute Now, Pay Later" +msgstr "Jetzt spenden, später zahlen" + +#: views/backend/contributions.php:210 +#: views/frontend/partials/widget/contribution-dialog.php:41 +msgid "Support the author" +msgstr "Unterstützen Sie den Autor" + +#: views/backend/contributions.php:215 +#: views/frontend/partials/widget/contribution-dialog.php:46 +msgid "How much would you like to contribute?" +msgstr "" +"Wie viel möchten Sie als Contribution (freiwillige Beitragszahlung) " +"beitragen?" + +#: views/backend/contributions.php:239 +#: views/frontend/partials/widget/contribution-dialog.php:75 +msgid "Custom Amount" +msgstr "Ihr Beitrag" + +#: views/backend/contributions.php:251 +#: views/frontend/partials/widget/contribution-dialog.php:89 +msgid "Contribute now" +msgstr "Jetzt spenden" + +#: views/backend/contributions.php:257 +#: views/backend/partials/purchase-overlay.php:139 +#: views/frontend/partials/widget/contribution-dialog.php:96 +#: views/frontend/partials/widget/purchase-overlay.php:176 +msgid "Powered by" +msgstr "Powered by" + +#: views/backend/contributions.php:264 +msgid "" +"To include this on your site, click the button below and paste the code " +"where you would like it to appear." +msgstr "" +"Um dies auf Ihrer Website einzubinden, klicken Sie auf die Schaltfläche " +"unten und fügen Sie den Code an der Stelle ein, an der er erscheinen soll." + +#: views/backend/contributions.php:267 +msgid "Generate and Copy Code" +msgstr "Code generieren und kopieren" + #: views/backend/options.php:10 msgid "You don't have sufficient permissions to manage options for this site." msgstr "" @@ -3473,11 +3672,6 @@ msgstr "Jetzt kaufen, später zahlen" msgid "Redeem voucher" msgstr "Gutschein einlösen" -#: views/backend/partials/purchase-overlay.php:139 -#: views/frontend/partials/widget/purchase-overlay.php:176 -msgid "Powered by" -msgstr "Powered by" - #: views/backend/partials/subscription.php:18 #: views/backend/partials/time-pass.php:17 #: views/frontend/partials/post/gift/gift-pass.php:19 @@ -3893,6 +4087,10 @@ msgstr "Besucher" msgid "View" msgstr "Anzeigen" +#: views/frontend/partials/widget/contribution-dialog.php:26 +msgid "now, Pay Later" +msgstr "spenden, später zahlen" + #: views/frontend/partials/widget/purchase-link.php:33 #: views/frontend/partials/widget/purchase-link.php:36 msgid "Buy now for" @@ -3947,8 +4145,19 @@ msgstr "Sehen Sie sich die verfügbaren LaterPay Zeitpässe und Abos an" msgid "Get a Time Pass or Subscription" msgstr "Holen Sie sich einen Zeitpass oder ein Abo" -#~ msgid "%sAsk%s For Contributions" -#~ msgstr "%sSPENDEN%s UND BEITRÄGE FÖRDERN" +#~ msgid "Contribute now, pay later" +#~ msgstr "Jetzt $/€ spenden, später zahlen" + +#~ msgid "Pricing" +#~ msgstr "Preise" + +#~ msgid "" +#~ "Have you seen our Contextual Help? Click the Help box in the upper right " +#~ "corner of any page to get relevant information." +#~ msgstr "" +#~ "Haben Sie unsere kontextuelle Hilfe schon kennengelernt? Klicken Sie auf " +#~ "das Feld Hilfe in der oberen rechten Ecke der jeweiligen Seite, um " +#~ "weitere nützliche Informationen zu erhalten." #~ msgid "" #~ "Using the LaterPay Button Generator, in just a couple of minutes you can " diff --git a/laterpay/languages/laterpay-de_DE_formal.mo b/laterpay/languages/laterpay-de_DE_formal.mo index a7d4b6d14..01b206f8b 100644 Binary files a/laterpay/languages/laterpay-de_DE_formal.mo and b/laterpay/languages/laterpay-de_DE_formal.mo differ diff --git a/laterpay/languages/laterpay.po b/laterpay/languages/laterpay.po index 3985810f9..f6b7e761c 100644 --- a/laterpay/languages/laterpay.po +++ b/laterpay/languages/laterpay.po @@ -73,11 +73,11 @@ msgstr "" msgid "LaterPay Plugin Settings" msgstr "" -#: laterpay/application/Controller/Admin.php:270 +#: laterpay/application/Controller/Admin.php:276 msgid "LaterPay" msgstr "" -#: laterpay/application/Controller/Admin.php:271 +#: laterpay/application/Controller/Admin.php:277 msgid "" "\n" "

\n" @@ -116,21 +116,21 @@ msgid "" "

" msgstr "" -#: laterpay/application/Controller/Admin.php:321, laterpay/views/backend/pricing.php:59 +#: laterpay/application/Controller/Admin.php:327, laterpay/views/backend/pricing.php:59 msgid "LaterPay Content" msgstr "" -#: laterpay/application/Controller/Admin.php:322 +#: laterpay/application/Controller/Admin.php:328 msgid "" "%1$sUse the LaterPay Content section to select what types of WordPress content you would like to sell using LaterPay. %3$s The most common types are Pages, Posts, and Media but additional options may be available depending on the other plugins that you have installed.%2$s\n" " %1$s%4$sTIP:%5$s If you are not sure what kind of content you would like to sell, we recommend starting with Posts & Media. This should ensure that your Pages (typically your Home Page, About Us Page, etc) remain free while you can monetize the majority of your other content (typically Posts).%2$s" msgstr "" -#: laterpay/application/Controller/Admin.php:338, laterpay/views/backend/pricing.php:208 +#: laterpay/application/Controller/Admin.php:344, laterpay/views/backend/pricing.php:208 msgid "Global Default Price" msgstr "" -#: laterpay/application/Controller/Admin.php:339 +#: laterpay/application/Controller/Admin.php:345 msgid "" "%1$sSetting the Global Default Price will determine the standard behavior of your monetized content. There are three options to choose from and we will go through each one in detail and provide a few examples to help determine which is the best option based on your strategy:%2$s\n" " %6$s \n" @@ -143,22 +143,22 @@ msgid "" " %7$s" msgstr "" -#: laterpay/application/Controller/Admin.php:367, laterpay/views/backend/pricing.php:366 +#: laterpay/application/Controller/Admin.php:373, laterpay/views/backend/pricing.php:366 msgid "Category Default Prices" msgstr "" -#: laterpay/application/Controller/Admin.php:368 +#: laterpay/application/Controller/Admin.php:374 msgid "" "%1$sA category default price is applied to all posts in a given category that don't have an individual price assigned to them on the edit post page.%2$s\n" " %1$sA category default price overwrites the global default price. If a post belongs to multiple categories, you can choose on the add / edit post page, which category default price should be effective.%2$s\n" " %1$sFor example, if you have set a global default price of 0.15, but a post belongs to a category with a category default price of 0.30, that post will sell for 0.30.%2$s" msgstr "" -#: laterpay/application/Controller/Admin.php:382, laterpay/views/backend/pricing.php:609 +#: laterpay/application/Controller/Admin.php:388, laterpay/views/backend/pricing.php:609 msgid "Time Passes" msgstr "" -#: laterpay/application/Controller/Admin.php:383 +#: laterpay/application/Controller/Admin.php:389 msgid "" "%1$sWith time passes, you can offer your users time-limited access to your content. You can define which content a time pass should cover and for which period of time it should be valid. A time pass can be valid for all LaterPay content%2$s\n" " %6$s\n" @@ -171,11 +171,11 @@ msgid "" " %1$sIf you delete a time pass, users who have bought this time pass will still have access to the covered content. Deleted time passes can't be restored.%2$s" msgstr "" -#: laterpay/application/Controller/Admin.php:410, laterpay/views/backend/pricing.php:812, laterpay/application/Controller/Admin/Pricing.php:51 +#: laterpay/application/Controller/Admin.php:416, laterpay/views/backend/pricing.php:812, laterpay/application/Controller/Admin/Pricing.php:51 msgid "Subscriptions" msgstr "" -#: laterpay/application/Controller/Admin.php:411 +#: laterpay/application/Controller/Admin.php:417 msgid "" "%1$sSubscriptions work exactly like time passes, with a simple difference: They renew automatically.%2$s\n" " %1$sWhen a user purchases a subscription, they have access to all the content covered by this subscription during the validity period. Of course, you can still sell your content individually.%2$s\n" @@ -183,11 +183,11 @@ msgid "" " %1$sIf you delete a subscription it, it will continue to renew for users who have an active subscription until the user cancels it. Existing subscribers will still have access to the content in their subscription. New users won't be able to buy the subscription anymore.%2$s" msgstr "" -#: laterpay/application/Controller/Admin.php:429 +#: laterpay/application/Controller/Admin.php:435 msgid "Vouchers" msgstr "" -#: laterpay/application/Controller/Admin.php:430 +#: laterpay/application/Controller/Admin.php:436 msgid "" "%1$sVoucher codes can be generated for time passes and subscriptions. To create a voucher code, simply click “+ Generate Voucher Code” at the bottom of the time pass or subscription box. A random 6 character code will be generated but this can be overridden with a custom 6 characters if you choose.%2$s\n" " %1$sYou can create any number of voucher codes. A voucher code allows one (or multiple) user(s) to purchase a time pass or subscription for a reduced price. A user can enter a voucher code right below the time passes by clicking \"I have a voucher\". If the entered code is a valid voucher code, the price of the respective offer will be reduced.%2$s\n" @@ -199,11 +199,11 @@ msgid "" " %1$sFor example, if you have a monthly subscription regularly priced at 10 per month and generate a voucher code which makes that subscription available for 5 per month, anyone who signs up for that subscription using the voucher code will pay 5 every month.%2$s" msgstr "" -#: laterpay/application/Controller/Admin.php:456 +#: laterpay/application/Controller/Admin.php:462 msgid "Additional Ways to Monetize Content" msgstr "" -#: laterpay/application/Controller/Admin.php:457 +#: laterpay/application/Controller/Admin.php:463 msgid "" "%4$sIndividual Article Price%5$s\n" " %1$sIf you ever need to override a price for a specific article, you may do so on the WordPress Edit Post page. To do this simply:%2$s\n" @@ -215,19 +215,19 @@ msgid "" " Check out other advanced pricing options on the %10$sAdvanced Tab%11$s" msgstr "" -#: laterpay/application/Controller/Admin.php:484, laterpay/application/Controller/Admin.php:694 +#: laterpay/application/Controller/Admin.php:490, laterpay/application/Controller/Admin.php:700 msgid "Need additional help?" msgstr "" -#: laterpay/application/Controller/Admin.php:485 +#: laterpay/application/Controller/Admin.php:491 msgid "For more instruction on setting up Pricing, %sclick here%s." msgstr "" -#: laterpay/application/Controller/Admin.php:500 +#: laterpay/application/Controller/Admin.php:506 msgid "Configure Appearance" msgstr "" -#: laterpay/application/Controller/Admin.php:501 +#: laterpay/application/Controller/Admin.php:507 msgid "" "%1$sThe top portion of this page allows you to customize how your pricing options are displayed. Below are the different options available. By checking & un-checking the corresponding checkboxes, you can easily see how the overlay will be displayed using the preview section to the right.%2$s\n" " %1$sOnce you have your display options configured, %6$sbe sure to click save%7$s at the bottom of the Configure Appearance section to apply these changes to your site.%2$s\n" @@ -273,11 +273,11 @@ msgid "" " " msgstr "" -#: laterpay/application/Controller/Admin.php:561 +#: laterpay/application/Controller/Admin.php:567 msgid "Customize Colors" msgstr "" -#: laterpay/application/Controller/Admin.php:562 +#: laterpay/application/Controller/Admin.php:568 msgid "" "%1$sUse the lower half of this page to customize the colors of the LaterPay elements. This section can be used to ensure that the color scheme matches your %3$s theme and brand. The following customizations are available:%2$s\n" " %4$s\n" @@ -328,11 +328,11 @@ msgid "" " " msgstr "" -#: laterpay/application/Controller/Admin.php:636 +#: laterpay/application/Controller/Admin.php:642 msgid "API Credentials" msgstr "" -#: laterpay/application/Controller/Admin.php:637 +#: laterpay/application/Controller/Admin.php:643 msgid "" "%1$sIn order to receive payments, you first need a LaterPay account. %3$sOnce this is set up, you need LaterPay API credentials, consisting of the following to link your WordPress plugin to your LaterPay account.%2$s\n" " %10$s\n" @@ -342,11 +342,11 @@ msgid "" " %4$sVisit our website to read more about how to become a content provider or to sign up with LaterPay.%5$s" msgstr "" -#: laterpay/application/Controller/Admin.php:663 +#: laterpay/application/Controller/Admin.php:669 msgid "Plugin Mode" msgstr "" -#: laterpay/application/Controller/Admin.php:664 +#: laterpay/application/Controller/Admin.php:670 msgid "" "%1$sYou can run the LaterPay plugin in two modes:%2$s\n" " %4$s\n" @@ -363,50 +363,58 @@ msgid "" " %1$s Using the LaterPay plugin usually requires some adjustments of your theme. Therefore, we recommend installing, configuring, and testing the LaterPay plugin on a test system before activating it on your production system.%2$s" msgstr "" -#: laterpay/application/Controller/Admin.php:695 +#: laterpay/application/Controller/Admin.php:701 msgid "Check out the %sLaterPay WordPress Plugin Knowledge Base here.%s" msgstr "" -#: laterpay/application/Controller/Admin.php:817 -msgid "Pricing" +#: laterpay/application/Controller/Admin.php:823 +msgid "Paywall" msgstr "" -#: laterpay/application/Controller/Admin.php:823, laterpay/views/backend/advanced.php:257 +#: laterpay/application/Controller/Admin.php:829 +msgid "Contributions" +msgstr "" + +#: laterpay/application/Controller/Admin.php:835, laterpay/views/backend/advanced.php:257 msgid "Appearance" msgstr "" -#: laterpay/application/Controller/Admin.php:829 +#: laterpay/application/Controller/Admin.php:841 msgid "Account" msgstr "" -#: laterpay/application/Controller/Admin.php:840 +#: laterpay/application/Controller/Admin.php:852 msgid "Advanced" msgstr "" -#: laterpay/application/Controller/Admin.php:893 +#: laterpay/application/Controller/Admin.php:905 msgid "Version %s Highlights:" msgstr "" -#: laterpay/application/Controller/Admin.php:894 -msgid "Have you seen our Contextual Help? Click the Help box in the upper right corner of any page to get relevant information." +#: laterpay/application/Controller/Admin.php:906 +msgid "At long last, one of our most highly requested features is here! Check out the new Contributions tab to explore our newest feature." msgstr "" -#: laterpay/application/Controller/Admin.php:900 +#: laterpay/application/Controller/Admin.php:912 msgid "Learn More" msgstr "" -#: laterpay/application/Controller/Admin.php:903 +#: laterpay/application/Controller/Admin.php:915 msgid "%sOptional%s Use the appearance tab to configure your payment button colors and how your pricing options are displayed." msgstr "" -#: laterpay/application/Controller/Admin.php:904 +#: laterpay/application/Controller/Admin.php:916 msgid "%sREQUIRED%s Use this tab to configure your default prices. Prices can also be set for an individual post on the edit post page." msgstr "" -#: laterpay/application/Controller/Admin.php:905 +#: laterpay/application/Controller/Admin.php:917 msgid "%sOptional%s Here we highlight advanced features & settings like selling downloadable content and promoting your subscriptions. Scroll through to learn more!" msgstr "" +#: laterpay/application/Controller/Admin.php:918 +msgid "%sOptional%s To request contributions, use the editor below to configure your contributions request then copy the shortcode anywhere on your site." +msgstr "" + #: laterpay/application/Controller/Install.php:76 msgid "

LaterPay: Your server does not meet the minimum requirement of %s version %s or higher. You are running %s version %s.

" msgstr "" @@ -443,11 +451,11 @@ msgstr "" msgid "Read now, pay later" msgstr "" -#: laterpay/application/Helper/Pricing.php:950, laterpay/views/backend/pricing.php:316, laterpay/views/backend/pricing.php:465, laterpay/views/backend/pricing.php:585, laterpay/views/backend/pricing.php:744, laterpay/views/backend/partials/post-pricing-form.php:172, laterpay/views/backend/partials/post-pricing-form.php:195, laterpay/views/backend/partials/post-pricing-form.php:274, laterpay/application/Controller/Admin/Post/Column.php:125, laterpay/application/Controller/Admin/Post/Metabox.php:155 +#: laterpay/application/Helper/Pricing.php:949, laterpay/views/backend/contributions.php:76, laterpay/views/backend/contributions.php:108, laterpay/views/backend/contributions.php:125, laterpay/views/backend/contributions.php:142, laterpay/views/backend/contributions.php:159, laterpay/views/backend/contributions.php:176, laterpay/views/backend/pricing.php:316, laterpay/views/backend/pricing.php:465, laterpay/views/backend/pricing.php:585, laterpay/views/backend/pricing.php:744, laterpay/views/backend/partials/post-pricing-form.php:172, laterpay/views/backend/partials/post-pricing-form.php:195, laterpay/views/backend/partials/post-pricing-form.php:274, laterpay/application/Controller/Admin/Post/Column.php:125, laterpay/application/Controller/Admin/Post/Metabox.php:155 msgid "Pay Now" msgstr "" -#: laterpay/application/Helper/Pricing.php:953, laterpay/application/Module/Purchase.php:653, laterpay/views/backend/pricing.php:311, laterpay/views/backend/pricing.php:460, laterpay/views/backend/pricing.php:580, laterpay/views/backend/pricing.php:739, laterpay/views/backend/partials/post-pricing-form.php:168, laterpay/views/backend/partials/post-pricing-form.php:191, laterpay/views/backend/partials/post-pricing-form.php:250, laterpay/views/backend/partials/purchase-overlay.php:44, laterpay/application/Controller/Admin/Post/Column.php:126, laterpay/application/Controller/Admin/Post/Metabox.php:154, laterpay/application/Controller/Admin/Post/Metabox.php:166 +#: laterpay/application/Helper/Pricing.php:952, laterpay/application/Module/Purchase.php:653, laterpay/views/backend/contributions.php:71, laterpay/views/backend/contributions.php:103, laterpay/views/backend/contributions.php:120, laterpay/views/backend/contributions.php:137, laterpay/views/backend/contributions.php:154, laterpay/views/backend/contributions.php:171, laterpay/views/backend/pricing.php:311, laterpay/views/backend/pricing.php:460, laterpay/views/backend/pricing.php:580, laterpay/views/backend/pricing.php:739, laterpay/views/backend/partials/post-pricing-form.php:168, laterpay/views/backend/partials/post-pricing-form.php:191, laterpay/views/backend/partials/post-pricing-form.php:250, laterpay/views/backend/partials/purchase-overlay.php:44, laterpay/application/Controller/Admin/Post/Column.php:126, laterpay/application/Controller/Admin/Post/Metabox.php:154, laterpay/application/Controller/Admin/Post/Metabox.php:166 msgid "Pay Later" msgstr "" @@ -539,7 +547,7 @@ msgstr "" msgid "k" msgstr "" -#: laterpay/application/Helper/View.php:249, laterpay/application/Controller/Frontend/Shortcode.php:138, laterpay/application/Controller/Frontend/Shortcode.php:152 +#: laterpay/application/Helper/View.php:249, laterpay/application/Controller/Frontend/Shortcode.php:142, laterpay/application/Controller/Frontend/Shortcode.php:156 msgid "Problem with inserted shortcode:" msgstr "" @@ -547,19 +555,19 @@ msgstr "" msgid "You don't have sufficient user capabilities to do this." msgstr "" -#: laterpay/application/Module/Purchase.php:111, laterpay/application/Module/Purchase.php:750, laterpay/views/backend/partials/purchase-overlay.php:56, laterpay/views/backend/partials/purchase-overlay.php:121, laterpay/views/frontend/partials/widget/purchase-identity-url.php:12 +#: laterpay/application/Module/Purchase.php:111, laterpay/application/Module/Purchase.php:757, laterpay/views/backend/partials/purchase-overlay.php:56, laterpay/views/backend/partials/purchase-overlay.php:121, laterpay/views/frontend/partials/widget/purchase-identity-url.php:12 msgid "I already bought this" msgstr "" -#: laterpay/application/Module/Purchase.php:591, laterpay/application/Module/Purchase.php:630, laterpay/application/Module/Purchase.php:643, laterpay/application/Controller/Frontend/Post.php:653, laterpay/application/Controller/Frontend/Shortcode.php:579, laterpay/views/backend/partials/purchase-overlay.php:32 +#: laterpay/application/Module/Purchase.php:591, laterpay/application/Module/Purchase.php:630, laterpay/application/Module/Purchase.php:643, laterpay/application/Controller/Frontend/Post.php:653, laterpay/application/Controller/Frontend/Shortcode.php:583, laterpay/views/backend/partials/purchase-overlay.php:32 msgid "Buy Now" msgstr "" -#: laterpay/application/Module/Purchase.php:594, laterpay/application/Controller/Frontend/Post.php:654, laterpay/application/Controller/Frontend/Shortcode.php:585 +#: laterpay/application/Module/Purchase.php:594, laterpay/application/Controller/Frontend/Post.php:654, laterpay/application/Controller/Frontend/Shortcode.php:589 msgid "Subscribe Now" msgstr "" -#: laterpay/application/Module/Purchase.php:598, laterpay/application/Controller/Frontend/Post.php:652, laterpay/application/Controller/Frontend/Shortcode.php:577 +#: laterpay/application/Module/Purchase.php:598, laterpay/application/Controller/Frontend/Post.php:652, laterpay/application/Controller/Frontend/Shortcode.php:581 msgid "Buy Now, Pay Later" msgstr "" @@ -627,18 +635,18 @@ msgstr "" msgid "Buy a timepass or subscription and pay with a payment method you trust." msgstr "" -#: laterpay/views/backend/account.php:24, laterpay/views/backend/advanced.php:29, laterpay/views/backend/appearance.php:38, laterpay/views/backend/pricing.php:19, laterpay/views/backend/partials/post-pricing-form.php:67, laterpay/views/frontend/partials/post/select-preview-mode-tab.php:23 +#: laterpay/views/backend/account.php:24, laterpay/views/backend/advanced.php:29, laterpay/views/backend/appearance.php:38, laterpay/views/backend/contributions.php:24, laterpay/views/backend/pricing.php:19, laterpay/views/backend/partials/post-pricing-form.php:67, laterpay/views/frontend/partials/post/select-preview-mode-tab.php:23 msgid "Test mode" msgstr "" #. translators: %1$s info text1, %2$s info text2 #. translators: %1$s info text1, %2$s info text2 #. translators: %1$s info text1, %2$s info text2 -#: laterpay/views/backend/account.php:25, laterpay/views/backend/advanced.php:30, laterpay/views/backend/appearance.php:39, laterpay/views/backend/pricing.php:23, laterpay/views/backend/partials/post-pricing-form.php:71, laterpay/views/frontend/partials/post/select-preview-mode-tab.php:27 +#: laterpay/views/backend/account.php:25, laterpay/views/backend/advanced.php:30, laterpay/views/backend/appearance.php:39, laterpay/views/backend/contributions.php:25, laterpay/views/backend/pricing.php:23, laterpay/views/backend/partials/post-pricing-form.php:71, laterpay/views/frontend/partials/post/select-preview-mode-tab.php:27 msgid "Earn money in" msgstr "" -#: laterpay/views/backend/account.php:25, laterpay/views/backend/advanced.php:30, laterpay/views/backend/appearance.php:39, laterpay/views/backend/pricing.php:23, laterpay/views/backend/partials/post-pricing-form.php:71, laterpay/views/frontend/partials/post/select-preview-mode-tab.php:27 +#: laterpay/views/backend/account.php:25, laterpay/views/backend/advanced.php:30, laterpay/views/backend/appearance.php:39, laterpay/views/backend/contributions.php:25, laterpay/views/backend/pricing.php:23, laterpay/views/backend/partials/post-pricing-form.php:71, laterpay/views/frontend/partials/post/select-preview-mode-tab.php:27 msgid "live mode" msgstr "" @@ -865,7 +873,7 @@ msgstr "" msgid "Dynamic pricing is a feature available on the Edit Post page. Once there, simply choose “Individual Price” in the Pricing for this Post section then click “+ Add dynamic pricing” at the bottom. Once you’ve completed this, you can drag and drop the points on the graph to adjust pricing based on the days since the article was originally published." msgstr "" -#: laterpay/views/backend/advanced.php:181, laterpay/views/backend/appearance.php:294 +#: laterpay/views/backend/advanced.php:181 msgid "Advanced Settings" msgstr "" @@ -997,7 +1005,7 @@ msgstr "" msgid "Define fallback behavior in case LaterPay API is not responding" msgstr "" -#: laterpay/views/backend/advanced.php:361 +#: laterpay/views/backend/advanced.php:361, laterpay/views/backend/appearance.php:294 msgid "TIPS & TRICKS" msgstr "" @@ -1133,6 +1141,82 @@ msgstr "" msgid "to adjust the number of characters automatically generated as your teaser content or the length of the content preview blurred behind our paywall." msgstr "" +#: laterpay/views/backend/contributions.php:46 +msgid "Campaign name" +msgstr "" + +#: laterpay/views/backend/contributions.php:47 +msgid "Enter the name you would like to appear on your customers' invoice. We recommend including your organization's name as well as something to remind them of this specific contribution." +msgstr "" + +#: laterpay/views/backend/contributions.php:50 +msgid "Contributions for..." +msgstr "" + +#: laterpay/views/backend/contributions.php:53 +msgid "Thank you page (optional)" +msgstr "" + +#: laterpay/views/backend/contributions.php:54 +msgid "Optional. After the button is clicked, we can redirect the visitor to a page of your choice (for example, a dedicated \"thank you\" page on your website)." +msgstr "" + +#: laterpay/views/backend/contributions.php:62 +msgid "Amount" +msgstr "" + +#: laterpay/views/backend/contributions.php:88 +msgid "Show multiple contribution amounts" +msgstr "" + +#: laterpay/views/backend/contributions.php:89 +msgid "Use this checkbox to toggle between a contributions button which allows one static contribution amount or a dialog which allows users to choose between several contribution amounts." +msgstr "" + +#: laterpay/views/backend/contributions.php:185 +msgid "Allow custom contribution amount" +msgstr "" + +#: laterpay/views/backend/contributions.php:186 +msgid "Only available if \"Show multiple contribution amounts\" is checked, this feature will add an input box to your contribution dialog allowing users to contribute custom amounts." +msgstr "" + +#: laterpay/views/backend/contributions.php:194 +msgid "Preview" +msgstr "" + +#: laterpay/views/backend/contributions.php:200 +msgid "Contribute Now, Pay Later" +msgstr "" + +#: laterpay/views/backend/contributions.php:210, laterpay/views/frontend/partials/widget/contribution-dialog.php:41 +msgid "Support the author" +msgstr "" + +#: laterpay/views/backend/contributions.php:215, laterpay/views/frontend/partials/widget/contribution-dialog.php:46 +msgid "How much would you like to contribute?" +msgstr "" + +#: laterpay/views/backend/contributions.php:239, laterpay/views/frontend/partials/widget/contribution-dialog.php:75 +msgid "Custom Amount" +msgstr "" + +#: laterpay/views/backend/contributions.php:251, laterpay/views/frontend/partials/widget/contribution-dialog.php:89 +msgid "Contribute now" +msgstr "" + +#: laterpay/views/backend/contributions.php:257, laterpay/views/backend/partials/purchase-overlay.php:139, laterpay/views/frontend/partials/widget/contribution-dialog.php:96, laterpay/views/frontend/partials/widget/purchase-overlay.php:176 +msgid "Powered by" +msgstr "" + +#: laterpay/views/backend/contributions.php:264 +msgid "To include this on your site, click the button below and paste the code where you would like it to appear." +msgstr "" + +#: laterpay/views/backend/contributions.php:267 +msgid "Generate and Copy Code" +msgstr "" + #: laterpay/views/backend/options.php:10 msgid "You don't have sufficient permissions to manage options for this site." msgstr "" @@ -1205,11 +1289,11 @@ msgstr "" msgid "Single Purchase" msgstr "" -#: laterpay/views/backend/pricing.php:177, laterpay/application/Controller/Admin/Pricing.php:134, laterpay/application/Controller/Frontend/Shortcode.php:565 +#: laterpay/views/backend/pricing.php:177, laterpay/application/Controller/Admin/Pricing.php:134, laterpay/application/Controller/Frontend/Shortcode.php:569 msgid "Time Pass" msgstr "" -#: laterpay/views/backend/pricing.php:182, laterpay/application/Controller/Admin/Pricing.php:52, laterpay/application/Controller/Admin/Pricing.php:135, laterpay/application/Controller/Frontend/Shortcode.php:565 +#: laterpay/views/backend/pricing.php:182, laterpay/application/Controller/Admin/Pricing.php:52, laterpay/application/Controller/Admin/Pricing.php:135, laterpay/application/Controller/Frontend/Shortcode.php:569 msgid "Subscription" msgstr "" @@ -1443,7 +1527,7 @@ msgstr "" msgid "LaterPay does not work properly with invalid API credentials." msgstr "" -#: laterpay/application/Controller/Admin/Account.php:121, laterpay/application/Controller/Admin/Advanced.php:121, laterpay/application/Controller/Admin/Appearance.php:116, laterpay/application/Controller/Admin/Pricing.php:290, laterpay/application/Controller/Admin/Pricing.php:568, laterpay/application/Controller/Admin/Pricing.php:650, laterpay/application/Controller/Admin/Pricing.php:1074, laterpay/application/Controller/Admin/Pricing.php:1187, laterpay/application/Controller/Frontend/PreviewMode.php:76 +#: laterpay/application/Controller/Admin/Account.php:121, laterpay/application/Controller/Admin/Advanced.php:121, laterpay/application/Controller/Admin/Appearance.php:116, laterpay/application/Controller/Admin/Contributions.php:106, laterpay/application/Controller/Admin/Pricing.php:290, laterpay/application/Controller/Admin/Pricing.php:568, laterpay/application/Controller/Admin/Pricing.php:650, laterpay/application/Controller/Admin/Pricing.php:1074, laterpay/application/Controller/Admin/Pricing.php:1187, laterpay/application/Controller/Frontend/PreviewMode.php:76 msgid "An error occurred when trying to save your settings. Please try again." msgstr "" @@ -1519,6 +1603,46 @@ msgstr "" msgid "Color scheme saved successfully." msgstr "" +#: laterpay/application/Controller/Admin/Contributions.php:60, laterpay/views/frontend/partials/widget/contribution-dialog.php:26, laterpay/views/frontend/partials/widget/contribution-dialog.php:28 +msgid "Contribute" +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:61, laterpay/views/frontend/partials/widget/contribution-dialog.php:28 +msgid "now" +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:62 +msgid "now, pay later" +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:63, laterpay/application/Controller/Frontend/Shortcode.php:746 +msgid "Please enter a Campaign Name above." +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:64 +msgid "Please enter a valid URL." +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:65 +msgid "Custom contribution amounts are only available when Show multiple contribution amounts is enabled." +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:66, laterpay/application/Controller/Frontend/Shortcode.php:755 +msgid "Please enter a valid contribution amount above." +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:67 +msgid "Please enter at least two valid contribution amounts above. If you would like to only allow one amount, simply un-check Show multiple contribution amounts." +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:132, laterpay/application/Controller/Admin/Contributions.php:172 +msgid "An error occurred when trying to generate the shortcode. Please try again." +msgstr "" + +#: laterpay/application/Controller/Admin/Contributions.php:151, laterpay/application/Controller/Admin/Contributions.php:231 +msgid "Successfully generated code, please paste at desired location." +msgstr "" + #: laterpay/application/Controller/Admin/Notice.php:58 msgid "Please contact WPEngine customer service to bypass the required cookies" msgstr "" @@ -1965,58 +2089,66 @@ msgstr "" msgid "Updated." msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:98 +#: laterpay/application/Controller/Frontend/Shortcode.php:102 msgid "Additional Premium Content" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:119 +#: laterpay/application/Controller/Frontend/Shortcode.php:123 msgid "We couldn't find a page for target_post_id=\"%s\" on this site." msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:131 +#: laterpay/application/Controller/Frontend/Shortcode.php:135 msgid "We couldn't find a page for target_post_title=\"%s\" on this site." msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:150 +#: laterpay/application/Controller/Frontend/Shortcode.php:154 msgid "LaterPay has been disabled for the post type of the target page." msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:220, laterpay/views/backend/partials/subscription.php:32, laterpay/views/backend/partials/time-pass.php:31, laterpay/views/frontend/partials/widget/purchase-button.php:18, laterpay/views/frontend/partials/widget/purchase-link.php:14 +#: laterpay/application/Controller/Frontend/Shortcode.php:224, laterpay/views/backend/partials/subscription.php:32, laterpay/views/backend/partials/time-pass.php:31, laterpay/views/frontend/partials/widget/purchase-button.php:18, laterpay/views/frontend/partials/widget/purchase-link.php:14 msgid "Buy now with LaterPay" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:316 +#: laterpay/application/Controller/Frontend/Shortcode.php:320 msgid "Download now" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:320 +#: laterpay/application/Controller/Frontend/Shortcode.php:324 msgid "Watch now" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:324 +#: laterpay/application/Controller/Frontend/Shortcode.php:328 msgid "View now" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:329 +#: laterpay/application/Controller/Frontend/Shortcode.php:333 msgid "Listen now" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:333 +#: laterpay/application/Controller/Frontend/Shortcode.php:337 msgid "Read now" msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:424 +#: laterpay/application/Controller/Frontend/Shortcode.php:428 msgid "Wrong time pass id." msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:565 +#: laterpay/application/Controller/Frontend/Shortcode.php:569 msgid "We couldn't find a %s with id=\"%s\" on this site." msgstr "" -#: laterpay/application/Controller/Frontend/Shortcode.php:655 +#: laterpay/application/Controller/Frontend/Shortcode.php:659 msgid "%1$s\"all\"%2$s cannot be used for both %1$s\"timepasses\"%2$s and %1$s\"subscriptions\"%2$s at the same time." msgstr "" +#: laterpay/application/Controller/Frontend/Shortcode.php:729 +msgid "Something went wrong." +msgstr "" + +#: laterpay/application/Controller/Frontend/Shortcode.php:815 +msgid "%1$s" +msgstr "" + #: laterpay/application/Core/Exception/FormValidation.php:18 msgid "Form \"%s\" validation failed." msgstr "" @@ -2257,10 +2389,6 @@ msgstr "" msgid "Redeem voucher" msgstr "" -#: laterpay/views/backend/partials/purchase-overlay.php:139, laterpay/views/frontend/partials/widget/purchase-overlay.php:176 -msgid "Powered by" -msgstr "" - #: laterpay/views/backend/partials/subscription.php:18, laterpay/views/backend/partials/time-pass.php:17, laterpay/views/frontend/partials/post/gift/gift-pass.php:19 msgid "on this website" msgstr "" @@ -2393,6 +2521,10 @@ msgstr "" msgid "View" msgstr "" +#: laterpay/views/frontend/partials/widget/contribution-dialog.php:26 +msgid "now, Pay Later" +msgstr "" + #. translators: %1$s purchase text, %2$s formatted price, %3$s currency tpye #. translators: %1$s purchase text, %2$s formatted price, %3$s currency tpye, %4$s purchase text #: laterpay/views/frontend/partials/widget/purchase-link.php:33, laterpay/views/frontend/partials/widget/purchase-link.php:36 diff --git a/laterpay/laterpay.php b/laterpay/laterpay.php index fd3431c5d..39be81ed6 100644 --- a/laterpay/laterpay.php +++ b/laterpay/laterpay.php @@ -4,7 +4,7 @@ * Plugin URI: https://github.com/laterpay/laterpay-wordpress-plugin * Description: Sell digital content with LaterPay. It allows super easy and fast payments from as little as 5 cent up to 149.99 Euro at a 15% fee and no fixed costs. * Author: LaterPay GmbH - * Version: 2.6.5 + * Version: 2.7.0 * Author URI: https://laterpay.net/ * Textdomain: laterpay * Domain Path: /languages diff --git a/laterpay/views/backend/appearance.php b/laterpay/views/backend/appearance.php index f1cdac258..249e0993f 100644 --- a/laterpay/views/backend/appearance.php +++ b/laterpay/views/backend/appearance.php @@ -291,7 +291,7 @@ class="lp_plugin-mode-indicator"
-

+

+ +

+ + + + + + +
+ +
+
+
+ + + + +
+
+ +

+ +


+ +
+
+ +

"> + +


+ +

+
+
+
+ + +
+
+
+ + + +
+ + +

+ +


+
+
+
    +
  • +
    + + +
    +
    + +
    + +
    +
  • +
  • +
    + + +
    +
    + +
    + +
    +
  • + + + +
+
+
+
+ + +

"> + +

+

+
+
+
+
+

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
0.00
+
+
+
0.00
+
+ + + +
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+

+
+
+ +
+
+

+
+
+
+
+
diff --git a/laterpay/views/frontend/partials/widget/contribution-dialog.php b/laterpay/views/frontend/partials/widget/contribution-dialog.php new file mode 100644 index 000000000..94f54eebe --- /dev/null +++ b/laterpay/views/frontend/partials/widget/contribution-dialog.php @@ -0,0 +1,102 @@ + + + +
+
+
+
+ + +
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+ + +
+
+
+ +
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+ diff --git a/package.json b/package.json index d07a3958e..80abae93c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "laterpay-wordpress-plugin", - "version": "2.6.5", + "version": "2.7.0", "description": "LaterPay WordPress plugin", "main": "index.js", "dependencies": {},