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

Merge pull request #38 from ginkgomzd/fix-bad-recurring-payments-query

fix bad-query: payment_processor_type is not a char-field. add join to g...
parents 7fd16bd1 e4224be3
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,8 @@ class CRM_Stripe_Page_Webhook extends CRM_Core_Page {
$test_mode = ! $data->livemode;
$stripe_key = CRM_Core_DAO::singleValueQuery("SELECT user_name FROM civicrm_payment_processor WHERE payment_processor_type = 'Stripe' AND is_test = '$test_mode'");
$stripe_key = CRM_Core_DAO::singleValueQuery("SELECT pp.user_name FROM civicrm_payment_processor pp INNER JOIN civicrm_payment_processor_type ppt on pp.payment_processor_type_id = ppt.id AND ppt.name = 'Stripe' WHERE is_test = '$test_mode'");
require_once ("packages/stripe-php/lib/Stripe.php");
Stripe::setApiKey($stripe_key);
......
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