fixed error on payment
This commit is contained in:
@@ -156,6 +156,7 @@ class AddtocartProvider extends ChangeNotifier {
|
||||
},
|
||||
(response) {
|
||||
allitem = response!;
|
||||
_discount = 0.0;
|
||||
_totalPrice = double.parse(response.subtotal.toString());
|
||||
_grandPrice = double.parse(response.subtotal.toString());
|
||||
|
||||
@@ -275,14 +276,24 @@ class AddtocartProvider extends ChangeNotifier {
|
||||
) async {
|
||||
ispaymentLoader = true;
|
||||
notifyListeners();
|
||||
var data;
|
||||
|
||||
var data = {
|
||||
"amount": originalAmount,
|
||||
"addressId": addressId,
|
||||
"cartId": cartId,
|
||||
"couponId": couponId
|
||||
};
|
||||
if (couponId.isEmpty) {
|
||||
data = {
|
||||
"amount": originalAmount,
|
||||
"addressId": addressId,
|
||||
"cartId": cartId,
|
||||
};
|
||||
} else {
|
||||
data = {
|
||||
"amount": originalAmount,
|
||||
"addressId": addressId,
|
||||
"cartId": cartId,
|
||||
"couponId": couponId
|
||||
};
|
||||
}
|
||||
|
||||
print("ksdjfkgjlhdfkg ${data}");
|
||||
try {
|
||||
var result = await _homeRepo.paymentOrder(data);
|
||||
return result.fold(
|
||||
|
||||
Reference in New Issue
Block a user