Add payment.gateway_type_id
This commit is contained in:
parent
290f52b49d
commit
697c24ccc3
|
|
@ -826,8 +826,8 @@ abstract class GatewayEntity extends Object
|
|||
.where((typeId) => options[typeId].supportTokenBilling)
|
||||
.isNotEmpty;
|
||||
|
||||
bool get supportsRefunds =>
|
||||
options.keys.where((typeId) => options[typeId].supportRefunds).isNotEmpty;
|
||||
bool supportsRefunds(String gatewayTypeId) =>
|
||||
options[gatewayTypeId].supportRefunds;
|
||||
|
||||
Map<String, dynamic> get parsedFields =>
|
||||
fields.isEmpty ? <String, dynamic>{} : jsonDecode(fields);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class _PaymentRefundState extends State<PaymentRefund> {
|
|||
onChanged: (value) => viewModel
|
||||
.onChanged(payment.rebuild((b) => b..sendEmail = value)),
|
||||
),
|
||||
if (gateway.supportsRefunds)
|
||||
if (gateway.supportsRefunds(payment.gatewayTypeId))
|
||||
SwitchListTile(
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
title: Text(localization.gatewayRefund),
|
||||
|
|
|
|||
Loading…
Reference in New Issue