Table of Contents |
---|
About Stripe Payments
Stripe is a global payment gateway built for developers. This implementation supports 3DS (3D Secure) and SCA (Secure Customer Authentication). Learn more about Stripe on their website at https://stripe.com/
Credit Card Processing Features
Local Storage | Token Storage | Process | Refund | Void |
---|---|---|---|---|
NO | YES | YES | YES | YES |
ACH Processing Features
Local Storage | Token Storage | Process | Refund | Void |
---|---|---|---|---|
NO | YES | YES | YES | NO |
Stripe will make 2 deposits to the checking or savings account which must be confirmed within the payment account before it can be used for payment.
Installing Stripe Payments
To install the Stripe Payments gateway, visit [Settings] > [Company] > [Payment Gateways] > Available, and click the "Install" button for Stripe Payments.
A message will be displayed, indicating that the payment gateway was successfully installed.
Double check migration
After running the migration, you should return to the management page and confirm that the "Accounts Remaining" is 0. Even if you get a success message after running the migration, it only runs in batches of 15 accounts and may consider some accounts unmigratable. If the number is not 0 then you should leave the old Stripe gateway installed.
The migration section will only be shown if the old Stripe gateway is installed
Enter the details provided by Stripe.
Field Name | Description |
---|---|
API Publishable Key | Enter your API Publishable Key. This is the API Publishable Key provided by Stripe or your merchant account provider. |
API Secret Key | Enter your API Secret Key. This is the API Secret Key provided by Stripe or your merchant account provider. |
Accepted Currencies | Check the currencies that you would like to be processed through this payment gateway. The following currencies are available: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, MAD, MDL, MGA, MKD, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SVC, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYI, UZS, VEF, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW |
When finished, click "Update Settings" to save the details. You have successfully installed and configured Stripe!
A guide for testing can be found here https://stripe.com/docs/testing
Configuring a Webhook
You should create a webhook for payment_intent events within your Stripe account. The webhook URL is shown in Blesta when managing the Stripe Payments gateway.
Aug 14, 2024: This link may help with configuring the webhook if you are logged into your account: https://dashboard.stripe.com/workbench/webhooks/create?events=payment_intent.amount_capturable_updated%2Cpayment_intent.canceled%2Cpayment_intent.created%2Cpayment_intent.partially_funded%2Cpayment_intent.payment_failed%2Cpayment_intent.processing%2Cpayment_intent.requires_action%2Cpayment_intent.succeeded
This is set in Stripe, typically under Developers > Webhooks.
Common Problems
- The Credit Card field does not appear when attempting to make a payment.
- Make sure you are accessing your Blesta installation over HTTPS and you have a valid SSL certificate.
- Make sure your server/browser can negotiate TLS 1.2
- Credit Card emails (e.g. Payment Approved (Credit Card)) may have missing content when payment is made without saving the details as a payment method. To help with this, replace "{card_type}" with "{card_type | set_default "credit card"}"and replace ", ending in {last_four}" with "{% if last_four %}, ending in {last_four}{% endif %}"
- Some users have reported transaction amounts not being recorded in Blesta correctly. For example, a payment of 5.49 might be recorded as 5.00, and Tools > Logs: Transaction log shows that it was changed from 5.49 to 5.00. This is reported to occur when enabling unnecessary events in your Stripe webhook. Make sure only payment_intent events are associated with your webhook.
- I'm running Blesta version 5.8.2 or older and transactions are not recorded in Blesta or the transaction number is missing
- Make sure you created a webhook
Update /components/gateways/merchant/stripe_payments/stripe_payments.php and replace the loadApi() method with the following:
/** * Loads the API if not already loaded */ private function loadApi() { Loader::load(dirname(__FILE__) . DS . 'vendor' . DS . 'stripe' . DS . 'stripe-php' . DS . 'init.php'); Stripe\Stripe::setApiKey((isset($this->meta['secret_key']) ? $this->meta['secret_key'] : null)); // Include identifying information about this being a gateway for Blesta Stripe\Stripe::setAppInfo('Blesta ' . $this->getName(), $this->getVersion(), 'https://blesta.com'); // Set API version Stripe\Stripe::setApiVersion('2022-08-01'); }