UNPKG

react-native-unit-components

Version:

Unit React Native components

28 lines (27 loc) 1.07 kB
import { LISTENERS } from '../../scripts/html/bodyScript'; import { PaymentMessage } from '../../messages/webMessages/paymentsMessage'; export const getCheckPaymentParams = props => { const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : ''; return ` ${accountIdParam} initial-stage-back-button="${props.initialStageBackButton ?? false}" final-stage-done-button="${props.finalStageDoneButton ?? false}" style="height: 100%" `; }; export const getCheckPaymentScript = () => { return ` window.addEventListener("${PaymentMessage.PAYMENT_CREATED}", (e) => { const response = e.detail response.then((data) => { postMessageToSDK({ type: "${PaymentMessage.PAYMENT_CREATED}", details: { data: JSON.stringify(data.data) }}) }).catch((e) => { console.log(e) }) }); ${LISTENERS.requestRefresh} ${LISTENERS.unitPaymentInitialStageBackButtonClicked} ${LISTENERS.unitPaymentFinalStageDoneButtonClicked} `; }; //# sourceMappingURL=UNCheckPaymentComponent.utils.js.map