PageSourceSearch

https://adamscenter.org/wp-content/plugins/bga-pay/assets/js/payme…?v=2026-10-02+16%3A10%3A49

js adamscenter.org collected 2026-10-02 17:10:56 UTC 3,971 bytes, 88 lines download raw bytes

1
2function openPopupForApplePay() {
3    document.getElementById("paymentPopup").style.display = "block";
4}
5
6function closePopupForApplePay() {
7    document.getElementById("paymentPopup").style.display = "none";
8}
9
10function appleDisplayErrorPopup(heading, content) {
11    document.getElementById("suc_heading").style.color = "red";
12    document.getElementById("suc_heading").innerHTML = heading;
13    document.getElementById("suc_content").innerHTML = content;
14    openPopupForApplePay();
15}
16function secondApplePayDataSalesforcev1(token, totalAmountHiddens, surchargeHiddens) {
17    // const amountValue = document.getElementById('bga3-amount').value;
18    // const amount = parseInt(amountValue);
19    // if (isNaN(amount) || amount <= 0) return;
20
21    // const recurringValue = document.getElementById('bga3-recurring')?.value || 'one-time';
22
23    // const amount = parseFloat(amountValue);
24    // if (isNaN(amount) || amount <= 0) return;
25  
26
27    const donationFrequency = 'one-time';
28
29    const additionalData = {
30        token: token,
31        amount:parseFloat(totalAmountHiddens),
32        donationType: document.getElementById("parent-campaign-select").value,
33        donationTo: document.getElementById("child-campaign-select").value,
34        conFirstName: document.getElementById('bga3-firstName').value.trim(),
35        conLastName: document.getElementById('bga3-lastName').value.trim(),
36        streetAddress: null,
37        city: null,
38        state: null,
39        zipCode: null,
40        phone: null,
41        conEmail: document.getElementById('bga3-Email').value.trim(),
42        NoofGifts: donationFrequency,
43        frequency: 'Single',
44        comment: null,
45        donationSource: "via Website",
46        Form_title: 'test',
47        transactionFee: parseFloat(surchargeHiddens),
48        Form_id: '12',
49        payment_type: 'Apple Pay',
50    };
51
52    console.log('additionalDatacheck', additionalData)
53    document.getElementById('spinner-overlay').style.display = "block";
54    jQuery.ajax({
55        url: salesforce_params.ajax_url + '?action=makePaymentWithApplePays',
56        type: 'POST',
57        data: JSON.stringify(additionalData),
58        contentType: 'application/json; charset=utf-8',
59        success: function (response) {
60            console.log('Response:', response);
61            document.getElementById('spinner-overlay').style.display = "none";
62            try {
63                const data = typeof response === 'string' ? JSON.parse(response) : response.data;
64                if (data.message === 'Donation is Created') {
65                    setTimeout(() => window.location.href = "donation-complete", 5000);
66                    openPopupForApplePay();
67                    document.getElementById("suc_heading").style.color = "green";
68                    document.getElementById("suc_heading").innerHTML = "Donation Successful";
69                    document.getElementById("suc_content").innerHTML = "Your donation has been successfully processed. Thank you for supporting us.";
70                } else {
71                    // displayErrorPopup("Error Encountered!", "Sorry, an error occurred and your payment could not be processed. Please check your details and try again. Thank you.");
72                    console.error('Payment not processed:', data);
73                    alert('Payment not processed:', data);
74                }
75            } catch (e) {
76                // displayErrorPopup("Response Error", "The payment gateway returned an invalid response.");
77                console.error('Parsing error:', e);
78            }
79        },
80        error: function (xhr, status, error) {
81            // document.getElementById('spinner-overlay').style.display = "none";
82            // displayErrorPopup("Network Error", "Something went wrong with the request. Please try again.");
83            // console.error('AJAX error:', status, error);
84        }
85
86    });
87
88}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.