Merge pull request #9670 from johanv/CRM-19869-pdf_table_header_issue
[civicrm-core.git] / api / v3 / examples / ParticipantPayment / Get.php
index 7b919f5934ac8f09f3fb72829b4b8893ba82a077..eaf18755b83e3af0c7efe31188ec55c339db379e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Test Generated example of using participant_payment get API.
+ * Test Generated example demonstrating the ParticipantPayment.get API.
  *
  * @return array
  *   API result array
@@ -12,7 +12,7 @@ function participant_payment_get_example() {
   );
 
   try{
-    $result = civicrm_api3('participant_payment', 'get', $params);
+    $result = civicrm_api3('ParticipantPayment', 'get', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -20,7 +20,8 @@ function participant_payment_get_example() {
     $errorCode = $e->getErrorCode();
     $errorData = $e->getExtraParams();
     return array(
-      'error' => $errorMessage,
+      'is_error' => 1,
+      'error_message' => $errorMessage,
       'error_code' => $errorCode,
       'error_data' => $errorData,
     );
@@ -54,11 +55,10 @@ function participant_payment_get_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testGet
-* and can be found in
+* The test that created it is called "testGet"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php
 *
 * You can see the outcome of the API tests at