Changeset 2836027
- Timestamp:
- 12/19/2022 11:49:02 AM (3 years ago)
- Location:
- sprinque
- Files:
-
- 26 edited
- 1 copied
-
tags/1.1.9 (copied) (copied from sprinque/trunk)
-
tags/1.1.9/assets/css/frontend.css (modified) (3 diffs)
-
tags/1.1.9/assets/css/frontend.scss (modified) (1 diff)
-
tags/1.1.9/assets/js/frontend.js (modified) (6 diffs)
-
tags/1.1.9/include/helper_functions.php (modified) (1 diff)
-
tags/1.1.9/include/payment_method.php (modified) (2 diffs)
-
tags/1.1.9/languages/sprinque-de_DE.po (modified) (1 diff)
-
tags/1.1.9/languages/sprinque-en_US.po (modified) (1 diff)
-
tags/1.1.9/languages/sprinque-nl_NL.po (modified) (1 diff)
-
tags/1.1.9/languages/sprinque.po (modified) (1 diff)
-
tags/1.1.9/languages/sprinque.pot (modified) (1 diff)
-
tags/1.1.9/readme.txt (modified) (2 diffs)
-
tags/1.1.9/sprinque.php (modified) (5 diffs)
-
tags/1.1.9/templates/frontend/srinque_pay_modal_form.php (modified) (1 diff)
-
trunk/assets/css/frontend.css (modified) (3 diffs)
-
trunk/assets/css/frontend.scss (modified) (1 diff)
-
trunk/assets/js/frontend.js (modified) (6 diffs)
-
trunk/include/helper_functions.php (modified) (1 diff)
-
trunk/include/payment_method.php (modified) (2 diffs)
-
trunk/languages/sprinque-de_DE.po (modified) (1 diff)
-
trunk/languages/sprinque-en_US.po (modified) (1 diff)
-
trunk/languages/sprinque-nl_NL.po (modified) (1 diff)
-
trunk/languages/sprinque.po (modified) (1 diff)
-
trunk/languages/sprinque.pot (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sprinque.php (modified) (5 diffs)
-
trunk/templates/frontend/srinque_pay_modal_form.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sprinque/tags/1.1.9/assets/css/frontend.css
r2777074 r2836027 579 579 border: 1px solid #d9dbf2; 580 580 box-shadow: rgba(217, 219, 242, 0.5) 0px 4px 8px; 581 max-height: 220px; 582 overflow-y: scroll; 581 583 } 582 584 .search-company-result_loaded:not(.search-company-result_selected) { … … 591 593 background: #fff; 592 594 border: 1px solid #d9dbf2; 593 box-shadow: rgba(217, 219, 242, 0.5) 0px 4px 8px; 595 box-shadow: rgba(217, 219, 242, 0.5) 0 4px 8px; 596 max-height: 200px; 597 overflow-y: scroll; 594 598 } 595 599 .company-not-found { … … 702 706 } 703 707 708 .verify-local-error { 709 color: red; 710 } 711 704 712 #cancel-order-sprinque { 705 713 margin-bottom: 30px; -
sprinque/tags/1.1.9/assets/css/frontend.scss
r2765613 r2836027 9 9 // color: blue; 10 10 11 }12 .founded-companies {13 11 } 14 12 .founded-companies .company-item { -
sprinque/tags/1.1.9/assets/js/frontend.js
r2828803 r2836027 119 119 $(inputs).on({ 120 120 paste: function(e) { 121 console.log('paste1');122 121 var pastedData = e.originalEvent.clipboardData.getData('text'); 123 122 var pastedChars = pastedData.split(""); … … 406 405 } else { 407 406 showTab('.verifying_your_account'); 408 aut orize_company_payment();407 authorize_company_payment(); 409 408 } 410 409 } else { … … 437 436 if(response.status === 'true') { 438 437 showTab('.verifying_your_account'); 439 aut orize_company_payment();438 authorize_company_payment(); 440 439 } else { 441 440 $('.otp-error-code').show(); … … 522 521 } else { 523 522 showTab('.verifying_your_account'); 524 aut orize_company_payment();523 authorize_company_payment(); 525 524 } 526 525 } else { … … 534 533 }); 535 534 536 function aut orize_company_payment()535 function authorize_company_payment() 537 536 { 538 537 var address_line1 = $('#billing_address_1').val(); … … 576 575 $('.cant-complete-autorization').show(); 577 576 $('.verifying_your_account .wpm-loader_my1').hide(); 578 $('.verify-error').html(response.message); 577 578 if(response.result.error_code === 'auth-credit-exceeded') { 579 $('.verify-local-error').show(); 580 } else { 581 $('.verify-error').html(response.message); 582 } 579 583 } 580 584 } -
sprinque/tags/1.1.9/include/helper_functions.php
r2765613 r2836027 75 75 'GA' => 'Gabon', 76 76 'GM' => 'Gambia', 77 'GE' => 'Georgia', 78 'DE' => 'Germany', 77 'GE' => 'Georgia',*/ 78 'DE' => 'Germany',/* 79 79 'GH' => 'Ghana', 80 80 'GI' => 'Gibraltar', -
sprinque/tags/1.1.9/include/payment_method.php
r2828803 r2836027 486 486 } 487 487 488 $ response = wp_remote_post( $api_url . $route,[488 $args = [ 489 489 'method' => $method, 490 490 "timeout" => 100, … … 493 493 "Accept" => "application/json", 494 494 "X-API-KEY-ID" => $this->api_key 495 ], 496 'body' => json_encode( $data ), 497 ] ); 495 ] 496 ]; 497 498 if($method == 'POST') { 499 $args['body'] = json_encode( $data ); 500 } 501 502 $response = wp_remote_post( $api_url . $route, $args); 498 503 499 504 return json_decode( $response['body'], true ); -
sprinque/tags/1.1.9/languages/sprinque-de_DE.po
r2828803 r2836027 24 24 msgstr "API-Schlüssel" 25 25 26 # When the order amount is larger than the available credit limit26 #: templates/frontend/srinque_pay_modal_form.php:91 27 27 msgid "AuthCreditExceededError" 28 28 msgstr "Die Autorisierungsanfrage überschreitet das verfügbare Kreditlimit" -
sprinque/tags/1.1.9/languages/sprinque-en_US.po
r2828803 r2836027 32 32 msgstr "API Key" 33 33 34 # When the order amount is larger than the available credit limit34 #: templates/frontend/srinque_pay_modal_form.php:91 35 35 msgid "AuthCreditExceededError" 36 36 msgstr "Authorization request exceeds the available credit limit" -
sprinque/tags/1.1.9/languages/sprinque-nl_NL.po
r2828803 r2836027 24 24 msgstr "API-Sleutel" 25 25 26 # When the order amount is larger than the available credit limit26 #: templates/frontend/srinque_pay_modal_form.php:91 27 27 msgid "AuthCreditExceededError" 28 28 msgstr "Autorisatieverzoek overschrijdt de beschikbare kredietlimiet" -
sprinque/tags/1.1.9/languages/sprinque.po
r2828803 r2836027 89 89 msgstr "" 90 90 91 #: templates/frontend/srinque_pay_modal_form.php:91 91 92 msgid "AuthCreditExceededError" 92 93 msgstr "" -
sprinque/tags/1.1.9/languages/sprinque.pot
r2777074 r2836027 33 33 msgstr "" 34 34 35 #: templates/frontend/srinque_pay_modal_form.php:91 36 msgid "AuthCreditExceededError" 37 msgstr "" 38 35 39 #: sprinque.php:392 sprinque.php:418 36 40 msgid "Awaiting Review" -
sprinque/tags/1.1.9/readme.txt
r2828803 r2836027 6 6 Tested up to: 6.0 7 7 Requires PHP: 5.3 8 Stable tag: 1.1. 88 Stable tag: 1.1.9 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 = 1.1.8 - November 15, 2022 = 53 = 1.1.9 - December 14, 2022 = 54 * Prevent multiple auth calls 55 * Limit height of the search results 56 * Translated auth credit exceeded error 57 * Enable as payment option for Germany 58 * Failed order status when buyer is rejected 59 * Add PHP 8.1.12 support 60 61 = 1.1.8 - December 5, 2022 = 54 62 * Fixed session cache usage 55 63 * Manage payment option name from admin 56 64 * Added buyer's phone 57 65 * Added tracking code (fullstory.com) 66 * Order cancellation 58 67 59 68 = 1.1.7 - November 10, 2022 = -
sprinque/tags/1.1.9/sprinque.php
r2828803 r2836027 5 5 Description: Sprinque for WordPress is a plugin that allows you to offer your business buyers net payment terms (15, 30, 60, 90 days) and thereby grow conversion and retention. 6 6 Author: Sprinque 7 Version: 1.1. 87 Version: 1.1.9 8 8 Text Domain: sprinque 9 9 Domain Path: /languages … … 196 196 $country = WC()->customer->get_billing_country(); 197 197 198 if ( $country != 'NL' && $country != 'BE' ) {198 if ( $country != 'NL' && $country != 'BE' && $country != 'DE') { 199 199 if (isset( $gateways['wpm_srinque_pay'])) { 200 200 unset( $gateways['wpm_srinque_pay'] ); … … 402 402 // Change order Status 403 403 foreach ( $orders as $order ) { 404 if ( $webhook['credit_qualification']['credit_decision'] == 'APPROVED' ) {404 if ( $webhook['credit_qualification']['credit_decision'] == 'APPROVED' OR $webhook['credit_qualification']['credit_decision'] == 'REJECTED' ) { 405 405 $order = wc_get_order( $order->ID ); 406 406 $order_id_from_sequential_plugin = $order->get_order_number(); … … 423 423 424 424 // Save API Result to Order 425 if ($webhook['credit_qualification']['credit_decision'] == 'APPROVED') { 426 $status = 'processing'; 427 } 428 elseif ($webhook['credit_qualification']['credit_decision'] == 'REJECTED') { 429 $status = 'failed'; 430 $order = new WC_Order( $order->ID ); 431 $order->update_status($status); 432 $order->save(); 433 } 434 425 435 if (isset($result['transaction_id'])) { 426 436 update_post_meta( $order->ID, 'transaction_id', $result['transaction_id'] ); 427 437 update_post_meta( $order->ID, 'merchant_order_id', $order->ID ); 428 438 $order = new WC_Order( $order->ID ); 429 $order->update_status( 'processing');439 $order->update_status($status); 430 440 $order->save(); 431 441 } … … 457 467 ]; 458 468 459 if($data != '' && $data != NULL ) {469 if($data != '' && $data != NULL && $method == 'POST') { 460 470 $post_data['body'] = json_encode( $data ); 461 471 } -
sprinque/tags/1.1.9/templates/frontend/srinque_pay_modal_form.php
r2808913 r2836027 95 95 <div class="cant-complete-autorization" style="display: none;"> 96 96 <div class="verify-error"></div> 97 <div class="verify-local-error"><?php _e( "AuthCreditExceededError", 'sprinque' ); ?></div> 97 98 <div class="pagination-btns"> 98 99 <button type="button" class="wpm-btn wpm-btn_outline-primary white_btn_pay to_select_companies"><?php _e( "Go Back", 'sprinque' ); ?></button> -
sprinque/trunk/assets/css/frontend.css
r2777074 r2836027 579 579 border: 1px solid #d9dbf2; 580 580 box-shadow: rgba(217, 219, 242, 0.5) 0px 4px 8px; 581 max-height: 220px; 582 overflow-y: scroll; 581 583 } 582 584 .search-company-result_loaded:not(.search-company-result_selected) { … … 591 593 background: #fff; 592 594 border: 1px solid #d9dbf2; 593 box-shadow: rgba(217, 219, 242, 0.5) 0px 4px 8px; 595 box-shadow: rgba(217, 219, 242, 0.5) 0 4px 8px; 596 max-height: 200px; 597 overflow-y: scroll; 594 598 } 595 599 .company-not-found { … … 702 706 } 703 707 708 .verify-local-error { 709 color: red; 710 } 711 704 712 #cancel-order-sprinque { 705 713 margin-bottom: 30px; -
sprinque/trunk/assets/css/frontend.scss
r2765613 r2836027 9 9 // color: blue; 10 10 11 }12 .founded-companies {13 11 } 14 12 .founded-companies .company-item { -
sprinque/trunk/assets/js/frontend.js
r2828803 r2836027 119 119 $(inputs).on({ 120 120 paste: function(e) { 121 console.log('paste1');122 121 var pastedData = e.originalEvent.clipboardData.getData('text'); 123 122 var pastedChars = pastedData.split(""); … … 406 405 } else { 407 406 showTab('.verifying_your_account'); 408 aut orize_company_payment();407 authorize_company_payment(); 409 408 } 410 409 } else { … … 437 436 if(response.status === 'true') { 438 437 showTab('.verifying_your_account'); 439 aut orize_company_payment();438 authorize_company_payment(); 440 439 } else { 441 440 $('.otp-error-code').show(); … … 522 521 } else { 523 522 showTab('.verifying_your_account'); 524 aut orize_company_payment();523 authorize_company_payment(); 525 524 } 526 525 } else { … … 534 533 }); 535 534 536 function aut orize_company_payment()535 function authorize_company_payment() 537 536 { 538 537 var address_line1 = $('#billing_address_1').val(); … … 576 575 $('.cant-complete-autorization').show(); 577 576 $('.verifying_your_account .wpm-loader_my1').hide(); 578 $('.verify-error').html(response.message); 577 578 if(response.result.error_code === 'auth-credit-exceeded') { 579 $('.verify-local-error').show(); 580 } else { 581 $('.verify-error').html(response.message); 582 } 579 583 } 580 584 } -
sprinque/trunk/include/helper_functions.php
r2765613 r2836027 75 75 'GA' => 'Gabon', 76 76 'GM' => 'Gambia', 77 'GE' => 'Georgia', 78 'DE' => 'Germany', 77 'GE' => 'Georgia',*/ 78 'DE' => 'Germany',/* 79 79 'GH' => 'Ghana', 80 80 'GI' => 'Gibraltar', -
sprinque/trunk/include/payment_method.php
r2828803 r2836027 486 486 } 487 487 488 $ response = wp_remote_post( $api_url . $route,[488 $args = [ 489 489 'method' => $method, 490 490 "timeout" => 100, … … 493 493 "Accept" => "application/json", 494 494 "X-API-KEY-ID" => $this->api_key 495 ], 496 'body' => json_encode( $data ), 497 ] ); 495 ] 496 ]; 497 498 if($method == 'POST') { 499 $args['body'] = json_encode( $data ); 500 } 501 502 $response = wp_remote_post( $api_url . $route, $args); 498 503 499 504 return json_decode( $response['body'], true ); -
sprinque/trunk/languages/sprinque-de_DE.po
r2828803 r2836027 24 24 msgstr "API-Schlüssel" 25 25 26 # When the order amount is larger than the available credit limit26 #: templates/frontend/srinque_pay_modal_form.php:91 27 27 msgid "AuthCreditExceededError" 28 28 msgstr "Die Autorisierungsanfrage überschreitet das verfügbare Kreditlimit" -
sprinque/trunk/languages/sprinque-en_US.po
r2828803 r2836027 32 32 msgstr "API Key" 33 33 34 # When the order amount is larger than the available credit limit34 #: templates/frontend/srinque_pay_modal_form.php:91 35 35 msgid "AuthCreditExceededError" 36 36 msgstr "Authorization request exceeds the available credit limit" -
sprinque/trunk/languages/sprinque-nl_NL.po
r2828803 r2836027 24 24 msgstr "API-Sleutel" 25 25 26 # When the order amount is larger than the available credit limit26 #: templates/frontend/srinque_pay_modal_form.php:91 27 27 msgid "AuthCreditExceededError" 28 28 msgstr "Autorisatieverzoek overschrijdt de beschikbare kredietlimiet" -
sprinque/trunk/languages/sprinque.po
r2828803 r2836027 89 89 msgstr "" 90 90 91 #: templates/frontend/srinque_pay_modal_form.php:91 91 92 msgid "AuthCreditExceededError" 92 93 msgstr "" -
sprinque/trunk/languages/sprinque.pot
r2777074 r2836027 33 33 msgstr "" 34 34 35 #: templates/frontend/srinque_pay_modal_form.php:91 36 msgid "AuthCreditExceededError" 37 msgstr "" 38 35 39 #: sprinque.php:392 sprinque.php:418 36 40 msgid "Awaiting Review" -
sprinque/trunk/readme.txt
r2828803 r2836027 6 6 Tested up to: 6.0 7 7 Requires PHP: 5.3 8 Stable tag: 1.1. 88 Stable tag: 1.1.9 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 = 1.1.8 - November 15, 2022 = 53 = 1.1.9 - December 14, 2022 = 54 * Prevent multiple auth calls 55 * Limit height of the search results 56 * Translated auth credit exceeded error 57 * Enable as payment option for Germany 58 * Failed order status when buyer is rejected 59 * Add PHP 8.1.12 support 60 61 = 1.1.8 - December 5, 2022 = 54 62 * Fixed session cache usage 55 63 * Manage payment option name from admin 56 64 * Added buyer's phone 57 65 * Added tracking code (fullstory.com) 66 * Order cancellation 58 67 59 68 = 1.1.7 - November 10, 2022 = -
sprinque/trunk/sprinque.php
r2828803 r2836027 5 5 Description: Sprinque for WordPress is a plugin that allows you to offer your business buyers net payment terms (15, 30, 60, 90 days) and thereby grow conversion and retention. 6 6 Author: Sprinque 7 Version: 1.1. 87 Version: 1.1.9 8 8 Text Domain: sprinque 9 9 Domain Path: /languages … … 196 196 $country = WC()->customer->get_billing_country(); 197 197 198 if ( $country != 'NL' && $country != 'BE' ) {198 if ( $country != 'NL' && $country != 'BE' && $country != 'DE') { 199 199 if (isset( $gateways['wpm_srinque_pay'])) { 200 200 unset( $gateways['wpm_srinque_pay'] ); … … 402 402 // Change order Status 403 403 foreach ( $orders as $order ) { 404 if ( $webhook['credit_qualification']['credit_decision'] == 'APPROVED' ) {404 if ( $webhook['credit_qualification']['credit_decision'] == 'APPROVED' OR $webhook['credit_qualification']['credit_decision'] == 'REJECTED' ) { 405 405 $order = wc_get_order( $order->ID ); 406 406 $order_id_from_sequential_plugin = $order->get_order_number(); … … 423 423 424 424 // Save API Result to Order 425 if ($webhook['credit_qualification']['credit_decision'] == 'APPROVED') { 426 $status = 'processing'; 427 } 428 elseif ($webhook['credit_qualification']['credit_decision'] == 'REJECTED') { 429 $status = 'failed'; 430 $order = new WC_Order( $order->ID ); 431 $order->update_status($status); 432 $order->save(); 433 } 434 425 435 if (isset($result['transaction_id'])) { 426 436 update_post_meta( $order->ID, 'transaction_id', $result['transaction_id'] ); 427 437 update_post_meta( $order->ID, 'merchant_order_id', $order->ID ); 428 438 $order = new WC_Order( $order->ID ); 429 $order->update_status( 'processing');439 $order->update_status($status); 430 440 $order->save(); 431 441 } … … 457 467 ]; 458 468 459 if($data != '' && $data != NULL ) {469 if($data != '' && $data != NULL && $method == 'POST') { 460 470 $post_data['body'] = json_encode( $data ); 461 471 } -
sprinque/trunk/templates/frontend/srinque_pay_modal_form.php
r2808913 r2836027 95 95 <div class="cant-complete-autorization" style="display: none;"> 96 96 <div class="verify-error"></div> 97 <div class="verify-local-error"><?php _e( "AuthCreditExceededError", 'sprinque' ); ?></div> 97 98 <div class="pagination-btns"> 98 99 <button type="button" class="wpm-btn wpm-btn_outline-primary white_btn_pay to_select_companies"><?php _e( "Go Back", 'sprinque' ); ?></button>
Note: See TracChangeset
for help on using the changeset viewer.