+ $result = civicrm_api3('payment_processor', 'create', $api_params);
+
+ // Create a Campaign for testing.
+ $campaign_name = md5(microtime());
+ $api_params = array(
+ 'title' => $campaign_name,
+ 'is_active' => TRUE,
+ 'status_id' => 2,
+ );
+ $result = civicrm_api3('campaign', 'create', $api_params);
+
+ // Create a membership type for testing.
+ $membership_type = md5(microtime());
+ $api_params = array(
+ 'name' => $membership_type,
+ 'is_active' => TRUE,
+ 'financial_type_id' => 1,
+ 'domain_id' => 1,
+ 'member_of_contact_id' => 1,
+ 'duration_unit' => 'day',
+ 'duration_interval' => 1,
+ );
+ $result = civicrm_api3('membership_type', 'create', $api_params);
+
+ // Create a contribution page for testing.
+ $contribution_page = md5(microtime());
+ $api_params = array(
+ 'title' => $contribution_page,
+ 'is_active' => TRUE,
+ 'financial_type_id' => 1,
+ );
+ $result = civicrm_api3('contribution_page', 'create', $api_params);