You are here

function uc_paypal_update_2 in Ubercart 5

File

payment/uc_paypal/uc_paypal.install, line 67

Code

function uc_paypal_update_2() {

  // Change the variable used to define the default transaction type.
  if (variable_get('uc_paypal_wpp_payment_action', 'Sale') == 'Sale') {
    variable_set('uc_pg_paypal_wpp_cc_txn_type', UC_CREDIT_AUTH_CAPTURE);
  }
  else {
    variable_set('uc_pg_paypal_wpp_cc_txn_type', UC_CREDIT_AUTH_ONLY);
  }
  variable_del('uc_paypal_wpp_payment_action');

  // Fix a bug in a variable name.
  variable_set('uc_paypal_wps_submit_method', variable_get('uc_paypal_wbs_submit_method', 'single'));
  variable_del('uc_paypal_wbs_submit_method');
  return array();
}