]> _ Git - psq.git/commitdiff
stripe for socialarticles and adcampagins
authorLouis Jeckel <louis.jeckel@outlook.com>
Thu, 15 Oct 2020 13:15:20 +0000 (15:15 +0200)
committerLouis Jeckel <louis.jeckel@outlook.com>
Thu, 15 Oct 2020 13:15:20 +0000 (15:15 +0200)
app/Models/AdCampaign.php
app/Models/SocialArticle.php
app/Policies/AdCampaignPolicy.php
app/Policies/SocialArticlePolicy.php
config/services.php
public/js/app.js
resources/views/com-campaigns/show.blade.php
resources/views/components/login-alert.blade.php
resources/views/components/unlocked-article-alerts.blade.php
resources/views/social-articles/show.blade.php

index a90e98fdb1d74b20310bace76d4569de09966ab4..f1570ef94d91ae60a49dd28233e0632b69a85f6f 100644 (file)
@@ -8,6 +8,7 @@ use A17\Twill\Models\Behaviors\HasMedias;
 use A17\Twill\Models\Behaviors\HasPosition;
 use A17\Twill\Models\Behaviors\Sortable;
 use A17\Twill\Models\Model;
+use App\IsStripeUnlockable;
 use Laravel\Scout\Searchable;
 
 /**
@@ -22,7 +23,7 @@ use Laravel\Scout\Searchable;
 class AdCampaign extends Model implements Sortable, PillBoxContract
 {
     use HasSlug, HasMedias, HasPositionTop, HasSubscriberOnlyContent;
-    use Searchable, HasMetaTags;
+    use Searchable, HasMetaTags, IsStripeUnlockable;
 
     protected $fillable = [
         'published',
index c7d95f1c04fd9b7ecb0ede17cdab305423903f94..1d44aaa252a236e1544ef658808b856245a5bceb 100644 (file)
@@ -11,6 +11,7 @@ use A17\Twill\Models\Behaviors\HasRevisions;
 use A17\Twill\Models\Behaviors\HasPosition;
 use A17\Twill\Models\Behaviors\Sortable;
 use A17\Twill\Models\Model;
+use App\IsStripeUnlockable;
 
 /**
  * Class SocialArticle
@@ -22,7 +23,7 @@ use A17\Twill\Models\Model;
  */
 class SocialArticle extends Model implements PillBoxContract
 {
-    use HasSlug, HasMedias, HasSubscriberOnlyContent, HasMetaTags;
+    use HasSlug, HasMedias, HasSubscriberOnlyContent, HasMetaTags, IsStripeUnlockable;
 
     protected $fillable = [
         'published',
index 75c5e5206241d3d39f744271c51c9c1f0efa328d..c16896b844a3e7651679720e43cd63ab883ee66d 100644 (file)
@@ -31,7 +31,9 @@ class AdCampaignPolicy
     public function view(?User $user, AdCampaign $adCampaign)
     {
         return !$adCampaign->subscriber_only ||
-            optional($user)->hasValidSubscription();
+            optional($user)->hasValidSubscription() ||
+            $adCampaign->unlockedBy($user);
+
     }
 
     /**
index d787ba42dc16e4a1b1204ca5ed571745beb8967b..2aac2c2ac6eba41a282cfffb205c324cb03bc083 100644 (file)
@@ -31,7 +31,9 @@ class SocialArticlePolicy
     public function view(?User $user, SocialArticle $socialArticle)
     {
         return !$socialArticle->subscriber_only ||
-            optional($user)->hasValidSubscription();
+            optional($user)->hasValidSubscription() ||
+            $socialArticle->unlockedBy($user);
+
     }
 
     /**
index 2a1d616c77464de6df0a2e6b90d5dba529dbd856..07a3a10bee7834b69b4086af397a6a10be86c89a 100644 (file)
@@ -30,4 +30,8 @@ return [
         'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
     ],
 
+    'stripe' => [
+        'enable' => env('STRIPE_ENABLE', false)
+    ]
+
 ];
index 07af3adf05f3ba0a52a4bb50d0010a1569defcb7..116474a616bf4546920eba12f02ac91f7836c700 100644 (file)
@@ -9576,6 +9576,21 @@ __webpack_require__.r(__webpack_exports__);
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 
 /* harmony default export */ __webpack_exports__["default"] = ({
   name: "StripeModal",
@@ -9583,10 +9598,14 @@ __webpack_require__.r(__webpack_exports__);
   data: function data() {
     return {
       stripe: null,
-      _elementsModal_HOST_URL: '/pay',
       amount: '-'
     };
   },
+  mounted: function mounted() {
+    if (location.search.indexOf('?pay=now') >= 0) {
+      this.toggleElementsModalVisibility();
+    }
+  },
   methods: {
     createIntent: function createIntent() {
       var _this = this;
@@ -9610,8 +9629,8 @@ __webpack_require__.r(__webpack_exports__);
       });
     },
     getPublicKey: function getPublicKey() {
-      return Promise.resolve("pk_test_51HcBp3KZBXuYePomhVUc9RxbsZbSfuoiu0NKiotBW4ZKwCbM6sLlPMLSyPDQeB0MUXoQD3qbk23eJ41NVpM1z1oT00lg84Ywcq");
-      return fetch(this._elementsModal_HOST_URL + "/public-key", {
+      // return Promise.resolve("pk_test_51HcBp3KZBXuYePomhVUc9RxbsZbSfuoiu0NKiotBW4ZKwCbM6sLlPMLSyPDQeB0MUXoQD3qbk23eJ41NVpM1z1oT00lg84Ywcq");
+      return fetch("/pay/public-key", {
         method: "get",
         headers: {
           "Content-Type": "application/json"
@@ -9627,10 +9646,11 @@ __webpack_require__.r(__webpack_exports__);
 
       if (modal && modal.classList) {
         modal.classList.toggle("ElementsModal--show-modal");
+        this.createIntent();
       }
     },
     createPaymentIntent: function createPaymentIntent(content) {
-      return fetch("/pay/payment_intents", {
+      return fetch("/pay/payment-intents", {
         method: "post",
         headers: {
           "Content-Type": "application/json",
@@ -9838,12 +9858,7 @@ __webpack_require__.r(__webpack_exports__);
   props: ['content'],
   methods: {
     toggleElementsModalVisibility: function toggleElementsModalVisibility() {
-      var modal = document.querySelector(".ElementsModal--modal");
-
-      if (modal && modal.classList) {
-        modal.classList.toggle("ElementsModal--show-modal");
-        this.$refs.stripeModal.createIntent();
-      }
+      this.$refs.stripeModal.toggleElementsModalVisibility();
     }
   }
 });
@@ -16626,7 +16641,7 @@ module.exports = exports;
 var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
 exports = ___CSS_LOADER_API_IMPORT___(false);
 // Module
-exports.push([module.i, "\n.ElementsModal--modal[data-v-728fb3ae] {\n    all: initial;\n    box-sizing: border-box;\n    position: fixed;\n    font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n    left: 0;\n    top: 0;\n    width: 100%;\n    height: 100%;\n    background-color: rgba(0, 0, 0, 0.5);\n    opacity: 0;\n    visibility: hidden;\n    transform: scale(1.1);\n    transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;\n    z-index: 100001 !important;\n}\n.ElementsModal--modal-content[data-v-728fb3ae] {\n    position: absolute;\n    top: 42%;\n    left: 50%;\n    /* make media query for this :) */\n    transform: translate(-50%, -50%);\n    border-radius: 10px;\n    background: rgb(255, 255, 255);\n    overflow: hidden;\n    width: 385px;\n    border-radius: 0.5rem;\n}\n@media screen and (max-width: 600px) {\n.ElementsModal--modal-content[data-v-728fb3ae] {\n        height: 100vh;\n        width: 100%;\n        border-radius: 0;\n}\n.ElementsModal--top[data-v-728fb3ae] {\n        padding-top: 4em;\n}\n.ElementsModal--close[data-v-728fb3ae] {\n        padding-top: 4em;\n}\n}\n.ElementsModal--top[data-v-728fb3ae] {\n    display: flex;\n    justify-content: flex-end;\n    position: relative;\n}\n.ElementsModal--close[data-v-728fb3ae] {\n    background: none;\n    color: inherit;\n    border: none;\n    padding: 0;\n    font: inherit;\n    outline: inherit;\n    color: rgb(255, 255, 255);\n    cursor: pointer;\n    position: absolute;\n    top: 0;\n    right: 0;\n    border: none;\n}\n.ElementsModal--show-modal[data-v-728fb3ae] {\n    opacity: 1;\n    visibility: visible;\n    transform: scale(1);\n    transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;\n}\n.ElementsModal--details[data-v-728fb3ae] {\n    margin-bottom: 2px;\n}\n.ElementsModal--price[data-v-728fb3ae] {\n    color: rgb(255, 255, 255);\n    font-size: 36px;\n    font-weight: 600;\n}\n.ElementsModal--top-banner[data-v-728fb3ae] {\n    background-color: #044e9c;\n    text-align: center;\n    padding: 20px 1em 2em;\n}\n.ElementsModal--email[data-v-728fb3ae] {\n    color: rgba(255, 255, 255, 0.5);\n    font-size: 16px;\n    font-weight: 500;\n}\n.ElementsModal--product[data-v-728fb3ae] {\n    color: rgba(255, 255, 255, 0.5);\n    font-size: 16px;\n    font-weight: 500;\n}\n.ElementsModal--company[data-v-728fb3ae] {\n    color: rgb(255, 255, 255);\n    font-size: 18px;\n    font-weight: bold;\n    margin: auto;\n    margin-bottom: 32px;\n}\n.ElementsModal--footer-text[data-v-728fb3ae] {\n    color: rgba(0, 0, 0, 0.4);\n    font-size: 12px;\n    font-weight: normal;\n    text-align: center;\n    line-height: 16px;\n}\n.ElementsModal--error-message[data-v-728fb3ae] {\n    margin-top: 5px;\n    color: rgb(220, 39, 39);\n    font-size: 13px;\n    line-height: 17px;\n}\n.ElementsModal--pay-button-wrapper[data-v-728fb3ae] {\n    font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n    margin: 25px;\n    width: 350px;\n    height: 40px;\n}\n.ElementsModal--pay-button[data-v-728fb3ae] {\n    cursor: pointer;\n    border: 0;\n    width: 100%;\n    text-align: center;\n    height: 40px;\n    box-shadow: inset 0 0 0 1px rgba(50, 50, 93, 0.1),\n    0 2px 5px 0 rgba(50, 50, 93, 0.1), 0 1px 1px 0 rgba(0, 0, 0, 0.07);\n    border-radius: 6px 6px 6px 6px;\n    font-size: 16px;\n    font-weight: 600;\n\n    background-color: rgb(0, 116, 212);\n    color: rgb(255, 255, 255);\n}\n.ElementsModal--pay-button[data-v-728fb3ae]:focus {\n    outline: none;\n    box-shadow: 0 0 0 1px rgba(50, 151, 211, 0.3), 0 1px 1px 0 rgba(0, 0, 0, 0.07),\n    0 0 0 4px rgba(50, 151, 211, 0.3);\n}\n.ElementsModal--dropdowns[data-v-728fb3ae] {\n    margin: 10px;\n    -webkit-appearance: none;\n    background: rgb(255, 255, 255);\n    box-shadow: 0px 0px 0px 1px rgb(224, 224, 224),\n    0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n    border-radius: 4px 4px 4px 4px;\n}\n\n/* Form */\n.ElementsModal--payment-form[data-v-728fb3ae] {\n    margin-bottom: 0;\n}\n.ElementsModal--label[data-v-728fb3ae] {\n    color: rgba(0, 0, 0, 0.6);\n    font-size: 14px;\n    font-weight: 500;\n}\n.ElementsModal--forms[data-v-728fb3ae] {\n    padding: 5%;\n}\n.ElementsModal--form[data-v-728fb3ae] {\n    margin-bottom: 14px;\n}\n.ElementsModal--form-label[data-v-728fb3ae] {\n    font-size: 13px;\n    margin-bottom: 4px;\n    display: block;\n    color: rgba(0, 0, 0, 0.6);\n}\n.ElementsModal--form-select select[data-v-728fb3ae] {\n    padding: 10px 12px;\n    width: 100%;\n    border: 1px solid transparent;\n    outline: none;\n    box-shadow: 0px 0px 0px 1px rgb(224, 224, 224),\n    0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n    transition: box-shadow 150ms ease;\n    border-radius: 5px 5px 5px 5px;\n\n    background-color: white;\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none;\n    background-image: url(\"data:image/svg+xml,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.193 3.97a.75.75 0 0 1 1.062 1.062L6.53 9.756a.75.75 0 0 1-1.06 0L.745 5.032A.75.75 0 0 1 1.807 3.97L6 8.163l4.193-4.193z' fill='%23000' fill-rule='evenodd' fill-opacity='.4'/%3E%3C/svg%3E\");\n    background-size: 12px;\n    background-position: calc(100% - 16px) center;\n    background-repeat: no-repeat;\n    color: rgb(40, 40, 40);\n    font-size: 16px;\n    font-weight: normal;\n}\n.ElementsModal--form-select select[data-v-728fb3ae]:-moz-focusring {\n    color: transparent;\n    text-shadow: 0 0 0 rgb(0, 0, 0);\n}\n.ElementsModal--form > label[data-v-728fb3ae] {\n    width: 100%;\n}\n.ElementsModal--form-select select[data-v-728fb3ae]:focus {\n    box-shadow: 0 0 0 1px rgba(50, 151, 211, 0.3), 0 1px 1px 0 rgba(0, 0, 0, 0.07),\n    0 0 0 4px rgba(50, 151, 211, 0.3);\n}\n.ElementsModal--form-select select[data-v-728fb3ae]::-ms-expand {\n    display: none; /* hide the default arrow in ie10 and ie11 */\n}\n.ElementsModal--form-divider[data-v-728fb3ae] {\n    margin-top: 14px;\n    margin-bottom: 25px;\n    text-align: center;\n    border-bottom: 1px solid rgb(231, 231, 231);\n    height: 20px;\n    width: 100%;\n}\n.ElementsModal--form-divider-text[data-v-728fb3ae] {\n    position: relative;\n    bottom: -10px; /* half of line-height */\n    padding: 0 10px;\n    background: rgb(255, 255, 255);\n    color: rgb(144, 144, 144);\n    font-size: 14px;\n    font-weight: 400;\n}\n.StripeElement--payment-request[data-v-728fb3ae] {\n    display: none;\n    margin-bottom: 14px;\n}\n.StripeElement--payment-request-button[data-v-728fb3ae] {\n    margin-bottom: 12px;\n}\n.StripeElement--card[data-v-728fb3ae] {\n    box-sizing: border-box;\n    height: 40px;\n    padding: 10px 12px;\n    border: 1px solid transparent;\n    border-radius: 5px 5px 5px 5px;\n    background-color: white;\n\n    box-shadow: 0px 0px 0px 1px rgb(224, 224, 224),\n    0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n    transition: box-shadow 150ms ease;\n}\n.StripeElement--card--focus[data-v-728fb3ae] {\n    box-shadow: 0 1px 3px 0 rgb(207, 215, 223);\n}\n.StripeElement--card--invalid[data-v-728fb3ae] {\n    border-color: rgb(239, 152, 150);\n}\n.StripeElement--card--webkit-autofill[data-v-728fb3ae] {\n    background-color: rgb(254, 253, 229) !important;\n}\n\n", ""]);
+exports.push([module.i, "\ninput[data-v-728fb3ae]{\n    height: 40px;\n    padding: 10px 12px;\n    width: 100%;\n    color: #32325d;\n    background-color: white;\n    border: 1px solid transparent;\n    border-radius: 4px;\n\n    box-shadow: 0 1px 3px 0 #e6ebf1;\n    transition: box-shadow 150ms ease;\n}\ninput[data-v-728fb3ae]:focus {\n    box-shadow: 0 1px 3px 0 #cfd7df;\n}\n.ElementsModal--modal[data-v-728fb3ae] {\n    all: initial;\n    box-sizing: border-box;\n    position: fixed;\n    font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n    left: 0;\n    top: 0;\n    width: 100%;\n    height: 100%;\n    background-color: rgba(0, 0, 0, 0.5);\n    opacity: 0;\n    visibility: hidden;\n    transform: scale(1.1);\n    transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;\n    z-index: 100001 !important;\n}\n.ElementsModal--modal-content[data-v-728fb3ae] {\n    position: absolute;\n    top: 42%;\n    left: 50%;\n    /* make media query for this :) */\n    transform: translate(-50%, -50%);\n    border-radius: 10px;\n    background: rgb(255, 255, 255);\n    overflow: hidden;\n    width: 385px;\n    border-radius: 0.5rem;\n}\n@media screen and (max-width: 600px) {\n.ElementsModal--modal-content[data-v-728fb3ae] {\n        height: 100vh;\n        width: 100%;\n        border-radius: 0;\n}\n.ElementsModal--top[data-v-728fb3ae] {\n        padding-top: 4em;\n}\n.ElementsModal--close[data-v-728fb3ae] {\n        padding-top: 4em;\n}\n}\n.ElementsModal--top[data-v-728fb3ae] {\n    display: flex;\n    justify-content: flex-end;\n    position: relative;\n}\n.ElementsModal--close[data-v-728fb3ae] {\n    background: none;\n    color: inherit;\n    border: none;\n    padding: 0;\n    font: inherit;\n    outline: inherit;\n    color: rgb(255, 255, 255);\n    cursor: pointer;\n    position: absolute;\n    top: 0;\n    right: 0;\n    border: none;\n}\n.ElementsModal--show-modal[data-v-728fb3ae] {\n    opacity: 1;\n    visibility: visible;\n    transform: scale(1);\n    transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;\n}\n.ElementsModal--details[data-v-728fb3ae] {\n    margin-bottom: 2px;\n}\n.ElementsModal--price[data-v-728fb3ae] {\n    color: rgb(255, 255, 255);\n    font-size: 36px;\n    font-weight: 600;\n}\n.ElementsModal--top-banner[data-v-728fb3ae] {\n    background-color: #044e9c;\n    text-align: center;\n    padding: 20px 1em 2em;\n}\n.ElementsModal--email[data-v-728fb3ae] {\n    color: rgba(255, 255, 255, 0.5);\n    font-size: 16px;\n    font-weight: 500;\n}\n.ElementsModal--product[data-v-728fb3ae] {\n    color: rgba(255, 255, 255, 0.5);\n    font-size: 16px;\n    font-weight: 500;\n}\n.ElementsModal--company[data-v-728fb3ae] {\n    color: rgb(255, 255, 255);\n    font-size: 18px;\n    font-weight: bold;\n    margin: auto;\n    margin-bottom: 32px;\n}\n.ElementsModal--footer-text[data-v-728fb3ae] {\n    color: rgba(0, 0, 0, 0.4);\n    font-size: 12px;\n    font-weight: normal;\n    text-align: center;\n    line-height: 16px;\n}\n.ElementsModal--error-message[data-v-728fb3ae] {\n    margin-top: 5px;\n    color: rgb(220, 39, 39);\n    font-size: 13px;\n    line-height: 17px;\n}\n.ElementsModal--pay-button-wrapper[data-v-728fb3ae] {\n    font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n    margin: 25px;\n    width: 350px;\n    height: 40px;\n}\n.ElementsModal--pay-button[data-v-728fb3ae] {\n    cursor: pointer;\n    border: 0;\n    width: 100%;\n    text-align: center;\n    height: 40px;\n    box-shadow: inset 0 0 0 1px rgba(50, 50, 93, 0.1),\n    0 2px 5px 0 rgba(50, 50, 93, 0.1), 0 1px 1px 0 rgba(0, 0, 0, 0.07);\n    border-radius: 6px 6px 6px 6px;\n    font-size: 16px;\n    font-weight: 600;\n\n    background-color: rgb(0, 116, 212);\n    color: rgb(255, 255, 255);\n}\n.ElementsModal--pay-button[data-v-728fb3ae]:focus {\n    outline: none;\n    box-shadow: 0 0 0 1px rgba(50, 151, 211, 0.3), 0 1px 1px 0 rgba(0, 0, 0, 0.07),\n    0 0 0 4px rgba(50, 151, 211, 0.3);\n}\n.ElementsModal--dropdowns[data-v-728fb3ae] {\n    margin: 10px;\n    -webkit-appearance: none;\n    background: rgb(255, 255, 255);\n    box-shadow: 0px 0px 0px 1px rgb(224, 224, 224),\n    0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n    border-radius: 4px 4px 4px 4px;\n}\n\n/* Form */\n.ElementsModal--payment-form[data-v-728fb3ae] {\n    margin-bottom: 0;\n}\n.ElementsModal--label[data-v-728fb3ae] {\n    color: rgba(0, 0, 0, 0.6);\n    font-size: 14px;\n    font-weight: 500;\n}\n.ElementsModal--forms[data-v-728fb3ae] {\n    padding: 5%;\n}\n.ElementsModal--form[data-v-728fb3ae] {\n    margin-bottom: 14px;\n}\n.ElementsModal--form-label[data-v-728fb3ae] {\n    font-size: 13px;\n    margin-bottom: 4px;\n    display: block;\n    color: rgba(0, 0, 0, 0.6);\n}\n.ElementsModal--form-select select[data-v-728fb3ae] {\n    padding: 10px 12px;\n    width: 100%;\n    border: 1px solid transparent;\n    outline: none;\n    box-shadow: 0px 0px 0px 1px rgb(224, 224, 224),\n    0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n    transition: box-shadow 150ms ease;\n    border-radius: 5px 5px 5px 5px;\n\n    background-color: white;\n    -webkit-appearance: none;\n    -moz-appearance: none;\n    appearance: none;\n    background-image: url(\"data:image/svg+xml,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.193 3.97a.75.75 0 0 1 1.062 1.062L6.53 9.756a.75.75 0 0 1-1.06 0L.745 5.032A.75.75 0 0 1 1.807 3.97L6 8.163l4.193-4.193z' fill='%23000' fill-rule='evenodd' fill-opacity='.4'/%3E%3C/svg%3E\");\n    background-size: 12px;\n    background-position: calc(100% - 16px) center;\n    background-repeat: no-repeat;\n    color: rgb(40, 40, 40);\n    font-size: 16px;\n    font-weight: normal;\n}\n.ElementsModal--form-select select[data-v-728fb3ae]:-moz-focusring {\n    color: transparent;\n    text-shadow: 0 0 0 rgb(0, 0, 0);\n}\n.ElementsModal--form > label[data-v-728fb3ae] {\n    width: 100%;\n}\n.ElementsModal--form-select select[data-v-728fb3ae]:focus {\n    box-shadow: 0 0 0 1px rgba(50, 151, 211, 0.3), 0 1px 1px 0 rgba(0, 0, 0, 0.07),\n    0 0 0 4px rgba(50, 151, 211, 0.3);\n}\n.ElementsModal--form-select select[data-v-728fb3ae]::-ms-expand {\n    display: none; /* hide the default arrow in ie10 and ie11 */\n}\n.ElementsModal--form-divider[data-v-728fb3ae] {\n    margin-top: 14px;\n    margin-bottom: 25px;\n    text-align: center;\n    border-bottom: 1px solid rgb(231, 231, 231);\n    height: 20px;\n    width: 100%;\n}\n.ElementsModal--form-divider-text[data-v-728fb3ae] {\n    position: relative;\n    bottom: -10px; /* half of line-height */\n    padding: 0 10px;\n    background: rgb(255, 255, 255);\n    color: rgb(144, 144, 144);\n    font-size: 14px;\n    font-weight: 400;\n}\n.StripeElement--payment-request[data-v-728fb3ae] {\n    display: none;\n    margin-bottom: 14px;\n}\n.StripeElement--payment-request-button[data-v-728fb3ae] {\n    margin-bottom: 12px;\n}\n.StripeElement--card[data-v-728fb3ae], .stripeElement--input[data-v-728fb3ae] {\n    box-sizing: border-box;\n    height: 40px;\n    padding: 10px 12px;\n    border: 1px solid transparent;\n    border-radius: 5px 5px 5px 5px;\n    background-color: white;\n\n    box-shadow: 0px 0px 0px 1px rgb(224, 224, 224),\n    0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n    transition: box-shadow 150ms ease;\n}\n.StripeElement--card--focus[data-v-728fb3ae] {\n    box-shadow: 0 1px 3px 0 rgb(207, 215, 223);\n}\n.StripeElement--card--invalid[data-v-728fb3ae] {\n    border-color: rgb(239, 152, 150);\n}\n.StripeElement--card--webkit-autofill[data-v-728fb3ae] {\n    background-color: rgb(254, 253, 229) !important;\n}\n\n", ""]);
 // Exports
 module.exports = exports;
 
index 64162d0009a428cd3872cf8b7b948e3ba7d95dba..e31ebedd0d96319aa630f00f686770b054ea580c 100644 (file)
@@ -3,7 +3,7 @@
 @section('content')
 
     <article class="container psq-com-campaign">
-        <x-back></x-back>
+        <x-back back="{{route('com-campaign.index')}}"></x-back>
 {{--        <h1>MARKETING & COM : LES CAMPAGNES DE LA SEMAINE</h1>--}}
 
         <div class="row mt-4">
@@ -11,6 +11,8 @@
                 <x-pill-box slug="article-com-campaigns" :object="$campaign"></x-pill-box>
             </div>
             <div class="col-sm-8">
+                <x-unlocked-article-alerts :article="$campaign"></x-unlocked-article-alerts>
+
                 <div class="content ck-content">
                     <x-subscriber-only-content :article="$campaign"></x-subscriber-only-content>
                 </div>
index 95430f66778434a39ff5db8ce3d37d829a64c0ca..d164d5fe7c853979b084b3518034145698e25e1b 100644 (file)
@@ -3,7 +3,7 @@
                 Cet article est réservé aux abonnés ! Pour y accéder <a href="{!! route('login', ['redirect_to' => request()->url()]) !!}">merci de vous connecter</a>, ou
                 <a href="{{route('not-registered')}}" >cliquez ici pour découvrir nos formules d'abonnement.</a>
             </p>
-            @if(isset($article) && method_exists($article, 'getStripeData'))
+            @if(config('services.stripe.enable') && isset($article) && method_exists($article, 'getStripeData'))
                 @auth
             <p>
                 <unlock-article
index 41bc9ed42f50cfe5a6e878bcd7bc486308f0a342..7fcc38970c9e8cf13f117170a6f46f293aa12914 100644 (file)
@@ -7,7 +7,7 @@
 </div>
 @elseif($article->unlockedByCurrentUser())
 <div class="alert alert-info alert-dismissible fade show">
-    Vous avez acheté cet article complet le {{$article->unlockedDate(null)->format('d/m/Y')}}, merci !
+    Vous avez débloqué cet article le {{$article->unlockedDate(null)->format('d/m/Y')}}, merci !
       <button type="button" class="close" data-dismiss="alert" aria-label="Close">
     <span aria-hidden="true">&times;</span>
   </button>
index db4a58e9345d972d0250e5db66d0617c90c2702d..5472a8d6f653c06e3f977da16b70fbbb91740027 100644 (file)
@@ -9,6 +9,8 @@
                 <x-pill-box slug="article-reseaux-sociaux" :object="$article" class="mb-4"></x-pill-box>
             </div>
             <article class="col-sm-8">
+                        <x-unlocked-article-alerts :article="$article"></x-unlocked-article-alerts>
+
                 <h2>{{$article->title}}</h2>
                 <div class="chapo">{!! $article->chapo !!}</div>