Skip to content
Snippets Groups Projects
Commit 490feb41 authored by mattwire's avatar mattwire
Browse files

Fixes to Stripe.Ipn for updated library

parent 2a29046a
Branches
Tags
1 merge request!1246.5
......@@ -1119,6 +1119,8 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
* The "raw" data, eg. a JSON string that is saved in the civicrm_system_log.context table
* @param bool $verifyRequest
* Should we verify the request data with the payment processor (eg. retrieve it again?).
* @param null|int $emailReceipt
* Override setting of email receipt if set to 0, 1
*
* @return bool
* @throws \CRM_Core_Exception
......
......@@ -31,7 +31,8 @@ function _civicrm_api3_stripe_Ipn_spec(&$spec) {
$spec['evtid']['title'] = ts("An event id as generated by Stripe.");
$spec['ppid']['title'] = ts("The payment processor to use (required if using evtid)");
$spec['noreceipt']['title'] = ts("Set to 1 to override contribution page settings and do not send a receipt (default is off or 0). )");
$spec['noreceipt']['api.default'] = 0;
$spec['noreceipt']['api.default'] = FALSE;
$spec['noreceipt']['type'] = CRM_Utils_Type::T_BOOLEAN;
}
/**
......@@ -98,7 +99,11 @@ function civicrm_api3_stripe_Ipn($params) {
if (class_exists('CRM_Core_Payment_StripeIPN')) {
try {
$paymentProcessor->processPaymentNotification($ppid, $object, TRUE, ($params['noreceipt'] == 1) ? 0 : NULL);
$paymentProcessor->processPaymentNotification(
$ppid,
json_encode($object),
FALSE,
($params['noreceipt'] === TRUE) ? 0 : NULL);
} catch(Throwable $e) {
return civicrm_api3_create_error($e->getMessage());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment