binance_pay 0.0.3 copy "binance_pay: ^0.0.3" to clipboard
binance_pay: ^0.0.3 copied to clipboard

A Flutter package for integrating Binance Pay API into your mobile applications, enabling users to make payments with ease.

Version

⭐ Installing #

dependencies:
    binance_pay: ^0.0.3

⚡ Import #

import 'package:binance_pay/binance_pay.dart';

📙 How To Use #

BinancePay pay = BinancePay(
    apiKey: apiKey,
    apiSecretKey: apiSecret,
);

Create an order #

Returns OrderResponse

String merchantTradeNo = generateMerchantTradeNo();

//Create an order
OrderResponse response = await pay.createOrder(
    body: RequestBody(
        merchantTradeNo: merchantTradeNo,
        orderAmount: '1.01',
        currency: 'BUSD',
        goodsType: '01',
        goodsCategory: '1000',
        referenceGoodsId: '1234567',
        goodsName: 'Cup Cake',
        goodsDetail: 'A Yummy cup cake.',
    ),
);

Query the order #

Returns QueryResponse


//Query the order
QueryResponse queryResponse = await pay.queryOrder(
    merchantTradeNo: merchantTradeNo,
    prepayId: response.data!.prepayId,
);

Close the order #

Returns CloseResponse


//Close the order
CloseResponse closeResponse = await pay.closeOrder(
    merchantTradeNo: merchantTradeNo,
);




4
likes
160
points
38
downloads

Publisher

verified publishermarsad.dev

Weekly Downloads

A Flutter package for integrating Binance Pay API into your mobile applications, enabling users to make payments with ease.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

convert, crypto, flutter, http

More

Packages that depend on binance_pay