UNPKG

@paydock/client-sdk

Version:

Paydock client sdk

49 lines (48 loc) 2.27 kB
import { CheckoutButton } from '../checkout-button'; import { CHECKOUT_MODE } from '../checkout-button.interface'; import { ZipmoneyRunnerParams } from './zipmoney.types'; /** * Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button into checkout * * @extends CheckoutButton * * @constructor * * @param {string} selector - Selector of html element. * @param {string} publicKey - PayDock users public key * @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway * @param {string} [gatewayId=default] - Checkout mode, it could be set to 'contextual' or 'redirect'. By default it 'contextual' * @example * var widget = new ZipmoneyCheckoutButton('#button', 'publicKey','gatewayId'); */ declare class ZipmoneyCheckoutButton extends CheckoutButton { protected publicKey: string; protected gatewayId: string; protected mode: CHECKOUT_MODE; /** @constructs */ constructor(selector: string, publicKey: string, gatewayId?: string, mode?: CHECKOUT_MODE); /** * Method for setting suspended redirect uri. Redirect after referred checkout * * The URI is used for a redirect after the checkout is complete. * This can be provided, even if using in-context checkout (sdk). By default, the standard styled page will be used. * If using in-context (sdk) we will not automatically redirect to this URI. * * @param {uri} string - uri for suspended redirect (by default) */ setSuspendedRedirectUri(uri: string): void; /** * Method for setting the merchant redirect URL. * The merchant's customers would be redirected to the specified URL * at the end of ZipMoney checkout flow. * * Once the redirect URL would be set, the checkout flow would be immediately switched * from 'contextual' mode to the 'redirect' mode. * The merchant's customer would be automatically redirected to this URL after the checkout is complete. * * @param {url} string - URL for redirect */ setRedirectUrl(url: string): void; protected buildAdditionalParams(): ZipmoneyRunnerParams; } export { ZipmoneyCheckoutButton }; //# sourceMappingURL=zipmoney-checkout-button.d.ts.map