Skip to content

@sourceloop/payment-service / Exports / StripeProvider

Class: StripeProvider

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new StripeProvider(transactionsRepository, ordersRepository, subscriptionsRepository, config?)

Parameters

Name Type
transactionsRepository TransactionsRepository
ordersRepository OrdersRepository
subscriptionsRepository SubscriptionsRepository
config? IStripeConfig

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:27

Properties

config

Private Optional Readonly config: IStripeConfig

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:37


ordersRepository

Private Readonly ordersRepository: OrdersRepository

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:31


stripe

stripe: any = Stripe

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:46


subscriptionsRepository

Private Readonly subscriptionsRepository: SubscriptionsRepository

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:33


transactionsRepository

Private Readonly transactionsRepository: TransactionsRepository

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:29

Methods

value

value(): Object

Returns

Object

Name Type
charge (chargeResponse: DataObject<{ orderId: string ; stripeEmail: string ; stripeToken: string }>) => Promise<{ orderId: undefined | string = order.id; res: ResponseMessage = ResponseMessage.Sucess }>
create (payorder: Orders, paymentTemplate: string) => Promise<string>
refund (transactionId: string) => Promise<any>
subscriptionCharge (chargeResponse: DataObject<{ stripeEmail: string ; stripeToken: string ; subscriptionId: string }>) => Promise<{ res: ResponseMessage = ResponseMessage.Sucess; subscriptionId: string = subscription.id }>
subscriptionCreate (subscription: Subscriptions) => Promise<string>
subscriptionWebHook (sub: DataObject<{ data: DataObject<{ object: DataObject<{ status: string ; subscription: string }> }> }>) => Promise<boolean>

Implementation of

Provider.value

Defined in

services/payment-service/src/providers/stripe/stripe.provider.ts:48