Skip to content
Snippets Groups Projects
Commit f3be3924 authored by Rich's avatar Rich Committed by mattwire
Browse files

Add suggestions in comments to use Civi\Payment... methods for getting payment class object

parent 24aafced
Branches
Tags
1 merge request!1526.6 to master
......@@ -41,7 +41,10 @@ class CRM_Stripe_Webhook {
foreach ($result['values'] as $paymentProcessor) {
$webhook_path = self::getWebhookPath($paymentProcessor['id']);
// @todo consider replacing this:
$processor = new CRM_Core_Payment_Stripe('', civicrm_api3('PaymentProcessor', 'getsingle', ['id' => $paymentProcessor['id']]));
// with
// $processor = \Civi\Payment\System::singleton()->getById($paymentProcessor['id']);
$processor->setAPIParams();
try {
......@@ -197,7 +200,10 @@ class CRM_Stripe_Webhook {
* @param int $paymentProcessorId
*/
public static function createWebhook($paymentProcessorId) {
// @todo consider replacing this:
$processor = new CRM_Core_Payment_Stripe('', civicrm_api3('PaymentProcessor', 'getsingle', ['id' => $paymentProcessorId]));
// With:
// $processor = \Civi\Payment\System::singleton()->getById($paymentProcessor['id']);
$processor->setAPIParams();
$params = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment