PayMongoSDK constructor

PayMongoSDK(
  1. String secret, {
  2. BaseClient? http,
  3. String apiUrl = 'api.paymongo.com',
})

Following methods will use secret key

  • createPayment Initialize PayMongo SDK.

The code provided is an example of using a secret key

final publicKeyClient = PayMongoSDK(publicKey);
final secretKeyClient = PayMongoSDK(secretKey);

Implementation

PayMongoSDK(this.secret, {this.http, String apiUrl = 'api.paymongo.com'})
    : _apiUrl = apiUrl,
      assert(
        secret.isNotEmpty,
        "API KEY must be provided, go to PayMongo Dashboard",
      );