Skip to content
Snippets Groups Projects
Commit f1c95ff6 authored by Eran's avatar Eran
Browse files

Lookup contact's email address from API if missing from POST body

parent af439c66
No related branches found
No related tags found
No related merge requests found
......@@ -245,6 +245,13 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
elseif (!empty($params['email-Primary'])) {
$email = $params['email-Primary'];
}
elseif (!empty($params['contact_id'])){
$email = civicrm_api3('Contact', 'getvalue', array(
'id' => $params['contact_id'],
'return' => 'email',
));
}
// Prepare escaped query params.
$query_params = array(
1 => array($email, 'String'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment