diff --git a/DCO b/DCO new file mode 100644 index 00000000000..d54f007a8c5 --- /dev/null +++ b/DCO @@ -0,0 +1,34 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2002 - Today, The Dolibarr team and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 85ad11bb74b..16cea8746c3 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -914,13 +914,9 @@ if ($source == 'order') { if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $order->total_ttc; -<<<<<<< HEAD - if (GETPOST("amount", 'int')) { - $amount = GETPOST("amount", 'int'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); } -======= - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git $amount = price2num($amount); } @@ -969,14 +965,8 @@ if ($source == 'order') { print ' ('.$langs->trans("ToComplete").')'; } print ''; -<<<<<<< HEAD if (empty($amount) || !is_numeric($amount)) { - print ''; -======= - if (empty($amount) || !is_numeric($amount)) - { print ''; ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git print ''; } else { print ''.price($amount).''; @@ -1048,13 +1038,9 @@ if ($source == 'invoice') { if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = price2num($invoice->total_ttc - ($invoice->getSommePaiement() + $invoice->getSumCreditNotesUsed() + $invoice->getSumDepositsUsed())); -<<<<<<< HEAD - if (GETPOST("amount", 'int')) { - $amount = GETPOST("amount", 'int'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); } -======= - if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'alpha'); ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git $amount = price2num($amount); } @@ -1106,14 +1092,8 @@ if ($source == 'invoice') { if ($object->type == $object::TYPE_CREDIT_NOTE) { print ''.$langs->trans("CreditNote").''; } elseif (empty($object->paye)) { -<<<<<<< HEAD if (empty($amount) || !is_numeric($amount)) { - print ''; -======= - if (empty($amount) || !is_numeric($amount)) - { print ''; ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git print ''; } else { print ''.price($amount).''; @@ -1224,13 +1204,9 @@ if ($source == 'contractline') { } } -<<<<<<< HEAD - if (GETPOST("amount", 'int')) { - $amount = GETPOST("amount", 'int'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); } -======= - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git $amount = price2num($amount); } @@ -1320,14 +1296,8 @@ if ($source == 'contractline') { print ' ('.$langs->trans("ToComplete").')'; } print ''; -<<<<<<< HEAD if (empty($amount) || !is_numeric($amount)) { - print ''; -======= - if (empty($amount) || !is_numeric($amount)) - { print ''; ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git print ''; } else { print ''.price($amount).''; @@ -1400,15 +1370,10 @@ if ($source == 'membersubscription') { if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $subscription->total_ttc; -<<<<<<< HEAD - if (GETPOST("amount", 'int')) { - $amount = GETPOST("amount", 'int'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); } - $amount = price2num($amount); -======= - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); $amount = price2num($amount, 'MT'); ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git } if (GETPOST('fulltag', 'alpha')) { @@ -1505,14 +1470,9 @@ if ($source == 'membersubscription') { } if (empty($amount) || !is_numeric($amount)) { //$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); -<<<<<<< HEAD if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); } - print ''; - print ''; -======= - if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); print ''; if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { print ''; @@ -1520,15 +1480,11 @@ if ($source == 'membersubscription') { } else { print ''; } ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git } else { $valtoshow = $amount; if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); -<<<<<<< HEAD -======= $amount = $valtoshow; ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git } print ''.price($valtoshow).''; print ''; @@ -1598,13 +1554,9 @@ if ($source == 'donation') { if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $subscription->total_ttc; -<<<<<<< HEAD - if (GETPOST("amount", 'int')) { - $amount = GETPOST("amount", 'int'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); } -======= - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git $amount = price2num($amount); } @@ -1678,24 +1630,16 @@ if ($source == 'donation') { } if (empty($amount) || !is_numeric($amount)) { //$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); -<<<<<<< HEAD if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); } - print ''; -======= - if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); print ''; ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git print ''; } else { $valtoshow = $amount; if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); -<<<<<<< HEAD -======= $amount = $valtoshow; ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git } print ''.price($valtoshow).''; print ''; @@ -2181,7 +2125,6 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme console.log("We click on buttontopay"); event.preventDefault(); -<<<<<<< HEAD if (cardholderName.value == '') { console.log("Field Card holder is empty"); @@ -2190,6 +2133,10 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme } else { + /* Disable button to pay and show hourglass cursor */ + jQuery('#hourglasstopay').show(); + jQuery('#buttontopay').hide(); + stripe.handleCardPayment( clientSecret, cardElement, { payment_method_data: { @@ -2240,59 +2187,6 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme }); } }); -======= - if (cardholderName.value == '') - { - console.log("Field Card holder is empty"); - var displayError = document.getElementById('card-errors'); - displayError.textContent = 'trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CardOwner"))); ?>'; - } - else - { - /* Disable button to pay and show hourglass cursor */ - jQuery('#hourglasstopay').show(); - jQuery('#buttontopay').hide(); - - stripe.handleCardPayment( - clientSecret, cardElement, { - payment_method_data: { - billing_details: { - name: cardholderName.value - thirdparty) && !empty($object->thirdparty->email))) { ?>, email: 'thirdparty->email); ?>' - thirdparty) && !empty($object->thirdparty->phone)) { ?>, phone: 'thirdparty->phone); ?>' - thirdparty)) { ?>, address: { - city: 'thirdparty->town); ?>', - thirdparty->country_code) { ?>country: 'thirdparty->country_code); ?>', - line1: 'thirdparty->address)); ?>', - postal_code: 'thirdparty->zip); ?>' - } - - } - }, - save_payment_method: /* true when a customer was provided when creating payment intent. true ask to save the card */ - } - ).then(function(result) { - console.log(result); - if (result.error) { - console.log("Error on result of handleCardPayment"); - jQuery('#buttontopay').show(); - jQuery('#hourglasstopay').hide(); - // Inform the user if there was an error - var errorElement = document.getElementById('card-errors'); - errorElement.textContent = result.error.message; - } else { - // The payment has succeeded. Display a success message. - console.log("No error on result of handleCardPayment, so we submit the form"); - // Submit the form - jQuery('#buttontopay').hide(); - jQuery('#hourglasstopay').show(); - // Send form (action=charge that will do nothing) - jQuery('#payment-form').submit(); - } - }); - } - }); ->>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git