orderpayment

This commit is contained in:
2025-02-03 18:16:41 +05:30
parent 1f7254ecaa
commit 8fb5ac1f31
21 changed files with 1433 additions and 789 deletions

View File

@@ -0,0 +1,104 @@
// To parse this JSON data, do
//
// final orderPaymnet = orderPaymnetFromJson(jsondynamic);
import 'dart:convert';
OrderPaymnet orderPaymnetFromJson(dynamic str) =>
OrderPaymnet.fromJson(json.decode(str));
dynamic orderPaymnetToJson(OrderPaymnet data) => json.encode(data.toJson());
class OrderPaymnet {
bool? success;
dynamic code;
dynamic message;
PaymentData? data;
OrderPaymnet({
this.success,
this.code,
this.message,
this.data,
});
factory OrderPaymnet.fromJson(Map<dynamic, dynamic> json) => OrderPaymnet(
success: json["success"],
code: json["code"],
message: json["message"],
data: PaymentData.fromJson(json["data"]),
);
Map<dynamic, dynamic> toJson() => {
"success": success,
"code": code,
"message": message,
"data": data!.toJson(),
};
}
class PaymentData {
dynamic merchantId;
dynamic merchantTransactionId;
InstrumentResponse? instrumentResponse;
PaymentData({
this.merchantId,
this.merchantTransactionId,
this.instrumentResponse,
});
factory PaymentData.fromJson(Map<dynamic, dynamic> json) => PaymentData(
merchantId: json["merchantId"],
merchantTransactionId: json["merchantTransactionId"],
instrumentResponse:
InstrumentResponse.fromJson(json["instrumentResponse"]),
);
Map<dynamic, dynamic> toJson() => {
"merchantId": merchantId,
"merchantTransactionId": merchantTransactionId,
"instrumentResponse": instrumentResponse!.toJson(),
};
}
class InstrumentResponse {
dynamic type;
RedirectInfo? redirectInfo;
InstrumentResponse({
this.type,
this.redirectInfo,
});
factory InstrumentResponse.fromJson(Map<dynamic, dynamic> json) =>
InstrumentResponse(
type: json["type"],
redirectInfo: RedirectInfo.fromJson(json["redirectInfo"]),
);
Map<dynamic, dynamic> toJson() => {
"type": type,
"redirectInfo": redirectInfo!.toJson(),
};
}
class RedirectInfo {
dynamic url;
dynamic method;
RedirectInfo({
this.url,
this.method,
});
factory RedirectInfo.fromJson(Map<dynamic, dynamic> json) => RedirectInfo(
url: json["url"],
method: json["method"],
);
Map<dynamic, dynamic> toJson() => {
"url": url,
"method": method,
};
}