UNPKG

@lomray/microservice-payment-stripe

Version:

Stripe payment microservice based on NodeJS & inverted json.

63 lines (62 loc) 1.91 kB
import StripeSdk from 'stripe'; import { EntityManager } from 'typeorm'; /** * Charge webhook handler */ declare class Charge { /** * @private */ private readonly manager; /** * @constructor */ /** * @constructor */ constructor(manager: EntityManager); /** * Handles charge refunded */ /** * Handles charge refunded */ handleChargeRefunded(event: StripeSdk.Event, manager: EntityManager, sdk: StripeSdk): Promise<void>; /** * Handles charge dispute created * @description Should create microservice dispute and related evidence details */ /** * Handles charge dispute created * @description Should create microservice dispute and related evidence details */ handleChargeDisputeCreated(event: StripeSdk.Event, manager: EntityManager): Promise<void>; /** * Handles charge dispute updated */ /** * Handles charge dispute updated */ handleChargeDisputeUpdated(event: StripeSdk.Event, manager: EntityManager): Promise<void>; /** * Handles refund updated */ /** * Handles refund updated */ handleRefundUpdated(event: StripeSdk.Event, manager: EntityManager, sdk: StripeSdk): Promise<void>; /** * Sync Stripe refunds with the microservice refunds * @description Stripe does not automatically create refunds if first partial refund was successful. * Iterate from all existing refund and save refund that STRIPE DOES NOT SENT IN WEBHOOK * @private */ /** * Sync Stripe refunds with the microservice refunds * @description Stripe does not automatically create refunds if first partial refund was successful. * Iterate from all existing refund and save refund that STRIPE DOES NOT SENT IN WEBHOOK * @private */ private syncStripeRefunds; } export { Charge as default };