Skip to content
Snippets Groups Projects
Commit 2efff690 authored by mattwire's avatar mattwire
Browse files

Add http response codes

parent 5ade3db1
No related branches found
No related tags found
1 merge request!11Support Cancellation and major refactor of backend / webhook processing
...@@ -870,6 +870,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment { ...@@ -870,6 +870,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
$data = json_decode($data_raw); $data = json_decode($data_raw);
$ipnClass = new CRM_Core_Payment_StripeIPN($data); $ipnClass = new CRM_Core_Payment_StripeIPN($data);
$ipnClass->main(); $ipnClass->main();
http_response_code(200);
} }
......
...@@ -240,7 +240,6 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN { ...@@ -240,7 +240,6 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
} }
else { else {
// The first contribution was completed, so create a new one. // The first contribution was completed, so create a new one.
// api contribution repeattransaction repeats the appropriate contribution if it is given // api contribution repeattransaction repeats the appropriate contribution if it is given
// simply the recurring contribution id. It also updates the membership for us. // simply the recurring contribution id. It also updates the membership for us.
civicrm_api3('Contribution', 'repeattransaction', array( civicrm_api3('Contribution', 'repeattransaction', array(
...@@ -260,7 +259,6 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN { ...@@ -260,7 +259,6 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
'failure_count' => 0, 'failure_count' => 0,
'contribution_status_id' => 'In Progress' 'contribution_status_id' => 'In Progress'
)); ));
return; return;
// Failed recurring payment. // Failed recurring payment.
...@@ -489,7 +487,7 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN { ...@@ -489,7 +487,7 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
public function exception($message) { public function exception($message) {
$errorMessage = 'StripeIPN Exception: Event: ' . $this->event_type . ' Error: ' . $message; $errorMessage = 'StripeIPN Exception: Event: ' . $this->event_type . ' Error: ' . $message;
Civi::log()->debug($errorMessage); Civi::log()->debug($errorMessage);
//throw new CRM_Core_Exception($errorMessage); http_response_code(400);
exit(); exit(1);
} }
} }
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