UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

50 lines (49 loc) 1.99 kB
import * as factory from '../../../factory'; import { Settings } from '../../../settings'; import type { ActionRepo } from '../../../repo/action'; import type { PaymentServiceRepo } from '../../../repo/paymentService'; import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider'; import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted'; import { ICreditCardPaymentAgencyTransaction } from './authorize/processAuthorizeCreditCard'; import { ICreditCardPaymentAgencyTransaction3ds } from './authorize/processAuthorizeCreditCard3ds'; type IPaymentAgencyTransaction = ICreditCardPaymentAgencyTransaction | ICreditCardPaymentAgencyTransaction3ds; type IAuthorizeResult = IPaymentAgencyTransaction & { accountId: ''; paymentMethodId: string; }; type IPayTransactionAsAuthorizeInvoiceAction = Pick<factory.assetTransaction.pay.IStartParamsWithoutDetail, 'object' | 'project' | 'recipient' | 'transactionNumber'> & { /** * 決済取引ID */ id: string; }; /** * クレジットカード決済承認 */ declare function authorize( /** * 承認開始元の決済取引 */ payTransaction: IPayTransactionAsAuthorizeInvoiceAction, paymentServiceId: string, options: { pendingPaymentAgencyTransaction?: Pick<IPaymentAgencyTransaction, 'entryTranArgs' | 'entryTranResult' | 'execTranArgs' | 'execTranResult'>; /** * 決済URL発行処理かどうか */ processPublishPaymentUrl: boolean; /** * 実行者 */ executor?: { /** * task ID * taskによって実行されている場合値が存在する(taskName: authorizePayment) */ id?: string; }; }): (repos: { action: ActionRepo; paymentAccepted: SellerPaymentAcceptedRepo; paymentService: PaymentServiceRepo; paymentServiceProvider: PaymentServiceProviderRepo; }, settings: Settings) => Promise<IAuthorizeResult>; export { authorize, IPaymentAgencyTransaction };