callPaypalService method

Future callPaypalService(
  1. BuildContext context
)

Implementation

Future callPaypalService(BuildContext context) async {
  await IncodesPaymentServices.paypalPayment(
    context: context,
    clientId: "enter your clientId",
    secretKey: "enter your secretKey",
    transactions: const [
      {
        "amount": {
          "total": '70',
          "currency": "USD",
          "details": {
            "subtotal": '70',
            "shipping": '0',
            "shipping_discount": 0
          }
        },
        "description": "The payment transaction description.",
        "item_list": {
          "items": [
            {"name": "Apple", "quantity": 4, "price": '5', "currency": "USD"},
            {
              "name": "Pineapple",
              "quantity": 5,
              "price": '10',
              "currency": "USD"
            }
          ],
        }
      }
    ],
  );
}