mohammeddawida / moyasar_payment

Flutter library for Moyasar. Supports Apple Pay, STC Pay and Credit Card.
https://pub.dev/packages/moyasar_payment
MIT License
13 stars 7 forks source link

Wrong Number of paramters #2

Closed AhmedAbogameel closed 1 year ago

AhmedAbogameel commented 2 years ago

I'm facing issue testing apple pay the message of the following code is "Wrong Number of paramters" i can not understand what does that mean and what paramters it means?

PayModel res = await _moyasarPayment.applePay(
      amount: amount,
      publishableKey: _publishableKey,
      applepayMerchantId: _applePayMerchantID,
      paymentItems: {'Service Cost' : amount, 'Total Cost': amount},
      currencyCode: 'SAR',
      countryCode: 'SA',
      description: 'Paying for a service with apple pay.',
    );
mohammeddawida commented 2 years ago

Can you put the value of the sent amount?

AhmedAbogameel commented 2 years ago

Can you put the value of the sent amount?

1000.0

mohammeddawida commented 1 year ago

A positive integer in the smallest currency unit (e.g., 100 cents to charge an amount of $1.00, 100 halalah to charge an amount of 1 SAR, or 1 to charge an amount of ¥1, a 0-decimal currency) representing how much to charge the card. The minimum amount is $0.50 (or equivalent in charge currency).