sslcommerz 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 53

SSLCommerz Payment Gateway Flutter package. #

Installation #

In the dependencies: section of your pubspec.yaml, add the following line:

  sslcommerz:

How to use: #

import 'package:sslcommerz/sslcommerz.dart';

class MyApp extends SsLCommerz {

}
For Sandbox:
const test = new SSLCzPayment({
    store_id: 'testbox',
    store_passwd: 'qwerty',
    total_amount: 100,
    currency: 'BDT',
    tran_id: 'REF123',
    success_url: 'http://yoursite.com/success.php',
    fail_url: 'http://yoursite.com/fail.php',
    cancel_url: 'http://yoursite.com/cancel.php',
    shipping_method:'Courier',
    product_name:'Computer.',
    product_category:'Electronic',
    product_profile:'general',
    cus_name: 'Customer Name',
    cus_email: 'cust@email.com',
    cus_add1: 'Dhaka',
    cus_add2: 'Dhaka',
    cus_city: 'Dhaka',
    cus_state: 'Dhaka',
    cus_postcode: '1207',
    cus_country: 'Bangladesh',
    cus_phone: '01711111111',
    cus_fax: '01711111111',
    ship_name: 'Customer Name',
    ship_add1: 'Dhaka',
    ship_add2: 'Dhaka',
    ship_city: 'Dhaka',
    ship_state: 'Dhaka',
    ship_postcode: 1207,
    ship_country: 'Bangladesh',
    multi_card_name: 'mastercard',
    value_a: 'ref001_A',
    value_b: 'ref002_B',
    value_c: 'ref003_C',
    value_d: 'ref004_D'
}, false);

For Live Transaction:
const test = new SSLCzPayment({
    store_id: 'testbox',
    store_passwd: 'qwerty',
    total_amount: 100,
    currency: 'BDT',
    tran_id: 'REF123',
    success_url: 'http://yoursite.com/success.php',
    fail_url: 'http://yoursite.com/fail.php',
    cancel_url: 'http://yoursite.com/cancel.php',
    shipping_method:'Courier',
    product_name:'Computer.',
    product_category:'Electronic',
    product_profile:'general',
    cus_name: 'Customer Name',
    cus_email: 'cust@email.com',
    cus_add1: 'Dhaka',
    cus_add2: 'Dhaka',
    cus_city: 'Dhaka',
    cus_state: 'Dhaka',
    cus_postcode: '1207',
    cus_country: 'Bangladesh',
    cus_phone: '01711111111',
    cus_fax: '01711111111',
    ship_name: 'Customer Name',
    ship_add1: 'Dhaka',
    ship_add2: 'Dhaka',
    ship_city: 'Dhaka',
    ship_state: 'Dhaka',
    ship_postcode: 1207,
    ship_country: 'Bangladesh',
    multi_card_name: 'mastercard',
    value_a: 'ref001_A',
    value_b: 'ref002_B',
    value_c: 'ref003_C',
    value_d: 'ref004_D'
}, true);

Find more details in SSLCommerz Developer's Guide

[0.0.1] - 06 May 2020. #

  • initial commit v0.0.1

example/README.md

SSLCommerz Payment Gateway Flutter package Demonstrates . #

Demonstrates how to use the sslcommerz package in flutter.

Getting Started #

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  sslcommerz: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:sslcommerz/sslcommerz.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
27
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
53
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [sslcommerz] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

10 out of 10 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/sslcommerz.dart. (-1 points)

Analysis of lib/sslcommerz.dart reported 2 hints:

line 3 col 8: Unused import: 'dart:async'.

line 5 col 8: Unused import: 'package:sslcommerz/SSLCZData.dart'.

Fix lib/SSLCzPayment.dart. (-0.50 points)

Analysis of lib/SSLCzPayment.dart reported 1 hint:

line 1 col 8: Unused import: 'package:sslcommerz/SSLCZData.dart'.

Fix lib/model/payment.dart. (-0.50 points)

Analysis of lib/model/payment.dart reported 1 hint:

line 1 col 8: Unused import: 'dart:convert'.

Format lib/SSLCZData.dart.

Run flutter format to format lib/SSLCZData.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/mdsami/flutter-sslcommerz was unreachable.

The package description is too short. (-17 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test