CoFeePayment constructor

CoFeePayment({
  1. required String clientId,
  2. required PaymentEnvironment paymentEnvironment,
})

Creates a CoFeePayment instance with the specified clientId and paymentEnvironment.

The clientId is required for authentication with the CoFee payment API. Different client IDs are provided for sandbox and production environments.

The paymentEnvironment determines whether payments are processed in sandbox (testing) or production (live) mode. It affects which API endpoint is used when fetching payment details.

Example:

final payment = CoFeePayment(
  clientId: 'test_client_123',
  paymentEnvironment: PaymentEnvironment.sandbox,
);

Implementation

CoFeePayment({required this.clientId, required this.paymentEnvironment});