We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29059
    • 88 Posts
    hello.

    Bob's Guides has a page showing how to use a MODx Revolution Snippet called ThermX, which creates a fundraising thermometer for placement on a web page...
    @ https://bobsguides.com/thermx-tutorial.html

    i've found many html5/css/js/jquery progress bars of all shapes & sizes, but the one thing lacking in all of these is an automated integration with Paypal. all of them that i've found, including this one Bob recommends, requires you to manually update the amount or percentage number in the code for the progress bar meter thermometer thing to show its representation.

    i have seen a few plugins specific to Wordpress that "might" do this, but i did not spend time investigating since, well, we don't use WP! (duh) ;-)

    i have been doing this manual method for over a year now and it's become very tiresome. i've been using the Easy-Pie-Chart Jquery plugin @ https://github.com/rendro/easy-pie-chart
    (i'm not stuck in to using this particular one, am open to others if better)

    for reference, am using it on this page @ http://sanctuaryinternational.com/test-giving
    note: i changed the url since original post, taking out my progress pie. use this test-giving page to see original & what i'd like to go back to (barring a better method).

    OKAY, Now... in case anyone (Bob? Others?) wouldn't mind donating a bit of their own time & expertise here, we/i would REALLY appreciate it. i'm proficient in HTML & CSS but can only do minor customizations to Javascript, Jquery, & PHP.

    i have strolled thru the Paypal API documentation and it's just way over my head; i couldn't figure it out at all.

    WHAT WE NEED is...
    ...a way to read back from our Paypal account, all the income amounts for the current month.
    ...this meter should reset on the first of each month.
    ...IF we continue to use the above mentioned Easy-Pie-Chart then the amounts need to be converted into percentages towards the monthly goal.
    ...i imagine there should be a way in the code to stipulate the monthly goal amount, then the system would fetch the current income total from Paypal & either show the amount towards goal or the percentage towards goal.

    possible hitches...
    ...it seems to me that this should NOT fetch the current balance in Paypal, because the money in Paypal is routinely transferred to a bank account; sometimes weekly, sometimes daily, depending on needs. so it would somehow have to know how much money has been donated during that month, whether or not it is still in Paypal.
    ...also, there are 2 types of donations: a "One-Time Donation" and an "Auto-Monthly Donation". so it seems to me that this code cannot simply count on the form submissions on the webpage, since the Paypal Subscriptions that occur automatically outside of this webpage (directly within Paypal) need to also be counted towards the monthly goal.

    does that all make sense?

    if this is just too big of a coding job to do without compensation, please let me know how much you might charge us to write it for us & we'll just have to see.

    THANKS for your time,
    -jason. [ed. note: syberknight last edited this post 8 years, 11 months ago.]
      • 3749
      • 24,544 Posts
      I know just enough about PayPal to create a donation button. wink

      If you have code that gets a response from PayPal, you could increment an amount in a TV (clearing it at the beginning of each month) and then feed the new total to ThermX by putting a tag for the TV in the ThermX tag.

      It's probably not much help, but it's all I've got.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 29059
        • 88 Posts
        @BobRay
        thanks for your reply, but yeah, i'm needing further help on this. so hoping somebody out there knows how to do what i'm needing & may be willing to help. THANKS!
          • 3749
          • 24,544 Posts
          Do you have a snippet that handles the PayPal transactions? If so, can you post it here (minus any security keys or tokens)?
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 29059
            • 88 Posts
            no, i don't.
            like you, i know just enough to create the buttons/forms too. i have searched'n'searched Google, StackExchange, Github, & these forums but can't seem to find any open source scripts that use the Paypal API IPN. i'm at a loss & am thinking it may just be too complex.
              • 3749
              • 24,544 Posts
              Without handling the PayPal transactions yourself, I don't think there will be any way to create your progress bar. And, yes, it's not simple at all and I didn't find the documentation very useful. I gave up on setting up continuing donations on my site. I'm sure I could have done it, but it just wasn't worth the hassle.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 53161
                • 130 Posts
                Quote from: syberknight at Oct 22, 2017, 04:23 PM
                @BobRay
                thanks for your reply, but yeah, i'm needing further help on this. so hoping somebody out there knows how to do what i'm needing & may be willing to help. THANKS!

                Why dont you log the amount for the month in the DB and then reset at the begining of each month? Kinda of like a PayPal meter but not really?
                  • 29059
                  • 88 Posts
                  Quote from: stefany at Oct 26, 2017, 12:27 PM

                  Why dont you log the amount for the month in the DB and then reset at the begining of each month? Kinda of like a PayPal meter but not really?

                  hi Stefany,

                  apologies for the delay. and thank you for your input.

                  my response is... how? smiley

                  also, if we do it this way, how would the meter know when the Paypal account receives subscription payments or email payments etc, outside of going thru my buttons on the website?