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 Jul 6, 2017
1 parent 03ed1c3 commit 90957f0
Show file tree
Hide file tree
Showing 2 changed files with 543 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CRM/Core/Payment/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -837,4 +837,16 @@ public function doRecurPayment(&$params, $amount, $stripe_customer) {
public function doTransferCheckout(&$params, $component) {
CRM_Core_Error::fatal(ts('Use direct billing instead of Transfer method.'));
}

/**
* 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 90957f0

Please sign in to comment.