This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@bitkidd/adonis-stripe
TypeScript icon, indicating that this package has built-in type declarations

8.168.0 • Public • Published

Adonis Stripe

adonis, stripe

npm-image license-image typescript-image

This service provider makes it easier to integrate and to work with Stripe official library. It is compatible with Adonis Framework v5.x. and Adonis Framework v4.x. via legacy tag.

It is built on top of stripe-node and proxies all the methods keeping them 100% original. So you can follow official Stripe documentation.

Package will follow stripe-node versioning to keep you in sync

Installation

To install package for Adonis v5.x run:

npm install @bitkidd/adonis-stripe
# or
yarn add @bitkidd/adonis-stripe

As the package has been installed, you have to configure it by running a command:

node ace configure @bitkidd/adonis-stripe

Then open the env.ts file and paste the following code inside the Env.rules object.

STRIPE_SECRET_KEY: Env.schema.string(),
STRIPE_API_VERSION: Env.schema.string()

And don't forget to add these variables to your .env and .env.sample files.

To install package for Adonis v4.x run:

npm install @bitkidd/adonis-stripe@legacy
# or
yarn add @bitkidd/adonis-stripe@legacy

And then follow the instructions.

Usage

import Stripe from '@ioc:Adonis/Addons/Stripe'

public async signup ({ response, request }) {
  
  ...

  const customer = await Stripe.customers.create({
    email: user.email
  });

  ...
}

Readme

Keywords

Package Sidebar

Install

npm i @bitkidd/adonis-stripe

Weekly Downloads

18

Version

8.168.0

License

MIT

Unpacked Size

8.31 kB

Total Files

9

Last publish

Collaborators

  • bitkidd