android - Flutter 暂存环境中不提供此 MID

标签 android flutter dart

我正在尝试将 paytm 支付网关集成到 Flutter 中,但它在分期中运行良好,但是当我将分期转移到显示错误的生产环境时。此 MID 在我们的暂存环境中不可用。

依赖项:
付款时间:^1.0.0

导入“包:paytm/paytm.dart”;

无效 generateCheckSum() 异步 {

var url =' https://us-central1-mrdishant-4819c.cloudfunctions.net/generateCheckSum ';

String orderId = tnxidController.text;

//Please use your parameters here
//CHANNEL_ID etc provided to you by paytm

final response = await http.post(url, headers: {
  "Content-Type": "application/x-www-form-urlencoded"
}, body: {
  "mid": "------------------",
  "CHANNEL_ID": "WAP",
  'INDUSTRY_TYPE_ID': 'Retail',
  'WEBSITE': 'APPSTAGING',
  'PAYTM_MERCHANT_KEY': '--------------',
  'TXN_AMOUNT': amountController.text,
  'ORDER_ID': orderId,
  'CUST_ID': Constant.SUPERID,
});

String callBackUrl ='https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=' + orderId;

print("Response :" + response.body);

var paytmResponse = Paytm.startPaytmPayment(
    true,
    "---------------------",
    orderId,
    Constant.SUPERID,
    "WAP",
    amountController.text,
    'APPSTAGING',
    callBackUrl,
    'Retail',
    response.body);

paytmResponse.then((value) {
  setState(() {
    payment_response = value.toString();
  });
});

}

最佳答案

您仍在使用暂存 callBackUrl ,分期WEBSITE和分期INDUSTRY_TYPE_ID .您应该将它们更改为它们的生产值,对于 callBackUrl它以 https://securegw.paytm.in 开头

关于android - Flutter 暂存环境中不提供此 MID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58037606/

相关文章:

android - 为 ExpandableListView 创建布局

android - 设置安卓 :background is messing up the text for my radiobutton

Flutter:动态更改选项卡文本

tensorflow - 资源无法调用关闭 -flutter/tflite 错误

flutter - unselectedLabelstyle 在 Flutter 中不起作用

android - 如何在 Google Play 上的同一应用程序中使用另一个 keystore

flutter - 如何在Flutter/Dart中处理键盘 Action 或在键盘TextInputAction中添加功能?

android - 如何在 Flutter 中打印 String 函数的结果?

google-chrome-extension - 在Dart中创建Web客户端

java - Google Cloud Messaging 服务器端注册?