Skip to content

Conversation

@tebexjaames
Copy link
Contributor

No description provided.

@tebexjaames tebexjaames requested a review from Chilledson May 2, 2025 10:22
@Chilledson Chilledson requested a review from Copilot May 2, 2025 13:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new defaultPaymentMethod option to the checkout process and exposes the CheckoutZoidProps type as part of the public API.

  • Adds tests for the default-payment-method attribute on the web component and for the checkout initialization behavior
  • Updates type definitions and exports in both tests and source files to support the new defaultPaymentMethod option
  • Enhances the checkout's option resolution by adding a dedicated resolver for defaultPaymentMethod

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/webComponents/TebexCheckout.test.ts Adds a test to verify that the default-payment-method attribute sets the checkout.defaultPaymentMethod correctly.
tests/index.test-d.ts Extends type tests to include CheckoutZoidProps and other new type exports.
tests/checkout.test.ts Introduces tests for setting a valid defaultPaymentMethod and validating improper values with warning behavior.
src/webComponents/TebexCheckout.ts Passes the default-payment-method attribute value to the checkout initialization.
src/index.ts Exports the new type definitions for the checkout API including CheckoutZoidProps.
src/checkout.ts Adds defaultPaymentMethod to the CheckoutOptions type, initializes it in the Checkout class, and implements a resolver method.
Files not reviewed (1)
  • package.json: Language not supported

Copy link
Contributor

@Chilledson Chilledson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

I'll create 1.7.0 release but make a note that this feature won't work until its enabled internally.

@Chilledson Chilledson merged commit 8fc8c3c into tebexio:main May 2, 2025
1 check passed
@Chilledson
Copy link
Contributor

This feature has now been enabled, documentation to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants