Skip to content

Discrepancy between Date handling on iOS and Android #368

Closed
@jonasbark

Description

We noticed a discrepancy between iOS / Android regarding "created" attribute on PaymentIntent on the native side:

https://github.com/stripe/stripe-react-native/blob/master/android/src/main/java/com/reactnativestripesdk/Mappers.kt#L328 -> created is a string
https://github.com/stripe/stripe-react-native/blob/master/ios/Mappers.swift#L360 -> created is an int
https://github.com/stripe/stripe-react-native/blob/master/src/types/PaymentIntents.ts#L7 -> created is a string

I'm not sure if it has an effect on React Native itself but it does on Android. Adjusting convertToUnitTimestamp on Mappers.kt on Android to return a String would fix this issue.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    P0Address these issues firstbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions