Closed aimensahnoun closed 4 weeks ago
The changes introduce a new optional billing information step to the payment widget, enhancing the user interface for collecting buyer details. This includes modifications to several components to accommodate structured data for buyer, seller, and product information, as well as validation logic to ensure completeness before proceeding with payments. The integration of these features aims to streamline the payment process while ensuring accurate data collection.
Files | Change Summary |
---|---|
packages/payment-widget/src/lib/components/buyer-info-form.svelte |
Introduced a form for collecting buyer information with validation for required fields and error handling. |
packages/payment-widget/src/lib/components/currency-selector.svelte |
Removed internal state management for payment steps; added callback for currency selection to enhance modularity. |
packages/payment-widget/src/lib/components/payment-confirmation.svelte |
Updated to use structured types for seller, buyer, and product information; added invoice number and control flow logic. |
packages/payment-widget/src/lib/payment-widget.svelte |
Added props for buyer information and invoice number; modified state management for dynamic payment step transitions. |
packages/payment-widget/src/lib/react/PaymentWidget.d.ts |
Expanded PaymentWidgetProps interface to include buyer info, enable buyer info flag, and invoice number. |
packages/payment-widget/src/lib/types/index.ts |
Introduced new interfaces for Address , SellerInfo , and BuyerInfo ; updated PaymentStep type to include "buyer-info". |
packages/payment-widget/src/lib/utils/request.ts |
Modified prepareRequestParameters to accept structured objects for seller and product info, and introduced buyer info parameter. |
Objective | Addressed | Explanation |
---|---|---|
Add optional billing info step to the payment widget ("Add Step 5") (#[107]) | ✅ | |
If the Seller provides seller info, it should include the invoice number. (#[107]) | ✅ |
[!TIP] We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Just a head's up @aimensahnoun you have to do the magic word for both PRs for it to link to both of them automatically https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
Resolves #107 Resolves #110
sellerInfo
,buyerInfo
,invoiceNumber
, andenableBuyerInfo
enableBuyerInfo
is set to true (default to true)enableBuyerInfo
is set to falseSummary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores