paystack-card-payment
v0.0.5
Published
A capacitor plugin form making debit card payment
Downloads
1
Readme
paystack-card-payment
A capacitor plugin form making debit card payment
Install
npm install paystack-card-payment
npx cap sync
API
initialize(...)
addCard(...)
validateCard()
chargeCard()
addChargeParameters(...)
getCardType()
putChargeMetadata(...)
putChargeCustomFields(...)
setChargeEmail(...)
setChargeAmount(...)
setAccessCode(...)
- Interfaces
initialize(...)
initialize(payload: { publicKey: string; }) => Promise<{ initialized: boolean; }>
| Param | Type |
| ------------- | ----------------------------------- |
| payload
| { publicKey: string; } |
Returns: Promise<{ initialized: boolean; }>
addCard(...)
addCard(payload: { cardNumber: string; expiryMonth: string; expiryYear: string; cvv: string; }) => Promise<any>
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------ |
| payload
| { cardNumber: string; expiryMonth: string; expiryYear: string; cvv: string; } |
Returns: Promise<any>
validateCard()
validateCard() => Promise<{ is_valid: boolean; }>
Returns: Promise<{ is_valid: boolean; }>
chargeCard()
chargeCard() => Promise<Transaction>
Returns: Promise<Transaction>
addChargeParameters(...)
addChargeParameters(parameters: { [key: string]: string; }) => Promise<any>
| Param | Type |
| ---------------- | --------------------------------------- |
| parameters
| { [key: string]: string; } |
Returns: Promise<any>
getCardType()
getCardType() => Promise<{ card_type: string; }>
Returns: Promise<{ card_type: string; }>
putChargeMetadata(...)
putChargeMetadata(metadata: { [key: string]: string; }) => Promise<any>
| Param | Type |
| -------------- | --------------------------------------- |
| metadata
| { [key: string]: string; } |
Returns: Promise<any>
putChargeCustomFields(...)
putChargeCustomFields(customFields: { [key: string]: string; }) => Promise<any>
| Param | Type |
| ------------------ | --------------------------------------- |
| customFields
| { [key: string]: string; } |
Returns: Promise<any>
setChargeEmail(...)
setChargeEmail(payload: { email: string; }) => Promise<any>
| Param | Type |
| ------------- | ------------------------------- |
| payload
| { email: string; } |
Returns: Promise<any>
setChargeAmount(...)
setChargeAmount(payload: { amount: string; }) => Promise<any>
| Param | Type |
| ------------- | -------------------------------- |
| payload
| { amount: string; } |
Returns: Promise<any>
setAccessCode(...)
setAccessCode(payload: { accessCode: string; }) => Promise<any>
| Param | Type |
| ------------- | ------------------------------------ |
| payload
| { accessCode: string; } |
Returns: Promise<any>
Interfaces
Transaction
| Prop | Type |
| --------------- | ------------------- |
| reference
| string |