Changeset 1546822
- Timestamp:
- 12/06/2016 11:44:32 PM (9 years ago)
- Location:
- edd-fastbill
- Files:
-
- 8 added
- 14 edited
- 1 copied
-
tags/1.4.3 (copied) (copied from edd-fastbill/trunk)
-
tags/1.4.3/edd-fastbill.php (modified) (1 diff)
-
tags/1.4.3/includes/fastbill-functions.php (modified) (2 diffs)
-
tags/1.4.3/includes/payment-actions.php (modified) (1 diff)
-
tags/1.4.3/includes/payment-history.php (modified) (1 diff)
-
tags/1.4.3/includes/register-settings.php (modified) (3 diffs)
-
tags/1.4.3/languages/edd-fastbill-de_DE.mo (added)
-
tags/1.4.3/languages/edd-fastbill-de_DE.po (added)
-
tags/1.4.3/languages/edd-fastbill.pot (modified) (8 diffs)
-
tags/1.4.3/readme.txt (modified) (3 diffs)
-
tags/1.4.3/screenshot-1.png (added)
-
tags/1.4.3/screenshot-2.png (added)
-
trunk/edd-fastbill.php (modified) (1 diff)
-
trunk/includes/fastbill-functions.php (modified) (2 diffs)
-
trunk/includes/payment-actions.php (modified) (1 diff)
-
trunk/includes/payment-history.php (modified) (1 diff)
-
trunk/includes/register-settings.php (modified) (3 diffs)
-
trunk/languages/edd-fastbill-de_DE.mo (added)
-
trunk/languages/edd-fastbill-de_DE.po (added)
-
trunk/languages/edd-fastbill.pot (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-1.png (added)
-
trunk/screenshot-2.png (added)
Legend:
- Unmodified
- Added
- Removed
-
edd-fastbill/tags/1.4.3/edd-fastbill.php
r1457180 r1546822 6 6 Author: Markus Drubba 7 7 Author URI: http://markusdrubba.de 8 Version: 1.4. 28 Version: 1.4.3 9 9 Text Domain: edd-fastbill 10 10 Domain Path: /languages -
edd-fastbill/tags/1.4.3/includes/fastbill-functions.php
r1457180 r1546822 383 383 384 384 /** 385 * drubba_fastbill_cancel_invoice() 386 * 387 * Cancel invoice in FastBill for the given order. 388 * 389 * @param $payment_id 390 * 391 * @access public 392 * @return void 393 * 394 **/ 395 function drubba_fastbill_cancel_invoice( $payment_id ) { 396 397 $fb_invoice_id = (int) get_post_meta( $payment_id, '_fastbill_invoice_id', true ); 398 399 if ( $fb_invoice_id > 0 ) { 400 // there is an invoice ID, so cancel invoice 401 402 drubba_fastbill_addlog( 'START - Canceling invoice in FastBill for invoice ID: ' . $fb_invoice_id ); 403 404 $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; 405 $xml .= "<FBAPI>"; 406 $xml .= "<SERVICE>invoice.cancel</SERVICE>"; 407 $xml .= "<DATA>"; 408 $xml .= "<INVOICE_ID>" . $fb_invoice_id . "</INVOICE_ID>"; 409 $xml .= "</DATA>"; 410 $xml .= "</FBAPI>"; 411 412 try { 413 414 $result = drubba_fastbill_apicall( $xml ); 415 416 } catch ( Exception $e ) { 417 418 drubba_fastbill_addlog( $e->getMessage() ); 419 420 return; 421 422 } 423 $response = new SimpleXMLElement( $result ); 424 $is_error = isset( $response->RESPONSE->ERRORS ) ? true : false; 425 426 if ( ! $is_error ) { 427 drubba_fastbill_addlog( 'END - Canceling invoice for order #' . $payment_id ); 428 } else { 429 // An error occured 430 $error_string = __( 'There was an error canceling an invoice in FastBill:', 'edd-fastbill' ) . "\n" . 431 __( 'Error: ', 'edd-fastbill' ) . $response->RESPONSE->ERRORS->ERROR; 432 drubba_fastbill_addlog( $error_string ); 433 } 434 } else { 435 // no invoice id so exit. 436 return; 437 } 438 } 439 440 441 /** 385 442 * drubba_fastbill_invoice_sendbyemail() 386 443 * … … 786 843 **/ 787 844 function drubba_fastbill_addlog( $log_string ) { 788 if ( WP_DEBUG ) { 789 $path = DRUBBAFASTBILL_DIR . "log/fastbill_debug.log"; 790 $log_string = "Log Date: " . date( "r" ) . "\n" . $log_string . "\n"; 791 if ( file_exists( $path ) ) { 792 if ( $log = fopen( $path, "a" ) ) { 793 fwrite( $log, $log_string, strlen( $log_string ) ); 794 fclose( $log ); 795 } 796 } else { 797 if ( $log = fopen( $path, "c" ) ) { 798 fwrite( $log, $log_string, strlen( $log_string ) ); 799 fclose( $log ); 800 } 801 } 802 } 803 } 845 global $edd_options; 846 847 if ( isset( $edd_options['drubba_fb_fastbill_debug_log'] ) && 1 == $edd_options['drubba_fb_fastbill_debug_log'] ) { 848 849 $current_log = get_option( 'edd_fastbill_error_log', '' ); 850 $log_string = "Log Date: " . date( "r" ) . "\n" . trim( $log_string ) . "\n\n"; 851 852 $final_log = $current_log . $log_string; 853 854 update_option( 'edd_fastbill_error_log', $final_log ); 855 856 } 857 } -
edd-fastbill/tags/1.4.3/includes/payment-actions.php
r1448780 r1546822 47 47 48 48 add_action( 'edd_update_payment_status', 'drubba_fastbill_complete_purchase', 10, 3 ); 49 50 function drubba_fastbill_refund_purchase( $payment_id, $new_status, $old_status ) { 51 global $edd_options; 52 53 if ( $new_status == 'refunded' ) { 54 drubba_fastbill_cancel_invoice( $payment_id ); 55 } 56 } 57 58 add_action( 'edd_update_payment_status', 'drubba_fastbill_refund_purchase', 10, 3 ); -
edd-fastbill/tags/1.4.3/includes/payment-history.php
r1448780 r1546822 146 146 147 147 if ( isset( $_GET['edd-message'] ) && 'got_fastbill_invoice_error' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 148 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved-error', __( 'The invoice link could not be generated.', 'edd-fastbill' ), 'error' );148 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved-error', __( 'The invoice link could not be generated.', 'edd-fastbill' ), 'error' ); 149 149 } 150 150 if ( isset( $_GET['edd-message'] ) && 'got_fastbill_invoice' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 151 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved', __( 'The invoice link was generated.', 'edd-fastbill' ), 'updated' );151 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved', __( 'The invoice link was generated.', 'edd-fastbill' ), 'updated' ); 152 152 } 153 153 154 154 if ( isset( $_GET['edd-message'] ) && 'mailed_fastbill_invoice_error' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 155 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved', __( 'The invoice could not be sent.', 'edd-fastbill' ), 'error' );155 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved', __( 'The invoice could not be sent.', 'edd-fastbill' ), 'error' ); 156 156 } 157 157 158 158 if ( isset( $_GET['edd-message'] ) && 'mailed_fastbill_invoice' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 159 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved', __( 'The invoice was sent.', 'edd-fastbill' ), 'updated' );160 } 161 162 settings_errors( 'edd- notices' );159 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved', __( 'The invoice was sent.', 'edd-fastbill' ), 'updated' ); 160 } 161 162 settings_errors( 'edd-fastbill-notices' ); 163 163 } 164 164 -
edd-fastbill/tags/1.4.3/includes/register-settings.php
r1448780 r1546822 90 90 91 91 92 93 92 if ( drubba_fb_cfm_active() ) { // @since 1.1.0 94 93 … … 119 118 } 120 119 } 120 121 $fastbill_settings[] = array( 122 'id' => 'drubba_fb_fastbill_debug_log', 123 'name' => __( 'Debug mode', 'edd-fastbill' ), 124 'desc' => __( 'Write debug logs into the database.', 'edd-fastbill' ), 125 'type' => 'checkbox', 126 ); 127 128 $fastbill_settings[] = array( 129 'id' => 'drubba_fb_fastbill_reset_debug_log', 130 'name' => __( 'Reset debug entries', 'edd-fastbill' ), 131 'desc' => __( 'Remove debug logs from database.', 'edd-fastbill' ), 132 'type' => 'checkbox', 133 ); 121 134 122 135 if ( version_compare( EDD_VERSION, 2.5, '>=' ) ) { … … 217 230 return $templates; 218 231 } 232 233 /** 234 * Display field for debug output 235 * 236 * @param $html 237 * @param $args 238 * 239 * @return string 240 */ 241 function drubba_fb_fastbill_show_debug_log_field( $html, $args ) { 242 if ( $args['id'] == 'drubba_fb_fastbill_debug_log' ) { 243 $current_log = get_option( 'edd_fastbill_error_log', '' ); 244 if ( ! empty( $current_log ) ) { 245 $html = $html . '<br><br><textarea style="width:100%;height:400px;" readonly>' . $current_log . '</textarea>'; 246 } 247 } 248 249 return $html; 250 } 251 252 add_filter( 'edd_after_setting_output', 'drubba_fb_fastbill_show_debug_log_field', 10, 2 ); 253 254 /** 255 * Reset database debug log 256 * 257 * @param $new_value 258 * @param $old_value 259 * 260 * @return mixed 261 */ 262 function drubba_fb_fastbill_reset_debug_log( $new_value, $old_value ) { 263 if ( $new_value['drubba_fb_fastbill_reset_debug_log'] == 1 ) { 264 update_option( 'edd_fastbill_error_log', '' ); 265 $new_value['drubba_fb_fastbill_reset_debug_log'] = - 1; 266 } 267 268 return $new_value; 269 } 270 271 add_action( 'pre_update_option_edd_settings', 'drubba_fb_fastbill_reset_debug_log', 10, 2 ); -
edd-fastbill/tags/1.4.3/languages/edd-fastbill.pot
r1457180 r1546822 1 1 # Copyright (C) 2016 Easy Digital Downloads - FastBill Integration 2 2 # This file is distributed under the same license as the Easy Digital Downloads - FastBill Integration package. 3 #, fuzzy 3 4 msgid "" 4 5 msgstr "" 5 "Project-Id-Version: Easy Digital Downloads - FastBill Integration 1.4.1\n" 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/edd-fastbill\n" 7 "POT-Creation-Date: 2016-07-19 20:21:24+00:00\n" 6 "Project-Id-Version: EDD - FastBill\n" 7 "Report-Msgid-Bugs-To: \n" 8 "POT-Creation-Date: 2016-12-07 00:40+0100\n" 9 "PO-Revision-Date: 2016-12-07 00:33+0100\n" 10 "Last-Translator: Markus Drubba <kontakt@markusdrubba.de>\n" 11 "Language-Team: \n" 12 "Language: de_DE\n" 8 13 "MIME-Version: 1.0\n" 9 14 "Content-Type: text/plain; charset=UTF-8\n" 10 15 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 "Language-Team: LANGUAGE <LL@li.org>\n" 16 "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 "X-Generator: Poedit 1.8.5\n" 18 "X-Poedit-SourceCharset: UTF-8\n" 19 "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;" 20 "_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" 21 "X-Poedit-Basepath: ..\n" 22 "X-Textdomain-Support: yes\n" 23 "X-Poedit-SearchPath-0: .\n" 14 24 15 25 #: includes/fastbill-functions.php:70 … … 25 35 msgstr "" 26 36 27 #: includes/fastbill-functions.php:177 includes/fastbill-functions.php:261 28 #: includes/fastbill-functions.php:319 includes/fastbill-functions.php:375 29 #: includes/fastbill-functions.php:412 includes/fastbill-functions.php:419 30 #: includes/fastbill-functions.php:456 includes/fastbill-functions.php:585 31 #: includes/fastbill-functions.php:639 includes/fastbill-functions.php:698 37 #: includes/fastbill-functions.php:177 includes/fastbill-functions.php:261 includes/fastbill-functions.php:319 38 #: includes/fastbill-functions.php:375 includes/fastbill-functions.php:431 includes/fastbill-functions.php:469 39 #: includes/fastbill-functions.php:476 includes/fastbill-functions.php:513 includes/fastbill-functions.php:642 40 #: includes/fastbill-functions.php:696 includes/fastbill-functions.php:755 32 41 msgid "Error: " 33 42 msgstr "" … … 41 50 msgstr "" 42 51 43 #: includes/fastbill-functions.php:455 52 #: includes/fastbill-functions.php:430 53 msgid "There was an error canceling an invoice in FastBill:" 54 msgstr "" 55 56 #: includes/fastbill-functions.php:512 44 57 msgid "There was an error sending an invoice via FastBill:" 45 58 msgstr "" 46 59 47 #: includes/fastbill-functions.php: 58460 #: includes/fastbill-functions.php:641 48 61 msgid "There was an error creating this customer in FastBill:" 49 62 msgstr "" 50 63 51 #: includes/fastbill-functions.php:6 3864 #: includes/fastbill-functions.php:695 52 65 msgid "There was an error looking up this customer in FastBill:" 53 66 msgstr "" 54 67 55 #: includes/fastbill-functions.php: 69768 #: includes/fastbill-functions.php:754 56 69 msgid "There was an error when receiving templates from FastBill:" 57 70 msgstr "" … … 61 74 msgstr "" 62 75 63 #: includes/frontend-functions.php:48 includes/frontend-functions.php:77 64 #: includes/ payment-history.php:33 includes/template-tags.php:5076 #: includes/frontend-functions.php:48 includes/frontend-functions.php:77 includes/payment-history.php:33 77 #: includes/template-tags.php:50 65 78 msgid "Download Invoice" 66 79 msgstr "" … … 111 124 112 125 #: includes/register-settings.php:51 113 msgid "" 114 "Choose invoice template. If you edit a Template in FastBill, you have to " 115 "reassign it here." 126 msgid "Choose invoice template. If you edit a Template in FastBill, you have to reassign it here." 116 127 msgstr "" 117 128 … … 137 148 138 149 #: includes/register-settings.php:72 139 msgid "" 140 "Create payment in FastBill when order is placed, requires invoice status " 141 "COMPLETE" 150 msgid "Create payment in FastBill when order is placed, requires invoice status COMPLETE" 142 151 msgstr "" 143 152 … … 156 165 #: includes/register-settings.php:86 157 166 msgid "" 158 "I activated the online invoice functionalty within my Fastbill account to " 159 "accessing the generated invoice." 160 msgstr "" 161 162 #: includes/register-settings.php:98 167 "I activated the online invoice functionalty within my Fastbill account to accessing the generated invoice." 168 msgstr "" 169 170 #: includes/register-settings.php:97 163 171 msgid "FastBill Customer Fields" 164 172 msgstr "" 165 173 166 #: includes/register-settings.php:179 174 #: includes/register-settings.php:123 175 msgid "Debug mode" 176 msgstr "" 177 178 #: includes/register-settings.php:124 179 msgid "Write debug logs into the database." 180 msgstr "" 181 182 #: includes/register-settings.php:130 183 msgid "Reset debug entries" 184 msgstr "" 185 186 #: includes/register-settings.php:131 187 msgid "Remove debug logs from database." 188 msgstr "" 189 190 #: includes/register-settings.php:192 167 191 msgid "Organization" 168 192 msgstr "" 169 193 170 #: includes/register-settings.php:1 80194 #: includes/register-settings.php:193 171 195 msgid "If set by customer, than Business" 172 196 msgstr "" 173 197 174 #: includes/register-settings.php:1 83198 #: includes/register-settings.php:196 175 199 msgid "Salutation" 176 200 msgstr "" 177 201 178 #: includes/register-settings.php:1 84202 #: includes/register-settings.php:197 179 203 msgid "Use Herr, Hr., Hr, Mister, Mr, Mr. & Frau, Fr., Fr, Misses, Miss, Mrs." 180 204 msgstr "" 181 205 182 #: includes/register-settings.php:1 86206 #: includes/register-settings.php:199 183 207 msgid "Phone" 184 208 msgstr "" 185 209 186 #: includes/register-settings.php: 187210 #: includes/register-settings.php:200 187 211 msgid "Fax" 188 212 msgstr "" 189 213 190 #: includes/register-settings.php: 188214 #: includes/register-settings.php:201 191 215 msgid "Mobile" 192 216 msgstr "" 193 217 194 #: includes/register-settings.php:2 02218 #: includes/register-settings.php:215 195 219 msgid "Default" 196 220 msgstr "" … … 199 223 msgid "Creates a link to the downloadable Fastbill invoice" 200 224 msgstr "" 201 202 #. Plugin Name of the plugin/theme203 msgid "Easy Digital Downloads - FastBill Integration"204 msgstr ""205 206 #. Plugin URI of the plugin/theme207 msgid ""208 "https://easydigitaldownloads.com/extensions/fastbill-integration/?ref=2325"209 msgstr ""210 211 #. Description of the plugin/theme212 msgid ""213 "Integrates <a href=\"https://easydigitaldownloads.com/\" target=\"_blank"214 "\">Easy Digital Downloads</a> with the <a href=\"http://www.fastbill.com\" "215 "target=\"_blank\">FastBill - fast money</a> accounting software."216 msgstr ""217 218 #. Author of the plugin/theme219 msgid "Markus Drubba"220 msgstr ""221 222 #. Author URI of the plugin/theme223 msgid "http://markusdrubba.de"224 msgstr "" -
edd-fastbill/tags/1.4.3/readme.txt
r1457180 r1546822 1 1 === EDD - FastBill Integration === 2 2 Contributors: drumba 3 Donate link: https://www.paypal. com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BCVM7FZ6ZCM2A3 Donate link: https://www.paypal.me/markusdrubba 4 4 Tags: Digital Downloads, EDD, Fastbill, Accounting, Invoice 5 5 Requires at least: 4.5 6 Tested up to: 4. 5.37 Stable tag: 1.4. 26 Tested up to: 4.7 7 Stable tag: 1.4.3 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 24 24 * Activate the plugin in your WordPress admin area. 25 25 26 == Screenshots == 27 28 1. FastBill Settings 29 2. Payment column 30 26 31 == Configuration == 27 32 … … 34 39 35 40 == Changelog == 41 42 = 2016-12-06 1.4.3 = 43 44 * New: Cancel Payments when customer get a refund 45 * Tweak: debug logs are written to the database 36 46 37 47 = 2016-07-04 1.4.2 = -
edd-fastbill/trunk/edd-fastbill.php
r1457180 r1546822 6 6 Author: Markus Drubba 7 7 Author URI: http://markusdrubba.de 8 Version: 1.4. 28 Version: 1.4.3 9 9 Text Domain: edd-fastbill 10 10 Domain Path: /languages -
edd-fastbill/trunk/includes/fastbill-functions.php
r1457180 r1546822 383 383 384 384 /** 385 * drubba_fastbill_cancel_invoice() 386 * 387 * Cancel invoice in FastBill for the given order. 388 * 389 * @param $payment_id 390 * 391 * @access public 392 * @return void 393 * 394 **/ 395 function drubba_fastbill_cancel_invoice( $payment_id ) { 396 397 $fb_invoice_id = (int) get_post_meta( $payment_id, '_fastbill_invoice_id', true ); 398 399 if ( $fb_invoice_id > 0 ) { 400 // there is an invoice ID, so cancel invoice 401 402 drubba_fastbill_addlog( 'START - Canceling invoice in FastBill for invoice ID: ' . $fb_invoice_id ); 403 404 $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; 405 $xml .= "<FBAPI>"; 406 $xml .= "<SERVICE>invoice.cancel</SERVICE>"; 407 $xml .= "<DATA>"; 408 $xml .= "<INVOICE_ID>" . $fb_invoice_id . "</INVOICE_ID>"; 409 $xml .= "</DATA>"; 410 $xml .= "</FBAPI>"; 411 412 try { 413 414 $result = drubba_fastbill_apicall( $xml ); 415 416 } catch ( Exception $e ) { 417 418 drubba_fastbill_addlog( $e->getMessage() ); 419 420 return; 421 422 } 423 $response = new SimpleXMLElement( $result ); 424 $is_error = isset( $response->RESPONSE->ERRORS ) ? true : false; 425 426 if ( ! $is_error ) { 427 drubba_fastbill_addlog( 'END - Canceling invoice for order #' . $payment_id ); 428 } else { 429 // An error occured 430 $error_string = __( 'There was an error canceling an invoice in FastBill:', 'edd-fastbill' ) . "\n" . 431 __( 'Error: ', 'edd-fastbill' ) . $response->RESPONSE->ERRORS->ERROR; 432 drubba_fastbill_addlog( $error_string ); 433 } 434 } else { 435 // no invoice id so exit. 436 return; 437 } 438 } 439 440 441 /** 385 442 * drubba_fastbill_invoice_sendbyemail() 386 443 * … … 786 843 **/ 787 844 function drubba_fastbill_addlog( $log_string ) { 788 if ( WP_DEBUG ) { 789 $path = DRUBBAFASTBILL_DIR . "log/fastbill_debug.log"; 790 $log_string = "Log Date: " . date( "r" ) . "\n" . $log_string . "\n"; 791 if ( file_exists( $path ) ) { 792 if ( $log = fopen( $path, "a" ) ) { 793 fwrite( $log, $log_string, strlen( $log_string ) ); 794 fclose( $log ); 795 } 796 } else { 797 if ( $log = fopen( $path, "c" ) ) { 798 fwrite( $log, $log_string, strlen( $log_string ) ); 799 fclose( $log ); 800 } 801 } 802 } 803 } 845 global $edd_options; 846 847 if ( isset( $edd_options['drubba_fb_fastbill_debug_log'] ) && 1 == $edd_options['drubba_fb_fastbill_debug_log'] ) { 848 849 $current_log = get_option( 'edd_fastbill_error_log', '' ); 850 $log_string = "Log Date: " . date( "r" ) . "\n" . trim( $log_string ) . "\n\n"; 851 852 $final_log = $current_log . $log_string; 853 854 update_option( 'edd_fastbill_error_log', $final_log ); 855 856 } 857 } -
edd-fastbill/trunk/includes/payment-actions.php
r1448780 r1546822 47 47 48 48 add_action( 'edd_update_payment_status', 'drubba_fastbill_complete_purchase', 10, 3 ); 49 50 function drubba_fastbill_refund_purchase( $payment_id, $new_status, $old_status ) { 51 global $edd_options; 52 53 if ( $new_status == 'refunded' ) { 54 drubba_fastbill_cancel_invoice( $payment_id ); 55 } 56 } 57 58 add_action( 'edd_update_payment_status', 'drubba_fastbill_refund_purchase', 10, 3 ); -
edd-fastbill/trunk/includes/payment-history.php
r1448780 r1546822 146 146 147 147 if ( isset( $_GET['edd-message'] ) && 'got_fastbill_invoice_error' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 148 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved-error', __( 'The invoice link could not be generated.', 'edd-fastbill' ), 'error' );148 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved-error', __( 'The invoice link could not be generated.', 'edd-fastbill' ), 'error' ); 149 149 } 150 150 if ( isset( $_GET['edd-message'] ) && 'got_fastbill_invoice' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 151 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved', __( 'The invoice link was generated.', 'edd-fastbill' ), 'updated' );151 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved', __( 'The invoice link was generated.', 'edd-fastbill' ), 'updated' ); 152 152 } 153 153 154 154 if ( isset( $_GET['edd-message'] ) && 'mailed_fastbill_invoice_error' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 155 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved', __( 'The invoice could not be sent.', 'edd-fastbill' ), 'error' );155 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved', __( 'The invoice could not be sent.', 'edd-fastbill' ), 'error' ); 156 156 } 157 157 158 158 if ( isset( $_GET['edd-message'] ) && 'mailed_fastbill_invoice' == $_GET['edd-message'] && current_user_can( 'view_shop_reports' ) ) { 159 add_settings_error( 'edd- notices', 'fastbill-invoice-retrieved', __( 'The invoice was sent.', 'edd-fastbill' ), 'updated' );160 } 161 162 settings_errors( 'edd- notices' );159 add_settings_error( 'edd-fastbill-notices', 'fastbill-invoice-retrieved', __( 'The invoice was sent.', 'edd-fastbill' ), 'updated' ); 160 } 161 162 settings_errors( 'edd-fastbill-notices' ); 163 163 } 164 164 -
edd-fastbill/trunk/includes/register-settings.php
r1448780 r1546822 90 90 91 91 92 93 92 if ( drubba_fb_cfm_active() ) { // @since 1.1.0 94 93 … … 119 118 } 120 119 } 120 121 $fastbill_settings[] = array( 122 'id' => 'drubba_fb_fastbill_debug_log', 123 'name' => __( 'Debug mode', 'edd-fastbill' ), 124 'desc' => __( 'Write debug logs into the database.', 'edd-fastbill' ), 125 'type' => 'checkbox', 126 ); 127 128 $fastbill_settings[] = array( 129 'id' => 'drubba_fb_fastbill_reset_debug_log', 130 'name' => __( 'Reset debug entries', 'edd-fastbill' ), 131 'desc' => __( 'Remove debug logs from database.', 'edd-fastbill' ), 132 'type' => 'checkbox', 133 ); 121 134 122 135 if ( version_compare( EDD_VERSION, 2.5, '>=' ) ) { … … 217 230 return $templates; 218 231 } 232 233 /** 234 * Display field for debug output 235 * 236 * @param $html 237 * @param $args 238 * 239 * @return string 240 */ 241 function drubba_fb_fastbill_show_debug_log_field( $html, $args ) { 242 if ( $args['id'] == 'drubba_fb_fastbill_debug_log' ) { 243 $current_log = get_option( 'edd_fastbill_error_log', '' ); 244 if ( ! empty( $current_log ) ) { 245 $html = $html . '<br><br><textarea style="width:100%;height:400px;" readonly>' . $current_log . '</textarea>'; 246 } 247 } 248 249 return $html; 250 } 251 252 add_filter( 'edd_after_setting_output', 'drubba_fb_fastbill_show_debug_log_field', 10, 2 ); 253 254 /** 255 * Reset database debug log 256 * 257 * @param $new_value 258 * @param $old_value 259 * 260 * @return mixed 261 */ 262 function drubba_fb_fastbill_reset_debug_log( $new_value, $old_value ) { 263 if ( $new_value['drubba_fb_fastbill_reset_debug_log'] == 1 ) { 264 update_option( 'edd_fastbill_error_log', '' ); 265 $new_value['drubba_fb_fastbill_reset_debug_log'] = - 1; 266 } 267 268 return $new_value; 269 } 270 271 add_action( 'pre_update_option_edd_settings', 'drubba_fb_fastbill_reset_debug_log', 10, 2 ); -
edd-fastbill/trunk/languages/edd-fastbill.pot
r1457180 r1546822 1 1 # Copyright (C) 2016 Easy Digital Downloads - FastBill Integration 2 2 # This file is distributed under the same license as the Easy Digital Downloads - FastBill Integration package. 3 #, fuzzy 3 4 msgid "" 4 5 msgstr "" 5 "Project-Id-Version: Easy Digital Downloads - FastBill Integration 1.4.1\n" 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/edd-fastbill\n" 7 "POT-Creation-Date: 2016-07-19 20:21:24+00:00\n" 6 "Project-Id-Version: EDD - FastBill\n" 7 "Report-Msgid-Bugs-To: \n" 8 "POT-Creation-Date: 2016-12-07 00:40+0100\n" 9 "PO-Revision-Date: 2016-12-07 00:33+0100\n" 10 "Last-Translator: Markus Drubba <kontakt@markusdrubba.de>\n" 11 "Language-Team: \n" 12 "Language: de_DE\n" 8 13 "MIME-Version: 1.0\n" 9 14 "Content-Type: text/plain; charset=UTF-8\n" 10 15 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 "Language-Team: LANGUAGE <LL@li.org>\n" 16 "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 "X-Generator: Poedit 1.8.5\n" 18 "X-Poedit-SourceCharset: UTF-8\n" 19 "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;" 20 "_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" 21 "X-Poedit-Basepath: ..\n" 22 "X-Textdomain-Support: yes\n" 23 "X-Poedit-SearchPath-0: .\n" 14 24 15 25 #: includes/fastbill-functions.php:70 … … 25 35 msgstr "" 26 36 27 #: includes/fastbill-functions.php:177 includes/fastbill-functions.php:261 28 #: includes/fastbill-functions.php:319 includes/fastbill-functions.php:375 29 #: includes/fastbill-functions.php:412 includes/fastbill-functions.php:419 30 #: includes/fastbill-functions.php:456 includes/fastbill-functions.php:585 31 #: includes/fastbill-functions.php:639 includes/fastbill-functions.php:698 37 #: includes/fastbill-functions.php:177 includes/fastbill-functions.php:261 includes/fastbill-functions.php:319 38 #: includes/fastbill-functions.php:375 includes/fastbill-functions.php:431 includes/fastbill-functions.php:469 39 #: includes/fastbill-functions.php:476 includes/fastbill-functions.php:513 includes/fastbill-functions.php:642 40 #: includes/fastbill-functions.php:696 includes/fastbill-functions.php:755 32 41 msgid "Error: " 33 42 msgstr "" … … 41 50 msgstr "" 42 51 43 #: includes/fastbill-functions.php:455 52 #: includes/fastbill-functions.php:430 53 msgid "There was an error canceling an invoice in FastBill:" 54 msgstr "" 55 56 #: includes/fastbill-functions.php:512 44 57 msgid "There was an error sending an invoice via FastBill:" 45 58 msgstr "" 46 59 47 #: includes/fastbill-functions.php: 58460 #: includes/fastbill-functions.php:641 48 61 msgid "There was an error creating this customer in FastBill:" 49 62 msgstr "" 50 63 51 #: includes/fastbill-functions.php:6 3864 #: includes/fastbill-functions.php:695 52 65 msgid "There was an error looking up this customer in FastBill:" 53 66 msgstr "" 54 67 55 #: includes/fastbill-functions.php: 69768 #: includes/fastbill-functions.php:754 56 69 msgid "There was an error when receiving templates from FastBill:" 57 70 msgstr "" … … 61 74 msgstr "" 62 75 63 #: includes/frontend-functions.php:48 includes/frontend-functions.php:77 64 #: includes/ payment-history.php:33 includes/template-tags.php:5076 #: includes/frontend-functions.php:48 includes/frontend-functions.php:77 includes/payment-history.php:33 77 #: includes/template-tags.php:50 65 78 msgid "Download Invoice" 66 79 msgstr "" … … 111 124 112 125 #: includes/register-settings.php:51 113 msgid "" 114 "Choose invoice template. If you edit a Template in FastBill, you have to " 115 "reassign it here." 126 msgid "Choose invoice template. If you edit a Template in FastBill, you have to reassign it here." 116 127 msgstr "" 117 128 … … 137 148 138 149 #: includes/register-settings.php:72 139 msgid "" 140 "Create payment in FastBill when order is placed, requires invoice status " 141 "COMPLETE" 150 msgid "Create payment in FastBill when order is placed, requires invoice status COMPLETE" 142 151 msgstr "" 143 152 … … 156 165 #: includes/register-settings.php:86 157 166 msgid "" 158 "I activated the online invoice functionalty within my Fastbill account to " 159 "accessing the generated invoice." 160 msgstr "" 161 162 #: includes/register-settings.php:98 167 "I activated the online invoice functionalty within my Fastbill account to accessing the generated invoice." 168 msgstr "" 169 170 #: includes/register-settings.php:97 163 171 msgid "FastBill Customer Fields" 164 172 msgstr "" 165 173 166 #: includes/register-settings.php:179 174 #: includes/register-settings.php:123 175 msgid "Debug mode" 176 msgstr "" 177 178 #: includes/register-settings.php:124 179 msgid "Write debug logs into the database." 180 msgstr "" 181 182 #: includes/register-settings.php:130 183 msgid "Reset debug entries" 184 msgstr "" 185 186 #: includes/register-settings.php:131 187 msgid "Remove debug logs from database." 188 msgstr "" 189 190 #: includes/register-settings.php:192 167 191 msgid "Organization" 168 192 msgstr "" 169 193 170 #: includes/register-settings.php:1 80194 #: includes/register-settings.php:193 171 195 msgid "If set by customer, than Business" 172 196 msgstr "" 173 197 174 #: includes/register-settings.php:1 83198 #: includes/register-settings.php:196 175 199 msgid "Salutation" 176 200 msgstr "" 177 201 178 #: includes/register-settings.php:1 84202 #: includes/register-settings.php:197 179 203 msgid "Use Herr, Hr., Hr, Mister, Mr, Mr. & Frau, Fr., Fr, Misses, Miss, Mrs." 180 204 msgstr "" 181 205 182 #: includes/register-settings.php:1 86206 #: includes/register-settings.php:199 183 207 msgid "Phone" 184 208 msgstr "" 185 209 186 #: includes/register-settings.php: 187210 #: includes/register-settings.php:200 187 211 msgid "Fax" 188 212 msgstr "" 189 213 190 #: includes/register-settings.php: 188214 #: includes/register-settings.php:201 191 215 msgid "Mobile" 192 216 msgstr "" 193 217 194 #: includes/register-settings.php:2 02218 #: includes/register-settings.php:215 195 219 msgid "Default" 196 220 msgstr "" … … 199 223 msgid "Creates a link to the downloadable Fastbill invoice" 200 224 msgstr "" 201 202 #. Plugin Name of the plugin/theme203 msgid "Easy Digital Downloads - FastBill Integration"204 msgstr ""205 206 #. Plugin URI of the plugin/theme207 msgid ""208 "https://easydigitaldownloads.com/extensions/fastbill-integration/?ref=2325"209 msgstr ""210 211 #. Description of the plugin/theme212 msgid ""213 "Integrates <a href=\"https://easydigitaldownloads.com/\" target=\"_blank"214 "\">Easy Digital Downloads</a> with the <a href=\"http://www.fastbill.com\" "215 "target=\"_blank\">FastBill - fast money</a> accounting software."216 msgstr ""217 218 #. Author of the plugin/theme219 msgid "Markus Drubba"220 msgstr ""221 222 #. Author URI of the plugin/theme223 msgid "http://markusdrubba.de"224 msgstr "" -
edd-fastbill/trunk/readme.txt
r1457180 r1546822 1 1 === EDD - FastBill Integration === 2 2 Contributors: drumba 3 Donate link: https://www.paypal. com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BCVM7FZ6ZCM2A3 Donate link: https://www.paypal.me/markusdrubba 4 4 Tags: Digital Downloads, EDD, Fastbill, Accounting, Invoice 5 5 Requires at least: 4.5 6 Tested up to: 4. 5.37 Stable tag: 1.4. 26 Tested up to: 4.7 7 Stable tag: 1.4.3 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 24 24 * Activate the plugin in your WordPress admin area. 25 25 26 == Screenshots == 27 28 1. FastBill Settings 29 2. Payment column 30 26 31 == Configuration == 27 32 … … 34 39 35 40 == Changelog == 41 42 = 2016-12-06 1.4.3 = 43 44 * New: Cancel Payments when customer get a refund 45 * Tweak: debug logs are written to the database 36 46 37 47 = 2016-07-04 1.4.2 =
Note: See TracChangeset
for help on using the changeset viewer.