Update copyright date for 2020
[civicrm-core.git] / tests / phpunit / CRM / Member / Form / MembershipRenewalTest.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 5 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2020 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26 */
27
28 /**
29 * Test CRM_Member_Form_Membership functions.
30 *
31 * @package CiviCRM
32 * @group headless
33 */
34 class CRM_Member_Form_MembershipRenewalTest extends CiviUnitTestCase {
35
36 protected $_individualId;
37 protected $_contribution;
38 protected $_financialTypeId = 1;
39 protected $_entity = 'Membership';
40 protected $_params;
41 protected $_paymentProcessorID;
42
43 /**
44 * Membership type ID for annual fixed membership.
45 *
46 * @var int
47 */
48 protected $membershipTypeAnnualFixedID;
49
50 /**
51 * Parameters to create payment processor.
52 *
53 * @var array
54 */
55 protected $_processorParams = [];
56
57 /**
58 * ID of created membership.
59 *
60 * @var int
61 */
62 protected $_membershipID;
63
64 /**
65 * Payment instrument mapping.
66 *
67 * @var array
68 */
69 protected $paymentInstruments = [];
70
71
72 /**
73 * @var CiviMailUtils
74 */
75 protected $mut;
76
77 /**
78 * Test setup for every test.
79 *
80 * Connect to the database, truncate the tables that will be used
81 * and redirect stdin to a temporary file.
82 */
83 public function setUp() {
84 parent::setUp();
85
86 $this->_individualId = $this->individualCreate();
87 $this->_paymentProcessorID = $this->processorCreate();
88
89 $this->loadXMLDataSet(dirname(__FILE__) . '/dataset/data.xml');
90 $membershipTypeAnnualFixed = $this->callAPISuccess('membership_type', 'create', [
91 'domain_id' => 1,
92 'name' => "AnnualFixed",
93 'member_of_contact_id' => 23,
94 'duration_unit' => "year",
95 'duration_interval' => 1,
96 'period_type' => "fixed",
97 'fixed_period_start_day' => "101",
98 'fixed_period_rollover_day' => "1231",
99 'relationship_type_id' => 20,
100 'financial_type_id' => 2,
101 ]);
102 $this->membershipTypeAnnualFixedID = $membershipTypeAnnualFixed['id'];
103 $membership = $this->callAPISuccess('Membership', 'create', [
104 'contact_id' => $this->_individualId,
105 'membership_type_id' => $this->membershipTypeAnnualFixedID,
106 ]);
107 $this->_membershipID = $membership['id'];
108
109 $instruments = $this->callAPISuccess('contribution', 'getoptions', ['field' => 'payment_instrument_id']);
110 $this->paymentInstruments = $instruments['values'];
111 }
112
113 /**
114 * Clean up after each test.
115 */
116 public function tearDown() {
117 $this->quickCleanUpFinancialEntities();
118 $this->quickCleanup(
119 [
120 'civicrm_relationship',
121 'civicrm_membership_type',
122 'civicrm_membership',
123 'civicrm_uf_match',
124 'civicrm_address',
125 ]
126 );
127 foreach ([17, 18, 23, 32] as $contactID) {
128 $this->callAPISuccess('contact', 'delete', ['id' => $contactID, 'skip_undelete' => TRUE]);
129 }
130 $this->callAPISuccess('relationship_type', 'delete', ['id' => 20]);
131 }
132
133 /**
134 * Test the submit function of the membership form.
135 */
136 public function testSubmit() {
137 $form = $this->getForm();
138 $this->createLoggedInUser();
139 $params = [
140 'cid' => $this->_individualId,
141 'join_date' => date('m/d/Y', time()),
142 'start_date' => '',
143 'end_date' => '',
144 // This format reflects the 23 being the organisation & the 25 being the type.
145 'membership_type_id' => [23, $this->membershipTypeAnnualFixedID],
146 'auto_renew' => '0',
147 'max_related' => '',
148 'num_terms' => '1',
149 'source' => '',
150 'total_amount' => '50.00',
151 //Member dues, see data.xml
152 'financial_type_id' => '2',
153 'soft_credit_type_id' => '',
154 'soft_credit_contact_id' => '',
155 'from_email_address' => '"Demonstrators Anonymous" <info@example.org>',
156 'receipt_text_signup' => 'Thank you text',
157 'payment_processor_id' => $this->_paymentProcessorID,
158 'credit_card_number' => '4111111111111111',
159 'cvv2' => '123',
160 'credit_card_exp_date' => [
161 'M' => '9',
162 // TODO: Future proof
163 'Y' => '2024',
164 ],
165 'credit_card_type' => 'Visa',
166 'billing_first_name' => 'Test',
167 'billing_middlename' => 'Last',
168 'billing_street_address-5' => '10 Test St',
169 'billing_city-5' => 'Test',
170 'billing_state_province_id-5' => '1003',
171 'billing_postal_code-5' => '90210',
172 'billing_country_id-5' => '1228',
173 ];
174 $form->_contactID = $this->_individualId;
175
176 $form->testSubmit($params);
177 $form->setRenewalMessage();
178 $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]);
179 $this->callAPISuccessGetCount('ContributionRecur', ['contact_id' => $this->_individualId], 0);
180 $contribution = $this->callAPISuccess('Contribution', 'get', [
181 'contact_id' => $this->_individualId,
182 'is_test' => TRUE,
183 ]);
184
185 $this->callAPISuccessGetCount('LineItem', [
186 'entity_id' => $membership['id'],
187 'entity_table' => 'civicrm_membership',
188 'contribution_id' => $contribution['id'],
189 ], 1);
190 $this->_checkFinancialRecords([
191 'id' => $contribution['id'],
192 'total_amount' => 50,
193 'financial_account_id' => 2,
194 'payment_instrument_id' => $this->callAPISuccessGetValue('PaymentProcessor', [
195 'id' => $this->_paymentProcessorID,
196 'return' => 'payment_instrument_id',
197 ]),
198 ], 'online');
199 $this->assertEquals([
200 [
201 'text' => 'AnnualFixed membership for Mr. Anthony Anderson II has been renewed.',
202 'title' => 'Complete',
203 'type' => 'success',
204 'options' => NULL,
205 ],
206 ], CRM_Core_Session::singleton()->getStatus());
207 }
208
209 /**
210 * Test the submit function of the membership form.
211 *
212 * @throws \CRM_Core_Exception
213 */
214 public function testSubmitRecur() {
215 $form = $this->getForm();
216
217 $this->callAPISuccess('MembershipType', 'create', [
218 'id' => $this->membershipTypeAnnualFixedID,
219 'duration_unit' => 'month',
220 'duration_interval' => 1,
221 'auto_renew' => TRUE,
222 ]);
223 $form->preProcess();
224 $this->createLoggedInUser();
225 $params = [
226 'cid' => $this->_individualId,
227 'price_set_id' => 0,
228 'join_date' => date('m/d/Y', time()),
229 'start_date' => '',
230 'end_date' => '',
231 'campaign_id' => '',
232 // This format reflects the 23 being the organisation & the 25 being the type.
233 'membership_type_id' => [23, $this->membershipTypeAnnualFixedID],
234 'auto_renew' => '1',
235 'is_recur' => 1,
236 'max_related' => 0,
237 'num_terms' => '1',
238 'source' => '',
239 'total_amount' => '77.00',
240 //Member dues, see data.xml
241 'financial_type_id' => '2',
242 'soft_credit_type_id' => 11,
243 'soft_credit_contact_id' => '',
244 'from_email_address' => '"Demonstrators Anonymous" <info@example.org>',
245 'receipt_text' => 'Thank you text',
246 'payment_processor_id' => $this->_paymentProcessorID,
247 'credit_card_number' => '4111111111111111',
248 'cvv2' => '123',
249 'credit_card_exp_date' => [
250 'M' => '9',
251 // TODO: Future proof
252 'Y' => '2019',
253 ],
254 'credit_card_type' => 'Visa',
255 'billing_first_name' => 'Test',
256 'billing_middlename' => 'Last',
257 'billing_street_address-5' => '10 Test St',
258 'billing_city-5' => 'Test',
259 'billing_state_province_id-5' => '1003',
260 'billing_postal_code-5' => '90210',
261 'billing_country_id-5' => '1228',
262 'send_receipt' => 1,
263 ];
264 $form->_mode = 'test';
265 $form->_contactID = $this->_individualId;
266
267 $form->testSubmit($params);
268 $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]);
269 $contributionRecur = $this->callAPISuccessGetSingle('ContributionRecur', ['contact_id' => $this->_individualId]);
270 $this->assertEquals(1, $contributionRecur['is_email_receipt']);
271 $this->assertEquals(date('Y-m-d'), date('Y-m-d', strtotime($contributionRecur['modified_date'])));
272 $this->assertEquals(date('Y-m-d'), date('Y-m-d', strtotime($contributionRecur['modified_date'])));
273 $this->assertNotEmpty($contributionRecur['invoice_id']);
274 $this->assertEquals(CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id',
275 'Pending'), $contributionRecur['contribution_status_id']);
276 $this->assertEquals($this->callAPISuccessGetValue('PaymentProcessor', [
277 'id' => $this->_paymentProcessorID,
278 'return' => 'payment_instrument_id',
279 ]), $contributionRecur['payment_instrument_id']);
280
281 $contribution = $this->callAPISuccess('Contribution', 'getsingle', [
282 'contact_id' => $this->_individualId,
283 'is_test' => TRUE,
284 ]);
285
286 $this->assertEquals($this->callAPISuccessGetValue('PaymentProcessor', [
287 'id' => $this->_paymentProcessorID,
288 'return' => 'payment_instrument_id',
289 ]), $contribution['payment_instrument_id']);
290 $this->assertEquals($contributionRecur['id'], $contribution['contribution_recur_id']);
291
292 $this->callAPISuccessGetCount('LineItem', [
293 'entity_id' => $membership['id'],
294 'entity_table' => 'civicrm_membership',
295 'contribution_id' => $contribution['id'],
296 ], 1);
297
298 $this->callAPISuccessGetSingle('address', [
299 'contact_id' => $this->_individualId,
300 'street_address' => '10 Test St',
301 'postal_code' => 90210,
302 ]);
303 }
304
305 /**
306 * Test the submit function of the membership form.
307 */
308 public function testSubmitRecurCompleteInstant() {
309 $form = $this->getForm();
310 /** @var \CRM_Core_Payment_Dummy $processor */
311 $processor = Civi\Payment\System::singleton()->getById($this->_paymentProcessorID);
312 $processor->setDoDirectPaymentResult([
313 'payment_status_id' => 1,
314 'trxn_id' => 'kettles boil water',
315 'fee_amount' => .29,
316 ]);
317
318 $this->callAPISuccess('MembershipType', 'create', [
319 'id' => $this->membershipTypeAnnualFixedID,
320 'duration_unit' => 'month',
321 'duration_interval' => 1,
322 'auto_renew' => TRUE,
323 ]);
324 $this->createLoggedInUser();
325 $form->preProcess();
326
327 $form->_contactID = $this->_individualId;
328 $params = $this->getBaseSubmitParams();
329 $form->_mode = 'test';
330
331 $form->testSubmit($params);
332 $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]);
333 $contributionRecur = $this->callAPISuccessGetSingle('ContributionRecur', ['contact_id' => $this->_individualId]);
334 $this->assertEquals($contributionRecur['id'], $membership['contribution_recur_id']);
335 $this->assertEquals(0, $contributionRecur['is_email_receipt']);
336 $this->assertEquals(date('Y-m-d'), date('Y-m-d', strtotime($contributionRecur['modified_date'])));
337 $this->assertNotEmpty($contributionRecur['invoice_id']);
338 // @todo fix this part!
339 /*
340 $this->assertEquals(CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id',
341 'In Progress'), $contributionRecur['contribution_status_id']);
342 $this->assertNotEmpty($contributionRecur['next_sched_contribution_date']);
343 */
344 $paymentInstrumentID = $this->callAPISuccessGetValue('PaymentProcessor', [
345 'id' => $this->_paymentProcessorID,
346 'return' => 'payment_instrument_id',
347 ]);
348 $this->assertEquals($paymentInstrumentID, $contributionRecur['payment_instrument_id']);
349
350 $contribution = $this->callAPISuccess('Contribution', 'getsingle', [
351 'contact_id' => $this->_individualId,
352 'is_test' => TRUE,
353 ]);
354 $this->assertEquals($paymentInstrumentID, $contribution['payment_instrument_id']);
355
356 $this->assertEquals('kettles boil water', $contribution['trxn_id']);
357 $this->assertEquals(.29, $contribution['fee_amount']);
358 $this->assertEquals(7800.90, $contribution['total_amount']);
359 $this->assertEquals(7800.61, $contribution['net_amount']);
360
361 $this->callAPISuccessGetCount('LineItem', [
362 'entity_id' => $membership['id'],
363 'entity_table' => 'civicrm_membership',
364 'contribution_id' => $contribution['id'],
365 ], 1);
366 }
367
368 /**
369 * Test the submit function of the membership form.
370 *
371 * @param string $thousandSeparator
372 *
373 * @dataProvider getThousandSeparators
374 */
375 public function testSubmitRecurCompleteInstantWithMail($thousandSeparator) {
376 $this->setCurrencySeparators($thousandSeparator);
377 $form = $this->getForm();
378 $this->mut = new CiviMailUtils($this, TRUE);
379 /** @var \CRM_Core_Payment_Dummy $processor */
380 $processor = Civi\Payment\System::singleton()->getById($this->_paymentProcessorID);
381 $processor->setDoDirectPaymentResult([
382 'payment_status_id' => 1,
383 'trxn_id' => 'kettles boil water',
384 'fee_amount' => .29,
385 ]);
386
387 $this->callAPISuccess('MembershipType', 'create', [
388 'id' => $this->membershipTypeAnnualFixedID,
389 'duration_unit' => 'month',
390 'duration_interval' => 1,
391 'auto_renew' => TRUE,
392 ]);
393 $this->createLoggedInUser();
394 $form->preProcess();
395
396 $form->_contactID = $this->_individualId;
397 $params = $this->getBaseSubmitParams();
398 $params['send_receipt'] = 1;
399 $form->_mode = 'test';
400
401 $form->testSubmit($params);
402 $contributionRecur = $this->callAPISuccessGetSingle('ContributionRecur', ['contact_id' => $this->_individualId]);
403 $this->assertEquals(1, $contributionRecur['is_email_receipt']);
404 $this->mut->checkMailLog([
405 '$ ' . $this->formatMoneyInput(7800.90),
406 ]);
407 $this->mut->stop();
408 $this->setCurrencySeparators(',');
409 }
410
411 /**
412 * Test the submit function of the membership form.
413 *
414 * @throws \CRM_Core_Exception
415 */
416 public function testSubmitPayLater() {
417 $form = $this->getForm(NULL);
418 $this->createLoggedInUser();
419 $originalMembership = $this->callAPISuccessGetSingle('membership', []);
420 $params = [
421 'cid' => $this->_individualId,
422 'join_date' => date('m/d/Y', time()),
423 'start_date' => '',
424 'end_date' => '',
425 // This format reflects the 23 being the organisation & the 25 being the type.
426 'membership_type_id' => [23, $this->membershipTypeAnnualFixedID],
427 'auto_renew' => '0',
428 'max_related' => '',
429 'num_terms' => '2',
430 'source' => '',
431 'total_amount' => '50.00',
432 //Member dues, see data.xml
433 'financial_type_id' => '2',
434 'soft_credit_type_id' => '',
435 'soft_credit_contact_id' => '',
436 'payment_instrument_id' => 4,
437 'from_email_address' => '"Demonstrators Anonymous" <info@example.org>',
438 'receipt_text_signup' => 'Thank you text',
439 'payment_processor_id' => $this->_paymentProcessorID,
440 'record_contribution' => TRUE,
441 'trxn_id' => 777,
442 'contribution_status_id' => 2,
443 ];
444 $form->_contactID = $this->_individualId;
445
446 $form->testSubmit($params);
447 $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]);
448 $this->assertEquals(strtotime($membership['end_date']), strtotime($originalMembership['end_date']));
449 $contribution = $this->callAPISuccessGetSingle('Contribution', [
450 'contact_id' => $this->_individualId,
451 'contribution_status_id' => 2,
452 'return' => ["tax_amount", "trxn_id"],
453 ]);
454 $this->assertEquals($contribution['trxn_id'], 777);
455 $this->assertEquals($contribution['tax_amount'], NULL);
456
457 $this->callAPISuccessGetCount('LineItem', [
458 'entity_id' => $membership['id'],
459 'entity_table' => 'civicrm_membership',
460 'contribution_id' => $contribution['id'],
461 ], 1);
462 }
463
464 /**
465 * Test the submit function of the membership form.
466 *
467 * @throws \CRM_Core_Exception
468 */
469 public function testSubmitPayLaterWithBilling() {
470 $form = $this->getForm(NULL);
471 $this->createLoggedInUser();
472 $originalMembership = $this->callAPISuccessGetSingle('membership', []);
473 $params = [
474 'cid' => $this->_individualId,
475 'join_date' => date('m/d/Y', time()),
476 'start_date' => '',
477 'end_date' => '',
478 // This format reflects the 23 being the organisation & the 25 being the type.
479 'membership_type_id' => [23, $this->membershipTypeAnnualFixedID],
480 'auto_renew' => '0',
481 'max_related' => '',
482 'num_terms' => '2',
483 'source' => '',
484 'total_amount' => '50.00',
485 //Member dues, see data.xml
486 'financial_type_id' => '2',
487 'soft_credit_type_id' => '',
488 'soft_credit_contact_id' => '',
489 'payment_instrument_id' => 4,
490 'from_email_address' => '"Demonstrators Anonymous" <info@example.org>',
491 'receipt_text_signup' => 'Thank you text',
492 'payment_processor_id' => $this->_paymentProcessorID,
493 'record_contribution' => TRUE,
494 'trxn_id' => 777,
495 'contribution_status_id' => 2,
496 'billing_first_name' => 'Test',
497 'billing_middlename' => 'Last',
498 'billing_street_address-5' => '10 Test St',
499 'billing_city-5' => 'Test',
500 'billing_state_province_id-5' => '1003',
501 'billing_postal_code-5' => '90210',
502 'billing_country_id-5' => '1228',
503 ];
504 $form->_contactID = $this->_individualId;
505
506 $form->testSubmit($params);
507 $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]);
508 $this->assertEquals(strtotime($membership['end_date']), strtotime($originalMembership['end_date']));
509 $contribution = $this->callAPISuccessGetSingle('Contribution', [
510 'contact_id' => $this->_individualId,
511 'contribution_status_id' => 2,
512 ]);
513 $this->assertEquals($contribution['trxn_id'], 777);
514
515 $this->callAPISuccessGetCount('LineItem', [
516 'entity_id' => $membership['id'],
517 'entity_table' => 'civicrm_membership',
518 'contribution_id' => $contribution['id'],
519 ], 1);
520 $this->callAPISuccessGetSingle('address', [
521 'contact_id' => $this->_individualId,
522 'street_address' => '10 Test St',
523 'postal_code' => 90210,
524 ]);
525 }
526
527 /**
528 * Test the submit function of the membership form.
529 */
530 public function testSubmitComplete() {
531 $form = $this->getForm(NULL);
532 $this->createLoggedInUser();
533 $originalMembership = $this->callAPISuccessGetSingle('membership', []);
534 $params = [
535 'cid' => $this->_individualId,
536 'join_date' => date('m/d/Y', time()),
537 'start_date' => '',
538 'end_date' => '',
539 // This format reflects the 23 being the organisation & the 25 being the type.
540 'membership_type_id' => [23, $this->membershipTypeAnnualFixedID],
541 'auto_renew' => '0',
542 'max_related' => '',
543 'num_terms' => '2',
544 'source' => '',
545 'total_amount' => '50.00',
546 //Member dues, see data.xml
547 'financial_type_id' => '2',
548 'soft_credit_type_id' => '',
549 'soft_credit_contact_id' => '',
550 'payment_instrument_id' => 4,
551 'from_email_address' => '"Demonstrators Anonymous" <info@example.org>',
552 'receipt_text_signup' => 'Thank you text',
553 'payment_processor_id' => $this->_paymentProcessorID,
554 'record_contribution' => TRUE,
555 'trxn_id' => 777,
556 'contribution_status_id' => 1,
557 'fee_amount' => .5,
558 ];
559 $form->_contactID = $this->_individualId;
560
561 $form->testSubmit($params);
562 $membership = $this->callAPISuccessGetSingle('Membership', ['contact_id' => $this->_individualId]);
563 $this->assertEquals(strtotime($membership['end_date']), strtotime('+ 2 years',
564 strtotime($originalMembership['end_date'])));
565 $contribution = $this->callAPISuccessGetSingle('Contribution', [
566 'contact_id' => $this->_individualId,
567 'contribution_status_id' => 1,
568 ]);
569
570 $this->assertEquals($contribution['trxn_id'], 777);
571 $this->assertEquals(.5, $contribution['fee_amount']);
572 $this->callAPISuccessGetCount('LineItem', [
573 'entity_id' => $membership['id'],
574 'entity_table' => 'civicrm_membership',
575 'contribution_id' => $contribution['id'],
576 ], 1);
577 }
578
579 /**
580 * Get a membership form object.
581 *
582 * We need to instantiate the form to run preprocess, which means we have to trick it about the request method.
583 *
584 * @param string $mode
585 *
586 * @return \CRM_Member_Form_MembershipRenewal
587 */
588 protected function getForm($mode = 'test') {
589 $form = new CRM_Member_Form_MembershipRenewal();
590 $_SERVER['REQUEST_METHOD'] = 'GET';
591 $form->controller = new CRM_Core_Controller();
592 $form->_bltID = 5;
593 $form->_mode = $mode;
594 $form->_id = $this->_membershipID;
595 $form->preProcess();
596 return $form;
597 }
598
599 /**
600 * Get some re-usable parameters for the submit function.
601 *
602 * @return array
603 */
604 protected function getBaseSubmitParams() {
605 $params = [
606 'cid' => $this->_individualId,
607 'price_set_id' => 0,
608 'join_date' => date('m/d/Y', time()),
609 'start_date' => '',
610 'end_date' => '',
611 'campaign_id' => '',
612 // This format reflects the 23 being the organisation & the 25 being the type.
613 'membership_type_id' => [23, $this->membershipTypeAnnualFixedID],
614 'auto_renew' => '1',
615 'is_recur' => 1,
616 'max_related' => 0,
617 'num_terms' => '1',
618 'source' => '',
619 'total_amount' => $this->formatMoneyInput('7800.90'),
620 //Member dues, see data.xml
621 'financial_type_id' => '2',
622 'soft_credit_type_id' => 11,
623 'soft_credit_contact_id' => '',
624 'from_email_address' => '"Demonstrators Anonymous" <info@example.org>',
625 'receipt_text' => 'Thank you text',
626 'payment_processor_id' => $this->_paymentProcessorID,
627 'credit_card_number' => '4111111111111111',
628 'cvv2' => '123',
629 'credit_card_exp_date' => [
630 'M' => '9',
631 // TODO: Future proof
632 'Y' => '2019',
633 ],
634 'credit_card_type' => 'Visa',
635 'billing_first_name' => 'Test',
636 'billing_middlename' => 'Last',
637 'billing_street_address-5' => '10 Test St',
638 'billing_city-5' => 'Test',
639 'billing_state_province_id-5' => '1003',
640 'billing_postal_code-5' => '90210',
641 'billing_country_id-5' => '1228',
642 ];
643 return $params;
644 }
645
646 }