wompi_web_checkout 2.0.0
wompi_web_checkout: ^2.0.0 copied to clipboard
A pure Dart client for Wompi's Web Checkout. Build integrity-signed checkout URLs and accept payments in your Dart or Flutter apps.
2.0.0 #
Full overhaul: leaner API, richer validation, and Panama support.
Breaking changes #
- Renamed:
WompiWebCheckoutData→WompiCheckoutData,WompiWebCheckoutCustomerInfo→WompiCustomerData(fieldcustomerInfo→customerData),WompiWebCheckoutShippingAddressInfo→WompiShippingAddress(fieldshippingAddressInfo→shippingAddress),WompiLegalId→WompiLegalIdType. - Removed
WompiCheckoutData.currency: it is derived fromWompiWebCheckout.country. - The three
WompiInvalid*Exceptiontypes were replaced by a singleWompiValidationExceptionthat aggregates every error inerrors. getCheckoutUriis now synchronous.WompiWebCheckout.integrityKeyis no longer publicly readable.expirationTimeis validated bygetCheckoutUri, not by the constructor.- Stricter
referenceand phone number validation, per the docs. - Requires Dart SDK >= 3.0.0; dropped the
email_validatordependency.
Added #
- Panama support through the new
WompiCountryenum, which selects the checkout host, the currency (WompiCurrency), the acceptedlegalIdTypesand which optional parameters may be sent. - Parameters missing from 1.x:
WompiTaxes,phoneNumberPrefix,collectShipping,collectCustomerLegalId,WompiLanguage/defaultLanguageandWompiPaymentMethodReferences. WompiEnvironment, derived from the public key prefix, plus key format validation and a console warning when production credentials run in a debug build.- Cross-field validation (
phoneNumber/phoneNumberPrefix,legalId/legalIdType). clearon every model, to remove optional fields thatcopyWithcannot.- Value equality on all models.
Fixed #
expirationTimeis normalized to UTC milliseconds, the format Wompi documents —DateTime.now()would otherwise emit microseconds in both the URL and the signature.WompiLegalIdType.fromCodepreviously threw for every valid code; a nullabletryFromCodewas added.WompiValidationExceptionrejects an empty error list with anArgumentErrorinstead of anassert.- The production-credentials warning no longer fires in Flutter profile builds.
1.1.0 #
- Implemented customer info validation
- Implemented shipping address info validation
- Added validation utilities for email and phone number
- Added tests
1.0.0+1 #
- Fixed pub.dev analysis issues
1.0.0 #
- Initial release