Skip to content
Snippets Groups Projects
Commit 38fc4534 authored by laryn's avatar laryn
Browse files

Adjustment to checking for live/test mode

My installation was not processing the previous method of checking live/test mode correctly -- test mode would come back positive but live mode was empty instead of negative.

See also https://github.com/drastik/com.drastikbydesign.stripe/issues/26#issuecomment-203485309
parent d24d0cbd
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,11 @@ class CRM_Stripe_Page_Webhook extends CRM_Core_Page {
CRM_Core_Error::Fatal("Stripe Callback: cannot json_decode data, exiting. <br /> $data");
}
$test_mode = ! $data->livemode;
if ($data->livemode) {
$test_mode = 0;
} else {
$test_mode = 1;
}
$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'");
......
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