forked from woocommerce/woocommerce-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Model PaymentIntent metadata matching Stripe
Previously, for any PaymentIntent metadata created using our convenience initializers, we stored the orderID as an Int64, however Stripe would transform this to a String. This is due to Stripe sending the metadata over the network in a x-www-urlformencoded request, without any type information, and returning it as a String. This meant that the type stored in the [AnyHashable: Any] for orderID could be a String, or an Int64, depending how the PaymentIntent was created (in tests with the convenience intitializer, vs from Stripe's network response.) This change maintains the Int64 for a convenient(!) convenience init, while also matching the real-life Stripe metadata for accuracy in tests.
- Loading branch information
Showing
4 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters