Skip to content

Conversation

@Skalakid
Copy link
Collaborator

Details

This PR normalizes the onCardActivated event payload structure across iOS and Android platforms to ensure consistency and improve developer experience.

Changes:

  • Event property naming: Changed actionStatusstatus in the TypeScript type definition
  • iOS payload keys: Changed statestatus and serialNumbertokenId to match Android implementation
  • Android status value: Changed "active""activated" for consistency with iOS
  • Documentation: Updated README to reflect the new status property name

Related Issues

#53

Manual Tests

  1. Test card activation flow on iOS and verify the event listener receives payload with status and tokenId properties
  2. Test card activation flow on Android and verify the event listener receives payload with status: "activated" instead of status: "active"
  3. Test card cancellation on both platforms and verify status: "canceled" is emitted

Linked PRs

N/A

Copy link
Collaborator

@zfurtak zfurtak left a comment

Choose a reason for hiding this comment

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

LGTM, just let me test it first 👍

| **UserAddress** | Structured address used for cardholder verification. | `name: string`,<br>`addressOne: string`,<br>`addressTwo: string`,<br>`city: string`,<br>`administrativeArea: string`,<br>`countryCode: string`,<br>`postalCode: string`,<br>`phoneNumber: string` |
| **IOSCardData** | Data related to a card that is to be added on iOS platform. | `network: string`,<br>`activationData: string`,<br>`encryptedPassData: string`,<br>`ephemeralPublicKey: string`,<br>`cardHolderTitle: string`,<br>`cardHolderName: string`,<br>`lastDigits: string`,<br>`cardDescription: string`,<br>`cardDescriptionComment: string` |
| **onCardActivatedPayload** | Data used by listener to notice when a cards status changes. | `tokenId: string`,<br> `actionStatus: 'activated' \| 'canceled'`<br> |
| **onCardActivatedPayload** | Data used by listener to notice when a card's status changes. | `tokenId: string`,<br> `status: 'activated' \| 'canceled'`<br> |
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess CardStatus type should also be changed?

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think no, here we have card state, but from the event listener, we are getting a status of the provisioning (success -> activated / failure -> canceled)

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.

3 participants