UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

50 lines (49 loc) 1.84 kB
import type { AccountingReportRepo } from '../../../repo/accountingReport'; import type { ActionRepo } from '../../../repo/action'; import type { CredentialsRepo } from '../../../repo/credentials'; import type { EventRepo } from '../../../repo/event'; import type { PaymentServiceRepo } from '../../../repo/paymentService'; import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider'; import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted'; import type { TaskRepo } from '../../../repo/task'; import * as factory from '../../../factory'; import { Settings } from '../../../settings'; interface IAuthorizeResult { accountId: string; accountsReceivablesByServiceType: factory.assetTransaction.pay.IAccountsReceivableByServiceType[]; } /** * 決済カード承認 * オーソリサービスが存在するわけではないので、実質着券する */ declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, transaction: factory.assetTransaction.pay.ITransaction, paymentServiceId: string, options: { /** * 実行者 */ executor?: { /** * task ID * taskによって実行されている場合値が存在する(taskName: authorizePayment) */ id?: string; }; purpose: { /** * placeOrder ID */ id?: string; }; checkedAction: { id: string; }; }): (repos: { action: ActionRepo; accountingReport: AccountingReportRepo; credentials: CredentialsRepo; event: EventRepo; paymentAccepted: SellerPaymentAcceptedRepo; paymentService: PaymentServiceRepo; paymentServiceProvider: PaymentServiceProviderRepo; task: TaskRepo; }, settings: Settings) => Promise<IAuthorizeResult>; export { authorize };