stripe_card_params.cpp 862 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #include "stripe/stripe_card_params.h"
  8. namespace Stripe {
  9. QString CardParams::rootObjectName() {
  10. return "card";
  11. }
  12. std::map<QString, QString> CardParams::formFieldValues() const {
  13. return {
  14. { "number", number },
  15. { "cvc", cvc },
  16. { "name", name },
  17. { "address_line1", addressLine1 },
  18. { "address_line2", addressLine2 },
  19. { "address_city", addressCity },
  20. { "address_state", addressState },
  21. { "address_zip", addressZip },
  22. { "address_country", addressCountry },
  23. { "exp_month", QString::number(expMonth) },
  24. { "exp_year", QString::number(expYear) },
  25. { "currency", currency },
  26. };
  27. }
  28. } // namespace Stripe