Stripe payment plugin.

If you want to pay with Stripe on your website, add {$plugin:stripepay:creditcard} in (c) container or in template.
To enable pay with stripe button add to page content {$plugin:stripepay:button}.

{$plugin:stripepay:creditcarrdquote} - credit card on quote page with partial payments support

To enable pay directly from the product page add to page content {$plugin:stripepay:product}.
For recurring payments from the product page add 'period' option with params.
Example: {$plugin:stripepay:product:period:1month:2month:3month:6month:1year}

To enable pay directly from the quote page add to page content {$plugin:stripepay:creditcardquoterecurrent}.
For recurring payments from the quote page add 'period' option with params.
You can set only one period from the list - 1month 2month 3month 6month 1year
Example: {$plugin:stripepay:creditcardquoterecurrent:period:2month}

Stripe configuration:
You can find the configuration screen on admin panel under STRIPE PAY / Stripe config

Use sand box checkbox - includes a mode test.

Mandatory params:

This params you can find on your personal account room ( https://dashboard.stripe.com/account/apikeys )
1. Test Secret Key: sk_test_.... used for tests
2. Test Publishable Key: pk_test_.... used for tests

3. Live Secret Key: sk_live_.... used for live access
4. Live Publishable Key: pk_live_.... used for live access

5. Endpoint Secret Key:
   You should register a webhook named "you-site-url/plugin/stripepay/run/buttonPaymentSuccessCallback"
   with event type "checkout.session.completed" in the account room and get the "Signing secret" for it.

======================================================= SuccessCallbackAction =======================================================
SuccessCallbackAction:
    This method used Mojo for success purchase via stripepay and seosambapos plugins if stripepayOAuth == 1 in toaster config.
    For standart using plugin you should register a webhook named "you-site-url/plugin/stripepay/run/buttonPaymentSuccessCallback"
    with event type "checkout.session.completed" in the account room and get the "Signing secret" for it.
mojoSessionEventSuccessPurchase
    Request params:
    $data = array(
        'eventType' => 'checkout.session.completed',//charge.succeeded
        'session' => 'jsonObj',
    );
    where:
    "checkout.session.completed" - stripe purchase
    "charge.succeeded" - seosambapos purchase

    Response success:
   {
     "error": "0",
     "code": "200",
     "message": "Success.",
   }

   Response fail:
  {
    "error": "1",
    "code": "400",
    "message": "Stripe session or cartId is empty."
  }

  {
   "error": "1",
   "code": "402",
   "message": "Accepted."
  }

Your server administrator must schedule the associated cron script to process Stripe recurring payments - plugins/stripepay/payRecurrentCron.php

======================================================= checkout =======================================================
To use Google Pay and Apple Pay insert the widget into container on checkout page or into the checkout template.
{$plugin:stripepay:button:google-apple-pay}

======================================================= quote =======================================================
To use Google Pay and Apple Pay insert the widget into container on quote page or into the quote template.
{$plugin:stripepay:googleapplepayquotebutton}

To integrate Google Pay or/and Apple Pay into your system please read the instruction on how you should connect your site below.
https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html

Apple Pay section:
You can use this payment with Touch ID on your device.
To download into your site "apple-developer-merchantid-domain-association" file please push the button "Download Apple Pay domain association file" in "Stripe config"

https://stripe.com/docs/stripe-js/elements/payment-request-button#verifying-your-domain-with-apple-pay
https://dashboard.stripe.com/settings/payments/apple_pay

APPLE AND GOOGLE AND LINK PAY integration

"The default integration path for Stripe today is to create a PaymentIntent first so that you get a client_secret you can use client-side to render their UI via PaymentElement. This means that if your customers decide not to pay after all, you end up with an incomplete PaymentIntent which is expected.
This is not really a problem, other than appearing in the Payments list which can be confusing. You could also write a background job daily that would cancel any PaymentIntent via you know won't be completed because the customer left and you didn't have any data to contact them to upsell them for example but this isn't really needed."


================================================= action e-mails lexem =================================================
1. Recurring payment received
2. Recurring payment failed
3. Subscription canceled
4. Subscription suspended
5. Subscription reactivated

For these action emails allowed lexeme:

{customer:email} - customer email
{customer:roleid} - customer role id
{customer:fullname} - customer full name
{profile:paymentperiod} = stripepay recurring period
{profile:subscriptiondate} = stripepay recurring subscription date
{profile:paymentcycleamount} = stripepay recurring payment cycle amount
{profile:totalamountpaid} = stripepay recurring total amount paid
{profile:lastpaymentdate} = stripepay recurring last payment date
{profile:recurringstatus} = stripepay recurring status
{profile:nextpaymentdate} = stripepay recurring next payment date
