From a5c7fd4653b69e5d01817b8211a1000253339e5f Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 12 Feb 2016 10:01:50 +0530 Subject: [PATCH] --CRM-16188, reverted back the changes since contribution status id is needed in transitioncomponent function --- api/v3/Order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/Order.php b/api/v3/Order.php index ff98dec4cc..008a584189 100644 --- a/api/v3/Order.php +++ b/api/v3/Order.php @@ -158,7 +158,7 @@ function civicrm_api3_order_delete($params) { */ function civicrm_api3_order_cancel($params) { $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'); - $params['contribution_status_id'] = 'Cancelled'; + $params['contribution_status_id'] = array_search('Cancelled', $contributionStatuses); $result = civicrm_api3('Contribution', 'create', $params); CRM_Contribute_BAO_Contribution::transitionComponents($params); return civicrm_api3_create_success($result['values'], $params, 'Order', 'cancel'); -- 2.25.1