payment method

Future<void> payment(
  1. PaymentRequest request
)

Performs a payment with the given request.

Uses the credentials and environment set in init. Implement the actual API call to Payorc inside this method.

Implementation

Future<void> payment(PaymentRequest request) async {
  // TODO: Replace with real Payorc API call (e.g. open checkout URL or call API)
  // Use merchantKey, merchantSecret, environment and request payload.
  throw UnimplementedError(
    'Payorc payment API integration is not implemented yet. '
    'Use request: ${request.orderDetails.isNotEmpty ? request.orderDetails.first.mOrderId : ""}',
  );
}