Support » Plugin: Give - Donation Plugin and Fundraising Platform » Copy of Offline Donation for Bitcoin donatiosn

  • Resolved lorixon

    (@lorixon)


    Hello there!

    TL;DR: I kindly ask for a code snippet to recreate another offline donation gateway with separate instructions and a separate label.

    First of all, thank you for this amazing plugin.

    I have just one query which pretty certainly is a lot easier for you to solve than me learning how to register a new payment gateway.

    Basically, I need a copy of the offline donation with exactly the same settings and all, just with modified instructions. In the instructions we will display a QR code in order to donate and tell the people to send us the transaction id.

    Do you think you could provide me with a relevant snippet?

    Thanks in advance!
    Pascal

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ben Meredith

    (@benmeredithgmailcom)

    Hi Pascal,

    Thanks for the kind words about our plugin.

    By far the fastest way to get where you are trying to go will be to register a new payment gateway. While we don’t have a tutorial for doing exactly that, our friend Chris Flannagan has written a tutorial that will get you started there: https://whoischris.com/building-payment-gateway-give-wp-donation-plugin-wordpress/

    Also, you can literally copy the offline-donations.php file from give/includes/gateways into a new functionality plugin, and search/replace the string “offline” for “offline2” and that will copy the offline gateway.

    We’re not able to help with that level of custom functionality but would love to see the end result once you get everything working!

    lorixon

    (@lorixon)

    Hi Ben,

    thanks for the reply.

    Unfortunately, I was not able to create a properly working payment gateway. I read the article you supplied me with and tried getting things set up, but I utterly failed.

    I know how to register a plugin, I did that. I came as far as having the new payment gateway appear in the activation and ordering setting. But no settings window was generated, nor was the information editable per form, nor did the payment gateway fetch the instructions set by default correctly.

    After digging into your files a bit more I found out that adding a new payment gateway consists of way more steps than only copying one file. Among others, one has to copy files re email sending, add the settings pane in another file for making the payment gateway accessible (which would mean the settings pane is lost because one has to edit the actual file if they do not know how to hook into this particular setting) and so on. Way more difficult than I thought.

    All in all, I have failed.
    But I thank you for your help. Not sure how I am going to get out of this, but I will see what I can do.

    • This reply was modified 2 months ago by  lorixon.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.