common.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  2. from odoo.addons.payment.tests.common import PaymentCommon
  3. class PaypalCommon(PaymentCommon):
  4. @classmethod
  5. def setUpClass(cls):
  6. super().setUpClass()
  7. cls.paypal = cls._prepare_provider('paypal', update_values={
  8. 'paypal_email_account': 'dummy@test.mail.com',
  9. 'fees_active': False,
  10. })
  11. # Override default values
  12. cls.provider = cls.paypal
  13. cls.currency = cls.currency_euro
  14. cls.notification_data = {
  15. 'PayerID': '59XDVNACRAZZK',
  16. 'address_city': 'Scranton',
  17. 'address_country_code': 'US',
  18. 'address_name': 'Mitchell Admin',
  19. 'address_state': 'Pennsylvania',
  20. 'address_street': '215 Vine St',
  21. 'address_zip': '18503',
  22. 'first_name': 'Norbert',
  23. 'handling_amount': '0.00',
  24. 'item_name': 'YourCompany: Test Transaction',
  25. 'item_number': cls.reference,
  26. 'last_name': 'Buyer',
  27. 'mc_currency': 'USD',
  28. 'mc_fee': '2.00',
  29. 'mc_gross': '50.00',
  30. 'notify_version': 'UNVERSIONED',
  31. 'payer_email': 'test-buyer@mail.odoo.com',
  32. 'payer_id': '59XDVNACRAZZK',
  33. 'payer_status': 'VERIFIED',
  34. 'payment_date': '2022-01-19T08:38:06Z',
  35. 'payment_fee': '2.00',
  36. 'payment_gross': '50.00',
  37. 'payment_status': 'Completed',
  38. 'payment_type': 'instant',
  39. 'protection_eligibility': 'ELIGIBLE',
  40. 'quantity': '1',
  41. 'receiver_id': 'BEQE89VH6257B',
  42. 'residence_country': 'US',
  43. 'shipping': '0.00',
  44. 'txn_id': '1H89255869624041K',
  45. 'txn_type': 'web_accept',
  46. 'verify_sign': 'dummy',
  47. }