configure static method

void configure(
  1. PaystackConfig config
)

Sets app-level defaults for all PayWithPayStack calls.

Call this once in main() (or your DI setup) so that secretKey, currency, and callbackUrl can be omitted on individual calls.

PayWithPayStack.configure(PaystackConfig(
  secretKey: 'sk_live_xxxx',
  currency: 'GHS',
  callbackUrl: 'https://my-app.com/callback',
  enableLogging: kDebugMode,
));

Implementation

static void configure(PaystackConfig config) {
  _globalConfig = config;
}