├── .gitignore ├── src ├── templates │ ├── index.twig │ ├── settings.twig │ ├── _layouts │ │ ├── settingscp.twig │ │ └── settings.twig │ ├── _charges │ │ ├── partials │ │ │ ├── data.twig │ │ │ ├── metadata.twig │ │ │ ├── refunds.twig │ │ │ ├── paymentDetails.twig │ │ │ ├── outcome.twig │ │ │ └── source.twig │ │ ├── index.twig │ │ └── charge.twig │ ├── _macros │ │ └── settings.twig │ └── _settings │ │ ├── webhooks │ │ └── index.twig │ │ ├── general │ │ └── index.twig │ │ └── credentials │ │ └── index.twig ├── icon-mask.svg ├── events │ └── ChargeEvent.php ├── icon.svg ├── assetbundles │ ├── ChargeBundle.php │ └── css │ │ └── charge.css ├── twigextensions │ └── StripeCheckoutTwigExtension.php ├── variables │ └── StripeCheckoutVariable.php ├── models │ └── Settings.php ├── controllers │ ├── WebhooksController.php │ ├── SettingsController.php │ ├── CredentialsController.php │ ├── WebhookController.php │ ├── ChargesController.php │ └── ChargeController.php ├── services │ ├── WebhookService.php │ ├── SettingsService.php │ ├── CheckoutService.php │ └── ChargeService.php ├── migrations │ ├── Install.php │ └── m180531_090631_v2_upgrade.php ├── elements │ ├── db │ │ └── ChargeQuery.php │ └── Charge.php └── StripeCheckout.php ├── docs ├── charges.md ├── available-variables.md ├── default-templates.md ├── installation.md ├── general-config.md ├── craft-stripecheckout-charges.md ├── charge-model.md └── creating-charges.md ├── resources └── screenshots │ └── charges.png ├── templates └── checkout │ ├── _layouts │ └── main.twig │ ├── charge.twig │ ├── index.twig │ ├── confirmation.twig │ ├── charges.twig │ └── create.twig ├── README.md ├── LICENSE.md ├── CHANGELOG.md └── composer.json /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /src/templates/index.twig: -------------------------------------------------------------------------------- 1 | {% redirect 'stripe-checkout/charges' %} 2 | -------------------------------------------------------------------------------- /src/templates/settings.twig: -------------------------------------------------------------------------------- 1 | {% redirect 'stripe-checkout/settings/general' %} 2 | -------------------------------------------------------------------------------- /docs/charges.md: -------------------------------------------------------------------------------- 1 | # Charges 2 | 3 | Charges are [charge models](charge-model.md). 4 | -------------------------------------------------------------------------------- /resources/screenshots/charges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jalendport/craft-stripecheckout/HEAD/resources/screenshots/charges.png -------------------------------------------------------------------------------- /src/templates/_layouts/settingscp.twig: -------------------------------------------------------------------------------- 1 | {% extends "_layouts/cp" %} 2 | {% requireAdmin %} 3 | {% set selectedSubnavItem = 'settings' %} 4 | -------------------------------------------------------------------------------- /src/templates/_charges/partials/data.twig: -------------------------------------------------------------------------------- 1 |
{{ charge.data|json_encode(constant('JSON_PRETTY_PRINT')) }}
3 | ' ~ setting ~ '' %}
3 | {{ 'This is being overridden by the {setting} config setting in your {file} config file.'|t('stripe-checkout', {
4 | setting: setting,
5 | file: 'stripe-checkout.php'
6 | })|raw }}
7 | {%- endmacro %}
8 |
--------------------------------------------------------------------------------
/docs/default-templates.md:
--------------------------------------------------------------------------------
1 | # Default Templates
2 |
3 | This plugin comes with a set of default templates. These templates are intended to help you understand how to create your own frontend templates and forms. Simply copy across the contents of the `templates` folder into your own templates to get started.
4 |
5 | The default templates [can be found here](/templates/checkout).
6 |
--------------------------------------------------------------------------------
/src/templates/_settings/webhooks/index.twig:
--------------------------------------------------------------------------------
1 | {% extends "stripe-checkout/_layouts/settings" %}
2 |
3 | {% set fullPageForm = true %}
4 |
5 | {% import "_includes/forms" as forms %}
6 |
7 | {% block content %}
8 |
9 | {{ charge|json_encode(constant('JSON_PRETTY_PRINT')) }}
11 | Charge not found.15 |
{{ charge|json_encode(constant('JSON_PRETTY_PRINT')) }}
11 | {{ errors|json_encode(constant('JSON_PRETTY_PRINT')) }}
15 | Charge data not available.19 |
No charges found.25 |
8 |
9 | ## Documentation
10 |
11 | ### Installation
12 |
13 | - [Installation](docs/installation.md)
14 |
15 | ### Configuration
16 |
17 | - [General Config](docs/general-config.md)
18 |
19 | ### Core Concepts
20 |
21 | - [Charges](docs/charges.md)
22 |
23 | ### Getting Elements
24 |
25 | - [craft.stripecheckout.charges](docs/craft-stripecheckout-charges.md)
26 |
27 | ### Template Guides
28 |
29 | - [Available Variables](docs/available-variables.md)
30 | - [Creating Charges](docs/creating-charges.md)
31 | - [Default Templates](docs/default-templates.md)
32 |
33 | ## Stripe Checkout Roadmap
34 |
35 | Some things to do, and ideas for potential features:
36 |
37 | - Reconcile tools
38 |
39 | Brought to you by [Luke Youell](https://github.com/lukeyouell/craft-stripecheckout)
40 |
--------------------------------------------------------------------------------
/docs/general-config.md:
--------------------------------------------------------------------------------
1 | # General Config
2 |
3 | The config items below can be placed into a `stripe-checkout.php` file in your `craft/config` directory, this is a handy way to have different settings across multiple environments.
4 |
5 | ### `pluginNameOverride`
6 |
7 | The plugin name as you’d like it to be displayed in the CP.
8 |
9 | ### `accountMode`
10 |
11 | Whether you want to use the `test` or `live` Stripe credentials.
12 |
13 | ### `testPublishableKey`
14 |
15 | Your Stripe test publishable key. See [API Keys](https://stripe.com/docs/keys).
16 |
17 | ### `testSecretKey`
18 |
19 | Your Stripe test secret key. See [API Keys](https://stripe.com/docs/keys).
20 |
21 | ### `livePublishableKey`
22 |
23 | Your Stripe live publishable key. See [API Keys](https://stripe.com/docs/keys).
24 |
25 | ### `liveSecretKey`
26 |
27 | Your Stripe live secret key. See [API Keys](https://stripe.com/docs/keys).
28 |
29 | ### `defaultCurrency`
30 |
31 | Three-letter ISO currency code. Must be a [supported currency](https://stripe.com/docs/currencies).
32 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 Jalen Davenport
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/src/templates/_charges/partials/refunds.twig:
--------------------------------------------------------------------------------
1 | {% set refunds = charge.data.refunds.data ?: null %}
2 |
3 |