-
Notifications
You must be signed in to change notification settings - Fork 0
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 #27 from XYOracleNetwork/feature/payment-card-auth…
…-sentinel Payment Card Auth Sentinel
- Loading branch information
Showing
52 changed files
with
1,162 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ | |
"quadkey", | ||
"quicktime", | ||
"realvideo", | ||
"rebilly", | ||
"replicaset", | ||
"satoshi", | ||
"scrollback", | ||
|
47 changes: 47 additions & 0 deletions
47
packages/payload/packages/payments/src/Billing/Address/Address.ts
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,47 @@ | ||
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model' | ||
|
||
import { BillingAddressSchema } from './Schema' | ||
|
||
/** | ||
* The fields describing a billing address. | ||
*/ | ||
export interface BillingAddressFields { | ||
/** Street address line 1. */ | ||
address: string | ||
/** Street address line 2. */ | ||
address2?: string | null | ||
/** City of the billing address. */ | ||
city?: string | ||
/** Country code of the billing address, ISO 3166-1 alpha-2 code. */ | ||
country?: string | ||
/** First name */ | ||
firstName: string | ||
/** Last name */ | ||
lastName: string | ||
/** Organization or company name associated with the billing address. */ | ||
organization?: string | null | ||
/** Postal or ZIP code of the billing address. */ | ||
postalCode?: string | ||
/** State or region of the billing address. */ | ||
region?: string | ||
} | ||
|
||
/** | ||
* A BillingAddress Payload | ||
*/ | ||
export type BillingAddress = Payload<BillingAddressFields, BillingAddressSchema> | ||
|
||
/** | ||
* Identity function for determine if an object is a BillingAddress | ||
*/ | ||
export const isBillingAddress = isPayloadOfSchemaType<BillingAddress>(BillingAddressSchema) | ||
|
||
/** | ||
* Identity function for determine if an object is a BillingAddress with sources | ||
*/ | ||
export const isBillingAddressWithSources = isPayloadOfSchemaTypeWithSources<BillingAddress>(BillingAddressSchema) | ||
|
||
/** | ||
* Identity function for determine if an object is a BillingAddress with meta | ||
*/ | ||
export const isBillingAddressWithMeta = isPayloadOfSchemaTypeWithMeta<BillingAddress>(BillingAddressSchema) |
4 changes: 4 additions & 0 deletions
4
packages/payload/packages/payments/src/Billing/Address/Schema.ts
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,4 @@ | ||
import { BillingSchema } from '../Schema' | ||
|
||
export const BillingAddressSchema = `${BillingSchema}.address` | ||
export type BillingAddressSchema = typeof BillingAddressSchema |
2 changes: 2 additions & 0 deletions
2
packages/payload/packages/payments/src/Billing/Address/index.ts
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,2 @@ | ||
export * from './Address' | ||
export * from './Schema' |
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,4 @@ | ||
import { PaymentsSchema } from '../Schema' | ||
|
||
export const BillingSchema = `${PaymentsSchema}.billing` | ||
export type BillingSchema = typeof BillingSchema |
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,2 @@ | ||
export * from './Address' | ||
export * from './Schema' |
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,2 +1,2 @@ | ||
export type EscrowSchema = 'network.xyo.escrow' | ||
export const EscrowSchema: EscrowSchema = 'network.xyo.escrow' | ||
export const EscrowSchema = 'network.xyo.escrow' | ||
export type EscrowSchema = typeof EscrowSchema |
49 changes: 49 additions & 0 deletions
49
packages/payload/packages/payments/src/Payment/Instrument/Card/Payload.ts
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,49 @@ | ||
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model' | ||
|
||
import { PaymentCardSchema } from './Schema' | ||
|
||
/** | ||
* The fields describing a payment card. | ||
*/ | ||
export interface PaymentCardFields { | ||
/** | ||
* Card Number (PAN) of the payment card. This value is required to perform a payment. | ||
*/ | ||
cardNumber: string | ||
/** | ||
* The name as it appears on the payment card. | ||
*/ | ||
cardholderName?: string | ||
/** | ||
* Card Verification Value (CVV/CVC) of the payment card. | ||
*/ | ||
cvv: string | ||
/** | ||
* Expiration month of the payment card. | ||
*/ | ||
expMonth: number | ||
/** | ||
* Expiration year of the payment card. | ||
*/ | ||
expYear: number | ||
} | ||
|
||
/** | ||
* A PaymentCard Payload | ||
*/ | ||
export type PaymentCard = Payload<PaymentCardFields, PaymentCardSchema> | ||
|
||
/** | ||
* Identity function for determine if an object is a PaymentCard | ||
*/ | ||
export const isPaymentCard = isPayloadOfSchemaType<PaymentCard>(PaymentCardSchema) | ||
|
||
/** | ||
* Identity function for determine if an object is a PaymentCard with sources | ||
*/ | ||
export const isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources<PaymentCard>(PaymentCardSchema) | ||
|
||
/** | ||
* Identity function for determine if an object is a PaymentCard with meta | ||
*/ | ||
export const isPaymentCardWithMeta = isPayloadOfSchemaTypeWithMeta<PaymentCard>(PaymentCardSchema) |
4 changes: 4 additions & 0 deletions
4
packages/payload/packages/payments/src/Payment/Instrument/Card/Schema.ts
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,4 @@ | ||
import { PaymentInstrumentSchema } from '../Schema' | ||
|
||
export const PaymentCardSchema = `${PaymentInstrumentSchema}.card` | ||
export type PaymentCardSchema = typeof PaymentCardSchema |
2 changes: 2 additions & 0 deletions
2
packages/payload/packages/payments/src/Payment/Instrument/Card/index.ts
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,2 @@ | ||
export * from './Payload' | ||
export * from './Schema' |
4 changes: 4 additions & 0 deletions
4
packages/payload/packages/payments/src/Payment/Instrument/Schema.ts
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,4 @@ | ||
import { PaymentSchema } from '../Schema' | ||
|
||
export const PaymentInstrumentSchema = `${PaymentSchema}.instrument` | ||
export type PaymentInstrumentSchema = typeof PaymentInstrumentSchema |
2 changes: 2 additions & 0 deletions
2
packages/payload/packages/payments/src/Payment/Instrument/index.ts
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,2 @@ | ||
export * from './Card' | ||
export * from './Schema' |
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,4 @@ | ||
import { PaymentsSchema } from '../Schema' | ||
|
||
export const PaymentSchema = `${PaymentsSchema}.payment` | ||
export type PaymentSchema = typeof PaymentSchema |
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,3 @@ | ||
export * from './Instrument' | ||
export * from './Payload' | ||
export * from './Schema' |
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,4 @@ | ||
import { PaymentsSchema } from '../Schema' | ||
|
||
export const PurchaseSchema = `${PaymentsSchema}.purchase` | ||
export type PurchaseSchema = typeof PurchaseSchema |
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,2 @@ | ||
export * from './Payload' | ||
export * from './Schema' |
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,4 @@ | ||
import { PaymentsSchema } from '../Schema' | ||
|
||
export const ReceiptSchema = `${PaymentsSchema}.receipt` | ||
export type ReceiptSchema = typeof ReceiptSchema |
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,2 @@ | ||
export * from './Payload' | ||
export * from './Schema' |
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,2 @@ | ||
export const PaymentsSchema = 'network.xyo.payments' | ||
export type PaymentsSchema = typeof PaymentsSchema |
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,3 +1,4 @@ | ||
export * from './Billing' | ||
export * from './Currency' | ||
export * from './Escrow' | ||
export * from './Payment' | ||
|
21 changes: 21 additions & 0 deletions
21
...ments/packages/providers/packages/rebilly/packages/authorization/packages/card/.npmignore
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,21 @@ | ||
.* | ||
.env | ||
.eslintcache | ||
.example.env | ||
tsconfig* | ||
jest.config.js | ||
rollup.config.ts | ||
yarn.lock | ||
**/*.spec.ts | ||
**/*.snap | ||
|
||
.github | ||
docs | ||
.pnp.* | ||
.vscode | ||
.yarn/* | ||
coverage | ||
cspell.json | ||
node_modules | ||
swagger.json | ||
packages |
Oops, something went wrong.