Yes. blackthorn | payments has both Apex and REST APIs.
REST API: Provides you an HTTP endpoint. Send your data (which can be CC tokens obtained from Stripe, Transaction data, etc.) and receive a JSON response. The objects are recorded in Salesforce, and it's your responsibility to process and handle the results on the client side. You can use the REST API in any environment where you can make HTTP calls (website, mobile app, outer space).
Apex API: A global Apex class, which you can access in your org or a Community. You can initialize blackthorn | payments entities (like Stripe Customer, Payment Methods and Transactions) and do actions (like send data to Stripe, update, capture, authorize, delete, etc). You can integrate these actions into your custom Apex code, and it is you responsibility to handle the customer data.
- Apex API: Visualforce website form
- Apex API: Salesforce Community
- Apex API: Your Salesforce internal app.
- REST API: Non-Visualforce website form
- REST API: Non-Salesforce custom portal
- REST API: Mobile (Native or Hybrid) Application
- Payment form. Create and validate a payment method (credit/debit/ACH), create and capture (charge) for a transaction, display success and failure messages to the user.
- Payment method management from a Community or custom portal. Display 'cards on file' (or ACH accounts), allow users to create new cards, update cards, and delete cards.
- Historical and future transactions. Display all prior or future scheduled transactions related to the user.
- Portal or Community. Because you already know who the authenticated user is (or even from a single payment or donation form), you can create (or update) an Account and/or Contact, create or update an Opportunity, and manage the payment process.
Apex API: The class returns the credit card status after committing it to Stripe. Data is pushed to the Apex back-end, which returns the result in the back-end, then you display it to the user.
Yes! See https://stripe.com/docs/testing. Make sure you have your Payment Gateway connected in Test Mode. You can do this by creating a Payment Gateway, checking the Test Mode checkbox, then click Connect to Stripe. Once you authenticate, your Payment Gateway will accept test cards (and only test cards).
The Connect to Stripe button utilizes OAuth to connect Salesforce with your Stripe account. After the authentication, Heroku helps us to redirect back to Salesforce, even when wildcard domains (custom domains) are enabled in customer orgs.
You'll likely run into issues with unit tests. We're working on a more comprehensive method to solution this, but for now, please use:
bt_stripeStripe_Settingsc settings = bt_stripeStripe_Settingsc.getOrgDefaults();
settings.bt_stripeDisable_All_Triggersc = true;
This will stop any callouts being made on payment method insertion and your unit tests will go through.