PaymentResponse.failure constructor
PaymentResponse.failure({})
Create a failed payment response
Implementation
factory PaymentResponse.failure({
required String message,
String? errorCode,
String? orderId,
PaymentProvider? provider,
Map<String, dynamic>? rawResponse,
Map<String, dynamic>? metadata,
}) {
return PaymentResponse(
status: PaymentStatus.failure,
message: message,
errorCode: errorCode,
orderId: orderId,
provider: provider,
rawResponse: rawResponse,
metadata: metadata,
);
}