Skip to content
Snippets Groups Projects
Commit 58c6aa0b authored by Jamie McClelland's avatar Jamie McClelland Committed by mattwire
Browse files

email is not enough, we now need contact id to find the customer.

parent d7b0e446
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,8 @@ class CRM_Stripe_Customer {
throw new CRM_Core_Exception('Stripe Customer (find): Missing required parameter: ' . $required);
}
}
if (empty($params['email']) && empty($params['contact_id'])) {
throw new CRM_Core_Exception('Stripe Customer (find): One of email or contact_id is required');
if (empty($params['contact_id'])) {
throw new CRM_Core_Exception('Stripe Customer (find): contact_id is required');
}
$queryParams = [
1 => [$params['contact_id'], 'String'],
......
......@@ -157,6 +157,7 @@ class CRM_Stripe_BaseTest extends \PHPUnit_Framework_TestCase implements Headles
'address_zip' => '12345',
),
'email' => $this->contact->email,
'contactID' => $this->contact->id,
'description' => 'Test from Stripe Test Code',
'currencyID' => 'USD',
'invoiceID' => $this->_invoiceID,
......
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