* @param array $input
* @param array $ids
*
- * @return bool
* @throws \CRM_Core_Exception
*/
public function getInput(&$input, &$ids) {
$input['trxn_id'] = md5(uniqid(rand(), TRUE));
}
- if (!$this->getBillingID($ids)) {
- return FALSE;
- }
- $billingID = $ids['billing'];
+ $billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
$params = [
'first_name' => 'x_first_name',
'last_name' => 'x_last_name',
}
/**
+ * @deprecated
* Get site billing ID.
*
* @param array $ids
* @return bool
*/
public function getBillingID(&$ids) {
+ CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_LocationType::getBilling()');
$ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
if (!$ids['billing']) {
CRM_Core_Error::debug_log_message(ts('Please set a location type of %1', [1 => 'Billing']));
* @throws \CRM_Core_Exception
*/
public function getInput(&$input, &$ids) {
- if (!$this->getBillingID($ids)) {
- return;
- }
-
+ $billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
$input['txnType'] = $this->retrieve('txn_type', 'String', FALSE);
$input['paymentStatus'] = $this->retrieve('payment_status', 'String', FALSE);
$input['invoice'] = $this->retrieve('invoice', 'String', TRUE);
$input['amount'] = $this->retrieve('mc_gross', 'Money', FALSE);
$input['reasonCode'] = $this->retrieve('ReasonCode', 'String', FALSE);
- $billingID = $ids['billing'];
$lookup = [
"first_name" => 'first_name',
"last_name" => 'last_name',
* @throws CRM_Core_Exception
*/
public function getInput(&$input, &$ids) {
- if (!$this->getBillingID($ids)) {
- return;
- }
+ $billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
$input['txnType'] = self::retrieve('txn_type', 'String', 'POST', FALSE);
$input['paymentStatus'] = self::retrieve('payment_status', 'String', 'POST', FALSE);
$input['amount'] = self::retrieve('mc_gross', 'Money', 'POST', FALSE);
$input['reasonCode'] = self::retrieve('ReasonCode', 'String', 'POST', FALSE);
- $billingID = $ids['billing'];
$lookup = [
"first_name" => 'first_name',
"last_name" => 'last_name',