X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FContribution%2FContributionCreateWithSoftCreditDefaults.php;h=8d7126cb897de7c0f5218e7f9f9b630623beca52;hb=e7ed2ed6dfa73a6225b7d2a2d09529edec03f974;hp=92b6fb984e1d4b7f474e1d1b3a22ca5fea3b6ba1;hpb=6d699851d58b6116417dd95d5821e1cdbdfe7e42;p=civicrm-core.git diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php index 92b6fb984e..8d7126cb89 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php @@ -1,15 +1,15 @@ 22, + 'contact_id' => 21, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -18,11 +18,11 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'soft_credit_to' => 23, + 'soft_credit_to' => 22, ); try{ - $result = civicrm_api3('contribution', 'create', $params); + $result = civicrm_api3('Contribution', 'create', $params); } catch (CiviCRM_API3_Exception $e) { // Handle error here. @@ -55,7 +55,7 @@ function contribution_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '22', + 'contact_id' => '21', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -90,11 +90,10 @@ function contribution_create_expectedresult() { return $expectedResult; } -/** +/* * This example has been generated from the API test suite. -* The test that created it is called -* testCreateContributionWithSoftCreditDefaults -* and can be found in +* The test that created it is called "testCreateContributionWithSoftCreditDefaults" +* and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at