Skip to content

Commit

Permalink
add authorizeInvoiceAction
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Jun 12, 2024
1 parent f0445d3 commit 6fdc542
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/action/authorize/invoice.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as ActionFactory from '../../action';
import { ActionType } from '../../actionType';
import { IInvoice } from '../../invoice';
import { IRecipe } from '../../recipe/authorizeInvoice';
import { IRecipe as IAuthorizeInvoiceRecipe } from '../../recipe/authorizeInvoice';
import { IRecipe as IAuthorizeInvoice3dsRecipe } from '../../recipe/authorizeInvoice3ds';
import * as AuthorizeActionFactory from '../authorize';

export { IRecipe };
// 3DSecureの場合レシピが異なる
export { IAuthorizeInvoiceRecipe, IAuthorizeInvoice3dsRecipe };
export type IAgent = ActionFactory.IParticipantAsProject;
export type IObject = Pick<IInvoice, 'paymentMethodId' | 'typeOf'>;
// tslint:disable-next-line:no-empty-interface
Expand Down
1 change: 1 addition & 0 deletions src/assetTransaction/pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export type IExecTranArgs = GMOFactory.credit.IExecTranArgs;
export type IExecTranResult = GMOFactory.credit.IExecTranResult;
export type IExecTran3dsArgs = GMOFactory.credit.IExecTran3dsArgs;
export type IExecTran3dsResult = GMOFactory.credit.IExecTran3dsResult;
export type ISecureTran2Args = GMOFactory.credit.ISecureTran2Args;
export type ISecureTran2Result = GMOFactory.credit.ISecureTran2Result;
export interface IPaymentMethodAmount extends Pick<IMonetaryAmount, 'currency' | 'typeOf' | 'value'> {
value: number;
Expand Down
4 changes: 3 additions & 1 deletion src/recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ export enum RecipeCategory {
acceptCOAOffer = 'acceptCOAOffer',
confirmCOAReserve = 'confirmCOAReserve',
returnCOAReserve = 'returnCOAReserve',
authorizeInvoice = 'authorizeInvoice'
authorizeInvoice = 'authorizeInvoice',
authorizeInvoice3ds = 'authorizeInvoice3ds'
}
export enum StepIdentifier {
entryTran = 'entryTran',
execTran = 'execTran',
searchTrade = 'searchTrade',
alterTran = 'alterTran',
secureTran2 = 'secureTran2',
seatInfoSync = 'seatInfoSync',
seatInfoSyncCancel = 'seatInfoSyncCancel',
purchaseNumberAuth = 'purchaseNumberAuth',
Expand Down
18 changes: 18 additions & 0 deletions src/recipe/authorizeInvoice3ds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { ISecureTran2Args, ISecureTran2Result } from '../assetTransaction/pay';
import * as RecipeFactory from '../recipe';

export interface IDirectionSecureTran2 extends RecipeFactory.IHowToDirection {
beforeMedia?: ISecureTran2Args;
afterMedia?: ISecureTran2Result;
}
export interface IStepSecureTran2 extends RecipeFactory.IHowToStep {
identifier: RecipeFactory.StepIdentifier.secureTran2;
itemListElement: [IDirectionSecureTran2];
}
export interface IHowToSection extends RecipeFactory.IHowToSection {
itemListElement: [IStepSecureTran2];
}
export interface IRecipe extends RecipeFactory.IRecipe {
recipeCategory: RecipeFactory.RecipeCategory.authorizeInvoice3ds;
step: IHowToSection[];
}

0 comments on commit 6fdc542

Please sign in to comment.