You are here

commerce1_payment.yml in Commerce Migrate 8.2

modules/commerce/migrations/commerce1_payment.yml

File

modules/commerce/migrations/commerce1_payment.yml
View source
  1. id: commerce1_payment
  2. label: Commerce payment
  3. migration_tags:
  4. - Drupal 7
  5. - Commerce
  6. - Content
  7. source:
  8. plugin: commerce1_payment_transaction
  9. constants:
  10. type: payment_manual
  11. process:
  12. # If you are using this file to build a custom migration consider removing
  13. # the payment_id field to allow incremental migrations.
  14. payment_id: transaction_id
  15. payment_gateway:
  16. -
  17. plugin: migration_lookup
  18. migration: commerce1_payment_gateway
  19. source: payment_method
  20. -
  21. plugin: skip_on_empty
  22. method: row
  23. # Migrated payments are considered historical and should not initiate real
  24. # transactions; therefore the manual payment gateway is used.
  25. type: 'constants/type'
  26. order_id:
  27. -
  28. plugin: migration_lookup
  29. migration: commerce1_order
  30. source: order_id
  31. -
  32. plugin: skip_on_empty
  33. method: row
  34. 'amount/number': amount
  35. 'amount/currency_code': currency_code
  36. 'refunded_amount/number': refund_amount
  37. 'refunded_amount/currency_code': currency_code
  38. state: status
  39. completed: received
  40. destination:
  41. plugin: entity:commerce_payment
  42. destination_module: commerce_payment
  43. migration_dependencies:
  44. required:
  45. - commerce1_order
  46. - commerce1_payment_gateway