This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #429 from beabee-communityrm/refactor/payment-types
refactor: move lots of payment related types to @type
- Loading branch information
Showing
24 changed files
with
128 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,23 @@ | ||
import JoinFlow from "@models/JoinFlow"; | ||
import JoinForm from "@models/JoinForm"; | ||
|
||
import { Address } from "@type/address"; | ||
|
||
export interface PaymentFlow { | ||
id: string; | ||
params: PaymentFlowParams; | ||
} | ||
|
||
export interface PaymentFlowParams { | ||
clientSecret?: string; | ||
redirectUrl?: string; | ||
} | ||
|
||
export interface PaymentFlowData { | ||
email: string; | ||
firstname?: string; | ||
lastname?: string; | ||
} | ||
|
||
export interface CompletedPaymentFlow { | ||
joinForm: JoinForm; | ||
customerId: string; | ||
mandateId: string; | ||
} | ||
|
||
export interface CompletedPaymentFlowData { | ||
firstname?: string; | ||
lastname?: string; | ||
billingAddress?: Address; | ||
} | ||
|
||
export interface PaymentFlowProvider { | ||
createPaymentFlow( | ||
import { | ||
CompletedPaymentFlow, | ||
CompletedPaymentFlowData, | ||
PaymentFlow, | ||
PaymentFlowData | ||
} from "@type/index"; | ||
|
||
export abstract class PaymentFlowProvider { | ||
abstract createPaymentFlow( | ||
joinFlow: JoinFlow, | ||
completeUrl: string, | ||
data: PaymentFlowData | ||
): Promise<PaymentFlow>; | ||
|
||
completePaymentFlow(joinFlow: JoinFlow): Promise<CompletedPaymentFlow>; | ||
abstract completePaymentFlow( | ||
joinFlow: JoinFlow | ||
): Promise<CompletedPaymentFlow>; | ||
|
||
getCompletedPaymentFlowData( | ||
abstract getCompletedPaymentFlowData( | ||
completedPaymentFlow: CompletedPaymentFlow | ||
): Promise<CompletedPaymentFlowData>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Address } from "@type/address"; | ||
|
||
export interface CompletedPaymentFlowData { | ||
firstname?: string; | ||
lastname?: string; | ||
billingAddress?: Address; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import JoinForm from "@models/JoinForm"; | ||
|
||
export interface CompletedPaymentFlow { | ||
joinForm: JoinForm; | ||
customerId: string; | ||
mandateId: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface PaymentFlowData { | ||
email: string; | ||
firstname?: string; | ||
lastname?: string; | ||
} |
Oops, something went wrong.