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

creditcard return Validation Failed #6

Closed yousef-almadhoun closed 1 year ago

yousef-almadhoun commented 1 year ago

{ "amount": 1000.0, "source": { "type": "creditcard", "name": "yousef madhoun", "number": 4111111111111111, "cvc": 123, "month": 12, "year": 24 }, "callback_url": "https://example.com/orders", "description": "description" }

return

{ "type": "invalid_request_error", "message": "Validation Failed", "errors": { "company": [ "is not supported. Only Mastercard, Visa, MADA and American Express card numbers are supported" ] } }

Screen Shot 2022-10-03 at 4 32 21 PM
yousef-almadhoun commented 1 year ago

The solution is to send the credit card number and other information as integers rather than strings. Please wrap these values in quotation marks.