Skip to content
Snippets Groups Projects
Commit f25b0802 authored by Joshua Walker's avatar Joshua Walker
Browse files

Merge pull request #72 from Swingline0/fix-missing-email-error

Lookup contact's email address from API if missing from POST body (for backend contributions in Wordpress)
parents af439c66 f1c95ff6
Branches
Tags
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.
Please register or to comment