payaza

Last updated:

0 purchases

payaza Image
payaza Images
Add to Cart

Description:

payaza

Payaza SDK #
Payaza’s SDK makes it easy for you to start accepting payments from your customers when they visit your applications. The checkout SDK can be integrated in very easy steps, making it the easiest way to start accepting payments.
Getting started #
To start collecting payment with Payaza install payaza widget by adding as a in pubspec.yaml dependency
dependencies:
payaza: ^0.0.1
copied to clipboard
Usage #
Initialize SDK anywhere before use
//...
Payaza.init('<public key>');
runApp(const MyApp());
//...
copied to clipboard
// ...
import 'package:payaza/payaza.dart';
// ...

void handleSuccess(PayazaSuccessResponse response) async {
await showAlert(
message: response.data.payazaReference ?? '',
title: 'Payment Successful');
if (context.mounted) {
Navigator.of(context).pop();
}
}

void handleError(PayazaErrorResponse response) async {
await showAlert(message: response.data.message, title: 'Error');
if (context.mounted) {
Navigator.of(context).pop();
}
}

void handleClose() {
print('Payaza widget was closed');
}

void onSubmit() {
Payaza.createTransaction(
context,
config: PayazaConfig(
amount: 110,
connectionMode: PayazaConnectionMode.LIVE_CONNECTION_MODE,
email: "[email protected]",
firstName: "<first name>",
lastName: "<last name>",
phoneNumber: "<+12345678900>",
transactionReference: "transaction_reference",
),
onSuccess: handleSuccess,
onError: handleError,
onClose: handleClose,
);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.