Last updated:
0 purchases
flutter hyperswitch
Flutter Hyperswitch #
Flutter Hyperswitch is a package designed to facilitate payment operations within Flutter applications, providing seamless integration with payment gateways and offering a variety of customization options.
Features #
Initiate Payment Sheet: Initialize the payment sheet with customizable parameters.
Present Payment Sheet: Display the payment sheet within your Flutter app.
Getting Started #
To use this package in your Flutter project, follow these steps:
Installation #
Add flutter_hyperswitch to your pubspec.yaml file:
yamldependencies:
flutter_hyperswitch: ^version_number
copied to clipboard
Then, run:
dartflutter pub get
copied to clipboard
Usage #
Import the Package
dartimport 'package:flutter_hyperswitch/flutter_hyperswitch.dart';
final _hyper = FlutterHyperswitch();
copied to clipboard
Initialize the payment sheet with required parameters:
dart//Set up HyperConfig parameters
_hyper.init(HyperConfig(publishableKey: 'your_publishable_key'));
// Set up the payment parameters
PaymentSheetParams params = PaymentSheetParams(
clientSecret: 'your_client_secret',
// Add other required parameters
);
// Initialize the payment sheet
Map<String, dynamic>? result = await _hyper.initPaymentSession(params);
copied to clipboard
Present the payment sheet within your app:
dartMap<String, dynamic>? result = await _hyper.presentPaymentSheet();copied to clipboard
Configuration #
You'll need to configure your backend and obtain necessary keys/secrets for successful payment processing. Please refer to our documentation Node SDK Reference for detailed setup instructions.
In the example project, you can also create a simple mock server using the following commands:
bashcd server
npm i
npm startcopied to clipboard
Documentation #
For detailed usage instructions, examples, and API reference, visit the documentation.
Issues & Contributions #
If you encounter any issues or would like to contribute, feel free to
reach out us here.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.