Add sample data from contribution & contribution recur
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 2 Sep 2021 04:17:10 +0000 (16:17 +1200)
committerTim Otten <totten@civicrm.org>
Wed, 15 Sep 2021 23:02:55 +0000 (16:02 -0700)
Civi/WorkflowMessage/GenericWorkflowMessage/contribution.ex.php [new file with mode: 0644]
Civi/WorkflowMessage/GenericWorkflowMessage/contribution_recur.ex.php [new file with mode: 0644]

diff --git a/Civi/WorkflowMessage/GenericWorkflowMessage/contribution.ex.php b/Civi/WorkflowMessage/GenericWorkflowMessage/contribution.ex.php
new file mode 100644 (file)
index 0000000..1ceb6ac
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+return [
+  'tags' => [],
+  'data' => function(\Civi\WorkflowMessage\Examples $examples) {
+    return [
+      'modelProps' => [
+        'contribution' => [
+          'id' => 50,
+          'contact_id' => 100,
+          'financial_type_id' => 'Member dues',
+          'contribution_page_id' => 2,
+          'payment_instrument_id:label' => 'Debit Card',
+          'contribution_status_id' => 1,
+          'receive_date' => '2021-07-23 15:39:20',
+          'revenue_recognition_date' => '2021-07-23 00:00:00',
+          'thankyou_date' => '2021-07-23 15:39:20',
+          'cancel_date' => '',
+          'cancel_reason' => '',
+          'non_deductible_amount' => 5,
+          'total_amount' => 5990.99,
+          'fee_amount' => 0.99,
+          'net_amount' => 5990,
+          'tax_amount' => 60,
+          'currency' => 'EUR',
+          'source' => 'Online donation',
+          'amount_level' => 'premium purchased',
+          'contribution_recur_id' => 50,
+          'check_number' => '',
+          'campaign_id:label' => 'Outreach',
+          'creditnote_id' => '',
+          'trxn_id' => 123,
+          'invoice_id' => 'inv123',
+          'is_test' => TRUE,
+          'is_pay_later' => FALSE,
+        ],
+      ],
+    ];
+  },
+];
diff --git a/Civi/WorkflowMessage/GenericWorkflowMessage/contribution_recur.ex.php b/Civi/WorkflowMessage/GenericWorkflowMessage/contribution_recur.ex.php
new file mode 100644 (file)
index 0000000..f680afc
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+return [
+  'tags' => [],
+  'data' => function(\Civi\WorkflowMessage\Examples $examples) {
+    return [
+      'modelProps' => [
+        'contribution_recur' => [
+          'id' => 50,
+          'contact_id' => 100,
+          'status_id' => 3,
+          'is_email_receipt' => 1,
+          'start_date' => '2021-07-23 15:39:20',
+          'end_date' => '2021-07-26 18:07:20',
+          'cancel_date' => '2021-08-19 09:12:45',
+          'cancel_reason' => 'Because',
+          'amount' => 5990.99,
+          'currency' => 'EUR',
+          'frequency_unit' => 'year',
+          'frequency_interval' => 2,
+          'installments' => 24,
+          'payment_instrument_id:label' => 'Debit Card',
+          'financial_type_id:label' => 'Member dues',
+          'processor_id' => 'abc_xyz',
+          'payment_processor_id' => 2,
+          'trxn_id' => 123,
+          'invoice_id' => 'inv123',
+          'sequential' => 1,
+          'failure_retry_date' => '2020-01-03',
+          'auto_renew' => 1,
+          'cycle_day' => '15',
+          'is_test' => TRUE,
+          'payment_token_id' => 4,
+        ],
+      ],
+    ];
+  },
+];