Skip to content

Instantly share code, notes, and snippets.

@popcorn245
Created February 17, 2019 22:14
Show Gist options
  • Save popcorn245/bfe0390158fa3cc6a71446233745d910 to your computer and use it in GitHub Desktop.
Save popcorn245/bfe0390158fa3cc6a71446233745d910 to your computer and use it in GitHub Desktop.
DadeMobile.d.ts
{
setApiKey: (apiKey: string) => void;
setApiBaseURL: (apiBaseUrl: string) => void;
/**
* After initialization, the next step is to stage a payment. The payment amount can be set when staging a payment, or after a payment has already been staged, depending on your workflow. If a payment was previously staged but not confirmed, then it will be resumed.
*/
stagePayment: (params: {
/**
* Unique identifer for your user making the payment.
*/
external_user_id: string;
/**
* Your reference identifer for the payment.
*/
external_reference?: string;
/**
* Payment amount. This can be set after staging the payment.
*/
amount?: number;
}) => Promise<any>;
/**
* Set the amount of a staged payment.
*/
setAmount: (
/**
* The staged payment.
*/
payment: any,
/**
* Payment amount.
*/
amount: number
) => Promise<any>;
/**
* Upload image for a staged payment.
*/
uploadImage: (
/**
* The staged payment.
*/
payment: any,
/**
* The type of image being uploaded
*/
imageType:
| DadeMobile.ImageTypes.CHECK_FRONT
| DadeMobile.ImageTypes.CHECK_REAR,
/**
* Base64 encoding of the image data.
*/
imageString: string
) => Promise<any>;
/**
* Once a payment is staged and all properties have been set, the final step is to confirm the payment. If the payment fails validation, then validation errors will be returned. See the next section for error codes.
*/
confirmPayment: (
/**
* The staged payment.
*/
payment: any
) => Promise<any>;
cancelPayment: (payment: any) => Promise<any>;
_resizeImage: (imageData: string) => Promise<any>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment