UNPKG

@automattic/wpcom-checkout

Version:
98 lines 4.09 kB
import creditCardAmexImage from './images/cc-amex.svg'; import creditCardCartesBancairesImage from './images/cc-cb.svg'; import creditCardDinersImage from './images/cc-diners.svg'; import creditCardDiscoverImage from './images/cc-discover.svg'; import creditCardJCBImage from './images/cc-jcb.svg'; import creditCardMasterCardImage from './images/cc-mastercard.svg'; import creditCardPlaceholderImage from './images/cc-placeholder.svg'; import creditCardUnionPayImage from './images/cc-unionpay.svg'; import creditCardVisaImage from './images/cc-visa.svg'; import payPalImage from './images/paypal.svg'; import razorpayImage from './images/upi.svg'; export { creditCardAmexImage, creditCardCartesBancairesImage, creditCardDinersImage, creditCardDiscoverImage, creditCardJCBImage, creditCardMasterCardImage, creditCardPlaceholderImage, creditCardUnionPayImage, creditCardVisaImage, payPalImage, razorpayImage, }; export declare const PARTNER_PAYPAL_EXPRESS = "paypal_express"; export declare const PARTNER_PAYPAL_PPCP = "paypal_ppcp"; export declare const PARTNER_RAZORPAY = "razorpay"; export declare const PAYMENT_AGREEMENTS_PARTNERS: string[]; export declare const UPI_PARTNERS: string[]; /** * A saved payment method (card, PayPal agreement, or Razorpay emandate). * * Used by the `/me/payment-methods` endpoint after version 1.1. */ export type StoredPaymentMethod = StoredPaymentMethodBase | StoredPaymentMethodPayPal | StoredPaymentMethodRazorpay | StoredPaymentMethodCard | StoredPaymentMethodEbanx | StoredPaymentMethodStripeSource; export interface StoredPaymentMethodBase { stored_details_id: string; user_id: string; name: string; country_code: string; payment_partner: string; payment_partner_reference: string; payment_partner_source_id: string; mp_ref: string; email: string; card_expiry_year: string | null; card_expiry_month: string | null; expiry: string; remember: boolean; source: string | null; original_stored_details_id: string; is_rechargable: boolean; payment_type: string; is_expired: boolean; is_backup: boolean; tax_location: StoredPaymentMethodTaxLocation | null; } export interface StoredPaymentMethodPayPal extends StoredPaymentMethodBase { payment_partner: 'paypal_express' | 'paypal_ppcp'; } export interface StoredPaymentMethodRazorpay extends StoredPaymentMethodBase { payment_partner: 'razorpay'; } export interface StoredPaymentMethodCard extends StoredPaymentMethodBase { card_type: string; card_iin: string; card_last_4: string; card_zip: string; display_brand: string | null; } export interface StoredPaymentMethodEbanx extends StoredPaymentMethodBase { address: string; street_number: string; city: string; state: string; document: string; phone_number: string; device_id: string; } export interface StoredPaymentMethodStripeSource extends StoredPaymentMethodBase { verified_name: string; iban_last4: string; bank: string; bic: string; } export interface StoredPaymentMethodRazorpay extends StoredPaymentMethodBase { payment_partner: 'razorpay'; razorpay_vpa: string; } export interface StoredPaymentMethodTaxLocation { country_code?: string; postal_code?: string; subdivision_code?: string; ip_address?: string; vat_id?: string; organization?: string; address?: string; city?: string; is_for_business?: boolean | undefined; } export declare const isPaymentAgreement: (method: StoredPaymentMethod) => method is StoredPaymentMethodPayPal; export declare const isUpiMethod: (method: StoredPaymentMethod) => method is StoredPaymentMethodRazorpay; export declare const isCreditCard: (method: StoredPaymentMethod) => method is StoredPaymentMethodCard; export declare const getPaymentMethodImageURL: (type: string) => string; export declare const PaymentMethodSummary: ({ type, digits, email, }: { type: string; digits?: string; email?: string; }) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=stored-payment-method-util.d.ts.map