throw new CRM_Core_Exception("Could not find contribution recur record: {$ids['ContributionRecur']} in IPN request: " . print_r($input, TRUE));
}
// do a subscription check
- if ($contributionRecur->processor_id != $input['subscription_id']) {
+ if ($contributionRecur->processor_id != $this->getRecurProcessorID()) {
throw new CRM_Core_Exception('Unrecognized subscription.');
}
*/
public function getInput(&$input) {
$input['amount'] = $this->retrieve('x_amount', 'String');
- $input['subscription_id'] = $this->retrieve('x_subscription_id', 'Integer');
+ $input['subscription_id'] = $this->getRecurProcessorID();
$input['response_code'] = $this->retrieve('x_response_code', 'Integer');
$input['response_reason_code'] = $this->retrieve('x_response_reason_code', 'String', FALSE);
$input['response_reason_text'] = $this->retrieve('x_response_reason_text', 'String', FALSE);
*/
public function getIDs(&$ids, $input) {
$ids['contribution'] = $this->getContributionID();
- $contributionRecur = $this->getContributionRecurObject($input['subscription_id'], (int) $this->retrieve('x_cust_id', 'Integer', FALSE, 0), $this->getContributionID());
+ $contributionRecur = $this->getContributionRecurObject($this->getRecurProcessorID(), (int) $this->retrieve('x_cust_id', 'Integer', FALSE, 0), $this->getContributionID());
$ids['contributionRecur'] = (int) $contributionRecur->id;
}