clickToShopItem method

void clickToShopItem(
  1. BuildContext context,
  2. double amount,
  3. ProductData data
)

Implementation

void clickToShopItem(
  BuildContext context,
  double amount,
  ProductData data,
) async {
  // print('customer email is : ${Storage.getValue(Constants.customerEmail)}');
  // print('oneclick api key is : ${ Constants.oneClickApiKey()}');
  CheckoutButton.depositsCheckout(
      context, CheckoutButton.ButtonConfig(amount: amount),
      userEmail: Storage.getValue(Constants.customerEmail),
      apiKey: Constants.oneClickApiKey(),
      envMode: true, chargeFundsResponse: (response) {
    if (response.data != null) {
      orderCheckOut(context, amount, response.data!.transactionId!, data);
    }
    shopContext?.checkoutEvent.add(response);
  });
}