UNPKG

@lomray/microservice-payment-stripe

Version:

Stripe payment microservice based on NodeJS & inverted json.

42 lines (41 loc) 1.24 kB
import StripeSdk from 'stripe'; import { EntityManager } from 'typeorm'; /** * Payment intent webhook handlers */ declare class PaymentIntent { /** * @private */ private readonly manager; /** * @private */ private readonly transactionRepository; /** * @constructor */ /** * @constructor */ constructor(manager: EntityManager); /** * Handles payment intent statuses */ /** * Handles payment intent statuses */ handlePaymentIntent(event: StripeSdk.Event, sdk: StripeSdk): Promise<void>; /** * Handles payment intent failure creation * @description Payment intent will be created with the failed status: card was declined - * high fraud risk but stripe will throw error on creation and send webhook event with the creation */ /** * Handles payment intent failure creation * @description Payment intent will be created with the failed status: card was declined - * high fraud risk but stripe will throw error on creation and send webhook event with the creation */ handlePaymentIntentPaymentFailed(event: StripeSdk.Event, sdk: StripeSdk): Promise<void>; } export { PaymentIntent as default };