Click anywhere to close this dialog

Farewell

Great is the art of beginning, but greater is the art of ending
Henry Wadsworth Longfellow

I announce that I cease all development and activity in the programming universe indefinitely. My career has reached the turning point I was not expecting for at least another year, leaving me highly off guard and without laid-out plans for this hobby's continuity. I have begun a 5-year residency program in Neurosurgery which is clearly not compatible, time-wise, with programming.

I gave in all my passion for developing, and you gave me back your loyalty and trust, even when I did not deserve that much. Now it is the time for payback. I release all my present and past work as Open Source software, in the hope some talented developer will continue maintaining and expanding my vision of a modern, sleek forum software. The intrinsic flexibility of MyBB is the true hidden gem of an otherwise outdated codebase; I do hope the project can continue and be updated complying to the latest coding standards.

I hereby thank Euan, kawaii, andrewjs18, Ben, Matt, Omar G., effone, Eric J., Devilshakerz, Wildcard, JordanMussi and all the other team members I have had the opportunity to work with when I was a MyBB team member. I thank Tomm M, my mentor, who inspired me to pick up coding with his piece-of-art plugins. And finally, I thank all of you MyBBoost subscribers who have helped me getting through my toughest university years economically.

Yours sincerely, Filippo

BankPipe documentation

20 Mar 2019 Edited
#1
BankPipe is a MyBB plugin which implements a seamless paid experience to deliver subscriptions and premium attachments across the whole board. This document will help you setting up the plugin. It is always tailored to the latest BankPipe version available.


BankPipe is a copyrighted product. If you did not pay for it, please report the source of illegal redistribution and purchase a legit copy of the product. Its owner and only developer partially lives off the revenue from BankPipe. Thank you.


PACKAGE Installation


KEYCAP 1 Click on the Install & activate button in your plugins list. BankPipe adds 42 templates to every theme of your board. The plugin also applies 1 core edit automatically. Ensure the core edit is in place by checking the plugin's row after the installation.

[Image: qe15izA.png]

KEYCAP 2 To add additional functionalities, alter your theme's templates as follows:
to see the user's purchases as an admin, add to member_profile:
{$memprofile['purchases']} 
to see the cart link in the header, add to header_welcomeblock_member:
{$cart
to see the subscriptions page in the header, add to header_welcomeblock_member:
<a href="bankpipe.php">Upgrade</a>
You can customize the link's appearance and content, as well as its placement: you are not bound to header_welcomeblock_member but you can put it wherever you want. Just make sure to point it to bankpipe.php.
to see the price box before uploading an attachment if using third party monetization, add to post_attachments_attachment:
{$paidOptions
to quickly jump to the Cart when adding an item, add the fastCheckout class to buttons. "Add to cart" buttons can be found in bankpipe_subscriptions_subscription and bankpipe_postbit_attachments_attachment_cart templates. You can either alter the existing buttons, or duplicate the button and create a Fast checkout button alongside the existing ones. Example of a Fast checkout button:
<a href="usercp.php?action=cart&amp;add=1&amp;bid={$paidAttachment['bid']}" class="bankpipe-item button fastCheckout" data-action="add" data-bid="{$paidAttachment['bid']}">
    Fast checkout
</a>

WRENCH Configuration


In order to accept payments you must set up gateway-specific applications.

PayPal



You need a business account to accept payments with PayPal. Guide to business accounts can be found here.


KEYCAP 1 Go to PayPal Developers and log in. If you haven't got a sandbox developer account yet and you want to use sandbox (fictional) payments, create one.

KEYCAP 2 Go to the applications panel and scroll down to REST APIs. Click on Create app and fill the required fields.

[Image: X6ZA8IX.png]

You will be presented a page similar to the following:

[Image: yDmYOWt.png]

KEYCAP 3 Scroll down and click on Add webhook. Fill in the fields with the following configuration and save:
Webhook Url: https://YOURBOARDURL/bankpipe.php?action=webhooks&gateway=PayPal
Event types: All events

WARNING SIGN Replace YOURBOARDURL with your board's base URL, including subfolders.

KEYCAP 4 Open BankPipe's module in your Admin Control Panel. Beneath PayPal's row, copy the client ID and client secret tokens into the respective fields. Add your PayPal email address where you want to receive your funds in the wallet field and save.

WARNING SIGN BankPipe can run in 2 modes: Sandbox and Live. Sandbox mode allows you to try the app with dummy accounts and payments, while Live mode collects real money from real accounts. Ensure you are using the correct tokens while using Sandbox mode and viceversa.

KEYCAP 5 Congrats! You're ready to receive PayPal payments!

Coinbase


KEYCAP 1 Go to Coinbase Commerce and log in. Create an account if you don't have one yet.

KEYCAP 2 Go to the settings panel and scroll down to API keys. Click on Create an API key.

[Image: nMoKilH.png]

KEYCAP 3 Scroll down to Webhook subscriptions. Click on Add an endpoint. Fill in the field with the following endpoint and save:
https://YOURBOARDURL/bankpipe.php?action=webhooks&gateway=Coinbase

[Image: sFIAvTm.png]

WARNING SIGN Replace YOURBOARDURL with your board's base URL, including subfolders.

WARNING SIGN Webhooks require the callback URL to be reachable. Some infrastructures such as Cloudflare or your own hosting MIGHT BLOCK Coinbase's IPs/ASN through a firewall. Ensure you whitelist Coinbase servers in order to receive notifications and let payments go through as planned.
ASN: AS397316
IPs: 54.175.255.*

KEYCAP 4 Open BankPipe's module in your Admin Control Panel, and keep Coinbase Commerce settings page at hand. Fill Coinbase's row in BankPipe's settings as follows:
BankPipe identifier: leave empty
BankPipe secret token: Coinbase shared secret. You can obtain the shared secret by clicking on Show shared secret under Webhook subscriptions
BankPipe wallet ID: Coinbase API key. You can obtain the API key by clicking on Reveal under API keys

WARNING SIGN Coinbase does not have a sandbox, so the respective option won't have any effect if enabled.

The configuration should be similar to the following:

[Image: 8qfpnTA.png]

KEYCAP 5 Congrats! You're ready to receive Coinbase payments!

Third party monetization


If you enable third party monetization, users in the "Usergroups allowed to manage" will be able to set a price for their attachments. They will be also able to specify a personal wallet where they will receive money for their attachments. Wallets format depend upon each gateway: for example, a PayPal wallet equals to a plain email address.


At present stages, users can specify a Coinbase wallet but they will NOT receive funds on them. A workaround is under active development.


WARNING SIGN If an user has permissions to create items but he has not set a wallet in his User Control Panel, the board's wallet will be used instead.

Hooks list


A complete hooks list ordered by filename is available below. It is formatted as JSON and includes: filename, name of the hook, code line and eventual arguments. You can easily integrate your plugins within BankPipe by injecting your code into these hooks.
Filename Size Downloads
5.85 KB 69
Enes Palit and Black Bird like this post