LokotroPaymentBody.fromLegacy constructor

LokotroPaymentBody.fromLegacy({
  1. required String systemRef,
  2. String? customRef,
  3. Map<String, dynamic>? metadata,
  4. double amount = 100.0,
  5. String currency = 'USD',
})

Create from old format for backward compatibility

Implementation

factory LokotroPaymentBody.fromLegacy({
  required String systemRef,
  String? customRef,
  Map<String, dynamic>? metadata,
  double amount = 100.0,
  String currency = 'USD',
}) {
  return LokotroPaymentBody(
    customerReference: customRef ?? systemRef,
    amount: amount.toString(),
    currency: currency,
    metadata: metadata,
  );
}