File tree Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Original file line number Diff line number Diff line change 33 var form = $ ( '#billing-payment-block' ) . closest ( 'form' ) ;
44 var qfKey = $ ( '[name=qfKey]' , form ) . val ( ) ;
55
6- /**
7- * Get the total amount on the form
8- * @returns {number }
9- */
10- function getTotalAmount ( ) {
11- var totalFee = 0.0 ;
12- if ( typeof CRM . payment . getTotalAmount !== 'undefined' ) {
13- return CRM . payment . getTotalAmount ( ) ;
14- }
15-
16- if ( typeof calculateTotalFee == 'function' ) {
17- // This is ONLY triggered in the following circumstances on a CiviCRM contribution page:
18- // - With a priceset that allows a 0 amount to be selected.
19- // - When we are the ONLY payment processor configured on the page.
20- totalFee = parseFloat ( calculateTotalFee ( ) ) ;
21- }
22- else if ( document . getElementById ( 'total_amount' ) ) {
23- // The input#total_amount field exists on backend contribution forms
24- totalFee = parseFloat ( document . getElementById ( 'total_amount' ) . value ) ;
25- }
26- return totalFee ;
27- }
28-
296 function renderPaypal ( ) {
307 paypal . Buttons ( {
318
5330
5431 var frequencyInterval = $ ( '#frequency_interval' ) . val ( ) || 1 ;
5532 var frequencyUnit = $ ( '#frequency_unit' ) . val ( ) ? $ ( '#frequency_interval' ) . val ( ) : CRM . vars . omnipay . frequency_unit ;
56- var paymentAmount = getTotalAmount ( ) ;
33+ var paymentAmount = calculateTotalFee ( ) ;
5734 var isRecur = $ ( '#is_recur' ) . is ( ":checked" ) ;
5835 var recurText = isRecur ? ' recurring' : '' ;
5936
You can’t perform that action at this time.
0 commit comments