$ids['onbehalf_dupe_alert'] = self::retrieve('onBehalfDupeAlert', 'Integer', 'GET', FALSE);
}
- $paymentProcessorID = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType',
- 'PayPal_Standard', 'id', 'name'
+ $processorParams = array(
+ 'user_name' => self::retrieve('receiver_email', 'String', 'POST', FALSE),
+ 'payment_processor_type_id' => CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', 'PayPal_Standard', 'id', 'name'),
+ 'is_test' => empty($input['is_test']) ? 0 : 1,
);
+ $processorInfo = array();
+ if (!CRM_Financial_BAO_PaymentProcessor::retrieve($processorParams, $processorInfo)) {
+ return FALSE;
+ }
- if (!$this->validateData($input, $ids, $objects, TRUE, $paymentProcessorID)) {
+ if (!$this->validateData($input, $ids, $objects, TRUE, $processorInfo['id'])) {
return FALSE;
}