binance_pay 0.0.2 copy "binance_pay: ^0.0.2" to clipboard
binance_pay: ^0.0.2 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.2

⚡ 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,
);




3
likes
150
pub points
58%
popularity

Publisher

verified publishermarsad.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

convert, crypto, flutter, http

More

Packages that depend on binance_pay