Skip to content

Commit

Permalink
add assert
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceramcesoliveros committed Jul 10, 2021
1 parent 1eb4d03 commit 7103178
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/utils/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ import '../src.dart';
class PayMongoSDK {
/// {@macro paymonggosdk}
PayMongoSDK(this.secret, {this.http, String apiUrl = 'api.paymongo.com'})
: _apiUrl = apiUrl;
: _apiUrl = apiUrl,
assert(
secret.isNotEmpty,
"API KEY must be provided, go to PayMongo Dashboard",
);

/// key generated from paymongo dashboard
/// you can use `--dart-define` command to store your private key.
Expand Down

0 comments on commit 7103178

Please sign in to comment.