Adding Payments Lite Dialog params

Hi! I am adding the dialog params for payments lite as it is different from normal payment ui params.
This commit is contained in:
Pedro Antonio Souza Viegas
2018-03-26 14:12:24 -03:00
committed by GitHub
parent 6668af81f6
commit 68c613f2f5
+24
View File
@@ -66,6 +66,11 @@ declare namespace facebook {
*/
ui(params: PayDialogParams, callback: (response: PayDialogResponse) => void): void;
/**
* @see https://developers.facebook.com/docs/games_payments/payments_lite
*/
ui(params: PaymentsLiteDialogParams, callback: (response: PaymentsLiteDialogResponse) => void): void;
/**
* @see https://developers.facebook.com/docs/videos/live-video/exploring-live
*/
@@ -154,6 +159,14 @@ declare namespace facebook {
request_id?: string;
test_currency?: string;
}
interface PaymentsLiteDialogParams extends DialogParams {
method: 'pay';
action: 'purchaseiap';
product_id: string;
developer_payload?: string;
quantity?: number;
}
interface LiveDialogParams extends DialogParams {
method: 'live_broadcast';
@@ -199,6 +212,17 @@ declare namespace facebook {
signed_request: string;
}
interface PaymentsLiteDialogResponse {
developer_payload?: string;
payment_id: number;
product_id?: string;
purchase_time?: number;
purchase_token?: string;
signed_request?: string;
error_code?: number;
error_message?: string;
}
interface LiveDialogResponse {
id: string;
stream_url: string;