Skip to content

Commit

Permalink
fix: #1465 unknow result
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon committed Dec 18, 2023
1 parent fb10f16 commit f06e51a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ class MethodChannelStripe extends StripePlatform {
PaymentSheetPaymentOption? _parsePaymentSheetResult(
Map<String, dynamic>? result) {
if (result != null) {
if (result.isEmpty) {
///iOS sometimes returns empty paymentoption so add workaround for it.
if (result.isEmpty ||
(result['paymentOption'] == null && result['error'] == null)) {
return null;
} else if (result['paymentOption'] != null) {
return PaymentSheetPaymentOption.fromJson(result['paymentOption']);
Expand Down

0 comments on commit f06e51a

Please sign in to comment.