3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.3 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 require_once 'CiviTest/CiviUnitTestCase.php';
30 class CRM_Core_Payment_BaseIPNTest
extends CiviUnitTestCase
{
31 protected $_contributionTypeId;
32 protected $_contributionParams;
33 protected $_contactId;
34 protected $_contributionId;
35 protected $_participantId;
38 protected $_processorId;
39 protected $_contributionRecurParams;
40 protected $_paymentProcessor;
43 protected $_membershipId;
47 public $DBResetRequired = FALSE;
51 'name' => 'BaseIPN test',
52 'description' => 'Test BaseIPN methods (via subclass A.net).',
53 'group' => 'Payment Processor Tests',
59 $this->input
= $this->ids
= $this->objects
= array();
60 $this->IPN
= new CRM_Core_Payment_AuthorizeNetIPN();
62 $this->_contactId
= $this->individualCreate();
63 $this->ids
['contact'] = $this->_contactId
;
64 $this->paymentProcessor
= new CRM_Financial_BAO_PaymentProcessor();
66 $paymentProcessorParams = array(
67 'user_name' => 'user_name',
68 'password' => 'password',
69 'url_recur' => 'url_recur',
72 $paymentProcessorParams['payment_processor_type'] = 'AuthorizeNet';
73 $paymentProcessorParams['domain_id'] = 1;
74 $paymentProcessorParams['is_active'] = 1;
75 $paymentProcessorParams['is_test'] = 1;
76 $paymentProcessorParams['billing_mode'] = 1;
77 $paymentProcessorParams['class_name'] = "Payment_AuthorizeNet";
78 $processorEntity = $this->paymentProcessor
->create($paymentProcessorParams);
80 $this->_processorId
= $processorEntity->id
;
81 $this->_contributionTypeId
= 1;
83 $this->_contributionParams
= array(
84 'contact_id' => $this->_contactId
,
86 'financial_type_id' => $this->_contributionTypeId
,
87 'recieve_date' => date('Ymd'),
88 'total_amount' => 150.00,
89 'invoice_id' => 'c8acb91e080ad7bd8a2adc119c192885',
91 'contribution_recur_id' => $this->_recurId
,
93 'contribution_status_id' => 2,
95 $contribution = civicrm_api('contribution', 'create', $this->_contributionParams
);
96 $this->assertAPISuccess($contribution, 'line ' . __LINE__
. ' set-up of contribution ');
97 $this->_contributionId
= $contribution['id'];
99 $contribution = new CRM_Contribute_BAO_Contribution();
100 $contribution->id
= $this->_contributionId
;
101 $contribution->find(true);
102 $this->objects
['contribution'] = $contribution;
105 function tearDown() {
107 $tablesToTruncate = array(
108 'civicrm_contribution',
109 'civicrm_contribution_recur',
110 'civicrm_membership',
111 'civicrm_membership_type',
112 'civicrm_membership_payment',
113 'civicrm_membership_status',
114 'civicrm_payment_processor',
116 'civicrm_participant',
120 $this->quickCleanup($tablesToTruncate);
121 CRM_Member_PseudoConstant
::membershipType($this->_membershipTypeID
, TRUE);
122 CRM_Member_PseudoConstant
::membershipStatus(NULL, NULL, 'name', TRUE);
126 * Test the LoadObjects function with recurring membership data
129 function testLoadMembershipObjects() {
130 $this->_setUpMembershipObjects();
131 $this->_setUpRecurringContribution();
132 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
133 $this->assertFalse(empty($this->objects
['membership']), 'in line ' . __LINE__
);
134 $this->assertArrayHasKey($this->_membershipTypeID
, $this->objects
['membership'], 'in line ' . __LINE__
);
135 $this->assertTrue(is_a($this->objects
['membership'][$this->_membershipTypeID
], 'CRM_Member_BAO_Membership'));
136 $this->assertTrue(is_a( $this->objects
['contributionType'],'CRM_Financial_BAO_FinancialType'));
137 $this->assertFalse(empty($this->objects
['contributionRecur']), __LINE__
);
138 $this->assertFalse(empty($this->objects
['paymentProcessor']), __LINE__
);
141 * Test the LoadObjects function with recurring membership data
144 function testLoadMembershipObjectsLoadAll() {
145 $this->_setUpMembershipObjects();
146 $this->_setUpRecurringContribution();
147 unset($this->ids
['membership']);
148 $contribution = new CRM_Contribute_BAO_Contribution();
149 $contribution->id
= $this->_contributionId
;
150 $contribution->find(true);
151 $contribution->loadRelatedObjects($this->input
, $this->ids
, FALSE, true);
152 $this->assertFalse(empty($contribution->_relatedObjects
['membership']), 'in line ' . __LINE__
);
153 $this->assertArrayHasKey($this->_membershipTypeID
, $contribution->_relatedObjects
['membership'], 'in line ' . __LINE__
);
154 $this->assertTrue(is_a($contribution->_relatedObjects
['membership'][$this->_membershipTypeID
], 'CRM_Member_BAO_Membership'));
155 $this->assertTrue(is_a($contribution->_relatedObjects
['contributionType'], 'CRM_Financial_BAO_FinancialType'));
156 $this->assertFalse(empty($contribution->_relatedObjects
['contributionRecur']), __LINE__
);
157 $this->assertFalse(empty($contribution->_relatedObjects
['paymentProcessor']), __LINE__
);
160 * Test the LoadObjects function with recurring membership data
163 function testsendMailMembershipObjects() {
164 $this->_setUpMembershipObjects();
166 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
167 $msg = $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, FALSE, TRUE);
168 $this->assertTrue(is_array($msg), "Message returned as an array in line" . __LINE__
);
169 $this->assertEquals('Mr. Anthony Anderson II', $msg['to']);
170 $this->assertContains('<p>Please print this confirmation for your records.</p>', $msg['html']);
171 $this->assertContains('Membership Type: General', $msg['body']);
175 * Test the LoadObjects function with recurring membership data
178 function testsendMailMembershipWithoutLoadObjects() {
179 $this->_setUpMembershipObjects();
181 $msg = $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, FALSE, TRUE);
182 $this->assertTrue(is_array($msg), "Message returned as an array in line" . __LINE__
);
183 $this->assertEquals('Mr. Anthony Anderson II', $msg['to']);
184 $this->assertContains('<p>Please print this confirmation for your records.</p>', $msg['html']);
185 $this->assertContains('Membership Type: General', $msg['body']);
188 * Test that loadObjects works with participant values
190 function testLoadParticipantObjects() {
191 $this->_setUpParticipantObjects();
192 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
193 $this->assertFalse(empty($this->objects
['participant']), 'in line ' . __LINE__
);
194 $this->assertTrue(is_a($this->objects
['participant'], 'CRM_Event_BAO_Participant'));
195 $this->assertTrue(is_a( $this->objects
['contributionType'],'CRM_Financial_BAO_FinancialType'));
196 $this->assertFalse(empty($this->objects
['event']));
197 $this->assertTrue(is_a($this->objects
['event'], 'CRM_Event_BAO_Event'));
198 $this->assertTrue(is_a($this->objects
['contribution'], 'CRM_Contribute_BAO_Contribution'));
199 $this->assertFalse(empty($this->objects
['event']->id
));
203 * Test the LoadObjects function with a participant
206 function testComposeMailParticipant() {
207 $this->_setUpParticipantObjects();
208 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
210 $this->assertFalse(empty($this->objects
['event']));
211 $msg = $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, False,True);
212 $this->assertContains('registration has been received and your status has been updated to registered', $msg['body']);
213 $this->assertContains('Annual CiviCRM meet', $msg['html']);
220 function testComposeMailParticipantObjects() {
221 $this->_setUpParticipantObjects();
223 $msg = $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, FALSE, TRUE);
224 $this->assertTrue(is_array($msg), "Message returned as an array in line" . __LINE__
);
225 $this->assertEquals('Mr. Anthony Anderson II', $msg['to']);
226 $this->assertContains('<p>Please print this confirmation for your records.</p>', $msg['html']);
227 $this->assertContains('Thank you for your participation', $msg['body']);
231 * Test the LoadObjects function with recurring membership data
234 function testsendMailParticipantObjectsCheckLog() {
235 $this->_setUpParticipantObjects();
237 require_once 'CiviTest/CiviMailUtils.php';
238 $mut = new CiviMailUtils( $this, true );
239 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
240 $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, FALSE, FALSE);
241 $mut->checkMailLog(array(
242 'Thank you for your participation',
243 'Annual CiviCRM meet',
244 'Mr. Anthony Anderson II')
249 * Test the LoadObjects function with recurring membership data
252 function testsendMailParticipantObjectsNoMail() {
253 $this->_setUpParticipantObjects();
254 $event = new CRM_Event_BAO_Event();
255 $event->id
= $this->_eventId
;
256 $event->is_email_confirm
= FALSE;
259 $tablesToTruncate = array(
260 'civicrm_mailing_spool',
262 $this->quickCleanup($tablesToTruncate, FALSE);
263 require_once 'CiviTest/CiviMailUtils.php';
264 $mut = new CiviMailUtils( $this, true );
265 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
266 $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, FALSE, FALSE);
267 $mut->assertMailLogEmpty('no mail should have been send as event set to no confirm');
272 * Test that loadObjects works with participant values
274 function testLoadPledgeObjects() {
275 $this->_setUpPledgeObjects();
276 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, $this->_processorId
);
277 $this->assertFalse(empty($this->objects
['pledge_payment'][0]), 'in line ' . __LINE__
);
278 $this->assertTrue(is_a( $this->objects
['contributionType'],'CRM_Financial_BAO_FinancialType'));
279 $this->assertTrue(is_a($this->objects
['contribution'], 'CRM_Contribute_BAO_Contribution'));
280 $this->assertTrue(is_a($this->objects
['pledge_payment'][0], 'CRM_Pledge_BAO_PledgePayment'));
281 $this->assertFalse(empty($this->objects
['pledge_payment'][0]->id
));
282 $this->assertEquals($this->_contributionTypeId
, $this->objects
['contributionType']->id
);
283 $this->assertEquals($this->_processorId
, $this->objects
['paymentProcessor']['id']);
284 $this->assertEquals($this->_contributionId
, $this->objects
['contribution']->id
);
285 $this->assertEquals($this->_contactId
, $this->objects
['contact']->id
);
286 $this->assertEquals($this->_pledgeId
, $this->objects
['pledge_payment'][0]->pledge_id
);
290 * Test that loadObjects works with participant values
292 function testLoadPledgeObjectsInvalidPledgeID() {
293 $this->_setUpPledgeObjects();
294 $this->ids
['pledge_payment'][0] = 0;
295 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('return_error' => 1));
296 $this->assertArrayHasKey('error_message', $result);
297 $this->assertArrayNotHasKey('pledge_payment', $this->objects
);
298 $this->assertEquals('Could not find payment processor for contribution record: 1', $result['error_message']);
299 $this->ids
['pledge_payment'][0] = NULL;
300 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('return_error' => 1));
301 $this->assertArrayHasKey('error_message', $result);
302 $this->assertArrayNotHasKey('pledge_payment', $this->objects
);
303 $this->assertEquals('Could not find payment processor for contribution record: 1', $result['error_message']);
304 $this->ids
['pledge_payment'][0] = '';
305 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('return_error' => 1));
306 $this->assertArrayHasKey('error_message', $result);
307 $this->assertArrayNotHasKey('pledge_payment', $this->objects
);
308 $this->assertEquals('Could not find payment processor for contribution record: 1', $result['error_message']);
311 $this->ids
['pledge_payment'][0] = 999;
312 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, $this->_processorId
, array('return_error' => 1));
313 $this->assertArrayHasKey('error_message', $result);
314 $this->assertEquals('Could not find pledge payment record: 999', $result['error_message']);
318 * Test the LoadObjects function with a pledge
321 function testsendMailPledge() {
322 $this->_setUpPledgeObjects();
324 $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, NULL);
325 $msg = $this->IPN
->sendMail($this->input
, $this->ids
, $this->objects
, $values, FALSE, TRUE);
326 $this->assertContains('Contribution Information', $msg['html']);
330 * Test that an error is returned if required set & no contribution page
333 function testRequiredWithoutProcessorID() {
334 $this->_setUpPledgeObjects();
336 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('return_error' => 1));
337 $this->assertArrayHasKey('error_message', $result);
338 $this->assertEquals('Could not find payment processor for contribution record: 1', $result['error_message']);
339 // error is only returned if $required set to True
340 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, NULL, array('return_error' => 1));
341 $this->assertFalse(is_array($result));
342 //check that error is not returned if error checking not set
343 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('log_error' => 1));
344 $this->assertFalse(is_array($result));
349 * Test that an error is not if required set & no processor ID
351 function testRequiredWithContributionPage() {
352 $this->_setUpContributionObjects(TRUE);
354 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('return_error' => 1));
355 $this->assertFalse(is_array($result), $result['error_message']);
359 * Test that an error is returned if required set & contribution page exists
362 function testRequiredWithContributionPageError() {
363 $this->_setUpContributionObjects();
365 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('return_error' => 1));
366 $this->assertArrayHasKey('error_message', $result);
367 $this->assertEquals('Could not find contribution page for contribution record: 1', $result['error_message']);
368 // error is only returned if $required set to True
369 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, FALSE, NULL, array('return_error' => 1));
370 $this->assertFalse(is_array($result));
371 //check that error is not returned if error checking not set
372 $result = $this->IPN
->loadObjects($this->input
, $this->ids
, $this->objects
, TRUE, NULL, array('log_error' => 1));
373 $this->assertFalse(is_array($result));
377 * Test calls main functions in sequence per 'main' - I had hoped to test the functions more
378 * fully but the calls to the POST happen in more than one function
379 * keeping this as good example of data to bring back to life later
381 function testMainFunctionActions(){
382 $ids = $objects = array( );
383 $input['component'] = 'Contribute';
384 $postedParams = array(
385 'x_response_code' => 1,
386 'x_response_reason_code' => 1,
387 'x_response_reason_text' => 'This transaction has been approved.',
389 'x_auth_code' => 140454,
390 'x_trans_id' => 4353599599,
392 'x_card_type' => 'American Express',
393 'x_account_number' => 'XXXX2701',
394 'x_first_name' => 'Arthur',
395 'x_last_name' => 'Jacobs',
397 'x_address' => '866 2166th St SN',
398 'x_city' => 'Edwardstown',
405 'x_invoice_num' => 'a9fb56c24576lk4c9490f6',
406 'x_description' => 'my desc',
407 'x_type' => 'auth_capture',
409 'x_ship_to_first_name' => null,
410 'x_ship_to_last_name' => null,
411 'x_ship_to_company' => null,
412 'x_ship_to_address' => null,
413 'x_ship_to_city' => null,
414 'x_ship_to_state' => null,
415 'x_ship_to_zip' => null,
416 'x_ship_to_country' => null,
421 'x_tax_exempt' => FALSE,
423 'x_MD5_Hash' => '069ECAD13C8E15AC205CDF92B8B58CC7',
424 'x_cvv2_resp_code' => null,
425 'x_cavv_response' => null,
426 'x_test_request' => false,
427 'description' => 'my description'
429 $this->IPN->getInput( $input, $ids );
430 $this->IPN->getIDs( $ids, $input );
432 CRM_Core_Error::debug_var( '$ids', $ids );
433 CRM_Core_Error::debug_var( '$input', $input );
435 $paymentProcessorID = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_PaymentProcessorType',
436 'AuthNet', 'id', 'name' );
438 if ( ! $this->IPN->validateData( $input, $ids, $objects, true, $paymentProcessorID ) ) {
442 if ( $component == 'contribute' && $ids['contributionRecur'] ) {
443 // check if first contribution is completed, else complete first contribution
445 if ( $objects['contribution']->contribution_status_id == 1 ) {
448 return $this->IPN->recur( $input, $ids, $objects, $first );
453 * Prepare for contribution Test - involving only contribution objects
455 function _setUpContributionObjects($contributionPage = FALSE) {
458 $contribution = new CRM_Contribute_BAO_Contribution();
459 $contribution->id
= $this->_contributionId
;
460 $contribution->find(TRUE);
461 if (!empty($contributionPage)) {
462 $dao = new CRM_Core_DAO();
463 $contribution_page = $dao->createTestObject('CRM_Contribute_DAO_ContributionPage');
464 $contribution->contribution_page_id
= $contribution_page->id
;
468 $this->objects
['contribution'] = $contribution;
469 $this->input
= array(
470 'component' => 'contribute',
471 'contribution_page_id' => $contribution_page->id
,
472 'total_amount' => 110.00,
473 'invoiceID' => "c8acb91e080ad7777a2adc119c192885",
474 'contactID' => $this->_contactId
,
475 'contributionID' => $this->objects
['contribution']->id
,
480 * Prepare for membership test
482 function _setUpMembershipObjects() {
484 $this->_membershipTypeID
= $this->membershipTypeCreate($this->_contactId
);
485 $this->_membershipStatusID
= $this->membershipStatusCreate('test status');
488 echo $e->getMessage();
490 CRM_Member_PseudoConstant
::membershipType($this->_membershipTypeID
, TRUE);
491 CRM_Member_PseudoConstant
::membershipStatus(NULL, NULL, 'name', TRUE);
492 $this->_membershipParams
= array(
493 'contact_id' => $this->_contactId
,
494 'membership_type_id' => $this->_membershipTypeID
,
495 'join_date' => '2009-01-21',
496 'start_date' => '2009-01-21',
497 'end_date' => '2009-12-21',
498 'source' => 'Payment',
500 'status_id' => $this->_membershipStatusID
,
504 $membership = civicrm_api('membership', 'create', $this->_membershipParams
);
505 $this->assertAPISuccess($membership, 'line ' . __LINE__
. ' set-up of membership');
507 $this->_membershipId
= $membership['id'];
508 //we'll create membership payment here because to make setup more re-usable
509 civicrm_api('membership_payment', 'create', array(
511 'contribution_id' => $this->_contributionId
,
512 'membership_id' => $this->_membershipId
,
515 $contribution = new CRM_Contribute_BAO_Contribution();
516 $contribution->id
= $this->_contributionId
;
517 $contribution->find();
518 $this->objects
['contribution'] = $contribution;
519 $this->input
= array(
520 'component' => 'contribute',
521 'total_amount' => 150.00,
522 'invoiceID' => "c8acb91e080ad7bd8a2adc119c192885",
523 'contactID' => $this->_contactId
,
524 'contributionID' => $this->objects
['contribution']->id
,
525 'membershipID' => $this->_membershipId
,
528 $this->ids
['membership'] = $this->_membershipId
;
531 function _setUpRecurringContribution() {
532 $this->_contributionRecurParams
= array(
533 'contact_id' => $this->_contactId
,
536 'frequency_unit' => 'week',
537 'frequency_interval' => 1,
539 'start_date' => date('Ymd'),
540 'create_date' => date('Ymd'),
541 'invoice_id' => 'c8acb91e080ad7bd8a2adc119c192885',
542 'contribution_status_id' => 2,
544 'financial_type_id' => $this->_contributionTypeId
,
546 'payment_processor_id' => $this->_processorId
,
548 $this->_recurId
= civicrm_api('contribution_recur', 'create', $this->_contributionRecurParams
);
549 $this->assertAPISuccess($this->_recurId
, 'line ' . __LINE__
. ' set-up of recurring contrib');
550 $this->_recurId
= $this->_recurId
['id'];
551 $this->input
['contributionRecurId'] = $this->_recurId
;
552 $this->ids
['contributionRecur'] = $this->_recurId
;
556 * Set up participant requirements for test
558 function _setUpParticipantObjects() {
559 $event = $this->eventCreate(array('is_email_confirm' => 1));
560 $this->assertAPISuccess($event, 'line ' . __LINE__
. ' set-up of event');
561 $this->_eventId
= $event['id'];
562 $this->_participantId
= $this->participantCreate(array(
563 'event_id' => $this->_eventId
,
564 'contact_id' => $this->_contactId
,
566 //we'll create membership payment here because to make setup more re-usable
567 $participantPayment = civicrm_api('participant_payment', 'create', array(
569 'contribution_id' => $this->_contributionId
,
570 'participant_id' => $this->_participantId
,
572 $this->assertAPISuccess($participantPayment, 'line ' . __LINE__
. ' set-up of event');
573 $contribution = new CRM_Contribute_BAO_Contribution();
574 $contribution->id
= $this->_contributionId
;
575 $contribution->find();
576 $this->objects
['contribution'] = $contribution;
577 $this->input
= array(
578 'component' => 'event',
579 'total_amount' => 150.00,
580 'invoiceID' => "c8acb91e080ad7bd8a2adc119c192885",
581 'contactID' => $this->_contactId
,
582 'contributionID' => $contribution->id
,
583 'participantID' => $this->_participantId
,
586 $this->ids
['participant'] = $this->_participantId
;
587 $this->ids
['event'] = $this->_eventId
;
591 * Set up participant requirements for test
593 function _setUpPledgeObjects() {
594 $this->_pledgeId
= $this->pledgeCreate($this->_contactId
);
595 //we'll create membership payment here because to make setup more re-usable
596 $pledgePayment = civicrm_api('pledge_payment', 'create', array(
598 'pledge_id' => $this->_pledgeId
,
599 'contribution_id' => $this->_contributionId
,
601 'actual_amount' => 50,
603 $this->assertAPISuccess($pledgePayment, 'line ' . __LINE__
. ' set-up of pledge payment');
604 $this->input
= array(
605 'component' => 'contribute',
606 'total_amount' => 150.00,
607 'invoiceID' => "c8acb91e080ad7bd8a2adc119c192885",
608 'contactID' => $this->_contactId
,
609 'contributionID' => $this->_contributionId
,
610 'pledgeID' => $this->_pledgeId
,
613 $this->ids
['pledge_payment'][] = $pledgePayment['id'];