From b9b8fdaea5e0876d35a29274c9261a6a4c60f160 Mon Sep 17 00:00:00 2001 From: Aidan Saunders <aidan.saunders@squiffle.uk> Date: Fri, 20 Jan 2023 12:02:32 +0000 Subject: [PATCH] Switch to APIv4 Managed Entity --- stripe.mgd.php | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/stripe.mgd.php b/stripe.mgd.php index 179edd28..165f3e5c 100644 --- a/stripe.mgd.php +++ b/stripe.mgd.php @@ -6,23 +6,40 @@ * https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed/ */ return [ - 0 => [ + [ 'name' => 'Stripe', 'entity' => 'PaymentProcessorType', + 'cleanup' => 'unused', + 'update' => 'unmodified', 'params' => [ - 'version' => 3, - 'name' => 'Stripe', - 'title' => 'Stripe', - 'description' => 'Stripe Payment Processor', - 'class_name' => 'Payment_Stripe', - 'user_name_label' => 'Publishable key', - 'password_label' => 'Secret Key', - 'signature_label' => 'Webhook Secret', - 'url_site_default' => 'http://unused.com', - 'url_site_test_default' => 'http://unused.com', - 'billing_mode' => 1, - 'payment_type' => 1, - 'is_recur' => 1, + 'version' => 4, + 'values' => [ + 'name' => 'Stripe', + 'title' => 'Stripe', + 'description' => 'Stripe Payment Processor', + 'is_active' => TRUE, + 'is_default' => FALSE, + 'user_name_label' => 'Publishable key', + 'password_label' => 'Secret Key', + 'signature_label' => 'Webhook Secret', + 'subject_label' => NULL, + 'class_name' => 'Payment_Stripe', + 'url_site_default' => 'http://unused.com', + 'url_api_default' => NULL, + 'url_recur_default' => NULL, + 'url_button_default' => NULL, + 'url_site_test_default' => 'http://unused.com', + 'url_api_test_default' => NULL, + 'url_recur_test_default' => NULL, + 'url_button_test_default' => NULL, + 'billing_mode' => 1, + 'is_recur' => TRUE, + 'payment_type' => 1, + 'payment_instrument_id:name' => 'Credit Card', + ], + 'match' => [ + 'name', + ], ], ], ]; -- GitLab