Merge pull request #21374 from ufundo/event-custom-tokens
[civicrm-core.git] / Civi / Test / ExampleData / ContributionRecur / Euro5990.ex.php
CommitLineData
13515f0c
TO
1<?php
2
3namespace Civi\Test\ExampleData\ContributionRecur;
4
5class Euro5990 extends \Civi\Test\EntityExample {
6
7 public function getExamples(): iterable {
8 yield [
9 'name' => "entity/{$this->entityName}/{$this->exName}/pending",
10 ];
11 yield [
12 'name' => "entity/{$this->entityName}/{$this->exName}/cancelled",
13 ];
14 }
15
16 public function build(array &$example): void {
17 $base = [
18 'id' => 50,
19 'contact_id' => 100,
20 'is_email_receipt' => 1,
21 'start_date' => '2021-07-23 15:39:20',
22 'end_date' => '2021-07-26 18:07:20',
23 'amount' => 5990.99,
24 'currency' => 'EUR',
25 'frequency_unit' => 'year',
26 'frequency_interval' => 2,
27 'installments' => 24,
28 'payment_instrument_id:label' => 'Debit Card',
29 'financial_type_id:label' => 'Member dues',
30 'processor_id' => 'abc_xyz',
31 'payment_processor_id' => 2,
32 'trxn_id' => 123,
33 'invoice_id' => 'inv123',
34 'sequential' => 1,
35 'failure_retry_date' => '2020-01-03',
36 'auto_renew' => 1,
37 'cycle_day' => '15',
38 'is_test' => TRUE,
39 'payment_token_id' => 4,
40 ];
41
42 $extras['pending'] = [
43 'status_id' => 2,
44 'cancel_date' => NULL,
45 'cancel_reason' => NULL,
46 ];
47 $extras['cancelled'] = [
48 'status_id' => 3,
49 'cancel_date' => '2021-08-19 09:12:45',
50 'cancel_reason' => 'Because',
51 ];
52
53 $example['data'] = $base + $extras[basename($example['name'])];
54 }
55
56}