Completed
Push — development ( b504d8...633085 )
by Ashutosh
10:54 queued 10s
created
app/Http/Controllers/Common/BaseMailChimpController.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 class BaseMailChimpController extends Controller
10 10
 {
11
-	public function getLists()
11
+    public function getLists()
12 12
     {
13 13
         try {
14 14
             $result = $this->mailchimp->request('lists');
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
                 ->pluck('mailchimp_group_cat_id')->first();
52 52
             }
53 53
             if ($interestGroupIdForNo  &&  $productGroupId) {
54
-                 $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
55
-                 'interests'         => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true],
56
-                 //refer to https://us7.api.mailchimp.com/playground
57
-                 ]);
54
+                    $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
55
+                    'interests'         => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true],
56
+                    //refer to https://us7.api.mailchimp.com/playground
57
+                    ]);
58 58
             } elseif ($interestGroupIdForNo  &&  $productGroupId ==null) {
59
-                 $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
60
-                 'interests'         => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false],
61
-                 //refer to https://us7.api.mailchimp.com/playground
59
+                    $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
60
+                    'interests'         => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false],
61
+                    //refer to https://us7.api.mailchimp.com/playground
62 62
             } elseif ($productGroupId && $interestGroupIdForNo==null || $interestGroupIdForYes==null) {
63
-                  $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
64
-                 'interests'         => [$productGroupId =>true],
63
+                    $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
64
+                    'interests'         => [$productGroupId =>true],
65 65
             }
66 66
         } catch (Exception $ex) {
67 67
             $exe = json_decode($ex->getMessage(), true);
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
     {
73 73
         try {
74 74
             $merge_fields = $this->field($email);
75
-               $hash = md5($email);
76
-             $isPaidStatus = StatusSetting::select()->value('mailchimp_ispaid_status');
77
-             $productStatusStatus = StatusSetting::select()->value('mailchimp_product_status');
75
+                $hash = md5($email);
76
+                $isPaidStatus = StatusSetting::select()->value('mailchimp_ispaid_status');
77
+                $productStatusStatus = StatusSetting::select()->value('mailchimp_product_status');
78 78
             if ($isPaidStatus ==1) {
79 79
                 $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No
80 80
                 $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
@@ -84,20 +84,20 @@  discard block
 block discarded – undo
84 84
                 ->pluck('mailchimp_group_cat_id')->first();
85 85
             }
86 86
             if ($interestGroupIdForNo && $productGroupId) {
87
-                 $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
88
-                 'interests'         => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true],
89
-                 //refer to https://us7.api.mailchimp.com/playground
90
-                 ]);
87
+                    $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
88
+                    'interests'         => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true],
89
+                    //refer to https://us7.api.mailchimp.com/playground
90
+                    ]);
91 91
             } elseif ($interestGroupIdForNo && $productGroupId ==null) {
92
-                 $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
93
-                 'interests'         => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true],
94
-                 //refer to https://us7.api.mailchimp.com/playground
92
+                    $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
93
+                    'interests'         => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true],
94
+                    //refer to https://us7.api.mailchimp.com/playground
95 95
             } elseif ($productGroupId && $interestGroupIdForNo==null || $interestGroupIdForYes==null) {
96
-                  $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
97
-                 'interests'         => [$productGroupId =>true],
96
+                    $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
97
+                    'interests'         => [$productGroupId =>true],
98 98
             }
99
-                 //refer to https://us7.api.mailchimp.com/playground
100
-              ]);
99
+                    //refer to https://us7.api.mailchimp.com/playground
100
+                ]);
101 101
         } catch (Exception $ex) {
102 102
             $exe = json_decode($ex->getMessage(), true);
103 103
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Order/BaseOrderController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
             $this->addSubscription($order->id, $plan_id, $version, $product, $serial_key);
110 110
             $this->sendOrderMail($user_id, $order->id, $item->id);
111 111
             //Update Subscriber To Mailchimp
112
-             $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
113
-              if($mailchimpStatus == 1) {
112
+                $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
113
+                if($mailchimpStatus == 1) {
114 114
             $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
115 115
             $email = User::where('id', $user_id)->pluck('email')->first();
116 116
             if ($item->subtotal > 0) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         } else {
119 119
             $r = $mailchimp->updateSubscriberForFreeProduct($email, $product);
120 120
         }
121
-      }
121
+        }
122 122
         } catch (\Exception $ex) {
123 123
             Bugsnag::notifyException($ex);
124 124
             app('log')->error($ex->getMessage());
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $data = $template->data;
279 279
         $replace = [
280 280
             'name'          => $user->first_name.' '.$user->last_name,
281
-             'serialkeyurl' => $myaccounturl,
281
+                'serialkeyurl' => $myaccounturl,
282 282
             'downloadurl'   => $downloadurl,
283 283
             'invoiceurl'    => $invoiceurl,
284 284
             'product'       => $product,
Please login to merge, or discard this patch.