Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D/plugins.madbrains.ru/mad_pay_channel(10071): ignoring exception: java.lang.IllegalStateException: Reply already submitted. See https://github.com/flutter/flutter/issues/29092 for details. #40

Open
FeofanGreek opened this issue Jan 25, 2022 · 5 comments

Comments

@FeofanGreek
Copy link

FeofanGreek commented Jan 25, 2022

Здравствуйте! После нажатия на кнопку GPay и выбора карты для оплаты в консоль вываливается ошибка D/plugins.madbrains.ru/mad_pay_channel(10071): ignoring exception: java.lang.IllegalStateException: Reply already submitted. See https://github.com/flutter/flutter/issues/29092 for details.

Дальнейшее выполнение программы не идет.

Ошибку вызывает функция из андроид пакета, находится в файле MadPayAndroidPlugin.kt на строке 61:

  private fun invokeSuccessResult(@Nullable data: ByteArray?) {
        val res = MadPay.Response.newBuilder().setSuccess(true)
        if (data != null)
            res.data = ByteString.copyFrom(data)

        ignoreIllegalState { activeResult.success(res.build().toByteArray()) }
    } 
@mit-73
Copy link
Collaborator

mit-73 commented Jan 26, 2022

Здравствуйте @FeofanGreek, скажите пожалуйста какую версию mad_pay и flutter вы используете?

@FeofanGreek
Copy link
Author

FeofanGreek commented Jan 26, 2022 via email

@FeofanGreek
Copy link
Author

FeofanGreek commented Jan 26, 2022

Пример моей реализации

`final MadPay pay = MadPay(environment: Environment.test);

GooglePayButton(
environment: Environment.test,
type: GooglePayButtonType.plain,
request: PaymentRequest.google(
google: GoogleParameters(
gatewayName: 'tinkoff',
gatewayMerchantId: 'DEMO',
merchantId: '
**',
),
currencyCode: 'RUB',
countryCode: 'RU',
paymentItems: [
PaymentItem(name: 'T-Shirt', price: 11.00),
],
paymentNetworks: [
PaymentNetwork.visa,
PaymentNetwork.mastercard,
PaymentNetwork.mir,
PaymentNetwork.maestro
]
),
onPaymentResult: (PaymentResponse? req) async {
print(1);
const String terminalKey = 'DEMO';
const String password = '
';
String customerKey = userId.toString();
final TinkoffAcquiring acquiring = TinkoffAcquiring(
TinkoffAcquiringConfig(
terminalKey: terminalKey,
password: password,
debug: false,
),
);
final InitResponse init = await acquiring.init(InitRequest(
orderId: orderNum, // id заказа
customerKey: customerKey, // ключ продовца
amount: amount, // сумма в копейках
//… // другие параметры
));
// производим оплату
final FinishAuthorizeResponse fa =
await acquiring.finishAuthorize(FinishAuthorizeRequest(
paymentId: int.parse(init.paymentId!),
// id из платежной сессии
encryptedPaymentData: req!.token,
// данные из Apple/Google Pay
route: Route.Route.acq,
source: Source.googlePay // ApplePay или GooglePay
//… // другие параметры
));
// Проверяем есть ли запрос на прохождение классической провер
final Completer<Submit3DSAuthorizationResponse?> webView =
Completer<Submit3DSAuthorizationResponse?>();
if (fa.status == Status.threeDsChecking) {
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) =>
Scaffold(
body: WebView3DS(
config: acquiring.config,
is3DsVersion2: fa.is3DsVersion2 ,
serverTransId: fa.serverTransId ,
acsUrl: fa.acsUrl!,
md: fa.md,
paReq: fa.paReq,
acsTransId: fa.acsTransId,
//version: check3DSVersion.version,
onLoad: (bool v) {
debugPrint('WebView load: $v');
},
onFinished: (
Submit3DSAuthorizationResponse? v) {
Navigator.of(context).pop();
webView.complete(v);
},
),
),
));
} else {
webView.complete(null);
}
},
onError: (Object? e) {
print(e);
},
)`

@FeofanGreek
Copy link
Author

FeofanGreek commented Jan 26, 2022

IMG_0202
D/plugins.madbrains.ru/mad_pay_channel(25255): ignoring exception: java.lang.IllegalStateException: Reply already submitted. See flutter/flutter#29092 for details.

@mit-73
Copy link
Collaborator

mit-73 commented Jun 27, 2022

@FeofanGreek к сожалению мы не смогли воспроизвести вашу проблему. Скажите пожалуйста проблема все еще актуальна?

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

No branches or pull requests

2 participants