forte integration test
parent
114dacacea
commit
a0741ce84d
|
|
@ -86,10 +86,11 @@ class MainActivity : FlutterActivity() {
|
||||||
val amount = call.argument<String>("amount").toString()
|
val amount = call.argument<String>("amount").toString()
|
||||||
val packageName = call.argument<String>("packageName").toString()
|
val packageName = call.argument<String>("packageName").toString()
|
||||||
val operationParameters = createOperationParameters(token)
|
val operationParameters = createOperationParameters(token)
|
||||||
|
val body = JsonForExternalCall.getRefundCardJson(operationParameters.authToken, terminalId, operDay, transNum, amount)
|
||||||
|
|
||||||
startOperation(
|
startOperation(
|
||||||
OperationType.REFUND,
|
OperationType.REFUND,
|
||||||
JsonForExternalCall.getRefundCardJson(operationParameters.authToken, terminalId, operDay, transNum, amount),
|
body,
|
||||||
packageName
|
packageName
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ object JsonForExternalCall {
|
||||||
"instrument": "CARD",
|
"instrument": "CARD",
|
||||||
"amountData" : {
|
"amountData" : {
|
||||||
"currencyCode": "348",
|
"currencyCode": "348",
|
||||||
"amount": "6000",
|
"amount": "$amount",
|
||||||
"amountExponent": "2"
|
"amountExponent": "2"
|
||||||
},
|
},
|
||||||
"parentTransaction" : {
|
"parentTransaction" : {
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,9 @@ class ForteService extends BaseService {
|
||||||
|
|
||||||
Future<ForteResponse> refund({double amount, String token, int terminalId, int operDay, int transNum }) async {
|
Future<ForteResponse> refund({double amount, String token, int terminalId, int operDay, int transNum }) async {
|
||||||
try {
|
try {
|
||||||
|
double total = amount * 100;
|
||||||
String response = await _channel.invokeMethod("refund", <String, dynamic>{
|
String response = await _channel.invokeMethod("refund", <String, dynamic>{
|
||||||
'amount': amount.toInt(),
|
'amount': total,
|
||||||
'token': token ,
|
'token': token ,
|
||||||
'terminalId': terminalId,
|
'terminalId': terminalId,
|
||||||
'operDay': operDay,
|
'operDay': operDay,
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ class _PaymentViewState extends State<PaymentView> {
|
||||||
AmanDao<CardData> data = await paymentMethod(_total);
|
AmanDao<CardData> data = await paymentMethod(_total);
|
||||||
|
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
pressPayment(widget.model.operationType, data.data);
|
pressPayment('card', data.data);
|
||||||
} else {
|
} else {
|
||||||
_dialogService.showDialog(description: data.msg);
|
_dialogService.showDialog(description: data.msg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue