UNPKG

@paydock/client-sdk

Version:

Paydock client sdk

61 lines 3.24 kB
export { PayPalSavePaymentSourceWidget } from './paypal-save-payment-source'; /** * Interface of data used for PayPal configuration. For further information refer to [the documentation](https://developer.paypal.com/sdk/js/reference/#style). * @interface PayPalSavePaymentSourceWidgetConfig * * @type {object} * @param {'vertical'|'horizontal'} [style.layout] Used for indicating the PayPal Button layout. * @param {'blue'|'gold'|'silver'|'black'|'white'} [style.color] Used for indicating the main color of the PayPal Button. * @param {'rect'|'sharp'|'pill'} [style.shape] Used for indicating the shape of the PayPal Button. * @param {'paypal'|'checkout'|'buynow'|'pay'} [style.label] Used for indicating the label of the PayPal Button. * @param {boolean} [style.disableMaxWidth] Used for indicating if the max width will be disabled. * @param {boolean} [style.disableMaxHeight] Used for indicating the max height will be disabled. * @param {number} [style.height] Used for indicating the height of the PayPal Button, if disableMaxHeight is true. * @param {number} [style.borderRadius] Used for indicating the border radius of the PayPal Button. * @param {boolean} [style.tagline] Used for indicating the tagline of the PayPal Button. * @param {number} [message.amount] Used for indicating an amount before the payment. * @param {'center'|'left'|'right'} [message.align] Used for indicating the align of the message. * @param {'black'|'white'} [message.color] Used for indicating the color of the message. * @param {'top'|'bottom'} [message.position] Used for indicating the position of the message. */ /** * Interface of possible error codes inside onError event data. * @interface ErrorCodes * * @type {object} * @param {string} [unavailable] Error code when an error occurs loading the widget. * @param {string} [onPaypalVaultSetupTokenError] Error code when an error occrus on PayPal side. * @param {string} [onGetIdTokenError] Error code when trying to get ID token from PayPal. * @param {string} [onGetWalletConfigError] Error code when trying to get wallet config from Paydock. * @param {string} [onGetSetupTokenError] Error code when trying to get the setup token from PayPal. * @param {string} [onOneTimeTokenError] Error code when trying to get the one time token from Paydock. */ /** * Interface for IOnSuccessEventData * @interface IOnSuccessEventData * * @type {object} * @param {EVENTS} event - Event Name is 'ON_SUCCESS' * @param {object} data Data object * @param {string} data.token One Time Token to be exchanged for a Paydock Customer. * @param {string} [data.email] Paypal account customer email if retrieved from Paypal servers. **/ /** * Interface for IOnErrorEventData * @interface IOnErrorEventData * * @type {object} * @param {EVENTS} event - Event Name is 'ON_ERROR' * @param {object} data Error data object * @param {ErrorCodes} data.error_code Error code. One of ErrorCodes. * @param {string} [data.details] Error details. * @param {string} [data.message] Error message. **/ /** * Interface for IOnCancelEventData * @interface IOnCancelEventData * * @type {object} * @param {EVENTS} event - Event Name is 'ON_CANCEL' **/ //# sourceMappingURL=index.d.ts.map