-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly parse JSON when creating or deleting customer card source (#…
…857) Both `POST /v1/customers/:customer_id/sources` and `DELETE /v1/customers/:customer_id/sources/:source_id` return a different shape depending on whether the object referenced by `:source_id` is a `Source` or a `Card`. The current implementation was not handling the `Card` case. The impact of this is that the listener passed to either `CustomerSession#addCustomerSource` or `CustomerSession#deleteCustomerSource` was not being called when the source was a `Card`. The short-term fix is to create a `Source` object and only populate its `id` field. This is not ideal because we are creating a `Source` with a card id, but it resolves the issue of the listener not being called. The long-term fix is to pass a `StripePaymentSource` to the listener. ANDROID-344
- Loading branch information
1 parent
8e14edd
commit f3e65da
Showing
2 changed files
with
81 additions
and
3 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