Skip to content

Commit

Permalink
refactored IPN to use base IPN class from civicrm
Browse files Browse the repository at this point in the history
This allows use of webhook in format /civicrm/payment/ipn/N

drastik#221
  • Loading branch information
jmcclelland committed Mar 19, 2018
1 parent fce5f13 commit f815b98
Show file tree
Hide file tree
Showing 2 changed files with 588 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CRM/Core/Payment/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -912,4 +912,15 @@ public function validatePaymentInstrument($values, &$errors) {
}
}

/**
* Process incoming notification.
*/

static public function handlePaymentNotification() {
$data_raw = file_get_contents("php://input");
$data = json_decode($data_raw);
$ipnClass = new CRM_Core_Payment_StripeIPN($data);
$ipnClass->main();
}
}

Loading

0 comments on commit f815b98

Please sign in to comment.