此MID在我们的过渡环境中不可用

时间:2019-09-21 05:45:34

标签: android flutter dart

我正在尝试将Paytm付款网关集成到Flutter中,但是它在停滞中效果很好,但是当我移到生产环境中时会显示错误。此MID在我们的暂存环境中不可用。

依赖性:   paytm:^ 1.0.0

import'package:paytm / paytm.dart';

void 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();
  });
});

}

1 个答案:

答案 0 :(得分:0)

您仍在使用阶段callBackUrl,阶段WEBSITE和阶段INDUSTRY_TYPE_ID。您应该将其更改为生产值,因为callBackUrlhttps://securegw.paytm.in开头