I'm using drupal(7.38), civicrm(4.6.5), ubercart(7.x-3.8) and ubercart_civicrm(7.x-4.x-dev). Whenever a user(registered/anonymous) is purchase a product from the site, a contribution will be added into the civcrm user. If the user is anonymous, system will create the user by using email both in drupal as well as civicrm also. I notice some of the products status is 'Abandoned' in ubercart, but under the corresponding user contribution tab, the product is listing as Completed. I gone throw the uc_civicrm module at last I found some piece of codes in uc_civicrm/uc_civicrm.module
function _uc_civicrm_map_contribution_status($order_status) {
// NOTE: There may be a more "correct" way to do this.
$map = array(
"completed" => 1,
"payment_received" => 1,
"pending" => 2,
"processing" => 5,
"canceled" => 3,
"in_checkout" => 5,
);
if (array_key_exists($order_status, $map)) {
$id = $map[$order_status];
}
else {
// Oh no.
$id = 1;
watchdog('uc_civicrm', 'There is no status that maps to %order_status, marking as "Complete"', array('%order_status' => $order_status), WATCHDOG_WARNING);
}
return $id;
}
I want to synchronize ubercart order status with civicrm contributions status. Please help me out this. Thanks in advance