findByTransactionReference method
Find a payment by its transaction reference
Implementation
Future<Payment?> findByTransactionReference(
String transactionReference) async {
final response = await WebClient().get(
'${InvoiceNinjaAdmin.url}/api/v1/payments?transaction_reference=$transactionReference',
token: InvoiceNinjaAdmin.token);
final data = PaymentList.fromJson(response).data;
return data.isEmpty ? null : data.first;
}