import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; import { CountryCode as CountryCode$1, CurrencyCode as CurrencyCode$1, GatewayCustomer as GatewayCustomer$1, GatewayMetadata as GatewayMetadata$1, GatewayStyle as GatewayStyle$1, CapsEnvironment as CapsEnvironment$1, GatewayPgMetadata as GatewayPgMetadata$1, SetElementLoadingFn as SetElementLoadingFn$1, GatewayType as GatewayType$1, AltpaynetPaymentMethod as AltpaynetPaymentMethod$1, GatewayReturnStatus as GatewayReturnStatus$1 } from './types'; import { Locale, CorvuspayLocale, BackendPaypalLocale, AmazonpayLocale } from '@/utils'; import { Stripe } from '@stripe/stripe-js'; type PaymentGatewaysConfig = { country: CountryCode$1; org: number; module: string; test: boolean; amount: number; currency: CurrencyCode$1; description: string; customerInfo: GatewayCustomer$1; metadata: GatewayMetadata$1; appearance: GatewayStyle$1; returnUrl: string; locale?: Locale; environment: CapsEnvironment$1; pgMetadata?: GatewayPgMetadata$1; handlePayOnClick?: Function; hidePayButton?: boolean; setVendorType?: Function; setPaymentProcessing?: Function; setElementLoading?: SetElementLoadingFn$1; prePaymentCheck?: Function; enablePayLater?: boolean; payLaterLabel?: string; setGatewayCount?: Function; }; interface Props { config: PaymentGatewaysConfig; } declare const PaymentGateways: React.MemoExoticComponent<({ config }: Props) => react_jsx_runtime.JSX.Element>; type InternalOrder = { customerInfo: PaymentGatewaysConfig["customerInfo"]; amount: PaymentGatewaysConfig["amount"]; currency: PaymentGatewaysConfig["currency"]; description: PaymentGatewaysConfig["description"]; metadata: PaymentGatewaysConfig["metadata"]; returnUrl: PaymentGatewaysConfig["returnUrl"]; pgMetadata: PaymentGatewaysConfig["pgMetadata"]; }; type GatewayInfo = { pgId: number; type: GatewayType$1; username: string; name: string; entityId: number; test: boolean; signature?: string; extra_id_1?: string; extra_id_2?: string; paymentProviders?: AltpaynetPaymentMethod$1[]; }; declare const initiatePayment: () => void; type CheckStatusProps = { environment: CapsEnvironment$1; caps_transaction_id: string; locale?: Locale; }; declare const checkStatus: ({ environment, caps_transaction_id, locale }: CheckStatusProps) => Promise<{ error: string; data?: undefined; } | { data: GatewayReturnStatus$1; error?: undefined; }>; type RefundOrderProps = { caps_transaction_id: string; amount: number; currency: CurrencyCode$1; metadata: GatewayMetadata$1; description: string; environment: CapsEnvironment$1; locale?: Locale; }; type RefundOrder = { id: string; transaction_date: string; status: ('failed' | 'created' | 'authorized' | 'action-required' | 'canceled' | 'bank-side-processing' | 'succeeded') | 'non-existent-status'; vendor: GatewayType$1; visible_id: string; }; declare const refundOrder: ({ environment, locale, ...refundData }: RefundOrderProps) => Promise<{ error: string; data?: undefined; } | { data: RefundOrder; error?: undefined; }>; declare const countryCodes: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "EU", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KS", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW", "ZZ"]; type CountryCode = typeof countryCodes[number]; declare const currencyCodes: readonly ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bhd", "bif", "bmd", "bnd", "bob", "bov", "brl", "bsd", "btn", "bwp", "byn", "bzd", "cad", "cdf", "che", "chf", "chw", "clf", "clp", "cny", "cop", "cou", "crc", "cup", "cve", "czk", "djf", "dkk", "dop", "dzd", "egp", "ern", "etb", "eur", "fjd", "fkp", "gbp", "gel", "ghs", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "htg", "huf", "idr", "ils", "inr", "iqd", "irr", "isk", "jmd", "jod", "jpy", "kes", "kgs", "khr", "kmf", "kpw", "krw", "kwd", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "lyd", "mad", "mdl", "mga", "mkd", "mmk", "mnt", "mop", "mru", "mur", "mvr", "mwk", "mxn", "mxv", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "omr", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sdg", "sek", "sgd", "shp", "sle", "sll", "sos", "srd", "ssp", "stn", "svc", "syp", "szl", "thb", "tjs", "tmt", "tnd", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyi", "uyu", "uyw", "uzs", "ved", "ves", "vnd", "vuv", "wst", "xaf", "xag", "xau", "xba", "xbb", "xbc", "xbd", "xcd", "xdr", "xof", "xpd", "xpf", "xpt", "xsu", "xts", "xua", "xxx", "yer", "zar", "zmw", "zwl"]; type CurrencySymbolMap = { [key in CurrencyCode]: string; }; declare const currencySymbols: CurrencySymbolMap; declare const zeroDecimalCodes: readonly ["bif", "clp", "djf", "gnf", "jpy", "kmf", "krw", "mga", "pyg", "rwf", "ugx", "vnd", "vuv", "xaf", "xof", "xpf"]; declare const threeDecimalCodes: readonly ["bhd", "jod", "kwd", "omr", "tnd"]; declare const corvuspayCurrencyCodes: readonly ["gbp", "usd", "eur", "dkk", "nok", "sek", "chf", "cad", "huf", "bhd", "aud", "rub", "pln", "ron", "czk", "isk", "bam", "rsd"]; type CurrencyCode = typeof currencyCodes[number]; type ZeroDecimalCode = CurrencyCode & (typeof zeroDecimalCodes[number]); type ThreeDecimalCode = CurrencyCode & (typeof threeDecimalCodes[number]); type CorvuspayCurrencyCode = CurrencyCode & (typeof corvuspayCurrencyCodes[number]); declare const isZeroDecimal: (currency: CurrencyCode) => currency is ZeroDecimalCode; declare const isThreeDecimal: (currency: CurrencyCode) => currency is ThreeDecimalCode; declare const gatewayTypes: readonly ["stripe", "corvuspay", "webpayrest", "mercadopagocard", "mercadopagocash", "mercadopagopix", "paypal", "paylater", "altpaynet", "goldenpay", "taptopay", "invoiceforu", "tupaggo", "thawanipay", "nmipg", "stripebanktransfer", "paratika", "amazonpay", "peach"]; type GatewayType = (typeof gatewayTypes)[number]; type GatewayAddress = { line1: string; line2: string; city: string; state: string; country: string; pincode: string; state_abbr?: string; }; type GatewayCustomer = { name: string; surname: string; phone: string; email: string; identification_number?: string; address: GatewayAddress; date_of_birth?: string; }; type GatewayMetadata = any; type GatewayPgMetadata = any; type GatewayStyle = { button: "default" | "border"; }; type GatewayReturnStatus = { status: ("failed" | "created" | "authorized" | "action-required" | "canceled" | "bank-side-processing" | "succeeded") | "non-existent-status"; amount: number; currency: CurrencyCode; metadata: GatewayMetadata; id: string; vendor: GatewayType; method: string; type: "sale" | "refund"; visible_id: string; failure_message: string | null; }; declare const capsPayElementLoadingStates: readonly ["loading", "loaded", "failed"]; declare const peachPaymentType: Map; type CapsPayElementLoadingState = (typeof capsPayElementLoadingStates)[number]; type SetElementLoadingFn = (loading: CapsPayElementLoadingState) => void; type StripePromise = Promise; type CorvuspayForm = { amount: string; cart: string; currency: CorvuspayCurrencyCode; language: string; order_number: string; require_complete: string; store_id: string; version: string; best_before: string; cardholder_name: string; cardholder_surname: string; cardholder_address: string; cardholder_city: string; cardholder_zip_code: string; cardholder_country: string; cardholder_email: string; signature: string; payment_all: string; }; type WebpayrestForm = { action: string; token_ws: string; order_number?: string; amount?: string; }; type ExternalOrder = { pg_id: GatewayInfo["pgId"]; eid: GatewayInfo["entityId"]; amount: InternalOrder["amount"]; currency: InternalOrder["currency"]; description: InternalOrder["description"]; metadata: InternalOrder["metadata"]; locale?: Locale; pgLocale?: CorvuspayLocale | BackendPaypalLocale | AmazonpayLocale; customer: { name: GatewayCustomer["name"]; surname: GatewayCustomer["surname"]; phone: GatewayCustomer["phone"]; email: GatewayCustomer["email"]; address: GatewayCustomer["address"]; identification_number?: GatewayCustomer["identification_number"]; }; returnUrl: InternalOrder["returnUrl"]; pgMetadata: InternalOrder["pgMetadata"]; paymentMethod?: string; paymentProviderPublicKey?: string; }; declare const capsEnvironments: readonly ["localdev", "development", "qa", "test", "uat", "vapt", "preproduction", "production"]; type CapsEnvironment = typeof capsEnvironments[number]; declare const stripePaymentType: Map; declare const corvuspayPaymentType: Map; declare const webpayrestPaymentType: Map; declare const mercadopagocardPaymentType: Map; declare const mercadopagocashPaymentType: Map; declare const mercadopagopixPaymentType: Map; declare const invoiceforuPaymentType: Map; declare const taptopayPaymentType: Map; declare const tupaggoPaymentType: Map; declare const stripebanktransferPaymentType: Map; declare const nmipgPaymentType: Map; declare const paypalPaymentType: Map; declare const goldenpayPaymentType: Map; declare const paylaterPaymentType = "paylater"; declare const thawanipayPaymentType: Map; declare const paratikaPaymentType: Map; declare const amazonpayPaymentType: Map; /** * Altpaynet Payment Gateway Types * * This file contains all TypeScript type definitions for the Altpaynet payment gateway integration. * Altpaynet is a payment gateway primarily used in the Philippines and Southeast Asia. */ /** * Customer address information for Altpaynet payments * Contains all required address fields for billing and shipping */ type AltpaynetCustomerAddress = { line1: string; line2: string; city_municipality: string; zip: string; state_province_region: string; country_code: string; }; /** * Customer contact information * Contains email and optional mobile number for customer communication */ type AltpaynetContact = { email: string; mobile?: string; }; /** * Complete customer information for Altpaynet payments * Combines personal details, billing address, optional shipping address, and contact info */ type AltpaynetCustomer = { first_name: string; last_name: string; billing_address: AltpaynetCustomerAddress; shipping_address?: AltpaynetCustomerAddress; contact: AltpaynetContact; }; /** * Payment information for Altpaynet transactions * Contains all payment details including amount, currency, and merchant reference */ type AltpaynetPayment = { description: string; amount: number; currency: string; option: string; merchant_reference_id: string; other_references?: string[]; }; /** * Route configuration for payment callbacks and notifications * Defines callback URLs and notification preferences for payment processing */ type AltpaynetRoute = { callback_url?: string; notify_user?: boolean; }; /** * Complete payment request structure for Altpaynet API * Main request object that combines customer, payment, and routing information */ type AltpaynetPaymentRequest = { data: { customer: AltpaynetCustomer; payment: AltpaynetPayment; route?: AltpaynetRoute; time_offset?: string; custom_parameters: AltpaynetCustomParameters; }; }; /** * Custom parameters for Altpaynet API * Allows additional data to be passed with payment requests */ type AltpaynetCustomParameters = any; /** * Individual payment method information * Represents a single payment option with its display name, code, and logo */ interface AltpaynetPaymentMethod { value: string; code: string; image: string; } /** * Group of payment methods (e.g., E-Wallet, Credit Cards) * Organizes payment methods into categories for better user experience */ interface AltpaynetPaymentGroup { label: string; items: AltpaynetPaymentMethod[]; } /** * Props for the Altpaynet payment selector component * Defines the interface for the payment method selection UI */ interface AltPayNetPaymentSelectorProps { data: AltpaynetPaymentMethod[]; onSelect?: (method: AltpaynetPaymentMethod) => void; } /** * E-Wallet payment methods supported by Altpaynet * Digital wallet options like GCash and GrabPay */ declare const altpaynetWallet: string[]; /** * Credit/Debit card payment methods supported by Altpaynet * Traditional card payment options from major card networks */ declare const altpaynetCard: string[]; /** * Bank transfer payment methods supported by Altpaynet * Direct bank transfer options like QR code payments */ declare const altpaynetBankTransfer: string[]; /** * Type guard to check if a string is a valid wallet payment method * Used for runtime validation of payment method selection */ declare const isWalletPaymentMethod: (method: string) => method is (typeof altpaynetWallet)[number]; /** * Type guard to check if a string is a valid card payment method * Used for runtime validation of card payment method selection */ declare const isCardPaymentMethod: (method: string) => method is (typeof altpaynetCard)[number]; /** * Type guard to check if a string is a valid bank transfer payment method * Used for runtime validation of bank transfer method selection */ declare const isBankTransferPaymentMethod: (method: string) => method is (typeof altpaynetBankTransfer)[number]; /** * Get all supported payment methods * Returns a combined array of all available payment options */ declare const getAllPaymentMethods: () => string[]; declare const goldenpayPaymentMethods: readonly [{ readonly code: "visa"; readonly image: "https://dzv00tuelpzbp.cloudfront.net/static/img/logo-po/logo-po-visa-trans.png"; }, { readonly code: "mastercard"; readonly image: "https://dzv00tuelpzbp.cloudfront.net/static/img/logo-po/logo-po-master-trans.png"; }]; declare const getGoldenpayApiUrl: (test: boolean) => string; export { PaymentGateways, altpaynetBankTransfer, altpaynetCard, altpaynetWallet, amazonpayPaymentType, capsEnvironments, capsPayElementLoadingStates, checkStatus, corvuspayPaymentType, countryCodes, currencyCodes, currencySymbols, gatewayTypes, getAllPaymentMethods, getGoldenpayApiUrl, goldenpayPaymentMethods, goldenpayPaymentType, initiatePayment, invoiceforuPaymentType, isBankTransferPaymentMethod, isCardPaymentMethod, isThreeDecimal, isWalletPaymentMethod, isZeroDecimal, mercadopagocardPaymentType, mercadopagocashPaymentType, mercadopagopixPaymentType, nmipgPaymentType, paratikaPaymentType, paylaterPaymentType, paypalPaymentType, peachPaymentType, refundOrder, stripePaymentType, stripebanktransferPaymentType, taptopayPaymentType, thawanipayPaymentType, tupaggoPaymentType, webpayrestPaymentType }; export type { AltPayNetPaymentSelectorProps, AltpaynetContact, AltpaynetCustomParameters, AltpaynetCustomer, AltpaynetCustomerAddress, AltpaynetPayment, AltpaynetPaymentGroup, AltpaynetPaymentMethod, AltpaynetPaymentRequest, AltpaynetRoute, CapsEnvironment, CapsPayElementLoadingState, CheckStatusProps, CorvuspayForm, CountryCode, CurrencyCode, ExternalOrder, GatewayAddress, GatewayCustomer, GatewayMetadata, GatewayPgMetadata, GatewayReturnStatus, GatewayStyle, GatewayType, PaymentGatewaysConfig, RefundOrder, RefundOrderProps, SetElementLoadingFn, StripePromise, WebpayrestForm };