Skip to content
Snippets Groups Projects
Commit b48aac6e authored by Jamie McClelland's avatar Jamie McClelland
Browse files

use api for better future compatibility.

parent 59534465
No related branches found
No related tags found
No related merge requests found
......@@ -212,11 +212,13 @@ function stripe_civicrm_managed(&$entities) {
function stripe_civicrm_idsException(&$skip) {
// Handle old method.
$skip[] = 'civicrm/stripe/webhook';
// Handle new method. Get the IDs of the Stripe payment processor.
$sql = "SELECT pp.id FROM civicrm_payment_processor pp JOIN civicrm_payment_processor_type
pt ON pp.payment_processor_type_id = pt.id AND pt.name = 'Stripe'";
$dao = CRM_Core_DAO::executeQuery($sql);
while($dao->fetch()) {
$skip[] = 'civicrm/payment/ipn/' . $dao->id;
$result = civicrm_api3('PaymentProcessor', 'get', array(
'sequential' => 1,
'return' => "id",
'class_name' => "Payment_stripe",
'is_active' => 1,
));
foreach($result['values'] as $value) {
$skip[] = 'civicrm/payment/ipn/' . $value['id'];
}
}
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