8.x-1.x
This module provides the Stripe PHP library as a service. It provides:
- API key storage via Key.
- A "@stripe_api.stripe_api" service that can be injected into your PHP classes
Once you've enabled the module and set your API keys, you are free to use the Stripe API library in your custom module. Simply injecting the "@stripe_api.stripe_api" into your class is sufficient to open a connection. For example:
use Drupal\stripe_api\StripeApiService;
use Stripe\Subscription;
class MySpecialClass {
public function __construct(StripeApiService $stripe_api) {
$this->stripeApi = $stripe_api;
}
public function loadSubscriptionsMultiple($args = []) {
$subscriptions = Subscription::all($args);
if (!count($subscriptions->data)) {
return FALSE;
}
return $subscriptions;
}
}
Requirements
In order to use this module, you must manage your Drupal site dependencies using Composer. See Using Composer to manage Drupal site dependencies for instructions.
Related Modules
7.x-1.x
This module provides a simple abstraction of the Stripe PHP SDK. It does not (and will not) provide any additional functionality. This module is designed to be required by other contrib/custom modules.
See project README.md for more information.
🇺🇦 |
This module is maintained by Ukrainian developers. Please consider supporting Ukraine in a fight for their freedom and safety of Europe. |
Project information
- Seeking new maintainer
The current maintainers are looking for new people to take ownership. - Module categories: Developer Tools, E-commerce, Integrations
- Ecosystem: Stripe Checkout, Stripe Registration, Stripe Licensing
- 118 sites report using this module
- Created by donutdan4114 on , updated
- Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
Development version: 7.x-1.x-dev updated 22 Feb 2020 at 11:25 UTC