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

======================================================= Express Checkout =======================================================
Enable the payment methods you want to support in your payment methods settings. You must enable at least one payment method. (Google Pay, Apple Pay, Onelink,...)
https://dashboard.stripe.com/settings/payment_methods

The Google Pay and Apple Pay widgets use Stripe Express Checkout Element.

Enable the card payment method in Stripe Dashboard. Apple Pay and Google Pay are available through the `card` payment method and are shown only when the customer's browser, device, wallet, country, currency, and registered domain support them.
https://dashboard.stripe.com/settings/payment_methods

The checkout page must be served over HTTPS. Register every domain that displays the widget in both Stripe test and live modes before testing payments.
https://dashboard.stripe.com/settings/payment_method_domains

For Apple Pay, Stripe domain registration requires the `apple-developer-merchantid-domain-association` file. In Stripe Dashboard, add the domain, download the file, publish it without redirects at `https://your-domain/.well-known/apple-developer-merchantid-domain-association`, then click Verify. Repeat this for every domain and subdomain where the widget is displayed, in both test and live modes.

The plugin creates a PaymentIntent before rendering the widget. Its amount and currency are passed to Stripe Elements with `mode: 'payment'`; the selected wallet is confirmed with `stripe.confirmPayment`.

======================================================= checkout =======================================================
To show the Express Checkout widget on the checkout page, insert it into a container or checkout template:
{$plugin:stripepay:button:google-apple-pay}

======================================================= quote =======================================================
To show the Express Checkout widget on the quote page, insert it into a container or quote template:
{$plugin:stripepay:googleapplepayquotebutton}

The quote widget checks that the quote is signed before it sends the authorised wallet payment to Stripe.

Stripe documentation:
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment?payment-ui=elements
https://docs.stripe.com/elements/express-checkout-element/migration?payment-ui=elements

The current widget is configured with `paymentMethodTypes: ['card']`; therefore it displays eligible Apple Pay and Google Pay buttons, but does not enable Link or other Express Checkout payment methods.


================================================= 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
