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.
Installation
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.
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&add=1&bid={$paidAttachment['bid']}" class="bankpipe-item button fastCheckout" data-action="add" data-bid="{$paidAttachment['bid']}">
Fast checkout
</a>
Configuration
In order to accept payments you must set up gateway-specific applications.
PayPal
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.
Go to
the applications panel and scroll down to REST APIs. Click on
Create app and fill the required fields.
You will be presented a page similar to the following:
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
Replace YOURBOARDURL with your board's base URL, including subfolders.
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.
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.
Congrats! You're ready to receive PayPal payments!
Coinbase
Go to
Coinbase Commerce and log in. Create an account if you don't have one yet.
Go to
the settings panel and scroll down to API keys. Click on
Create an API key.
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
Replace YOURBOARDURL with your board's base URL, including subfolders.
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.*
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
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:
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.
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.