Skip to content

Conversation

@kieran-osgood-shopify
Copy link
Contributor

@kieran-osgood-shopify kieran-osgood-shopify commented Nov 27, 2025

What changes are you making?

Implements checkout.paymentMethodChangeStart event from the native libraries:
https://github.com/Shopify/checkout-sheet-kit-swift/pull/475/files
https://github.com/Shopify/checkout-sheet-kit-android/pull/425/files

Screen.Recording.2025-12-01.at.13.46.20.mov

PR Checklist

Important

Releasing a new version of the kit?


Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@kieran-osgood-shopify kieran-osgood-shopify requested a review from a team as a code owner November 27, 2025 19:00
@kieran-osgood-shopify kieran-osgood-shopify changed the title Feat: add checkout.paymentMethodChangeStart #8681 add checkout.paymentMethodChangeStart Nov 28, 2025
@kieran-osgood-shopify kieran-osgood-shopify changed the title #8681 add checkout.paymentMethodChangeStart #8681 add checkout.paymentMethodChangeStart Nov 28, 2025
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the prototype-development/issue-8681-checkout.paymentmethodchangestart2 branch from c58840e to d9a3354 Compare November 28, 2025 15:44
@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as ready for review November 28, 2025 18:18
@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as draft December 1, 2025 09:15

package com.shopify.reactnative.checkoutsheetkit;

public enum CheckoutEventType {
Copy link
Contributor Author

@kieran-osgood-shopify kieran-osgood-shopify Dec 1, 2025

Choose a reason for hiding this comment

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

ran into an error where the eventName was being passed wrong and getting mixed up between the prop onPaymentMethodStartChange versus event.type checkout.paymentMethodChangeStart so decided to unify here, comment above says as much but this gives an auto register pattern for the events

@kieran-osgood-shopify kieran-osgood-shopify force-pushed the prototype-development/issue-8681-checkout.paymentmethodchangestart2 branch from fcd5faf to c19e9e6 Compare December 1, 2025 14:19
try {
CheckoutPaymentMethodChangeStartParams params = event.getParams();

Map<String, Object> eventData = new HashMap<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this bits a tad repetitive between the inline/sheet event processors - will perform a follow up to have a factory class for event construction

const handleError = useCallback<
Required<NativeCheckoutWebViewProps>['onError']
>(
(event: {nativeEvent: CheckoutException}) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These types on event: {nativeEvent} were duplicative in the end because we already pass the generic into useCallback so was able to remove them

@kieran-osgood-shopify kieran-osgood-shopify force-pushed the prototype-development/issue-8681-checkout.paymentmethodchangestart2 branch from c19e9e6 to 500215d Compare December 1, 2025 14:31
@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as ready for review December 1, 2025 14:31
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the prototype-development/issue-8681-checkout.paymentmethodchangestart2 branch from e45705f to 45c5e91 Compare December 3, 2025 09:57
@kieran-osgood-shopify kieran-osgood-shopify merged commit 1bcb609 into prototype/development Dec 3, 2025
7 checks passed
@kieran-osgood-shopify kieran-osgood-shopify deleted the prototype-development/issue-8681-checkout.paymentmethodchangestart2 branch December 3, 2025 17:24
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