Version Description
Download this release
Release Info
Developer | bordoni |
Plugin | Event Tickets |
Version | 5.3.0 |
Comparing to | |
See all releases |
Code changes from version 5.2.4.1 to 5.3.0
- common/lang/tribe-common.pot +52 -52
- common/node_modules/clipboard/dist/clipboard.min.js +7 -0
- common/src/Tribe/Admin/Notices.php +1 -1
- common/src/Tribe/Assets.php +40 -4
- common/src/Tribe/Field.php +8 -7
- common/src/Tribe/Main.php +4 -2
- common/src/Tribe/PUE/Checker.php +33 -0
- common/src/Tribe/Values/Abstract_Value.php +8 -0
- common/src/Tribe/Values/Value_Calculation.php +1 -1
- common/src/Tribe/Values/Value_Interface.php +9 -0
- common/src/resources/images/mascot.png +0 -0
- common/src/resources/js/admin/help-page.js +1 -1
- common/vendor/autoload.php +1 -1
- common/vendor/autoload_52.php +1 -1
- common/vendor/clipboard/clipboard.min.js +0 -7
- common/vendor/composer/autoload_real.php +4 -4
- common/vendor/composer/autoload_real_52.php +3 -3
- common/vendor/composer/autoload_static.php +5 -5
- common/vendor/ky/ky.min.js +8 -0
- common/vendor/ky/tec-ky.js +2 -0
- event-tickets.php +1 -1
- lang/event-tickets.pot +716 -205
- readme.txt +22 -65
- src/Tickets/Commerce/Abstract_Order.php +111 -1
- src/Tickets/Commerce/Abstract_Settings.php +0 -29
- src/Tickets/Commerce/Admin/Featured_Settings.php +65 -0
- src/Tickets/Commerce/Admin/Notices.php +0 -61
- src/Tickets/Commerce/Assets.php +19 -0
- src/Tickets/Commerce/Gateways/Abstract_Gateway.php +0 -80
- src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php +305 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_Merchant.php +81 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_REST_Endpoint.php +86 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_Requests.php +172 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_Settings.php +57 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_Signup.php +100 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_Webhooks.php +108 -0
- src/Tickets/Commerce/Gateways/Contracts/Abstract_WhoDat.php +127 -0
- src/Tickets/Commerce/Gateways/Contracts/Gateway_Interface.php +127 -0
- src/Tickets/Commerce/Gateways/Contracts/Merchant_Interface.php +53 -0
- src/Tickets/Commerce/Gateways/Contracts/REST_Endpoint_Interface.php +41 -0
- src/Tickets/Commerce/Gateways/Contracts/Requests_Interface.php +121 -0
- src/Tickets/Commerce/Gateways/Contracts/Signup_Interface.php +64 -0
- src/Tickets/Commerce/Gateways/Contracts/Webhook_Event_Interface.php +25 -0
- src/Tickets/Commerce/Gateways/Contracts/WhoDat_Interface.php +65 -0
- src/Tickets/Commerce/Gateways/Interface_Gateway.php +0 -77
- src/Tickets/Commerce/Gateways/Manager.php +10 -2
- src/Tickets/Commerce/Gateways/Manual/Gateway.php +10 -1
- src/Tickets/Commerce/Gateways/PayPal/Assets.php +4 -1
- src/Tickets/Commerce/Gateways/PayPal/Buttons.php +10 -71
- src/Tickets/Commerce/Gateways/PayPal/Gateway.php +78 -102
- src/Tickets/Commerce/Gateways/PayPal/Hooks.php +1 -43
- src/Tickets/Commerce/Gateways/PayPal/Merchant.php +2 -63
- src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php +10 -80
- src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php +12 -55
- src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php +2 -32
- src/Tickets/Commerce/Gateways/PayPal/Settings.php +11 -8
- src/Tickets/Commerce/Gateways/PayPal/Signup.php +4 -89
- src/Tickets/Commerce/Gateways/PayPal/Webhooks.php +11 -66
- src/Tickets/Commerce/Gateways/PayPal/WhoDat.php +7 -108
- src/Tickets/Commerce/Gateways/Stripe/Application_Fee.php +53 -0
- src/Tickets/Commerce/Gateways/Stripe/Assets.php +185 -0
- src/Tickets/Commerce/Gateways/Stripe/Gateway.php +128 -0
- src/Tickets/Commerce/Gateways/Stripe/Hooks.php +204 -0
- src/Tickets/Commerce/Gateways/Stripe/Merchant.php +436 -0
- src/Tickets/Commerce/Gateways/Stripe/Payment_Intent.php +307 -0
- src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php +218 -0
- src/Tickets/Commerce/Gateways/Stripe/Provider.php +66 -0
- src/Tickets/Commerce/Gateways/Stripe/REST.php +33 -0
- src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php +346 -0
- src/Tickets/Commerce/Gateways/Stripe/REST/Return_Endpoint.php +192 -0
- src/Tickets/Commerce/Gateways/Stripe/REST/Webhook_Endpoint.php +156 -0
- src/Tickets/Commerce/Gateways/Stripe/Requests.php +64 -0
- src/Tickets/Commerce/Gateways/Stripe/Settings.php +489 -0
- src/Tickets/Commerce/Gateways/Stripe/Signup.php +108 -0
- src/Tickets/Commerce/Gateways/Stripe/Status.php +166 -0
- src/Tickets/Commerce/Gateways/Stripe/Stripe_Elements.php +64 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks.php +218 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks/Account_Webhook.php +82 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks/Charge_Webhook.php +55 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php +283 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php +134 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php +126 -0
- src/Tickets/Commerce/Gateways/Stripe/Webhooks/events.json +195 -0
- src/Tickets/Commerce/Gateways/Stripe/WhoDat.php +99 -0
- src/Tickets/Commerce/Hooks.php +16 -0
- src/Tickets/Commerce/Module.php +1 -1
- src/Tickets/Commerce/Order.php +63 -29
- src/Tickets/Commerce/Payments_Tab.php +323 -45
- src/Tickets/Commerce/Provider.php +1 -0
- src/Tickets/Commerce/Settings.php +113 -5
- src/Tickets/Commerce/Shortcodes/Checkout_Shortcode.php +8 -5
- src/Tickets/Commerce/Status/Action_Required.php +2 -2
- src/Tickets/Commerce/Status/Denied.php +14 -7
- src/Tickets/Commerce/Status/Pending.php +5 -0
- src/Tickets/Commerce/Status/Refunded.php +14 -7
- src/Tickets/Commerce/Status/Reversed.php +14 -7
- src/Tickets/Commerce/Status/Status_Abstract.php +14 -0
- src/Tickets/Commerce/Status/Status_Handler.php +1 -0
- src/Tickets/Commerce/Status/Status_Interface.php +9 -0
- src/Tickets/Commerce/Status/Voided.php +14 -7
- src/Tickets/Commerce/Traits/Has_Mode.php +4 -0
- src/Tickets/Commerce/Utils/Currency.php +235 -105
- src/Tickets/Commerce/Utils/Value.php +1 -1
- src/Tribe/Editor/Provider.php +1 -1
- src/Tribe/Main.php +1 -1
- src/Tribe/Plugin_Register.php +1 -1
- src/admin-views/settings/featured/container.php +24 -0
- src/admin-views/settings/featured/content.php +18 -0
- src/admin-views/settings/featured/description.php +18 -0
- src/admin-views/settings/featured/link.php +34 -0
- src/admin-views/settings/featured/links.php +23 -0
- src/admin-views/settings/featured/title.php +18 -0
- src/admin-views/settings/section/link.php +27 -0
- src/admin-views/settings/section/menu.php +30 -0
- src/admin-views/settings/tickets-commerce/gateways/brand.php +36 -0
- src/admin-views/settings/tickets-commerce/gateways/button.php +52 -0
- src/admin-views/settings/tickets-commerce/gateways/container.php +26 -0
- src/admin-views/settings/tickets-commerce/gateways/item.php +34 -0
- src/admin-views/settings/tickets-commerce/gateways/status.php +33 -0
- src/admin-views/settings/tickets-commerce/gateways/toggle.php +24 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/active.php +3 -2
- src/admin-views/settings/tickets-commerce/paypal/connect/active/actions.php +5 -4
- src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-access-token.php +12 -3
- src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-connection.php +20 -11
- src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-user-info.php +12 -3
- src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-webhook.php +12 -3
- src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php +16 -8
- src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php +7 -6
- src/admin-views/settings/tickets-commerce/paypal/connect/active/webhooks.php +9 -8
- src/admin-views/settings/tickets-commerce/paypal/connect/help-links.php +4 -3
- src/admin-views/settings/tickets-commerce/paypal/connect/help-links/configuring.php +2 -2
- src/admin-views/settings/tickets-commerce/paypal/connect/help-links/troubleshooting.php +2 -2
- src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php +5 -4
- src/admin-views/settings/tickets-commerce/paypal/connect/logo.php +3 -2
- src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php +4 -3
- src/admin-views/settings/tickets-commerce/paypal/main.php +5 -4
- src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete.php +2 -2
- src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php +3 -2
- src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/notice-test-mode.php +4 -3
- src/admin-views/settings/tickets-commerce/paypal/signup-link.php +4 -4
- src/admin-views/settings/tickets-commerce/stripe/connect/active.php +32 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/active/button.php +34 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/active/connection.php +38 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-currency.php +60 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php +77 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/help-links.php +23 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/help-links/configuring.php +29 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/help-links/troubleshooting.php +24 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/inactive.php +35 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/logo.php +23 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/logo/features.php +29 -0
- src/admin-views/settings/tickets-commerce/stripe/connect/logo/image.php +24 -0
- src/admin-views/settings/tickets-commerce/stripe/main.php +39 -0
- src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete.php +42 -0
- src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php +72 -0
- src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/notice-test-mode.php +25 -0
- src/admin-views/settings/tickets-commerce/stripe/signup-link.php +26 -0
- src/resources/css/tickets-admin-settings.css +285 -73
- src/resources/css/tickets-admin-settings.min.css +1 -1
- src/resources/css/tickets-commerce.css +69 -0
- src/resources/css/tickets-commerce.min.css +1 -1
- src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.css +30 -0
- src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.min.css +1 -0
- src/resources/css/tickets-commerce/gateway/paypal.css +4 -0
- src/resources/css/tickets-commerce/gateway/paypal.min.css +1 -1
- src/resources/css/tickets-commerce/gateway/stripe.css +717 -0
- src/resources/css/tickets-commerce/gateway/stripe.min.css +1 -0
- src/resources/images/admin/stripe-logo.png +0 -0
- src/resources/images/{background-paypal-connect.png → background-gateway-connect.png} +0 -0
- src/resources/js/admin/gateway/stripe/webhooks.js +151 -0
- src/resources/js/admin/tickets-commerce-settings.js +10 -3
- src/resources/js/commerce/gateway/paypal/checkout.js +47 -29
- src/resources/js/commerce/gateway/stripe/checkout.js +621 -0
- src/resources/js/commerce/gateway/toggler.js +227 -0
- src/resources/js/v2/tickets-commerce.js +26 -0
- src/resources/postcss/tickets-admin/settings/_tickets-commerce.pcss +248 -37
- src/resources/postcss/tickets-commerce/_checkout.pcss +71 -0
- src/resources/postcss/tickets-commerce/admin/gateway/stripe/webhooks.pcss +24 -0
- src/resources/postcss/tickets-commerce/gateway/paypal/_advanced-payments.pcss +4 -0
- src/resources/postcss/tickets-commerce/gateway/stripe.pcss +8 -0
- src/resources/postcss/tickets-commerce/gateway/stripe/_all.pcss +7 -0
- src/resources/postcss/tickets-commerce/gateway/stripe/_stripe.pcss +62 -0
- src/views/tickets/email.php +3 -1
- src/views/v2/commerce/checkout.php +13 -10
- src/views/v2/commerce/checkout/cart.php +12 -11
- src/views/v2/commerce/checkout/footer/gateway-error.php +2 -1
- src/views/v2/commerce/checkout/gateways.php +47 -0
- src/views/v2/commerce/checkout/purchaser-info.php +30 -0
- src/views/v2/commerce/checkout/purchaser-info/email.php +50 -0
- src/views/v2/commerce/checkout/purchaser-info/name.php +45 -0
- src/views/v2/commerce/gateway/paypal/container.php +34 -0
- src/views/v2/commerce/gateway/stripe/card-element.php +62 -0
- src/views/v2/commerce/gateway/stripe/container.php +33 -0
- src/views/v2/commerce/gateway/stripe/payment-element.php +40 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +40 -3
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +44 -7
common/lang/tribe-common.pot
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
# This file is distributed under the same license as the Tribe Common package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Tribe Common 4.14.
|
6 |
"Report-Msgid-Bugs-To: http://m.tri.be/191x\n"
|
7 |
-
"POT-Creation-Date: 2022-02-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2022-02-
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
@@ -58,7 +58,7 @@ msgctxt "Error status label for system info optin"
|
|
58 |
msgid "Status:"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#. #-#-#-#-# tribe-common.pot (Tribe Common 4.14.
|
62 |
#. Author of the plugin/theme
|
63 |
#: src/Tribe/Admin/Help_Page.php:82 src/Tribe/Customizer.php:666
|
64 |
#: src/Tribe/Plugins_API.php:25 src/admin-views/help-calendar.php:97
|
@@ -1003,19 +1003,19 @@ msgid ""
|
|
1003 |
"and you should likely delete it."
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: src/Tribe/Field.php:
|
1007 |
msgid "Invalid field type specified"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: src/Tribe/Field.php:
|
1011 |
msgid "No radio options specified"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: src/Tribe/Field.php:
|
1015 |
msgid "No checkbox options specified"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: src/Tribe/Field.php:
|
1019 |
msgid "No select options specified"
|
1020 |
msgstr ""
|
1021 |
|
@@ -2239,188 +2239,188 @@ msgstr ""
|
|
2239 |
msgid "Full debug (all events)"
|
2240 |
msgstr ""
|
2241 |
|
2242 |
-
#: src/Tribe/Main.php:
|
2243 |
msgid ": activate to sort column ascending"
|
2244 |
msgstr ""
|
2245 |
|
2246 |
-
#: src/Tribe/Main.php:
|
2247 |
msgid ": activate to sort column descending"
|
2248 |
msgstr ""
|
2249 |
|
2250 |
-
#: src/Tribe/Main.php:
|
2251 |
msgid "Show _MENU_ entries"
|
2252 |
msgstr ""
|
2253 |
|
2254 |
-
#: src/Tribe/Main.php:
|
2255 |
msgid "No data available in table"
|
2256 |
msgstr ""
|
2257 |
|
2258 |
-
#: src/Tribe/Main.php:
|
2259 |
msgid "Showing _START_ to _END_ of _TOTAL_ entries"
|
2260 |
msgstr ""
|
2261 |
|
2262 |
-
#: src/Tribe/Main.php:
|
2263 |
msgid "Showing 0 to 0 of 0 entries"
|
2264 |
msgstr ""
|
2265 |
|
2266 |
-
#: src/Tribe/Main.php:
|
2267 |
msgid "(filtered from _MAX_ total entries)"
|
2268 |
msgstr ""
|
2269 |
|
2270 |
-
#: src/Tribe/Main.php:
|
2271 |
msgid "No matching records found"
|
2272 |
msgstr ""
|
2273 |
|
2274 |
-
#: src/Tribe/Main.php:
|
2275 |
msgid "Search:"
|
2276 |
msgstr ""
|
2277 |
|
2278 |
-
#: src/Tribe/Main.php:
|
2279 |
msgid "All items on this page were selected. "
|
2280 |
msgstr ""
|
2281 |
|
2282 |
-
#: src/Tribe/Main.php:
|
2283 |
msgid "Select all pages"
|
2284 |
msgstr ""
|
2285 |
|
2286 |
-
#: src/Tribe/Main.php:
|
2287 |
msgid "Clear Selection."
|
2288 |
msgstr ""
|
2289 |
|
2290 |
-
#: src/Tribe/Main.php:
|
2291 |
msgid "All"
|
2292 |
msgstr ""
|
2293 |
|
2294 |
-
#: src/Tribe/Main.php:
|
2295 |
msgid "Next"
|
2296 |
msgstr ""
|
2297 |
|
2298 |
-
#: src/Tribe/Main.php:
|
2299 |
msgid "Previous"
|
2300 |
msgstr ""
|
2301 |
|
2302 |
-
#: src/Tribe/Main.php:
|
2303 |
msgid ": Selected %d rows"
|
2304 |
msgstr ""
|
2305 |
|
2306 |
-
#: src/Tribe/Main.php:
|
2307 |
msgid ": Selected 1 row"
|
2308 |
msgstr ""
|
2309 |
|
2310 |
-
#: src/Tribe/Main.php:
|
2311 |
msgid "Prev"
|
2312 |
msgstr ""
|
2313 |
|
2314 |
-
#: src/Tribe/Main.php:
|
2315 |
msgid "Today"
|
2316 |
msgstr ""
|
2317 |
|
2318 |
-
#: src/Tribe/Main.php:
|
2319 |
msgid "Done"
|
2320 |
msgstr ""
|
2321 |
|
2322 |
-
#: src/Tribe/Main.php:
|
2323 |
msgid "Clear"
|
2324 |
msgstr ""
|
2325 |
|
2326 |
-
#: src/Tribe/PUE/Checker.php:
|
2327 |
msgid "A valid license key is required for support and updates"
|
2328 |
msgstr ""
|
2329 |
|
2330 |
-
#: src/Tribe/PUE/Checker.php:
|
2331 |
msgid ""
|
2332 |
"%1$sBuy a license%2$s for the Event Aggregator service to access additional "
|
2333 |
"import features."
|
2334 |
msgstr ""
|
2335 |
|
2336 |
-
#: src/Tribe/PUE/Checker.php:
|
2337 |
#: src/admin-views/troubleshooting/ea-status/license-key.php:44
|
2338 |
msgid "License Key"
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
#: src/Tribe/PUE/Checker.php:
|
2342 |
msgid "License Key Status:"
|
2343 |
msgstr ""
|
2344 |
|
2345 |
-
#: src/Tribe/PUE/Checker.php:
|
2346 |
msgid "Override network license key"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: src/Tribe/PUE/Checker.php:
|
2350 |
msgid ""
|
2351 |
"Check this box if you wish to override the network license key with your own"
|
2352 |
msgstr ""
|
2353 |
|
2354 |
-
#: src/Tribe/PUE/Checker.php:
|
2355 |
msgid "Site License Key"
|
2356 |
msgstr ""
|
2357 |
|
2358 |
-
#: src/Tribe/PUE/Checker.php:
|
2359 |
msgid "License key(s) updated."
|
2360 |
msgstr ""
|
2361 |
|
2362 |
-
#: src/Tribe/PUE/Checker.php:
|
2363 |
msgid ""
|
2364 |
"Hmmm... something's wrong with this validator. Please contact %ssupport%s."
|
2365 |
msgstr ""
|
2366 |
|
2367 |
-
#: src/Tribe/PUE/Checker.php:
|
2368 |
msgid "unknown date"
|
2369 |
msgstr ""
|
2370 |
|
2371 |
-
#: src/Tribe/PUE/Checker.php:
|
2372 |
msgid "Sorry, key validation server is not available."
|
2373 |
msgstr ""
|
2374 |
|
2375 |
-
#: src/Tribe/PUE/Checker.php:
|
2376 |
msgid "Valid Key! Expires on %s"
|
2377 |
msgstr ""
|
2378 |
|
2379 |
-
#: src/Tribe/PUE/Checker.php:
|
2380 |
msgid "Thanks for setting up a valid key. It will expire on %s"
|
2381 |
msgstr ""
|
2382 |
|
2383 |
-
#: src/Tribe/PUE/Checker.php:
|
2384 |
msgid "Renew Your License Now"
|
2385 |
msgstr ""
|
2386 |
|
2387 |
-
#: src/Tribe/PUE/Checker.php:
|
2388 |
msgid " (opens in a new window)"
|
2389 |
msgstr ""
|
2390 |
|
2391 |
-
#: src/Tribe/PUE/Checker.php:
|
2392 |
msgid "Please refresh the page and try your request again."
|
2393 |
msgstr ""
|
2394 |
|
2395 |
-
#: src/Tribe/PUE/Checker.php:
|
2396 |
msgid ""
|
2397 |
"There is an update for %s. You'll need to %scheck your license%s to have "
|
2398 |
"access to updates, downloads, and support."
|
2399 |
msgstr ""
|
2400 |
|
2401 |
-
#: src/Tribe/PUE/Checker.php:
|
2402 |
msgid ""
|
2403 |
"There is an update for %s. %sRenew your license%s to get access to bug "
|
2404 |
"fixes, security updates, and new features."
|
2405 |
msgstr ""
|
2406 |
|
2407 |
-
#: src/Tribe/PUE/Checker.php:
|
2408 |
msgid "Update now to version %s."
|
2409 |
msgstr ""
|
2410 |
|
2411 |
-
#: src/Tribe/PUE/Checker.php:
|
2412 |
msgid "There is a new version of %1$s available. %2$s"
|
2413 |
msgstr ""
|
2414 |
|
2415 |
-
#: src/Tribe/PUE/Checker.php:
|
2416 |
msgid "A valid license has been entered by your network administrator."
|
2417 |
msgstr ""
|
2418 |
|
2419 |
-
#: src/Tribe/PUE/Checker.php:
|
2420 |
msgid "No license entered. Consult your network administrator."
|
2421 |
msgstr ""
|
2422 |
|
2423 |
-
#: src/Tribe/PUE/Checker.php:
|
2424 |
msgid "Expired license. Consult your network administrator."
|
2425 |
msgstr ""
|
2426 |
|
2 |
# This file is distributed under the same license as the Tribe Common package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Tribe Common 4.14.14\n"
|
6 |
"Report-Msgid-Bugs-To: http://m.tri.be/191x\n"
|
7 |
+
"POT-Creation-Date: 2022-02-23 17:47:45+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2022-02-23 17:47\n"
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
58 |
msgid "Status:"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#. #-#-#-#-# tribe-common.pot (Tribe Common 4.14.14) #-#-#-#-#
|
62 |
#. Author of the plugin/theme
|
63 |
#: src/Tribe/Admin/Help_Page.php:82 src/Tribe/Customizer.php:666
|
64 |
#: src/Tribe/Plugins_API.php:25 src/admin-views/help-calendar.php:97
|
1003 |
"and you should likely delete it."
|
1004 |
msgstr ""
|
1005 |
|
1006 |
+
#: src/Tribe/Field.php:235
|
1007 |
msgid "Invalid field type specified"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: src/Tribe/Field.php:545
|
1011 |
msgid "No radio options specified"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: src/Tribe/Field.php:581
|
1015 |
msgid "No checkbox options specified"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: src/Tribe/Field.php:643
|
1019 |
msgid "No select options specified"
|
1020 |
msgstr ""
|
1021 |
|
2239 |
msgid "Full debug (all events)"
|
2240 |
msgstr ""
|
2241 |
|
2242 |
+
#: src/Tribe/Main.php:335
|
2243 |
msgid ": activate to sort column ascending"
|
2244 |
msgstr ""
|
2245 |
|
2246 |
+
#: src/Tribe/Main.php:336
|
2247 |
msgid ": activate to sort column descending"
|
2248 |
msgstr ""
|
2249 |
|
2250 |
+
#: src/Tribe/Main.php:338
|
2251 |
msgid "Show _MENU_ entries"
|
2252 |
msgstr ""
|
2253 |
|
2254 |
+
#: src/Tribe/Main.php:339
|
2255 |
msgid "No data available in table"
|
2256 |
msgstr ""
|
2257 |
|
2258 |
+
#: src/Tribe/Main.php:340
|
2259 |
msgid "Showing _START_ to _END_ of _TOTAL_ entries"
|
2260 |
msgstr ""
|
2261 |
|
2262 |
+
#: src/Tribe/Main.php:341
|
2263 |
msgid "Showing 0 to 0 of 0 entries"
|
2264 |
msgstr ""
|
2265 |
|
2266 |
+
#: src/Tribe/Main.php:342
|
2267 |
msgid "(filtered from _MAX_ total entries)"
|
2268 |
msgstr ""
|
2269 |
|
2270 |
+
#: src/Tribe/Main.php:343
|
2271 |
msgid "No matching records found"
|
2272 |
msgstr ""
|
2273 |
|
2274 |
+
#: src/Tribe/Main.php:344
|
2275 |
msgid "Search:"
|
2276 |
msgstr ""
|
2277 |
|
2278 |
+
#: src/Tribe/Main.php:345
|
2279 |
msgid "All items on this page were selected. "
|
2280 |
msgstr ""
|
2281 |
|
2282 |
+
#: src/Tribe/Main.php:346
|
2283 |
msgid "Select all pages"
|
2284 |
msgstr ""
|
2285 |
|
2286 |
+
#: src/Tribe/Main.php:347
|
2287 |
msgid "Clear Selection."
|
2288 |
msgstr ""
|
2289 |
|
2290 |
+
#: src/Tribe/Main.php:349
|
2291 |
msgid "All"
|
2292 |
msgstr ""
|
2293 |
|
2294 |
+
#: src/Tribe/Main.php:350 src/Tribe/Main.php:367
|
2295 |
msgid "Next"
|
2296 |
msgstr ""
|
2297 |
|
2298 |
+
#: src/Tribe/Main.php:351
|
2299 |
msgid "Previous"
|
2300 |
msgstr ""
|
2301 |
|
2302 |
+
#: src/Tribe/Main.php:356
|
2303 |
msgid ": Selected %d rows"
|
2304 |
msgstr ""
|
2305 |
|
2306 |
+
#: src/Tribe/Main.php:357
|
2307 |
msgid ": Selected 1 row"
|
2308 |
msgstr ""
|
2309 |
|
2310 |
+
#: src/Tribe/Main.php:368
|
2311 |
msgid "Prev"
|
2312 |
msgstr ""
|
2313 |
|
2314 |
+
#: src/Tribe/Main.php:369 src/Tribe/Main.php:371
|
2315 |
msgid "Today"
|
2316 |
msgstr ""
|
2317 |
|
2318 |
+
#: src/Tribe/Main.php:370
|
2319 |
msgid "Done"
|
2320 |
msgstr ""
|
2321 |
|
2322 |
+
#: src/Tribe/Main.php:372
|
2323 |
msgid "Clear"
|
2324 |
msgstr ""
|
2325 |
|
2326 |
+
#: src/Tribe/PUE/Checker.php:531
|
2327 |
msgid "A valid license key is required for support and updates"
|
2328 |
msgstr ""
|
2329 |
|
2330 |
+
#: src/Tribe/PUE/Checker.php:534
|
2331 |
msgid ""
|
2332 |
"%1$sBuy a license%2$s for the Event Aggregator service to access additional "
|
2333 |
"import features."
|
2334 |
msgstr ""
|
2335 |
|
2336 |
+
#: src/Tribe/PUE/Checker.php:546 src/Tribe/PUE/Checker.php:557
|
2337 |
#: src/admin-views/troubleshooting/ea-status/license-key.php:44
|
2338 |
msgid "License Key"
|
2339 |
msgstr ""
|
2340 |
|
2341 |
+
#: src/Tribe/PUE/Checker.php:566 src/Tribe/PUE/Checker.php:600
|
2342 |
msgid "License Key Status:"
|
2343 |
msgstr ""
|
2344 |
|
2345 |
+
#: src/Tribe/PUE/Checker.php:575
|
2346 |
msgid "Override network license key"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
+
#: src/Tribe/PUE/Checker.php:576
|
2350 |
msgid ""
|
2351 |
"Check this box if you wish to override the network license key with your own"
|
2352 |
msgstr ""
|
2353 |
|
2354 |
+
#: src/Tribe/PUE/Checker.php:587
|
2355 |
msgid "Site License Key"
|
2356 |
msgstr ""
|
2357 |
|
2358 |
+
#: src/Tribe/PUE/Checker.php:687
|
2359 |
msgid "License key(s) updated."
|
2360 |
msgstr ""
|
2361 |
|
2362 |
+
#: src/Tribe/PUE/Checker.php:941
|
2363 |
msgid ""
|
2364 |
"Hmmm... something's wrong with this validator. Please contact %ssupport%s."
|
2365 |
msgstr ""
|
2366 |
|
2367 |
+
#: src/Tribe/PUE/Checker.php:954
|
2368 |
msgid "unknown date"
|
2369 |
msgstr ""
|
2370 |
|
2371 |
+
#: src/Tribe/PUE/Checker.php:960
|
2372 |
msgid "Sorry, key validation server is not available."
|
2373 |
msgstr ""
|
2374 |
|
2375 |
+
#: src/Tribe/PUE/Checker.php:980
|
2376 |
msgid "Valid Key! Expires on %s"
|
2377 |
msgstr ""
|
2378 |
|
2379 |
+
#: src/Tribe/PUE/Checker.php:985
|
2380 |
msgid "Thanks for setting up a valid key. It will expire on %s"
|
2381 |
msgstr ""
|
2382 |
|
2383 |
+
#: src/Tribe/PUE/Checker.php:1014 src/Tribe/PUE/Notices.php:342
|
2384 |
msgid "Renew Your License Now"
|
2385 |
msgstr ""
|
2386 |
|
2387 |
+
#: src/Tribe/PUE/Checker.php:1016 src/Tribe/PUE/Notices.php:344
|
2388 |
msgid " (opens in a new window)"
|
2389 |
msgstr ""
|
2390 |
|
2391 |
+
#: src/Tribe/PUE/Checker.php:1033
|
2392 |
msgid "Please refresh the page and try your request again."
|
2393 |
msgstr ""
|
2394 |
|
2395 |
+
#: src/Tribe/PUE/Checker.php:1053
|
2396 |
msgid ""
|
2397 |
"There is an update for %s. You'll need to %scheck your license%s to have "
|
2398 |
"access to updates, downloads, and support."
|
2399 |
msgstr ""
|
2400 |
|
2401 |
+
#: src/Tribe/PUE/Checker.php:1110
|
2402 |
msgid ""
|
2403 |
"There is an update for %s. %sRenew your license%s to get access to bug "
|
2404 |
"fixes, security updates, and new features."
|
2405 |
msgstr ""
|
2406 |
|
2407 |
+
#: src/Tribe/PUE/Checker.php:1140
|
2408 |
msgid "Update now to version %s."
|
2409 |
msgstr ""
|
2410 |
|
2411 |
+
#: src/Tribe/PUE/Checker.php:1151
|
2412 |
msgid "There is a new version of %1$s available. %2$s"
|
2413 |
msgstr ""
|
2414 |
|
2415 |
+
#: src/Tribe/PUE/Checker.php:1732
|
2416 |
msgid "A valid license has been entered by your network administrator."
|
2417 |
msgstr ""
|
2418 |
|
2419 |
+
#: src/Tribe/PUE/Checker.php:1733
|
2420 |
msgid "No license entered. Consult your network administrator."
|
2421 |
msgstr ""
|
2422 |
|
2423 |
+
#: src/Tribe/PUE/Checker.php:1734
|
2424 |
msgid "Expired license. Consult your network administrator."
|
2425 |
msgstr ""
|
2426 |
|
common/node_modules/clipboard/dist/clipboard.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* clipboard.js v2.0.10
|
3 |
+
* https://clipboardjs.com/
|
4 |
+
*
|
5 |
+
* Licensed MIT © Zeno Rocha
|
6 |
+
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";return"string"==typeof t?(e=t,n="rtl"===document.documentElement.getAttribute("dir"),(o=document.createElement("textarea")).style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[n?"right":"left"]="-9999px",n=window.pageYOffset||document.documentElement.scrollTop,o.style.top="".concat(n,"px"),o.setAttribute("readonly",""),o.value=e,o=o,r.container.appendChild(o),i=c()(o),a("copy"),o.remove()):(i=c()(t),a("copy")),i};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==r(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?l(t,{container:o}):e?"cut"===n?f(e):l(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=m(n);return t=o?(t=m(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var o=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return l(t,e)}},{key:"cut",value:function(t){return f(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return v("action",t)}},{key:"defaultTarget",value:function(t){t=v("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return v("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
|
common/src/Tribe/Admin/Notices.php
CHANGED
@@ -107,7 +107,7 @@ class Tribe__Admin__Notices {
|
|
107 |
[ 'jquery' ],
|
108 |
null,
|
109 |
[
|
110 |
-
'
|
111 |
]
|
112 |
);
|
113 |
}
|
107 |
[ 'jquery' ],
|
108 |
null,
|
109 |
[
|
110 |
+
'groups' => 'tec-admin-notices',
|
111 |
]
|
112 |
);
|
113 |
}
|
common/src/Tribe/Assets.php
CHANGED
@@ -39,6 +39,7 @@ class Tribe__Assets {
|
|
39 |
// Hook the actual registering of.
|
40 |
add_action( 'init', [ $this, 'register_in_wp' ], 1, 0 );
|
41 |
add_filter( 'script_loader_tag', [ $this, 'filter_tag_async_defer' ], 50, 2 );
|
|
|
42 |
|
43 |
// Enqueue late.
|
44 |
add_filter( 'script_loader_tag', [ $this, 'filter_add_localization_data' ], 500, 2 );
|
@@ -149,10 +150,44 @@ class Tribe__Assets {
|
|
149 |
$replacement .= 'defer ';
|
150 |
}
|
151 |
|
152 |
-
$replacement_src = $replacement . 'src=';
|
153 |
-
$replacement_type = $replacement . 'type=';
|
154 |
|
155 |
-
return str_replace(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
|
158 |
/**
|
@@ -553,6 +588,7 @@ class Tribe__Assets {
|
|
553 |
|
554 |
'async' => false,
|
555 |
'defer' => false,
|
|
|
556 |
|
557 |
'in_footer' => true,
|
558 |
'is_registered' => false,
|
@@ -633,7 +669,7 @@ class Tribe__Assets {
|
|
633 |
if ( filter_var( $asset->file, FILTER_VALIDATE_URL ) ) {
|
634 |
$asset->url = $asset->file;
|
635 |
} else {
|
636 |
-
$asset->url =
|
637 |
}
|
638 |
|
639 |
// Parse the Localize asset arguments.
|
39 |
// Hook the actual registering of.
|
40 |
add_action( 'init', [ $this, 'register_in_wp' ], 1, 0 );
|
41 |
add_filter( 'script_loader_tag', [ $this, 'filter_tag_async_defer' ], 50, 2 );
|
42 |
+
add_filter( 'script_loader_tag', [ $this, 'filter_modify_to_module' ], 50, 2 );
|
43 |
|
44 |
// Enqueue late.
|
45 |
add_filter( 'script_loader_tag', [ $this, 'filter_add_localization_data' ], 500, 2 );
|
150 |
$replacement .= 'defer ';
|
151 |
}
|
152 |
|
|
|
|
|
153 |
|
154 |
+
return str_replace( '<script ', $replacement, $tag );
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Filters the Script tags to attach type=module based on the rules we set in our Asset class.
|
159 |
+
*
|
160 |
+
* @since 4.14.14
|
161 |
+
*
|
162 |
+
* @param string $tag Tag we are filtering.
|
163 |
+
* @param string $handle Which is the ID/Handle of the tag we are about to print.
|
164 |
+
*
|
165 |
+
* @return string Script tag with the type=module
|
166 |
+
*/
|
167 |
+
public function filter_modify_to_module( $tag, $handle ) {
|
168 |
+
// Only filter for own own filters.
|
169 |
+
if ( ! $asset = $this->get( $handle ) ) {
|
170 |
+
return $tag;
|
171 |
+
}
|
172 |
+
|
173 |
+
// Bail when not dealing with JS assets.
|
174 |
+
if ( 'js' !== $asset->type ) {
|
175 |
+
return $tag;
|
176 |
+
}
|
177 |
+
|
178 |
+
// When not module we bail with the tag.
|
179 |
+
if ( ! $asset->module ) {
|
180 |
+
return $tag;
|
181 |
+
}
|
182 |
+
|
183 |
+
// Do not add Module to a Script that already has a type.
|
184 |
+
if ( false !== strpos( $tag, ' type=' ) ) {
|
185 |
+
return $tag;
|
186 |
+
}
|
187 |
+
|
188 |
+
$replacement = '<script type="module" ';
|
189 |
+
|
190 |
+
return str_replace( '<script ', $replacement, $tag );
|
191 |
}
|
192 |
|
193 |
/**
|
588 |
|
589 |
'async' => false,
|
590 |
'defer' => false,
|
591 |
+
'module' => false,
|
592 |
|
593 |
'in_footer' => true,
|
594 |
'is_registered' => false,
|
669 |
if ( filter_var( $asset->file, FILTER_VALIDATE_URL ) ) {
|
670 |
$asset->url = $asset->file;
|
671 |
} else {
|
672 |
+
$asset->url = static::maybe_get_min_file( tribe_resource_url( $asset->file, false, ( $is_vendor ? '' : null ), $origin ) );
|
673 |
}
|
674 |
|
675 |
// Parse the Localize asset arguments.
|
common/src/Tribe/Field.php
CHANGED
@@ -143,20 +143,21 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
143 |
$label_attributes = $args['label_attributes'];
|
144 |
$tooltip = wp_kses(
|
145 |
$args['tooltip'], [
|
146 |
-
'a' => [ 'href' => [], 'title' => [], 'target' => [] ],
|
147 |
'br' => [],
|
148 |
-
'em' => [],
|
149 |
-
'strong' => [],
|
150 |
-
'b' => [],
|
151 |
-
'i' => [],
|
152 |
-
'u' => [],
|
153 |
'img' => [
|
|
|
154 |
'title' => [],
|
155 |
'src' => [],
|
156 |
'alt' => [],
|
157 |
],
|
158 |
'code' => [ 'span' => [] ],
|
159 |
-
'span' => [],
|
160 |
]
|
161 |
);
|
162 |
$fieldset_attributes = [];
|
143 |
$label_attributes = $args['label_attributes'];
|
144 |
$tooltip = wp_kses(
|
145 |
$args['tooltip'], [
|
146 |
+
'a' => [ 'class' => [], 'href' => [], 'title' => [], 'target' => [] ],
|
147 |
'br' => [],
|
148 |
+
'em' => [ 'class' => [] ],
|
149 |
+
'strong' => [ 'class' => [] ],
|
150 |
+
'b' => [ 'class' => [] ],
|
151 |
+
'i' => [ 'class' => [] ],
|
152 |
+
'u' => [ 'class' => [] ],
|
153 |
'img' => [
|
154 |
+
'class' => [],
|
155 |
'title' => [],
|
156 |
'src' => [],
|
157 |
'alt' => [],
|
158 |
],
|
159 |
'code' => [ 'span' => [] ],
|
160 |
+
'span' => [ 'class' => [] ],
|
161 |
]
|
162 |
);
|
163 |
$fieldset_attributes = [];
|
common/src/Tribe/Main.php
CHANGED
@@ -20,7 +20,7 @@ class Tribe__Main {
|
|
20 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
21 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
22 |
|
23 |
-
const VERSION = '4.14.
|
24 |
|
25 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
26 |
|
@@ -188,7 +188,7 @@ class Tribe__Main {
|
|
188 |
[
|
189 |
[ 'tribe-accessibility-css', 'accessibility.css' ],
|
190 |
[ 'tribe-query-string', 'utils/query-string.js' ],
|
191 |
-
[ 'tribe-clipboard', '
|
192 |
[ 'datatables', 'vendor/datatables/datatables.js', [ 'jquery' ] ],
|
193 |
[ 'tribe-select2', 'vendor/tribe-selectWoo/dist/js/selectWoo.full.js', [ 'jquery' ] ],
|
194 |
[ 'tribe-select2-css', 'vendor/tribe-selectWoo/dist/css/selectWoo.css' ],
|
@@ -207,6 +207,8 @@ class Tribe__Main {
|
|
207 |
[ 'tribe-jquery-timepicker-css', 'vendor/jquery-tribe-timepicker/jquery.timepicker.css' ],
|
208 |
[ 'tribe-timepicker', 'timepicker.js', [ 'jquery', 'tribe-jquery-timepicker' ] ],
|
209 |
[ 'tribe-attrchange', 'vendor/attrchange/js/attrchange.js' ],
|
|
|
|
|
210 |
]
|
211 |
);
|
212 |
|
20 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
21 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
22 |
|
23 |
+
const VERSION = '4.14.14';
|
24 |
|
25 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
26 |
|
188 |
[
|
189 |
[ 'tribe-accessibility-css', 'accessibility.css' ],
|
190 |
[ 'tribe-query-string', 'utils/query-string.js' ],
|
191 |
+
[ 'tribe-clipboard', 'node_modules/clipboard/dist/clipboard.min.js' ],
|
192 |
[ 'datatables', 'vendor/datatables/datatables.js', [ 'jquery' ] ],
|
193 |
[ 'tribe-select2', 'vendor/tribe-selectWoo/dist/js/selectWoo.full.js', [ 'jquery' ] ],
|
194 |
[ 'tribe-select2-css', 'vendor/tribe-selectWoo/dist/css/selectWoo.css' ],
|
207 |
[ 'tribe-jquery-timepicker-css', 'vendor/jquery-tribe-timepicker/jquery.timepicker.css' ],
|
208 |
[ 'tribe-timepicker', 'timepicker.js', [ 'jquery', 'tribe-jquery-timepicker' ] ],
|
209 |
[ 'tribe-attrchange', 'vendor/attrchange/js/attrchange.js' ],
|
210 |
+
[ 'tec-ky-module', 'vendor/ky/ky.js', [], null, [ 'module' => true ] ],
|
211 |
+
[ 'tec-ky', 'vendor/ky/tec-ky.js', [ 'tec-ky-module' ], null, [ 'module' => true ] ],
|
212 |
]
|
213 |
);
|
214 |
|
common/src/Tribe/PUE/Checker.php
CHANGED
@@ -87,6 +87,15 @@ if ( ! class_exists( 'Tribe__PUE__Checker' ) ) {
|
|
87 |
*/
|
88 |
public $pue_option_name = '';
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
/**
|
91 |
* used to hold the install_key if set (included here for addons that will extend PUE to use install key checks)
|
92 |
*
|
@@ -171,6 +180,28 @@ if ( ! class_exists( 'Tribe__PUE__Checker' ) ) {
|
|
171 |
$this->set_plugin_file( $plugin_file );
|
172 |
$this->set_options( $options );
|
173 |
$this->hooks();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
|
176 |
/**
|
@@ -973,6 +1004,8 @@ if ( ! class_exists( 'Tribe__PUE__Checker' ) ) {
|
|
973 |
|
974 |
$response['message'] = wp_kses( $response['message'], 'data' );
|
975 |
|
|
|
|
|
976 |
return $response;
|
977 |
}
|
978 |
|
87 |
*/
|
88 |
public $pue_option_name = '';
|
89 |
|
90 |
+
/**
|
91 |
+
* Where to store the temporary status info.
|
92 |
+
*
|
93 |
+
* @since 4.14.14
|
94 |
+
*
|
95 |
+
* @var string
|
96 |
+
*/
|
97 |
+
public $pue_key_status_transient_name;
|
98 |
+
|
99 |
/**
|
100 |
* used to hold the install_key if set (included here for addons that will extend PUE to use install key checks)
|
101 |
*
|
180 |
$this->set_plugin_file( $plugin_file );
|
181 |
$this->set_options( $options );
|
182 |
$this->hooks();
|
183 |
+
$this->set_key_status_transient_name();
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Creates a hash for the transient name that holds the current key status.
|
188 |
+
*
|
189 |
+
* @since 4.14.14
|
190 |
+
*/
|
191 |
+
public function set_key_status_transient_name() {
|
192 |
+
$this->pue_key_status_transient_name = md5( $this->get_slug() . $this->get_site_domain() );
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Sets the key status transient based on the key validation check results.
|
197 |
+
*
|
198 |
+
* @since 4.14.14
|
199 |
+
*
|
200 |
+
* @param int $valid 0 for invalid, 1 or 2 for valid.
|
201 |
+
*/
|
202 |
+
public function set_key_status_transient( $valid ) {
|
203 |
+
$status = tribe_is_truthy( $valid ) ? 'valid' : 'invalid';
|
204 |
+
set_transient( $this->pue_key_status_transient_name, $status, $this->check_period * HOUR_IN_SECONDS );
|
205 |
}
|
206 |
|
207 |
/**
|
1004 |
|
1005 |
$response['message'] = wp_kses( $response['message'], 'data' );
|
1006 |
|
1007 |
+
$this->set_key_status_transient( $response['status'] );
|
1008 |
+
|
1009 |
return $response;
|
1010 |
}
|
1011 |
|
common/src/Tribe/Values/Abstract_Value.php
CHANGED
@@ -91,6 +91,14 @@ abstract class Abstract_Value implements Value_Interface {
|
|
91 |
$this->update();
|
92 |
}
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
/**
|
95 |
* @inheritDoc
|
96 |
*/
|
91 |
$this->update();
|
92 |
}
|
93 |
|
94 |
+
/**
|
95 |
+
* @inheritDoc
|
96 |
+
*/
|
97 |
+
public function set_precision( $amount ) {
|
98 |
+
$this->precision = $amount;
|
99 |
+
}
|
100 |
+
|
101 |
+
|
102 |
/**
|
103 |
* @inheritDoc
|
104 |
*/
|
common/src/Tribe/Values/Value_Calculation.php
CHANGED
@@ -66,6 +66,6 @@ trait Value_Calculation {
|
|
66 |
* @return int
|
67 |
*/
|
68 |
public function to_integer( $value ) {
|
69 |
-
return (int) ( round( $value, $this->
|
70 |
}
|
71 |
}
|
66 |
* @return int
|
67 |
*/
|
68 |
public function to_integer( $value ) {
|
69 |
+
return (int) ( round( $value, $this->get_precision() ) * pow( 10, $this->get_precision() ) );
|
70 |
}
|
71 |
}
|
common/src/Tribe/Values/Value_Interface.php
CHANGED
@@ -101,6 +101,15 @@ interface Value_Interface {
|
|
101 |
*/
|
102 |
public function set_value( $amount );
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
/**
|
105 |
* Get all valid setters registered to this object instance, up the inheritance chain.
|
106 |
*
|
101 |
*/
|
102 |
public function set_value( $amount );
|
103 |
|
104 |
+
/**
|
105 |
+
* Public setter to use for any object.
|
106 |
+
*
|
107 |
+
* @since 4.14.14
|
108 |
+
*
|
109 |
+
* @param int $amount the precision value to set
|
110 |
+
*/
|
111 |
+
public function set_precision( $amount );
|
112 |
+
|
113 |
/**
|
114 |
* Get all valid setters registered to this object instance, up the inheritance chain.
|
115 |
*
|
common/src/resources/images/mascot.png
CHANGED
Binary file
|
common/src/resources/js/admin/help-page.js
CHANGED
@@ -22,7 +22,7 @@ tribe.helpPage = tribe.helpPage || {};
|
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
-
var clipboard = new
|
26 |
var button_icon = '<span class="dashicons dashicons-clipboard license-btn"></span>';
|
27 |
var button_text = tribe_system_info.clipboard_btn_text;
|
28 |
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
+
var clipboard = new ClipboardJS( obj.selectors.copyButton );
|
26 |
var button_icon = '<span class="dashicons dashicons-clipboard license-btn"></span>';
|
27 |
var button_text = tribe_system_info.clipboard_btn_text;
|
28 |
|
common/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit6fbe49c8f8ab7e51dd699e84a42d9f95::getLoader();
|
common/vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit4e547433824e3937f7d66f668eca5550::getLoader();
|
common/vendor/clipboard/clipboard.min.js
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* clipboard.js v1.5.12
|
3 |
-
* https://zenorocha.github.io/clipboard.js
|
4 |
-
*
|
5 |
-
* Licensed MIT � Zeno Rocha
|
6 |
-
*/
|
7 |
-
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e,n){var o=t("matches-selector");e.exports=function(t,e,n){for(var i=n?t:t.parentNode;i&&i!==document;){if(o(i,e))return i;i=i.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function i(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e,!0),n.delegateTarget&&o.call(t,n)}}var r=t("closest");e.exports=o},{closest:1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return i(t,e,n);if(c.nodeList(t))return r(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return s(document.body,t,e,n)}var c=t("./is"),s=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){function o(t,e){if(r)return r.call(t,e);for(var n=t.parentNode.querySelectorAll(e),o=0;o<n.length;++o)if(n[o]==t)return!0;return!1}var i=Element.prototype,r=i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;e.exports=o},{}],6:[function(t,e,n){function o(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}e.exports=o},{}],7:[function(t,e,n){function o(){}o.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){i.off(t,o),e.apply(n,arguments)}var i=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;i>o;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;a>r;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","select"],r);else if("undefined"!=typeof o)r(n,e("select"));else{var a={exports:{}};r(a,i.select),i.clipboardAction=a.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""},t.prototype.initSelection=function t(){this.text?this.selectFake():this.target&&this.selectTarget()},t.prototype.selectFake=function t(){var e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()},t.prototype.removeFake=function t(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function t(){this.selectedText=(0,i.default)(this.target),this.copyText()},t.prototype.copyText=function t(){var e=void 0;try{e=document.execCommand(this.action)}catch(n){e=!1}this.handleResult(e)},t.prototype.handleResult=function t(e){e?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function t(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function t(){this.removeFake()},a(t,[{key:"action",set:function t(){var e=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function t(){return this._action}},{key:"target",set:function t(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function t(){return this._target}}]),t}();t.exports=c})},{select:6}],9:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof o)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),u=i(n),f=i(o),d=function(t){function e(n,o){r(this,e);var i=a(this,t.call(this));return i.resolveOptions(o),i.listenClick(n),i}return c(e,t),e.prototype.resolveOptions=function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText},e.prototype.listenClick=function t(e){var n=this;this.listener=(0,f.default)(e,"click",function(t){return n.onClick(t)})},e.prototype.onClick=function t(e){var n=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})},e.prototype.defaultAction=function t(e){return s("action",e)},e.prototype.defaultTarget=function t(e){var n=s("target",e);return n?document.querySelector(n):void 0},e.prototype.defaultText=function t(e){return s("text",e)},e.prototype.destroy=function t(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(u.default);t.exports=d})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitf5432e92183aa2f0253e2dcd3dad3536
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit6fbe49c8f8ab7e51dd699e84a42d9f95
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit6fbe49c8f8ab7e51dd699e84a42d9f95', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit6fbe49c8f8ab7e51dd699e84a42d9f95', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit6fbe49c8f8ab7e51dd699e84a42d9f95::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
common/vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitee1cf866a1e66cea373cd52c095b2bac {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit4e547433824e3937f7d66f668eca5550 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit4e547433824e3937f7d66f668eca5550', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit4e547433824e3937f7d66f668eca5550', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
common/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -261,10 +261,10 @@ class ComposerStaticInitf5432e92183aa2f0253e2dcd3dad3536
|
|
261 |
public static function getInitializer(ClassLoader $loader)
|
262 |
{
|
263 |
return \Closure::bind(function () use ($loader) {
|
264 |
-
$loader->prefixLengthsPsr4 =
|
265 |
-
$loader->prefixDirsPsr4 =
|
266 |
-
$loader->prefixesPsr0 =
|
267 |
-
$loader->classMap =
|
268 |
|
269 |
}, null, ClassLoader::class);
|
270 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit6fbe49c8f8ab7e51dd699e84a42d9f95
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
261 |
public static function getInitializer(ClassLoader $loader)
|
262 |
{
|
263 |
return \Closure::bind(function () use ($loader) {
|
264 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit6fbe49c8f8ab7e51dd699e84a42d9f95::$prefixLengthsPsr4;
|
265 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit6fbe49c8f8ab7e51dd699e84a42d9f95::$prefixDirsPsr4;
|
266 |
+
$loader->prefixesPsr0 = ComposerStaticInit6fbe49c8f8ab7e51dd699e84a42d9f95::$prefixesPsr0;
|
267 |
+
$loader->classMap = ComposerStaticInit6fbe49c8f8ab7e51dd699e84a42d9f95::$classMap;
|
268 |
|
269 |
}, null, ClassLoader::class);
|
270 |
}
|
common/vendor/ky/ky.min.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Bundled by jsDelivr using Rollup v2.60.2 and Terser v5.10.0.
|
3 |
+
* Original file: /npm/ky@0.29.0/distribution/index.js
|
4 |
+
*
|
5 |
+
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
6 |
+
*/
|
7 |
+
class t extends Error{constructor(t,e,s){const o=`${t.status||0===t.status?t.status:""} ${t.statusText||""}`.trim();super(`Request failed with ${o?`status code ${o}`:"an unknown error"}`),this.name="HTTPError",this.response=t,this.request=e,this.options=s}}class e extends Error{constructor(t){super("Request timed out"),this.name="TimeoutError",this.request=t}}const s=t=>null!==t&&"object"==typeof t,o=(...t)=>{for(const e of t)if((!s(e)||Array.isArray(e))&&void 0!==e)throw new TypeError("The `options` argument must be an object");return n({},...t)},r=(t={},e={})=>{const s=new globalThis.Headers(t),o=e instanceof globalThis.Headers,r=new globalThis.Headers(e);for(const[t,e]of r.entries())o&&"undefined"===e||void 0===e?s.delete(t):s.set(t,e);return s},n=(...t)=>{let e={},o={};for(const i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(s(i)){for(let[t,o]of Object.entries(i))s(o)&&t in e&&(o=n(e[t],o)),e={...e,[t]:o};s(i.headers)&&(o=r(o,i.headers),e.headers=o)}return e},i="function"==typeof globalThis.AbortController,a="function"==typeof globalThis.ReadableStream,h="function"==typeof globalThis.FormData,u=["get","post","put","patch","head","delete"],p={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},l=Symbol("stop"),c=t=>u.includes(t)?t.toUpperCase():t,f=[413,429,503],d={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:f,maxRetryAfter:Number.POSITIVE_INFINITY},y=(t={})=>{if("number"==typeof t)return{...d,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...d,...t,afterStatusCodes:f}};class _{constructor(t,e={}){var s,o;if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...e,headers:r(this._input.headers,e.headers),hooks:n({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},e.hooks),method:c(null!==(s=e.method)&&void 0!==s?s:this._input.method),prefixUrl:String(e.prefixUrl||""),retry:y(e.retry),throwHttpErrors:!1!==e.throwHttpErrors,timeout:void 0===e.timeout?1e4:e.timeout,fetch:null!==(o=e.fetch)&&void 0!==o?o:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(i&&(this.abortController=new globalThis.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),e=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(h&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}static create(e,s){const o=new _(e,s),r=async()=>{if(o._options.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await o._fetch();for(const t of o._options.hooks.afterResponse){const s=await t(o.request,o._options,o._decorateResponse(e.clone()));s instanceof globalThis.Response&&(e=s)}if(o._decorateResponse(e),!e.ok&&o._options.throwHttpErrors){let s=new t(e,o.request,o._options);for(const t of o._options.hooks.beforeError)s=await t(s);throw s}if(o._options.onDownloadProgress){if("function"!=typeof o._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!a)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return o._stream(e.clone(),o._options.onDownloadProgress)}return e},n=o._options.retry.methods.includes(o.request.method.toLowerCase())?o._retry(r):r();for(const[t,e]of Object.entries(p))n[t]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||e);const r=(await n).clone();if("json"===t){if(204===r.status)return"";if(s.parseJson)return s.parseJson(await r.text())}return r[t]()};return n}_calculateRetryDelay(s){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(s instanceof e)){if(s instanceof t){if(!this._options.retry.statusCodes.includes(s.response.status))return 0;const t=s.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(s.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===s.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(e){const s=Math.min(this._calculateRetryDelay(e),2147483647);if(0!==s&&this._retryCount>0){await(async t=>new Promise((e=>{setTimeout(e,t)})))(s);for(const t of this._options.hooks.beforeRetry){if(await t({request:this.request,options:this._options,error:e,retryCount:this._retryCount})===l)return}return this._retry(t)}throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?this._options.fetch(this.request.clone()):(async(t,s,o)=>new Promise(((r,n)=>{const i=setTimeout((()=>{s&&s.abort(),n(new e(t))}),o.timeout);o.fetch(t).then(r).catch(n).then((()=>{clearTimeout(i)}))})))(this.request.clone(),this.abortController,this._options)}_stream(t,e){const s=Number(t.headers.get("content-length"))||0;let o=0;return new globalThis.Response(new globalThis.ReadableStream({async start(r){const n=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:s},new Uint8Array),await async function t(){const{done:i,value:a}=await n.read();if(i)r.close();else{if(e){o+=a.byteLength;e({percent:0===s?0:o/s,transferredBytes:o,totalBytes:s},a)}r.enqueue(a),await t()}}()}}))}}
|
8 |
+
/*! MIT License © Sindre Sorhus */const m=t=>{const e=(e,s)=>_.create(e,o(t,s));for(const s of u)e[s]=(e,r)=>_.create(e,o(t,r,{method:s}));return e.create=t=>m(o(t)),e.extend=e=>m(o(t,e)),e.stop=l,e},b=m();export{t as HTTPError,e as TimeoutError,b as default};
|
common/vendor/ky/tec-ky.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
import ky from './ky.min.js';
|
2 |
+
tribe.ky = ky;
|
event-tickets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
-
Version: 5.
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
+
Version: 5.3.0
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
lang/event-tickets.pot
CHANGED
@@ -2,59 +2,58 @@
|
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Event Tickets 5.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
-
"POT-Creation-Date: 2022-02-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2022-02-
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
-
#. #-#-#-#-# event-tickets.pot (Event Tickets 5.
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
#: event-tickets.php:61 src/Tribe/Admin/Notices.php:92 src/Tribe/Main.php:691
|
18 |
#: src/Tribe/Privacy.php:59 src/admin-views/admin-welcome-message.php:58
|
19 |
msgid "Event Tickets"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: src/Tickets/Commerce/
|
23 |
-
|
24 |
-
#: src/Tickets/Commerce/Admin/Notices.php:176
|
25 |
-
msgid "Learn More"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: src/Tickets/Commerce/
|
29 |
-
msgid "
|
30 |
msgstr ""
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: src/Tickets/Commerce/Admin/Notices.php:
|
41 |
msgid "Set up your checkout page"
|
42 |
msgstr ""
|
43 |
|
44 |
#. translators: %1$s: Link to knowledgebase article.
|
45 |
-
#: src/Tickets/Commerce/Admin/Notices.php:
|
46 |
msgid ""
|
47 |
"In order to start selling with Tickets Commerce, you'll need to set up your "
|
48 |
"checkout page. Please configure the setting on Settings > Payments and "
|
49 |
"confirm that the page you have selected has the proper shortcode. %1$s"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: src/Tickets/Commerce/Admin/Notices.php:
|
53 |
msgid "Set up your order success page"
|
54 |
msgstr ""
|
55 |
|
56 |
#. translators: %1$s: Link to knowledgebase article.
|
57 |
-
#: src/Tickets/Commerce/Admin/Notices.php:
|
58 |
msgid ""
|
59 |
"In order to start selling with Tickets Commerce, you'll need to set up your "
|
60 |
"order success page. Please configure the setting on Settings > Payments and "
|
@@ -121,7 +120,7 @@ msgid "Details"
|
|
121 |
msgstr ""
|
122 |
|
123 |
#: src/Tickets/Commerce/Admin_Tables/Attendees.php:219
|
124 |
-
#: src/views/tickets/email.php:
|
125 |
msgid "Security Code"
|
126 |
msgstr ""
|
127 |
|
@@ -279,6 +278,14 @@ msgstr ""
|
|
279 |
msgid "%1$s"
|
280 |
msgstr ""
|
281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
#: src/Tickets/Commerce/Attendee.php:200 src/Tribe/Admin/Columns/Tickets.php:56
|
283 |
#: src/Tribe/Admin/Manager/Service_Provider.php:173 src/Tribe/Attendees.php:207
|
284 |
#: src/Tribe/Commerce/PayPal/Main.php:456
|
@@ -298,23 +305,36 @@ msgstr ""
|
|
298 |
msgid "Tickets Commerce Checkout Page"
|
299 |
msgstr ""
|
300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
#: src/Tickets/Commerce/Gateways/Manual/Gateway.php:27
|
302 |
msgid "Manually Generated"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
306 |
msgid "Disconnect PayPal Account"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
310 |
msgid "Are you sure you want to disconnect your PayPal account?"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
314 |
msgid "You’re connected to PayPal! Here’s what’s next..."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
318 |
msgid ""
|
319 |
"PayPal allows you to accept credit or debit cards directly on your website. "
|
320 |
"Because of\n"
|
@@ -326,47 +346,47 @@ msgid ""
|
|
326 |
"comprised of, but not limited to:"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
330 |
msgid ""
|
331 |
"Using a trusted, secure hosting provider – preferably one which claims and "
|
332 |
"actively promotes PCI compliance."
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
336 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
337 |
msgid ""
|
338 |
"Maintain security best practices when setting passwords and limit access to "
|
339 |
"your server."
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
343 |
msgid "Implement an SSL certificate to keep your payments secure."
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
347 |
msgid "Keep plugins up to date to ensure latest security fixes are present."
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
351 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/notice-test-mode.php:
|
352 |
msgid ""
|
353 |
"You have connected your account for test mode. You will need to connect "
|
354 |
"again once you are in live mode."
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
358 |
msgid "E.g.: 123"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
362 |
msgid "E.g.: 03/26"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
366 |
msgid "E.g.: 4111 1111 1111 1111"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:
|
370 |
msgid "E.g.: 01020"
|
371 |
msgstr ""
|
372 |
|
@@ -392,59 +412,54 @@ msgstr ""
|
|
392 |
msgid "Unexpected PayPal response when updating webhook"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
396 |
msgid "PayPal"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
400 |
msgid "PayPal is now connected."
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
404 |
msgid "Failed to disconnect PayPal account."
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
408 |
msgid "Disconnected PayPal account."
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
412 |
msgid "Failed to refresh PayPal access token."
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
416 |
msgid "PayPal access token was refreshed successfully."
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
420 |
msgid "Failed to refresh PayPal user info."
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
424 |
msgid "PayPal user info was refreshed successfully."
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
428 |
msgid "Failed to refresh PayPal webhooks."
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
432 |
msgid "PayPal webhooks refreshed successfully."
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
436 |
msgid ""
|
437 |
"A valid SSL certificate is required to set up your PayPal account and accept "
|
438 |
"payments"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:
|
442 |
-
|
443 |
-
msgid "Something went wrong!"
|
444 |
-
msgstr ""
|
445 |
-
|
446 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:172
|
447 |
-
msgid "Unexpected response recieved."
|
448 |
msgstr ""
|
449 |
|
450 |
#: src/Tickets/Commerce/Gateways/PayPal/Location/Country.php:95
|
@@ -4441,108 +4456,112 @@ msgstr ""
|
|
4441 |
msgid "Zaragoza"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php:
|
4445 |
msgid "Unexpected response from PayPal when on boarding"
|
4446 |
msgstr ""
|
4447 |
|
4448 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4449 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4450 |
msgid "Order ID in PayPal"
|
4451 |
msgstr ""
|
4452 |
|
4453 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4454 |
msgid "Payer ID token from PayPal"
|
4455 |
msgstr ""
|
4456 |
|
4457 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
|
|
4458 |
msgid "To which status the failing should change this order to"
|
4459 |
msgstr ""
|
4460 |
|
4461 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
|
|
4462 |
msgid "Why this particular order has failed."
|
4463 |
msgstr ""
|
4464 |
|
4465 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4466 |
msgid "Creating new PayPal order failed. Please try again."
|
4467 |
msgstr ""
|
4468 |
|
4469 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4470 |
msgid "Your PayPal order was cancelled."
|
4471 |
msgstr ""
|
4472 |
|
4473 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4474 |
msgid "Provided Order id is not valid."
|
4475 |
msgstr ""
|
4476 |
|
4477 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4478 |
msgid "There was a problem while processing your payment, please try again."
|
4479 |
msgstr ""
|
4480 |
|
4481 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
4482 |
msgid "There was a problem with the Order status change, please try again."
|
4483 |
msgstr ""
|
4484 |
|
4485 |
#. Translators: %s: The event type.
|
4486 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:
|
4487 |
msgid "Received PayPal webhook event for type: %s"
|
4488 |
msgstr ""
|
4489 |
|
4490 |
#. Translators: %s: The PayPal payment event.
|
4491 |
-
|
|
|
4492 |
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:53
|
|
|
4493 |
msgid "Invalid event type for webhook event: %s"
|
4494 |
msgstr ""
|
4495 |
|
4496 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:
|
4497 |
msgid "Failed PayPal webhook event verification"
|
4498 |
msgstr ""
|
4499 |
|
4500 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:
|
4501 |
msgid "Processes the Webhook as long as it includes valid Payment Event data"
|
4502 |
msgstr ""
|
4503 |
|
4504 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:
|
4505 |
msgid "Whether the processing was successful"
|
4506 |
msgstr ""
|
4507 |
|
4508 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:
|
4509 |
msgid "The webhook was invalid and was not processed"
|
4510 |
msgstr ""
|
4511 |
|
4512 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
4513 |
msgid "-- Please select a country --"
|
4514 |
msgstr ""
|
4515 |
|
4516 |
#. Translators: %s: The PayPal telephone number.
|
4517 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
4518 |
msgid "Please call a PayPal support representative at %s"
|
4519 |
msgstr ""
|
4520 |
|
4521 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
4522 |
msgid ""
|
4523 |
"Please reach out to PayPal support from your PayPal account Resolution Center"
|
4524 |
msgstr ""
|
4525 |
|
4526 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
4527 |
msgid " and relay the following message:"
|
4528 |
msgstr ""
|
4529 |
|
4530 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:
|
4531 |
msgid ""
|
4532 |
"There was a problem with the status check for your account. Please try "
|
4533 |
"disconnecting and connecting again. If the problem persists, please contact "
|
4534 |
"support."
|
4535 |
msgstr ""
|
4536 |
|
4537 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:
|
4538 |
msgid "Set up an account to receive payment from PayPal"
|
4539 |
msgstr ""
|
4540 |
|
4541 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:
|
4542 |
msgid "Confirm your primary email address"
|
4543 |
msgstr ""
|
4544 |
|
4545 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:
|
4546 |
msgid ""
|
4547 |
"Your account was expected to be able to accept custom payments, but is not. "
|
4548 |
"Please make sure your\n"
|
@@ -4550,11 +4569,11 @@ msgid ""
|
|
4550 |
"persists, please contact PayPal."
|
4551 |
msgstr ""
|
4552 |
|
4553 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:
|
4554 |
msgid "Reach out to PayPal to enable PPCP_CUSTOM for your account"
|
4555 |
msgstr ""
|
4556 |
|
4557 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:
|
4558 |
msgid "Reach out to PayPal to resolve the following capabilities:"
|
4559 |
msgstr ""
|
4560 |
|
@@ -4608,7 +4627,7 @@ msgid "Refunds"
|
|
4608 |
msgstr ""
|
4609 |
|
4610 |
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php:79
|
4611 |
-
#: src/Tickets/Commerce/Status/Reversed.php:
|
4612 |
msgid "Reversed"
|
4613 |
msgstr ""
|
4614 |
|
@@ -4632,6 +4651,326 @@ msgstr ""
|
|
4632 |
msgid "Change %1$s in PayPal from webhook: %2$s"
|
4633 |
msgstr ""
|
4634 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4635 |
#: src/Tickets/Commerce/Legacy_Compat.php:86
|
4636 |
msgid "Tribe Commerce ( Legacy PayPal, not recommended )"
|
4637 |
msgstr ""
|
@@ -4641,7 +4980,7 @@ msgstr ""
|
|
4641 |
msgid "(deleted)"
|
4642 |
msgstr ""
|
4643 |
|
4644 |
-
#: src/Tickets/Commerce/Module.php:20
|
4645 |
msgid "Tickets Commerce"
|
4646 |
msgstr ""
|
4647 |
|
@@ -4651,43 +4990,41 @@ msgstr ""
|
|
4651 |
msgid "Orders"
|
4652 |
msgstr ""
|
4653 |
|
4654 |
-
#: src/Tickets/Commerce/Payments_Tab.php:
|
4655 |
msgid "Payments"
|
4656 |
msgstr ""
|
4657 |
|
4658 |
-
#: src/Tickets/Commerce/Payments_Tab.php:
|
4659 |
#: src/Tribe/Main.php:666 src/admin-views/admin-welcome-message.php:56
|
4660 |
#: src/admin-views/tribe-commerce-settings.php:4
|
4661 |
msgid "Event Tickets Plus"
|
4662 |
msgstr ""
|
4663 |
|
4664 |
-
|
4665 |
-
#: src/
|
4666 |
-
msgid "Check it out!"
|
4667 |
-
msgstr ""
|
4668 |
-
|
4669 |
-
#. Translators: %1$s: The Event Tickets Plus link, %2$s: The word "ticket" in
|
4670 |
-
#. lowercase, %3$s: The "Check it out!" link.
|
4671 |
-
#: src/Tickets/Commerce/Payments_Tab.php:81
|
4672 |
msgctxt "about Tickets Commerce"
|
4673 |
msgid ""
|
4674 |
-
"Tickets Commerce
|
4675 |
-
"
|
4676 |
-
"
|
4677 |
-
"
|
4678 |
-
"
|
4679 |
-
"%2$s. %3$s"
|
4680 |
msgstr ""
|
4681 |
|
4682 |
-
#: src/Tickets/Commerce/Payments_Tab.php:
|
4683 |
msgid "Enable Tickets Commerce"
|
4684 |
msgstr ""
|
4685 |
|
4686 |
-
|
|
|
|
|
|
|
|
|
|
|
4687 |
msgid "Tickets Checkout"
|
4688 |
msgstr ""
|
4689 |
|
4690 |
-
#: src/Tickets/Commerce/Payments_Tab.php:
|
4691 |
msgid "Order Completed"
|
4692 |
msgstr ""
|
4693 |
|
@@ -4798,44 +5135,44 @@ msgctxt "Browser title"
|
|
4798 |
msgid "%s - Tickets Commerce Orders"
|
4799 |
msgstr ""
|
4800 |
|
4801 |
-
#: src/Tickets/Commerce/Settings.php:
|
4802 |
msgid "Tickets Commerce Test Mode Active"
|
4803 |
msgstr ""
|
4804 |
|
4805 |
-
#: src/Tickets/Commerce/Settings.php:
|
4806 |
msgid "-- No page set --"
|
4807 |
msgstr ""
|
4808 |
|
4809 |
-
#: src/Tickets/Commerce/Settings.php:
|
4810 |
msgid "Tickets Commerce Settings"
|
4811 |
msgstr ""
|
4812 |
|
4813 |
-
#: src/Tickets/Commerce/Settings.php:
|
4814 |
msgid "Enable Test Mode"
|
4815 |
msgstr ""
|
4816 |
|
4817 |
-
#: src/Tickets/Commerce/Settings.php:
|
4818 |
msgid ""
|
4819 |
"Enables Test mode for testing payments. Any payments made will be done on "
|
4820 |
"\"sandbox\" accounts."
|
4821 |
msgstr ""
|
4822 |
|
4823 |
-
#: src/Tickets/Commerce/Settings.php:
|
4824 |
#: src/admin-views/tribe-commerce-settings.php:136
|
4825 |
msgid "Currency Code"
|
4826 |
msgstr ""
|
4827 |
|
4828 |
-
#: src/Tickets/Commerce/Settings.php:
|
4829 |
msgid "The currency that will be used for Tickets Commerce transactions."
|
4830 |
msgstr ""
|
4831 |
|
4832 |
-
#: src/Tickets/Commerce/Settings.php:
|
4833 |
#: src/admin-views/tribe-commerce-settings.php:144
|
4834 |
msgid "Stock Handling"
|
4835 |
msgstr ""
|
4836 |
|
4837 |
#. Translators: %s: The word "ticket" in lowercase.
|
4838 |
-
#: src/Tickets/Commerce/Settings.php:
|
4839 |
msgctxt "tickets fields settings paypal stock handling"
|
4840 |
msgid ""
|
4841 |
"When a customer purchases a %s, the payment gateway might flag the order as "
|
@@ -4845,62 +5182,62 @@ msgstr ""
|
|
4845 |
|
4846 |
#. Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening
|
4847 |
#. tag. %3$s: `</strong>` closing tag.
|
4848 |
-
#: src/Tickets/Commerce/Settings.php:
|
4849 |
msgid ""
|
4850 |
"Decrease available %1$s stock as soon as a %2$sPending%3$s order is created."
|
4851 |
msgstr ""
|
4852 |
|
4853 |
#. Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening
|
4854 |
#. tag. %3$s: `</strong>` closing tag.
|
4855 |
-
#: src/Tickets/Commerce/Settings.php:
|
4856 |
msgid ""
|
4857 |
"Only decrease available %1$s stock if an order is confirmed as %2$sCompleted"
|
4858 |
"%3$s by the payment gateway."
|
4859 |
msgstr ""
|
4860 |
|
4861 |
-
#: src/Tickets/Commerce/Settings.php:
|
4862 |
msgid "Checkout page"
|
4863 |
msgstr ""
|
4864 |
|
4865 |
#. Translators: %s: The [shortcode] for the success page.
|
4866 |
-
#: src/Tickets/Commerce/Settings.php:
|
4867 |
msgid ""
|
4868 |
"This is the page where customers go to complete their purchase. Use the %s "
|
4869 |
"shortcode to display the checkout experience in the page content."
|
4870 |
msgstr ""
|
4871 |
|
4872 |
-
#: src/Tickets/Commerce/Settings.php:
|
4873 |
#: src/admin-views/tribe-commerce-settings.php:162
|
4874 |
msgid "Success page"
|
4875 |
msgstr ""
|
4876 |
|
4877 |
#. Translators: %s: The [shortcode] for the success page.
|
4878 |
-
#: src/Tickets/Commerce/Settings.php:
|
4879 |
msgid ""
|
4880 |
"After a successful order, users will be redirected to this page. Use the %s "
|
4881 |
"shortcode to display the order confirmation to the user in the page content."
|
4882 |
msgstr ""
|
4883 |
|
4884 |
-
#: src/Tickets/Commerce/Settings.php:
|
4885 |
#: src/admin-views/tribe-commerce-settings.php:176
|
4886 |
msgid "Confirmation email sender address"
|
4887 |
msgstr ""
|
4888 |
|
4889 |
#. Translators: %s: The word "tickets" in lowercase.
|
4890 |
-
#: src/Tickets/Commerce/Settings.php:
|
4891 |
msgctxt "tickets fields settings confirmation email"
|
4892 |
msgid ""
|
4893 |
"Email address that %s customers will receive confirmation from. Leave empty "
|
4894 |
"to use the default WordPress site email address."
|
4895 |
msgstr ""
|
4896 |
|
4897 |
-
#: src/Tickets/Commerce/Settings.php:
|
4898 |
#: src/admin-views/tribe-commerce-settings.php:185
|
4899 |
msgid "Confirmation email sender name"
|
4900 |
msgstr ""
|
4901 |
|
4902 |
#. Translators: %s: The word "ticket" in lowercase.
|
4903 |
-
#: src/Tickets/Commerce/Settings.php:
|
4904 |
#: src/admin-views/tribe-commerce-settings.php:186
|
4905 |
msgctxt "tickets fields settings paypal email sender"
|
4906 |
msgid ""
|
@@ -4908,13 +5245,13 @@ msgid ""
|
|
4908 |
"purchase."
|
4909 |
msgstr ""
|
4910 |
|
4911 |
-
#: src/Tickets/Commerce/Settings.php:
|
4912 |
#: src/admin-views/tribe-commerce-settings.php:194
|
4913 |
msgid "Confirmation email subject"
|
4914 |
msgstr ""
|
4915 |
|
4916 |
#. Translators: %s: The word "ticket" in lowercase.
|
4917 |
-
#: src/Tickets/Commerce/Settings.php:
|
4918 |
#: src/admin-views/tribe-commerce-settings.php:195
|
4919 |
msgctxt "tickets fields settings paypal email subject"
|
4920 |
msgid ""
|
@@ -4923,12 +5260,21 @@ msgid ""
|
|
4923 |
msgstr ""
|
4924 |
|
4925 |
#. Translators: %s: The word "tickets" in lowercase.
|
4926 |
-
#: src/Tickets/Commerce/Settings.php:
|
4927 |
#: src/admin-views/tribe-commerce-settings.php:197
|
4928 |
msgctxt "tickets fields settings paypal email subject"
|
4929 |
msgid "You have %s!"
|
4930 |
msgstr ""
|
4931 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4932 |
#: src/Tickets/Commerce/Status/Action_Required.php:29
|
4933 |
msgid "Action Required"
|
4934 |
msgstr ""
|
@@ -4947,7 +5293,7 @@ msgstr ""
|
|
4947 |
msgid "Created"
|
4948 |
msgstr ""
|
4949 |
|
4950 |
-
#: src/Tickets/Commerce/Status/Denied.php:
|
4951 |
msgid "Denied"
|
4952 |
msgstr ""
|
4953 |
|
@@ -4959,35 +5305,35 @@ msgstr ""
|
|
4959 |
msgid "Pending"
|
4960 |
msgstr ""
|
4961 |
|
4962 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4963 |
msgid "This order contained an invalid Ticket (ID: %1$d)"
|
4964 |
msgstr ""
|
4965 |
|
4966 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4967 |
msgid "This order contained a Ticket with an invalid Event (Event ID: %1$d)"
|
4968 |
msgstr ""
|
4969 |
|
4970 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4971 |
msgid "Cannot purchase zero of \"%1$s\""
|
4972 |
msgstr ""
|
4973 |
|
4974 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4975 |
msgid "Insufficient stock for \"%1$s\""
|
4976 |
msgstr ""
|
4977 |
|
4978 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4979 |
msgid "%s will be available on %s at %s"
|
4980 |
msgstr ""
|
4981 |
|
4982 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4983 |
msgid "%s are no longer available."
|
4984 |
msgstr ""
|
4985 |
|
4986 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
4987 |
msgid "There are no %s available at this time."
|
4988 |
msgstr ""
|
4989 |
|
4990 |
-
#: src/Tickets/Commerce/Status/Refunded.php:
|
4991 |
msgid "Refunded"
|
4992 |
msgstr ""
|
4993 |
|
@@ -4995,7 +5341,7 @@ msgstr ""
|
|
4995 |
msgid "Undefined"
|
4996 |
msgstr ""
|
4997 |
|
4998 |
-
#: src/Tickets/Commerce/Status/Voided.php:
|
4999 |
msgid "Voided"
|
5000 |
msgstr ""
|
5001 |
|
@@ -5025,127 +5371,127 @@ msgstr ""
|
|
5025 |
msgid "unavailable"
|
5026 |
msgstr ""
|
5027 |
|
5028 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5029 |
#: src/Tribe/Commerce/Currency.php:197
|
5030 |
msgid "Australian Dollar (AUD)"
|
5031 |
msgstr ""
|
5032 |
|
5033 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5034 |
#: src/Tribe/Commerce/Currency.php:203
|
5035 |
msgid "Brazilian Real (BRL)"
|
5036 |
msgstr ""
|
5037 |
|
5038 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5039 |
#: src/Tribe/Commerce/Currency.php:209
|
5040 |
msgid "Canadian Dollar (CAD)"
|
5041 |
msgstr ""
|
5042 |
|
5043 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5044 |
#: src/Tribe/Commerce/Currency.php:215
|
5045 |
msgid "Swiss Franc (CHF)"
|
5046 |
msgstr ""
|
5047 |
|
5048 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5049 |
#: src/Tribe/Commerce/Currency.php:221
|
5050 |
msgid "Czech Koruna (CZK)"
|
5051 |
msgstr ""
|
5052 |
|
5053 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5054 |
#: src/Tribe/Commerce/Currency.php:228
|
5055 |
msgid "Danish Krone (DKK)"
|
5056 |
msgstr ""
|
5057 |
|
5058 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5059 |
#: src/Tribe/Commerce/Currency.php:234
|
5060 |
msgid "Euro (EUR)"
|
5061 |
msgstr ""
|
5062 |
|
5063 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5064 |
#: src/Tribe/Commerce/Currency.php:240
|
5065 |
msgid "Pound Sterling (GBP)"
|
5066 |
msgstr ""
|
5067 |
|
5068 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5069 |
#: src/Tribe/Commerce/Currency.php:246
|
5070 |
msgid "Hong Kong Dollar (HKD)"
|
5071 |
msgstr ""
|
5072 |
|
5073 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5074 |
#: src/Tribe/Commerce/Currency.php:252
|
5075 |
msgid "Hungarian Forint (HUF)"
|
5076 |
msgstr ""
|
5077 |
|
5078 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5079 |
#: src/Tribe/Commerce/Currency.php:258
|
5080 |
msgid "Israeli New Sheqel (ILS)"
|
5081 |
msgstr ""
|
5082 |
|
5083 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5084 |
#: src/Tribe/Commerce/Currency.php:264
|
5085 |
msgid "Indian Rupee (INR)"
|
5086 |
msgstr ""
|
5087 |
|
5088 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5089 |
#: src/Tribe/Commerce/Currency.php:270
|
5090 |
msgid "Japanese Yen (JPY)"
|
5091 |
msgstr ""
|
5092 |
|
5093 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5094 |
#: src/Tribe/Commerce/Currency.php:276
|
5095 |
msgid "Malaysian Ringgit (MYR)"
|
5096 |
msgstr ""
|
5097 |
|
5098 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5099 |
#: src/Tribe/Commerce/Currency.php:282
|
5100 |
msgid "Mexican Peso (MXN)"
|
5101 |
msgstr ""
|
5102 |
|
5103 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5104 |
#: src/Tribe/Commerce/Currency.php:288
|
5105 |
msgid "Norwegian Krone (NOK)"
|
5106 |
msgstr ""
|
5107 |
|
5108 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5109 |
#: src/Tribe/Commerce/Currency.php:294
|
5110 |
msgid "New Zealand Dollar (NZD)"
|
5111 |
msgstr ""
|
5112 |
|
5113 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5114 |
#: src/Tribe/Commerce/Currency.php:300
|
5115 |
msgid "Philippine Peso (PHP)"
|
5116 |
msgstr ""
|
5117 |
|
5118 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5119 |
#: src/Tribe/Commerce/Currency.php:306
|
5120 |
msgid "Polish Zloty (PLN)"
|
5121 |
msgstr ""
|
5122 |
|
5123 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5124 |
#: src/Tribe/Commerce/Currency.php:312
|
5125 |
msgid "Russian Ruble (RUB)"
|
5126 |
msgstr ""
|
5127 |
|
5128 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5129 |
#: src/Tribe/Commerce/Currency.php:318
|
5130 |
msgid "Swedish Krona (SEK)"
|
5131 |
msgstr ""
|
5132 |
|
5133 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5134 |
#: src/Tribe/Commerce/Currency.php:324
|
5135 |
msgid "Singapore Dollar (SGD)"
|
5136 |
msgstr ""
|
5137 |
|
5138 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5139 |
#: src/Tribe/Commerce/Currency.php:330
|
5140 |
msgid "Thai Baht (THB)"
|
5141 |
msgstr ""
|
5142 |
|
5143 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5144 |
#: src/Tribe/Commerce/Currency.php:336
|
5145 |
msgid "Taiwan New Dollar (TWD)"
|
5146 |
msgstr ""
|
5147 |
|
5148 |
-
#: src/Tickets/Commerce/Utils/Currency.php:
|
5149 |
#: src/Tribe/Commerce/Currency.php:342
|
5150 |
msgid "U.S. Dollar (USD)"
|
5151 |
msgstr ""
|
@@ -5398,14 +5744,6 @@ msgstr ""
|
|
5398 |
msgid "Get started"
|
5399 |
msgstr ""
|
5400 |
|
5401 |
-
#: src/Tribe/Admin/Settings/Service_Provider.php:146
|
5402 |
-
#: src/Tribe/Admin/Settings/Service_Provider.php:194
|
5403 |
-
#: src/admin-views/admin-welcome-message.php:157
|
5404 |
-
#: src/admin-views/admin-welcome-message.php:179
|
5405 |
-
#: src/admin-views/admin-welcome-message.php:199
|
5406 |
-
msgid "Learn more"
|
5407 |
-
msgstr ""
|
5408 |
-
|
5409 |
#: src/Tribe/Admin/Settings/Service_Provider.php:191
|
5410 |
msgid ""
|
5411 |
"Tribe Commerce has been replaced by our new payments system, Tickets "
|
@@ -5839,28 +6177,28 @@ msgstr ""
|
|
5839 |
msgid "Are you sure you want to cancel?"
|
5840 |
msgstr ""
|
5841 |
|
5842 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
5843 |
msgctxt "Error message title, will be followed by the error code."
|
5844 |
msgid "API Error"
|
5845 |
msgstr ""
|
5846 |
|
5847 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
5848 |
msgid ""
|
5849 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
5850 |
"repeatedly, please contact the Site Admin."
|
5851 |
msgstr ""
|
5852 |
|
5853 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
5854 |
msgid ""
|
5855 |
"The ticket for this event has sold out and has been removed from your cart."
|
5856 |
msgstr ""
|
5857 |
|
5858 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
5859 |
#: src/views/v2/commerce/order/header/title-empty.php:28
|
5860 |
msgid "Whoops!"
|
5861 |
msgstr ""
|
5862 |
|
5863 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:
|
5864 |
msgctxt "The %s will change based on the error produced."
|
5865 |
msgid "You have %s ticket(s) with a field that requires information."
|
5866 |
msgstr ""
|
@@ -8081,43 +8419,55 @@ msgstr ""
|
|
8081 |
msgid "New!"
|
8082 |
msgstr ""
|
8083 |
|
8084 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8085 |
msgid "Refresh Access Token"
|
8086 |
msgstr ""
|
8087 |
|
8088 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-connection.php:
|
8089 |
msgid "Resync payment connection"
|
8090 |
msgstr ""
|
8091 |
|
8092 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-user-info.php:
|
8093 |
msgid "Refresh User Info"
|
8094 |
msgstr ""
|
8095 |
|
8096 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-webhook.php:
|
8097 |
msgid "Refresh Webhook"
|
8098 |
msgstr ""
|
8099 |
|
8100 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php:
|
|
|
8101 |
msgid "Connected as:"
|
8102 |
msgstr ""
|
8103 |
|
8104 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php:
|
|
|
8105 |
msgid "Disconnect"
|
8106 |
msgstr ""
|
8107 |
|
8108 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php:
|
8109 |
msgid "PayPal Status:"
|
8110 |
msgstr ""
|
8111 |
|
8112 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php:
|
8113 |
msgid "Connected"
|
8114 |
msgstr ""
|
8115 |
|
8116 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/webhooks.php:
|
8117 |
msgid "Webhooks:"
|
8118 |
msgstr ""
|
8119 |
|
8120 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/webhooks.php:
|
8121 |
msgid "payment connection error"
|
8122 |
msgstr ""
|
8123 |
|
@@ -8126,14 +8476,15 @@ msgid "Learn more about configuring PayPal payments"
|
|
8126 |
msgstr ""
|
8127 |
|
8128 |
#: src/admin-views/settings/tickets-commerce/paypal/connect/help-links/troubleshooting.php:24
|
|
|
8129 |
msgid "Get troubleshooting help"
|
8130 |
msgstr ""
|
8131 |
|
8132 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php:
|
8133 |
msgid "Accept online payments with PayPal!"
|
8134 |
msgstr ""
|
8135 |
|
8136 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php:
|
8137 |
msgid ""
|
8138 |
"Start selling tickets to your events today with PayPal. Attendees can "
|
8139 |
"purchase tickets directly on your site using debit or credit cards with no "
|
@@ -8149,56 +8500,60 @@ msgid "Easy no-API key connection"
|
|
8149 |
msgstr ""
|
8150 |
|
8151 |
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:25
|
|
|
8152 |
msgid "Accept payments from around the world"
|
8153 |
msgstr ""
|
8154 |
|
8155 |
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:28
|
|
|
8156 |
msgid "Supports 3D Secure payments"
|
8157 |
msgstr ""
|
8158 |
|
8159 |
-
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php:
|
8160 |
msgid "PayPal Logo Image"
|
8161 |
msgstr ""
|
8162 |
|
8163 |
#. Translators: %1$s: opening `a` tag to the knowledge base article. %2$s:
|
8164 |
#. closing `a` tag to the knowledge base article.
|
8165 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
8166 |
msgid ""
|
8167 |
"PayPal allows you to accept credit or debit cards directly on your website. "
|
8168 |
"Because of this, your site needs to maintain %1$sPCI-DSS compliance%2$s."
|
8169 |
msgstr ""
|
8170 |
|
8171 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
8172 |
msgid ""
|
8173 |
"Event Tickets never stores sensitive information like card details to your "
|
8174 |
"server and works seamlessly with SSL certificates."
|
8175 |
msgstr ""
|
8176 |
|
8177 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
8178 |
msgid "Compliance is comprised of, but not limited to:"
|
8179 |
msgstr ""
|
8180 |
|
8181 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
8182 |
msgid ""
|
8183 |
"Using a trusted, secure hosting provider — preferably one which claims "
|
8184 |
"and actively promotes PCI compliance."
|
8185 |
msgstr ""
|
8186 |
|
8187 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
8188 |
msgid "Implement an SSL certificate to keep your ticket sales secure."
|
8189 |
msgstr ""
|
8190 |
|
8191 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
8192 |
msgid ""
|
8193 |
"Keep WordPress and plugins up to date to ensure latest security fixes are "
|
8194 |
"present."
|
8195 |
msgstr ""
|
8196 |
|
8197 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
|
|
8198 |
msgid "Close this modal window"
|
8199 |
msgstr ""
|
8200 |
|
8201 |
-
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:
|
|
|
8202 |
msgid "Got it, thanks!"
|
8203 |
msgstr ""
|
8204 |
|
@@ -8214,6 +8569,136 @@ msgstr ""
|
|
8214 |
msgid "Connect Automatically with <i>PayPal</i>"
|
8215 |
msgstr ""
|
8216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8217 |
#: src/admin-views/ticket-type-history.php:13
|
8218 |
msgctxt "ticket type history"
|
8219 |
msgid "%s history:"
|
@@ -8227,6 +8712,10 @@ msgstr ""
|
|
8227 |
msgid "Click to hide history"
|
8228 |
msgstr ""
|
8229 |
|
|
|
|
|
|
|
|
|
8230 |
#: src/admin-views/tribe-commerce-settings.php:13
|
8231 |
msgctxt "about Tribe Commerce"
|
8232 |
msgid ""
|
@@ -8972,7 +9461,7 @@ msgstr ""
|
|
8972 |
|
8973 |
#: src/views/registration/attendees/fields.php:15
|
8974 |
#: src/views/registration-js/attendees/fields.php:19
|
8975 |
-
#: src/views/tickets/email.php:
|
8976 |
msgid "Attendee"
|
8977 |
msgstr ""
|
8978 |
|
@@ -8984,10 +9473,6 @@ msgstr ""
|
|
8984 |
msgid "Back to cart"
|
8985 |
msgstr ""
|
8986 |
|
8987 |
-
#: src/views/registration/button-checkout.php:31
|
8988 |
-
msgid "Checkout"
|
8989 |
-
msgstr ""
|
8990 |
-
|
8991 |
#: src/views/registration/cart-empty.php:15
|
8992 |
msgid "You currently have no events awaiting registration"
|
8993 |
msgstr ""
|
@@ -9097,11 +9582,11 @@ msgid_plural ""
|
|
9097 |
msgstr[0] ""
|
9098 |
msgstr[1] ""
|
9099 |
|
9100 |
-
#: src/views/tickets/email.php:
|
9101 |
msgid "Ticket #"
|
9102 |
msgstr ""
|
9103 |
|
9104 |
-
#: src/views/tickets/email.php:
|
9105 |
msgctxt "ticket type email heading"
|
9106 |
msgid "%s Type"
|
9107 |
msgstr ""
|
@@ -9304,17 +9789,21 @@ msgctxt "Closes the ticket description"
|
|
9304 |
msgid "Less info"
|
9305 |
msgstr ""
|
9306 |
|
9307 |
-
#: src/views/v2/commerce/checkout/footer/gateway-error.php:
|
9308 |
-
#: src/views/v2/commerce/checkout.php:
|
9309 |
msgid "Checkout Unavailable!"
|
9310 |
msgstr ""
|
9311 |
|
9312 |
-
#: src/views/v2/commerce/checkout/footer/gateway-error.php:
|
9313 |
msgid ""
|
9314 |
"Checkout is not available at this time because a payment method has not been "
|
9315 |
"set up. Please notify the site administrator."
|
9316 |
msgstr ""
|
9317 |
|
|
|
|
|
|
|
|
|
9318 |
#. Translators: %1$s: Singular `event` in lowercase.
|
9319 |
#: src/views/v2/commerce/checkout/header/links/back.php:36
|
9320 |
msgid "back to %1$s"
|
@@ -9326,6 +9815,8 @@ msgstr ""
|
|
9326 |
|
9327 |
#. Translators: %1$s: Plural `Tickets` label.
|
9328 |
#: src/views/v2/commerce/checkout/header/title.php:31
|
|
|
|
|
9329 |
msgid "Purchase %1$s"
|
9330 |
msgstr ""
|
9331 |
|
@@ -9342,13 +9833,29 @@ msgstr ""
|
|
9342 |
msgid "create a new account"
|
9343 |
msgstr ""
|
9344 |
|
9345 |
-
#: src/views/v2/commerce/checkout.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9346 |
msgid ""
|
9347 |
"Checkout is not available at this time because a payment method has not been "
|
9348 |
"set up for this event. Please notify the site administrator."
|
9349 |
msgstr ""
|
9350 |
|
9351 |
-
#: src/views/v2/commerce/checkout.php:
|
9352 |
msgid "Checkout Error!"
|
9353 |
msgstr ""
|
9354 |
|
@@ -9381,6 +9888,10 @@ msgstr ""
|
|
9381 |
msgid "PayPal Capture ID:"
|
9382 |
msgstr ""
|
9383 |
|
|
|
|
|
|
|
|
|
9384 |
#: src/views/v2/commerce/order/description/order-empty.php:28
|
9385 |
msgid "No order information is available because no purchase was made."
|
9386 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Event Tickets 5.3.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
+
"POT-Creation-Date: 2022-02-24 17:47:54+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2022-02-24 17:47\n"
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
+
#. #-#-#-#-# event-tickets.pot (Event Tickets 5.3.0) #-#-#-#-#
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
#: event-tickets.php:61 src/Tribe/Admin/Notices.php:92 src/Tribe/Main.php:691
|
18 |
#: src/Tribe/Privacy.php:59 src/admin-views/admin-welcome-message.php:58
|
19 |
msgid "Event Tickets"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: src/Tickets/Commerce/Abstract_Order.php:105
|
23 |
+
msgid "Please provide a valid purchaser name and email."
|
|
|
|
|
24 |
msgstr ""
|
25 |
|
26 |
+
#: src/Tickets/Commerce/Abstract_Order.php:111
|
27 |
+
msgid "Please provide a valid purchaser name."
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: src/Tickets/Commerce/Abstract_Order.php:115
|
31 |
+
msgid "Please provide a valid purchaser email."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: src/Tickets/Commerce/Admin/Notices.php:70
|
35 |
+
#: src/Tickets/Commerce/Admin/Notices.php:115
|
36 |
+
msgid "Learn More"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: src/Tickets/Commerce/Admin/Notices.php:72
|
40 |
msgid "Set up your checkout page"
|
41 |
msgstr ""
|
42 |
|
43 |
#. translators: %1$s: Link to knowledgebase article.
|
44 |
+
#: src/Tickets/Commerce/Admin/Notices.php:75
|
45 |
msgid ""
|
46 |
"In order to start selling with Tickets Commerce, you'll need to set up your "
|
47 |
"checkout page. Please configure the setting on Settings > Payments and "
|
48 |
"confirm that the page you have selected has the proper shortcode. %1$s"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: src/Tickets/Commerce/Admin/Notices.php:117
|
52 |
msgid "Set up your order success page"
|
53 |
msgstr ""
|
54 |
|
55 |
#. translators: %1$s: Link to knowledgebase article.
|
56 |
+
#: src/Tickets/Commerce/Admin/Notices.php:120
|
57 |
msgid ""
|
58 |
"In order to start selling with Tickets Commerce, you'll need to set up your "
|
59 |
"order success page. Please configure the setting on Settings > Payments and "
|
120 |
msgstr ""
|
121 |
|
122 |
#: src/Tickets/Commerce/Admin_Tables/Attendees.php:219
|
123 |
+
#: src/views/tickets/email.php:458
|
124 |
msgid "Security Code"
|
125 |
msgstr ""
|
126 |
|
278 |
msgid "%1$s"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: src/Tickets/Commerce/Assets.php:101
|
282 |
+
msgid "Default checkout"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: src/Tickets/Commerce/Assets.php:102
|
286 |
+
msgid "Additional payment options"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
#: src/Tickets/Commerce/Attendee.php:200 src/Tribe/Admin/Columns/Tickets.php:56
|
290 |
#: src/Tribe/Admin/Manager/Service_Provider.php:173 src/Tribe/Attendees.php:207
|
291 |
#: src/Tribe/Commerce/PayPal/Main.php:456
|
305 |
msgid "Tickets Commerce Checkout Page"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php:166
|
309 |
+
#: src/views/v2/commerce/checkout.php:55
|
310 |
+
msgid "Something went wrong!"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php:167
|
314 |
+
msgid "Unexpected response recieved."
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php:263
|
318 |
+
msgid "Enabled for Checkout"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
#: src/Tickets/Commerce/Gateways/Manual/Gateway.php:27
|
322 |
msgid "Manually Generated"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:44
|
326 |
msgid "Disconnect PayPal Account"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:45
|
330 |
msgid "Are you sure you want to disconnect your PayPal account?"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:46
|
334 |
msgid "You’re connected to PayPal! Here’s what’s next..."
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:48
|
338 |
msgid ""
|
339 |
"PayPal allows you to accept credit or debit cards directly on your website. "
|
340 |
"Because of\n"
|
346 |
"comprised of, but not limited to:"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:58
|
350 |
msgid ""
|
351 |
"Using a trusted, secure hosting provider – preferably one which claims and "
|
352 |
"actively promotes PCI compliance."
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:59
|
356 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:36
|
357 |
msgid ""
|
358 |
"Maintain security best practices when setting passwords and limit access to "
|
359 |
"your server."
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:60
|
363 |
msgid "Implement an SSL certificate to keep your payments secure."
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:61
|
367 |
msgid "Keep plugins up to date to ensure latest security fixes are present."
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:64
|
371 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/notice-test-mode.php:24
|
372 |
msgid ""
|
373 |
"You have connected your account for test mode. You will need to connect "
|
374 |
"again once you are in live mode."
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:111
|
378 |
msgid "E.g.: 123"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:112
|
382 |
msgid "E.g.: 03/26"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:113
|
386 |
msgid "E.g.: 4111 1111 1111 1111"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:114
|
390 |
msgid "E.g.: 01020"
|
391 |
msgstr ""
|
392 |
|
412 |
msgid "Unexpected PayPal response when updating webhook"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:55
|
416 |
msgid "PayPal"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:65
|
420 |
msgid "PayPal is now connected."
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:70
|
424 |
msgid "Failed to disconnect PayPal account."
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:75
|
428 |
msgid "Disconnected PayPal account."
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:80
|
432 |
msgid "Failed to refresh PayPal access token."
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:85
|
436 |
msgid "PayPal access token was refreshed successfully."
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:90
|
440 |
msgid "Failed to refresh PayPal user info."
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:95
|
444 |
msgid "PayPal user info was refreshed successfully."
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:100
|
448 |
msgid "Failed to refresh PayPal webhooks."
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:105
|
452 |
msgid "PayPal webhooks refreshed successfully."
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:110
|
456 |
msgid ""
|
457 |
"A valid SSL certificate is required to set up your PayPal account and accept "
|
458 |
"payments"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:129
|
462 |
+
msgid "Enable payments through PayPal, Venmo, and credit card."
|
|
|
|
|
|
|
|
|
|
|
463 |
msgstr ""
|
464 |
|
465 |
#: src/Tickets/Commerce/Gateways/PayPal/Location/Country.php:95
|
4456 |
msgid "Zaragoza"
|
4457 |
msgstr ""
|
4458 |
|
4459 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php:98
|
4460 |
msgid "Unexpected response from PayPal when on boarding"
|
4461 |
msgstr ""
|
4462 |
|
4463 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:311
|
4464 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:349
|
4465 |
msgid "Order ID in PayPal"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:324
|
4469 |
msgid "Payer ID token from PayPal"
|
4470 |
msgstr ""
|
4471 |
|
4472 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:362
|
4473 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:282
|
4474 |
msgid "To which status the failing should change this order to"
|
4475 |
msgstr ""
|
4476 |
|
4477 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:375
|
4478 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:295
|
4479 |
msgid "Why this particular order has failed."
|
4480 |
msgstr ""
|
4481 |
|
4482 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:416
|
4483 |
msgid "Creating new PayPal order failed. Please try again."
|
4484 |
msgstr ""
|
4485 |
|
4486 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:417
|
4487 |
msgid "Your PayPal order was cancelled."
|
4488 |
msgstr ""
|
4489 |
|
4490 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:418
|
4491 |
msgid "Provided Order id is not valid."
|
4492 |
msgstr ""
|
4493 |
|
4494 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:419
|
4495 |
msgid "There was a problem while processing your payment, please try again."
|
4496 |
msgstr ""
|
4497 |
|
4498 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:420
|
4499 |
msgid "There was a problem with the Order status change, please try again."
|
4500 |
msgstr ""
|
4501 |
|
4502 |
#. Translators: %s: The event type.
|
4503 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:120
|
4504 |
msgid "Received PayPal webhook event for type: %s"
|
4505 |
msgstr ""
|
4506 |
|
4507 |
#. Translators: %s: The PayPal payment event.
|
4508 |
+
#. Translators: %s: The Stripe payment event.
|
4509 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:131
|
4510 |
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:53
|
4511 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php:51
|
4512 |
msgid "Invalid event type for webhook event: %s"
|
4513 |
msgstr ""
|
4514 |
|
4515 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:144
|
4516 |
msgid "Failed PayPal webhook event verification"
|
4517 |
msgstr ""
|
4518 |
|
4519 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:193
|
4520 |
msgid "Processes the Webhook as long as it includes valid Payment Event data"
|
4521 |
msgstr ""
|
4522 |
|
4523 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:200
|
4524 |
msgid "Whether the processing was successful"
|
4525 |
msgstr ""
|
4526 |
|
4527 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:209
|
4528 |
msgid "The webhook was invalid and was not processed"
|
4529 |
msgstr ""
|
4530 |
|
4531 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:35
|
4532 |
msgid "-- Please select a country --"
|
4533 |
msgstr ""
|
4534 |
|
4535 |
#. Translators: %s: The PayPal telephone number.
|
4536 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:89
|
4537 |
msgid "Please call a PayPal support representative at %s"
|
4538 |
msgstr ""
|
4539 |
|
4540 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:93
|
4541 |
msgid ""
|
4542 |
"Please reach out to PayPal support from your PayPal account Resolution Center"
|
4543 |
msgstr ""
|
4544 |
|
4545 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:96
|
4546 |
msgid " and relay the following message:"
|
4547 |
msgstr ""
|
4548 |
|
4549 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:216
|
4550 |
msgid ""
|
4551 |
"There was a problem with the status check for your account. Please try "
|
4552 |
"disconnecting and connecting again. If the problem persists, please contact "
|
4553 |
"support."
|
4554 |
msgstr ""
|
4555 |
|
4556 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:226
|
4557 |
msgid "Set up an account to receive payment from PayPal"
|
4558 |
msgstr ""
|
4559 |
|
4560 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:230
|
4561 |
msgid "Confirm your primary email address"
|
4562 |
msgstr ""
|
4563 |
|
4564 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:241
|
4565 |
msgid ""
|
4566 |
"Your account was expected to be able to accept custom payments, but is not. "
|
4567 |
"Please make sure your\n"
|
4569 |
"persists, please contact PayPal."
|
4570 |
msgstr ""
|
4571 |
|
4572 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:260
|
4573 |
msgid "Reach out to PayPal to enable PPCP_CUSTOM for your account"
|
4574 |
msgstr ""
|
4575 |
|
4576 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Signup.php:272
|
4577 |
msgid "Reach out to PayPal to resolve the following capabilities:"
|
4578 |
msgstr ""
|
4579 |
|
4627 |
msgstr ""
|
4628 |
|
4629 |
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php:79
|
4630 |
+
#: src/Tickets/Commerce/Status/Reversed.php:46
|
4631 |
msgid "Reversed"
|
4632 |
msgstr ""
|
4633 |
|
4651 |
msgid "Change %1$s in PayPal from webhook: %2$s"
|
4652 |
msgstr ""
|
4653 |
|
4654 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:50
|
4655 |
+
msgid "Stripe"
|
4656 |
+
msgstr ""
|
4657 |
+
|
4658 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:60
|
4659 |
+
msgid "Stripe wasn't able to complete your connection request. Try again."
|
4660 |
+
msgstr ""
|
4661 |
+
|
4662 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:65
|
4663 |
+
msgid ""
|
4664 |
+
"Stripe signup was successful but the authentication tokens could not be "
|
4665 |
+
"retrieved. Try refreshing the tokens."
|
4666 |
+
msgstr ""
|
4667 |
+
|
4668 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:70
|
4669 |
+
msgid "Disconnecting from Stripe failed. Please try again."
|
4670 |
+
msgstr ""
|
4671 |
+
|
4672 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:80
|
4673 |
+
msgid ""
|
4674 |
+
"Due to Regulatory Issues between Stripe and the country listed in your "
|
4675 |
+
"Stripe account, the free version of Event Tickets cannot accept connections "
|
4676 |
+
"from accounts in your country. Please use a Stripe account from a different "
|
4677 |
+
"country or purchase Event Tickets Plus to continue."
|
4678 |
+
msgstr ""
|
4679 |
+
|
4680 |
+
#. Translators: %1$s is the opening <a> tag for the Payments Tab page link.
|
4681 |
+
#. %2$s is the closing <a> tag.
|
4682 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:87
|
4683 |
+
msgid ""
|
4684 |
+
"Your stripe account was disconnected from the Stripe dashboard. If you "
|
4685 |
+
"believe this is an error, you can re-connect in the %1$sPayments Tab of the "
|
4686 |
+
"Settings Page%2$s."
|
4687 |
+
msgstr ""
|
4688 |
+
|
4689 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Gateway.php:109
|
4690 |
+
msgid ""
|
4691 |
+
"Enable credit card payments, Afterpay, AliPay, Giropay, Klarna and more."
|
4692 |
+
msgstr ""
|
4693 |
+
|
4694 |
+
#. Translators: %s is the html-formatted response from Stripe servers
|
4695 |
+
#. containing the error messages.
|
4696 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Payment_Intent.php:81
|
4697 |
+
msgid ""
|
4698 |
+
"Stripe reports that it is unable to process charges with the selected "
|
4699 |
+
"Payment Methods. Usually this means that one of the methods selected is not "
|
4700 |
+
"available or not configured in your Stripe account. The errors you see below "
|
4701 |
+
"were returned from Stripe, please correct any inconsistencies or contact "
|
4702 |
+
"Stripe support, then try again: <div class=\"stripe-errors\">%s</div>"
|
4703 |
+
msgstr ""
|
4704 |
+
|
4705 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Payment_Intent.php:278
|
4706 |
+
msgid "Payment methods accepted cannot be empty"
|
4707 |
+
msgstr ""
|
4708 |
+
|
4709 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php:92
|
4710 |
+
msgid ""
|
4711 |
+
"There was an error enabling Stripe on your cart. More information is "
|
4712 |
+
"available in the Event Tickets settings dashboard. Please contact the site "
|
4713 |
+
"administrator for support."
|
4714 |
+
msgstr ""
|
4715 |
+
|
4716 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:160
|
4717 |
+
msgid "Order ID (Payment Intent ID) in Stripe"
|
4718 |
+
msgstr ""
|
4719 |
+
|
4720 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:173
|
4721 |
+
msgid "Client Secret from Stripe"
|
4722 |
+
msgstr ""
|
4723 |
+
|
4724 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:269
|
4725 |
+
msgid "Order ID in Stripe"
|
4726 |
+
msgstr ""
|
4727 |
+
|
4728 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:332
|
4729 |
+
msgid "Completing the Stripe PaymentIntent failed. Please try again."
|
4730 |
+
msgstr ""
|
4731 |
+
|
4732 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:333
|
4733 |
+
msgid "Creating new Stripe PaymentIntent failed. Please try again."
|
4734 |
+
msgstr ""
|
4735 |
+
|
4736 |
+
#: src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php:334
|
4737 |
+
msgid "Creating new Stripe order failed. Please try again."
|
4738 |
+
msgstr ""
|
4739 |
+
|
4740 |
+
#. Translators: %1$s The tickets commerce currency. %2$s: The currency from the
|
4741 |
+
#. Stripe account.
|
4742 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:178
|
4743 |
+
msgid ""
|
4744 |
+
"Tickets Commerce is configured to use %1$s as its currency but the default "
|
4745 |
+
"currency for the connected stripe account is %2$s. Using different "
|
4746 |
+
"currencies for Tickets Commerce and Stripe may not be supported by all "
|
4747 |
+
"payment methods available in %1$s, and may result in exchange rates and "
|
4748 |
+
"conversions from %1$s to %2$s being handled by Stripe. If you believe this "
|
4749 |
+
"is an error, you can modify the Tickets Commerce currency in the main "
|
4750 |
+
"Payments tab."
|
4751 |
+
msgstr ""
|
4752 |
+
|
4753 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:194
|
4754 |
+
#: src/Tribe/Admin/Settings/Service_Provider.php:146
|
4755 |
+
#: src/Tribe/Admin/Settings/Service_Provider.php:194
|
4756 |
+
#: src/admin-views/admin-welcome-message.php:157
|
4757 |
+
#: src/admin-views/admin-welcome-message.php:179
|
4758 |
+
#: src/admin-views/admin-welcome-message.php:199
|
4759 |
+
msgid "Learn more"
|
4760 |
+
msgstr ""
|
4761 |
+
|
4762 |
+
#. Translators: %1$s: Opening `<a>` tag for KB article link. %2$s: Closing
|
4763 |
+
#. `<a>` tag.
|
4764 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:199
|
4765 |
+
msgid ""
|
4766 |
+
"Additional payment methods are available based on currency and location and "
|
4767 |
+
"must be enabled individually within your Stripe account. %1$sLearn more%2$s"
|
4768 |
+
msgstr ""
|
4769 |
+
|
4770 |
+
#. Translators: %1$s: Opening `<span>` tag. %2$s: The currency name. %3$s:
|
4771 |
+
#. Closing `</span>` tag. %4$s: Opening `<a>` tag for Stripe link. %5$s:
|
4772 |
+
#. Closing `</a>` tag.
|
4773 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:206
|
4774 |
+
msgid ""
|
4775 |
+
"%1$sPayment methods available for %2$s%3$s.<br /><br /> The payment methods "
|
4776 |
+
"listed here are dependent on the currency selected for Tickets Commerce and "
|
4777 |
+
"the currency each payment method support. You can review the payment methods "
|
4778 |
+
"and their availablity for each currency on %4$sStripe's documentation%5$s."
|
4779 |
+
"<br /><br />"
|
4780 |
+
msgstr ""
|
4781 |
+
|
4782 |
+
#. Translators: %1$s: The Event Tickets Plus link.
|
4783 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:216
|
4784 |
+
msgid ""
|
4785 |
+
"You are using the free Stripe payment gateway integration. This includes an "
|
4786 |
+
"additional 2%% fee for processing ticket sales. This fee is removed if you "
|
4787 |
+
"have an active subscription to Event Tickets Plus. %1$s."
|
4788 |
+
msgstr ""
|
4789 |
+
|
4790 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:248
|
4791 |
+
msgid "Stripe Settings"
|
4792 |
+
msgstr ""
|
4793 |
+
|
4794 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:252
|
4795 |
+
msgid "General"
|
4796 |
+
msgstr ""
|
4797 |
+
|
4798 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:256
|
4799 |
+
msgid "Statement Descriptor"
|
4800 |
+
msgstr ""
|
4801 |
+
|
4802 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:257
|
4803 |
+
msgid ""
|
4804 |
+
"This is the text that appears on the ticket purchaser bank statements. If "
|
4805 |
+
"left blank, the descriptor set in Stripe will be used."
|
4806 |
+
msgstr ""
|
4807 |
+
|
4808 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:266
|
4809 |
+
msgid "Enable Stripe Receipt Emails"
|
4810 |
+
msgstr ""
|
4811 |
+
|
4812 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:267
|
4813 |
+
msgid ""
|
4814 |
+
"If this option is selected, ticket buyers will get stripe receipts, as well "
|
4815 |
+
"as Event Tickets confirmation emails."
|
4816 |
+
msgstr ""
|
4817 |
+
|
4818 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:273
|
4819 |
+
msgid "Checkout Settings"
|
4820 |
+
msgstr ""
|
4821 |
+
|
4822 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:278
|
4823 |
+
#: src/views/registration/button-checkout.php:31
|
4824 |
+
msgid "Checkout"
|
4825 |
+
msgstr ""
|
4826 |
+
|
4827 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:282
|
4828 |
+
msgid "Checkout Type"
|
4829 |
+
msgstr ""
|
4830 |
+
|
4831 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:287
|
4832 |
+
msgid "Accept only credit card payments."
|
4833 |
+
msgstr ""
|
4834 |
+
|
4835 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:288
|
4836 |
+
msgid ""
|
4837 |
+
"Accept credit card payments and additional payment methods configured in "
|
4838 |
+
"Stripe."
|
4839 |
+
msgstr ""
|
4840 |
+
|
4841 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:293
|
4842 |
+
msgid "Credit Card field format"
|
4843 |
+
msgstr ""
|
4844 |
+
|
4845 |
+
#. Translators: %1$s: Opening `<span>` tag. %2$s: Closing `</span>` tag.
|
4846 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:304
|
4847 |
+
msgid "Single field. %1$sFor streamlined checkout.%2$s"
|
4848 |
+
msgstr ""
|
4849 |
+
|
4850 |
+
#. Translators: %1$s: Opening `<span>` tag. %2$s: Closing `</span>` tag.
|
4851 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:310
|
4852 |
+
msgid "Multiple fields. %1$sFor standard checkout.%2$s"
|
4853 |
+
msgstr ""
|
4854 |
+
|
4855 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:318
|
4856 |
+
msgid "Payment methods accepted"
|
4857 |
+
msgstr ""
|
4858 |
+
|
4859 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:355
|
4860 |
+
msgid "Credit Cards"
|
4861 |
+
msgstr ""
|
4862 |
+
|
4863 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:392
|
4864 |
+
msgid "AfterPay and ClearPay"
|
4865 |
+
msgstr ""
|
4866 |
+
|
4867 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:396
|
4868 |
+
msgid "Alipay"
|
4869 |
+
msgstr ""
|
4870 |
+
|
4871 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:400
|
4872 |
+
msgid "Giropay"
|
4873 |
+
msgstr ""
|
4874 |
+
|
4875 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Settings.php:404
|
4876 |
+
msgid "Klarna"
|
4877 |
+
msgstr ""
|
4878 |
+
|
4879 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Account_Webhook.php:72
|
4880 |
+
msgid "Account deauthorized is not the same as account connected."
|
4881 |
+
msgstr ""
|
4882 |
+
|
4883 |
+
#. Translators: %s is the payment intent id.
|
4884 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Charge_Webhook.php:30
|
4885 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php:48
|
4886 |
+
msgid "Payment Intent %s does not correspond to a known order."
|
4887 |
+
msgstr ""
|
4888 |
+
|
4889 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php:216
|
4890 |
+
msgid "Canceled payments"
|
4891 |
+
msgstr ""
|
4892 |
+
|
4893 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php:217
|
4894 |
+
msgid "Created payments"
|
4895 |
+
msgstr ""
|
4896 |
+
|
4897 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php:218
|
4898 |
+
msgid "Failed payments"
|
4899 |
+
msgstr ""
|
4900 |
+
|
4901 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php:219
|
4902 |
+
msgid "Pending payments"
|
4903 |
+
msgstr ""
|
4904 |
+
|
4905 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php:220
|
4906 |
+
msgid "Action required payments"
|
4907 |
+
msgstr ""
|
4908 |
+
|
4909 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php:221
|
4910 |
+
msgid "Successful payments"
|
4911 |
+
msgstr ""
|
4912 |
+
|
4913 |
+
#. Translators: %1$s is the event id and %2$s is the event type name.
|
4914 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php:61
|
4915 |
+
msgid ""
|
4916 |
+
"Event %1$s was received but events of type %2$s are not currently handled."
|
4917 |
+
msgstr ""
|
4918 |
+
|
4919 |
+
#. Translators: %1$s is the event type name.
|
4920 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php:107
|
4921 |
+
msgid "Event was received but events of type %1$s are not currently handled."
|
4922 |
+
msgstr ""
|
4923 |
+
|
4924 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php:40
|
4925 |
+
msgid "Payment Intent Test Successful"
|
4926 |
+
msgstr ""
|
4927 |
+
|
4928 |
+
#. Translators: %s is the payment intent id
|
4929 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php:58
|
4930 |
+
msgid ""
|
4931 |
+
"Payment Intent %s does not require an update or is a duplicate of a past "
|
4932 |
+
"event."
|
4933 |
+
msgstr ""
|
4934 |
+
|
4935 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:78
|
4936 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:156
|
4937 |
+
msgid "Webhooks not validated yet."
|
4938 |
+
msgstr ""
|
4939 |
+
|
4940 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:116
|
4941 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:158
|
4942 |
+
msgid "Webhooks were properly validated for sales."
|
4943 |
+
msgstr ""
|
4944 |
+
|
4945 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:162
|
4946 |
+
msgid "Webhook validation will not work in Tickets Commerce test mode."
|
4947 |
+
msgstr ""
|
4948 |
+
|
4949 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:172
|
4950 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:35
|
4951 |
+
msgid "Webhooks"
|
4952 |
+
msgstr ""
|
4953 |
+
|
4954 |
+
#. Translators: %1$s A link to the KB article. %2$s closing `</a>` link.
|
4955 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:180
|
4956 |
+
msgid ""
|
4957 |
+
"Setting up webhooks will enable you to receive notifications on charge "
|
4958 |
+
"statuses and keep order information up to date for asynchronous payments. "
|
4959 |
+
"%1$sLearn more%2$s"
|
4960 |
+
msgstr ""
|
4961 |
+
|
4962 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:189
|
4963 |
+
msgid "Webhooks URL"
|
4964 |
+
msgstr ""
|
4965 |
+
|
4966 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:200
|
4967 |
+
msgid "Signing Secret"
|
4968 |
+
msgstr ""
|
4969 |
+
|
4970 |
+
#: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php:208
|
4971 |
+
msgid "Validating signing key with Stripe, please wait."
|
4972 |
+
msgstr ""
|
4973 |
+
|
4974 |
#: src/Tickets/Commerce/Legacy_Compat.php:86
|
4975 |
msgid "Tribe Commerce ( Legacy PayPal, not recommended )"
|
4976 |
msgstr ""
|
4980 |
msgid "(deleted)"
|
4981 |
msgstr ""
|
4982 |
|
4983 |
+
#: src/Tickets/Commerce/Module.php:20 src/Tickets/Commerce/Payments_Tab.php:181
|
4984 |
msgid "Tickets Commerce"
|
4985 |
msgstr ""
|
4986 |
|
4990 |
msgid "Orders"
|
4991 |
msgstr ""
|
4992 |
|
4993 |
+
#: src/Tickets/Commerce/Payments_Tab.php:109
|
4994 |
msgid "Payments"
|
4995 |
msgstr ""
|
4996 |
|
4997 |
+
#: src/Tickets/Commerce/Payments_Tab.php:281 src/Tribe/Admin/Notices.php:214
|
4998 |
#: src/Tribe/Main.php:666 src/admin-views/admin-welcome-message.php:56
|
4999 |
#: src/admin-views/tribe-commerce-settings.php:4
|
5000 |
msgid "Event Tickets Plus"
|
5001 |
msgstr ""
|
5002 |
|
5003 |
+
#. Translators: %1$s: The Event Tickets Plus link.
|
5004 |
+
#: src/Tickets/Commerce/Payments_Tab.php:286
|
|
|
|
|
|
|
|
|
|
|
|
|
5005 |
msgctxt "about Tickets Commerce"
|
5006 |
msgid ""
|
5007 |
+
"Tickets Commerce provides a simple and flexible ecommerce checkout for "
|
5008 |
+
"purchasing tickets. Just choose your payment gateway and configure checkout "
|
5009 |
+
"options and you're all set. If you need more advanced features like custom "
|
5010 |
+
"attendee information, QR code check in, and stock sharing between tickets, "
|
5011 |
+
"take a look at %1$s for these features and more."
|
|
|
5012 |
msgstr ""
|
5013 |
|
5014 |
+
#: src/Tickets/Commerce/Payments_Tab.php:303
|
5015 |
msgid "Enable Tickets Commerce"
|
5016 |
msgstr ""
|
5017 |
|
5018 |
+
#. Translators: %s: Name of payment gateway.
|
5019 |
+
#: src/Tickets/Commerce/Payments_Tab.php:338
|
5020 |
+
msgid "Enable %s"
|
5021 |
+
msgstr ""
|
5022 |
+
|
5023 |
+
#: src/Tickets/Commerce/Payments_Tab.php:444
|
5024 |
msgid "Tickets Checkout"
|
5025 |
msgstr ""
|
5026 |
|
5027 |
+
#: src/Tickets/Commerce/Payments_Tab.php:473
|
5028 |
msgid "Order Completed"
|
5029 |
msgstr ""
|
5030 |
|
5135 |
msgid "%s - Tickets Commerce Orders"
|
5136 |
msgstr ""
|
5137 |
|
5138 |
+
#: src/Tickets/Commerce/Settings.php:181
|
5139 |
msgid "Tickets Commerce Test Mode Active"
|
5140 |
msgstr ""
|
5141 |
|
5142 |
+
#: src/Tickets/Commerce/Settings.php:221
|
5143 |
msgid "-- No page set --"
|
5144 |
msgstr ""
|
5145 |
|
5146 |
+
#: src/Tickets/Commerce/Settings.php:236
|
5147 |
msgid "Tickets Commerce Settings"
|
5148 |
msgstr ""
|
5149 |
|
5150 |
+
#: src/Tickets/Commerce/Settings.php:240
|
5151 |
msgid "Enable Test Mode"
|
5152 |
msgstr ""
|
5153 |
|
5154 |
+
#: src/Tickets/Commerce/Settings.php:241
|
5155 |
msgid ""
|
5156 |
"Enables Test mode for testing payments. Any payments made will be done on "
|
5157 |
"\"sandbox\" accounts."
|
5158 |
msgstr ""
|
5159 |
|
5160 |
+
#: src/Tickets/Commerce/Settings.php:247
|
5161 |
#: src/admin-views/tribe-commerce-settings.php:136
|
5162 |
msgid "Currency Code"
|
5163 |
msgstr ""
|
5164 |
|
5165 |
+
#: src/Tickets/Commerce/Settings.php:248
|
5166 |
msgid "The currency that will be used for Tickets Commerce transactions."
|
5167 |
msgstr ""
|
5168 |
|
5169 |
+
#: src/Tickets/Commerce/Settings.php:255
|
5170 |
#: src/admin-views/tribe-commerce-settings.php:144
|
5171 |
msgid "Stock Handling"
|
5172 |
msgstr ""
|
5173 |
|
5174 |
#. Translators: %s: The word "ticket" in lowercase.
|
5175 |
+
#: src/Tickets/Commerce/Settings.php:259
|
5176 |
msgctxt "tickets fields settings paypal stock handling"
|
5177 |
msgid ""
|
5178 |
"When a customer purchases a %s, the payment gateway might flag the order as "
|
5182 |
|
5183 |
#. Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening
|
5184 |
#. tag. %3$s: `</strong>` closing tag.
|
5185 |
+
#: src/Tickets/Commerce/Settings.php:268
|
5186 |
msgid ""
|
5187 |
"Decrease available %1$s stock as soon as a %2$sPending%3$s order is created."
|
5188 |
msgstr ""
|
5189 |
|
5190 |
#. Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening
|
5191 |
#. tag. %3$s: `</strong>` closing tag.
|
5192 |
+
#: src/Tickets/Commerce/Settings.php:275
|
5193 |
msgid ""
|
5194 |
"Only decrease available %1$s stock if an order is confirmed as %2$sCompleted"
|
5195 |
"%3$s by the payment gateway."
|
5196 |
msgstr ""
|
5197 |
|
5198 |
+
#: src/Tickets/Commerce/Settings.php:285
|
5199 |
msgid "Checkout page"
|
5200 |
msgstr ""
|
5201 |
|
5202 |
#. Translators: %s: The [shortcode] for the success page.
|
5203 |
+
#: src/Tickets/Commerce/Settings.php:289
|
5204 |
msgid ""
|
5205 |
"This is the page where customers go to complete their purchase. Use the %s "
|
5206 |
"shortcode to display the checkout experience in the page content."
|
5207 |
msgstr ""
|
5208 |
|
5209 |
+
#: src/Tickets/Commerce/Settings.php:300
|
5210 |
#: src/admin-views/tribe-commerce-settings.php:162
|
5211 |
msgid "Success page"
|
5212 |
msgstr ""
|
5213 |
|
5214 |
#. Translators: %s: The [shortcode] for the success page.
|
5215 |
+
#: src/Tickets/Commerce/Settings.php:304
|
5216 |
msgid ""
|
5217 |
"After a successful order, users will be redirected to this page. Use the %s "
|
5218 |
"shortcode to display the order confirmation to the user in the page content."
|
5219 |
msgstr ""
|
5220 |
|
5221 |
+
#: src/Tickets/Commerce/Settings.php:315
|
5222 |
#: src/admin-views/tribe-commerce-settings.php:176
|
5223 |
msgid "Confirmation email sender address"
|
5224 |
msgstr ""
|
5225 |
|
5226 |
#. Translators: %s: The word "tickets" in lowercase.
|
5227 |
+
#: src/Tickets/Commerce/Settings.php:319
|
5228 |
msgctxt "tickets fields settings confirmation email"
|
5229 |
msgid ""
|
5230 |
"Email address that %s customers will receive confirmation from. Leave empty "
|
5231 |
"to use the default WordPress site email address."
|
5232 |
msgstr ""
|
5233 |
|
5234 |
+
#: src/Tickets/Commerce/Settings.php:330
|
5235 |
#: src/admin-views/tribe-commerce-settings.php:185
|
5236 |
msgid "Confirmation email sender name"
|
5237 |
msgstr ""
|
5238 |
|
5239 |
#. Translators: %s: The word "ticket" in lowercase.
|
5240 |
+
#: src/Tickets/Commerce/Settings.php:334
|
5241 |
#: src/admin-views/tribe-commerce-settings.php:186
|
5242 |
msgctxt "tickets fields settings paypal email sender"
|
5243 |
msgid ""
|
5245 |
"purchase."
|
5246 |
msgstr ""
|
5247 |
|
5248 |
+
#: src/Tickets/Commerce/Settings.php:345
|
5249 |
#: src/admin-views/tribe-commerce-settings.php:194
|
5250 |
msgid "Confirmation email subject"
|
5251 |
msgstr ""
|
5252 |
|
5253 |
#. Translators: %s: The word "ticket" in lowercase.
|
5254 |
+
#: src/Tickets/Commerce/Settings.php:349
|
5255 |
#: src/admin-views/tribe-commerce-settings.php:195
|
5256 |
msgctxt "tickets fields settings paypal email subject"
|
5257 |
msgid ""
|
5260 |
msgstr ""
|
5261 |
|
5262 |
#. Translators: %s: The word "tickets" in lowercase.
|
5263 |
+
#: src/Tickets/Commerce/Settings.php:357
|
5264 |
#: src/admin-views/tribe-commerce-settings.php:197
|
5265 |
msgctxt "tickets fields settings paypal email subject"
|
5266 |
msgid "You have %s!"
|
5267 |
msgstr ""
|
5268 |
|
5269 |
+
#: src/Tickets/Commerce/Settings.php:372
|
5270 |
+
msgid "Payment Gateways"
|
5271 |
+
msgstr ""
|
5272 |
+
|
5273 |
+
#: src/Tickets/Commerce/Settings.php:384
|
5274 |
+
#: src/admin-views/settings/featured/link.php:33
|
5275 |
+
msgid "Learn more about configuring payment options with Tickets Commerce"
|
5276 |
+
msgstr ""
|
5277 |
+
|
5278 |
#: src/Tickets/Commerce/Status/Action_Required.php:29
|
5279 |
msgid "Action Required"
|
5280 |
msgstr ""
|
5293 |
msgid "Created"
|
5294 |
msgstr ""
|
5295 |
|
5296 |
+
#: src/Tickets/Commerce/Status/Denied.php:48
|
5297 |
msgid "Denied"
|
5298 |
msgstr ""
|
5299 |
|
5305 |
msgid "Pending"
|
5306 |
msgstr ""
|
5307 |
|
5308 |
+
#: src/Tickets/Commerce/Status/Pending.php:99
|
5309 |
msgid "This order contained an invalid Ticket (ID: %1$d)"
|
5310 |
msgstr ""
|
5311 |
|
5312 |
+
#: src/Tickets/Commerce/Status/Pending.php:114
|
5313 |
msgid "This order contained a Ticket with an invalid Event (Event ID: %1$d)"
|
5314 |
msgstr ""
|
5315 |
|
5316 |
+
#: src/Tickets/Commerce/Status/Pending.php:128
|
5317 |
msgid "Cannot purchase zero of \"%1$s\""
|
5318 |
msgstr ""
|
5319 |
|
5320 |
+
#: src/Tickets/Commerce/Status/Pending.php:145
|
5321 |
msgid "Insufficient stock for \"%1$s\""
|
5322 |
msgstr ""
|
5323 |
|
5324 |
+
#: src/Tickets/Commerce/Status/Pending.php:161
|
5325 |
msgid "%s will be available on %s at %s"
|
5326 |
msgstr ""
|
5327 |
|
5328 |
+
#: src/Tickets/Commerce/Status/Pending.php:163 src/Tribe/Tickets.php:3195
|
5329 |
msgid "%s are no longer available."
|
5330 |
msgstr ""
|
5331 |
|
5332 |
+
#: src/Tickets/Commerce/Status/Pending.php:165 src/Tribe/Tickets.php:3197
|
5333 |
msgid "There are no %s available at this time."
|
5334 |
msgstr ""
|
5335 |
|
5336 |
+
#: src/Tickets/Commerce/Status/Refunded.php:46
|
5337 |
msgid "Refunded"
|
5338 |
msgstr ""
|
5339 |
|
5341 |
msgid "Undefined"
|
5342 |
msgstr ""
|
5343 |
|
5344 |
+
#: src/Tickets/Commerce/Status/Voided.php:48
|
5345 |
msgid "Voided"
|
5346 |
msgstr ""
|
5347 |
|
5371 |
msgid "unavailable"
|
5372 |
msgstr ""
|
5373 |
|
5374 |
+
#: src/Tickets/Commerce/Utils/Currency.php:344
|
5375 |
#: src/Tribe/Commerce/Currency.php:197
|
5376 |
msgid "Australian Dollar (AUD)"
|
5377 |
msgstr ""
|
5378 |
|
5379 |
+
#: src/Tickets/Commerce/Utils/Currency.php:352
|
5380 |
#: src/Tribe/Commerce/Currency.php:203
|
5381 |
msgid "Brazilian Real (BRL)"
|
5382 |
msgstr ""
|
5383 |
|
5384 |
+
#: src/Tickets/Commerce/Utils/Currency.php:360
|
5385 |
#: src/Tribe/Commerce/Currency.php:209
|
5386 |
msgid "Canadian Dollar (CAD)"
|
5387 |
msgstr ""
|
5388 |
|
5389 |
+
#: src/Tickets/Commerce/Utils/Currency.php:368
|
5390 |
#: src/Tribe/Commerce/Currency.php:215
|
5391 |
msgid "Swiss Franc (CHF)"
|
5392 |
msgstr ""
|
5393 |
|
5394 |
+
#: src/Tickets/Commerce/Utils/Currency.php:376
|
5395 |
#: src/Tribe/Commerce/Currency.php:221
|
5396 |
msgid "Czech Koruna (CZK)"
|
5397 |
msgstr ""
|
5398 |
|
5399 |
+
#: src/Tickets/Commerce/Utils/Currency.php:385
|
5400 |
#: src/Tribe/Commerce/Currency.php:228
|
5401 |
msgid "Danish Krone (DKK)"
|
5402 |
msgstr ""
|
5403 |
|
5404 |
+
#: src/Tickets/Commerce/Utils/Currency.php:393
|
5405 |
#: src/Tribe/Commerce/Currency.php:234
|
5406 |
msgid "Euro (EUR)"
|
5407 |
msgstr ""
|
5408 |
|
5409 |
+
#: src/Tickets/Commerce/Utils/Currency.php:401
|
5410 |
#: src/Tribe/Commerce/Currency.php:240
|
5411 |
msgid "Pound Sterling (GBP)"
|
5412 |
msgstr ""
|
5413 |
|
5414 |
+
#: src/Tickets/Commerce/Utils/Currency.php:409
|
5415 |
#: src/Tribe/Commerce/Currency.php:246
|
5416 |
msgid "Hong Kong Dollar (HKD)"
|
5417 |
msgstr ""
|
5418 |
|
5419 |
+
#: src/Tickets/Commerce/Utils/Currency.php:417
|
5420 |
#: src/Tribe/Commerce/Currency.php:252
|
5421 |
msgid "Hungarian Forint (HUF)"
|
5422 |
msgstr ""
|
5423 |
|
5424 |
+
#: src/Tickets/Commerce/Utils/Currency.php:425
|
5425 |
#: src/Tribe/Commerce/Currency.php:258
|
5426 |
msgid "Israeli New Sheqel (ILS)"
|
5427 |
msgstr ""
|
5428 |
|
5429 |
+
#: src/Tickets/Commerce/Utils/Currency.php:433
|
5430 |
#: src/Tribe/Commerce/Currency.php:264
|
5431 |
msgid "Indian Rupee (INR)"
|
5432 |
msgstr ""
|
5433 |
|
5434 |
+
#: src/Tickets/Commerce/Utils/Currency.php:441
|
5435 |
#: src/Tribe/Commerce/Currency.php:270
|
5436 |
msgid "Japanese Yen (JPY)"
|
5437 |
msgstr ""
|
5438 |
|
5439 |
+
#: src/Tickets/Commerce/Utils/Currency.php:449
|
5440 |
#: src/Tribe/Commerce/Currency.php:276
|
5441 |
msgid "Malaysian Ringgit (MYR)"
|
5442 |
msgstr ""
|
5443 |
|
5444 |
+
#: src/Tickets/Commerce/Utils/Currency.php:457
|
5445 |
#: src/Tribe/Commerce/Currency.php:282
|
5446 |
msgid "Mexican Peso (MXN)"
|
5447 |
msgstr ""
|
5448 |
|
5449 |
+
#: src/Tickets/Commerce/Utils/Currency.php:465
|
5450 |
#: src/Tribe/Commerce/Currency.php:288
|
5451 |
msgid "Norwegian Krone (NOK)"
|
5452 |
msgstr ""
|
5453 |
|
5454 |
+
#: src/Tickets/Commerce/Utils/Currency.php:473
|
5455 |
#: src/Tribe/Commerce/Currency.php:294
|
5456 |
msgid "New Zealand Dollar (NZD)"
|
5457 |
msgstr ""
|
5458 |
|
5459 |
+
#: src/Tickets/Commerce/Utils/Currency.php:481
|
5460 |
#: src/Tribe/Commerce/Currency.php:300
|
5461 |
msgid "Philippine Peso (PHP)"
|
5462 |
msgstr ""
|
5463 |
|
5464 |
+
#: src/Tickets/Commerce/Utils/Currency.php:489
|
5465 |
#: src/Tribe/Commerce/Currency.php:306
|
5466 |
msgid "Polish Zloty (PLN)"
|
5467 |
msgstr ""
|
5468 |
|
5469 |
+
#: src/Tickets/Commerce/Utils/Currency.php:497
|
5470 |
#: src/Tribe/Commerce/Currency.php:312
|
5471 |
msgid "Russian Ruble (RUB)"
|
5472 |
msgstr ""
|
5473 |
|
5474 |
+
#: src/Tickets/Commerce/Utils/Currency.php:505
|
5475 |
#: src/Tribe/Commerce/Currency.php:318
|
5476 |
msgid "Swedish Krona (SEK)"
|
5477 |
msgstr ""
|
5478 |
|
5479 |
+
#: src/Tickets/Commerce/Utils/Currency.php:513
|
5480 |
#: src/Tribe/Commerce/Currency.php:324
|
5481 |
msgid "Singapore Dollar (SGD)"
|
5482 |
msgstr ""
|
5483 |
|
5484 |
+
#: src/Tickets/Commerce/Utils/Currency.php:521
|
5485 |
#: src/Tribe/Commerce/Currency.php:330
|
5486 |
msgid "Thai Baht (THB)"
|
5487 |
msgstr ""
|
5488 |
|
5489 |
+
#: src/Tickets/Commerce/Utils/Currency.php:529
|
5490 |
#: src/Tribe/Commerce/Currency.php:336
|
5491 |
msgid "Taiwan New Dollar (TWD)"
|
5492 |
msgstr ""
|
5493 |
|
5494 |
+
#: src/Tickets/Commerce/Utils/Currency.php:537
|
5495 |
#: src/Tribe/Commerce/Currency.php:342
|
5496 |
msgid "U.S. Dollar (USD)"
|
5497 |
msgstr ""
|
5744 |
msgid "Get started"
|
5745 |
msgstr ""
|
5746 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5747 |
#: src/Tribe/Admin/Settings/Service_Provider.php:191
|
5748 |
msgid ""
|
5749 |
"Tribe Commerce has been replaced by our new payments system, Tickets "
|
6177 |
msgid "Are you sure you want to cancel?"
|
6178 |
msgstr ""
|
6179 |
|
6180 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:282 src/Tribe/Tickets.php:4329
|
6181 |
msgctxt "Error message title, will be followed by the error code."
|
6182 |
msgid "API Error"
|
6183 |
msgstr ""
|
6184 |
|
6185 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:283 src/Tribe/Tickets.php:4330
|
6186 |
msgid ""
|
6187 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
6188 |
"repeatedly, please contact the Site Admin."
|
6189 |
msgstr ""
|
6190 |
|
6191 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:284 src/Tribe/Tickets.php:4331
|
6192 |
msgid ""
|
6193 |
"The ticket for this event has sold out and has been removed from your cart."
|
6194 |
msgstr ""
|
6195 |
|
6196 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:285 src/Tribe/Tickets.php:4332
|
6197 |
#: src/views/v2/commerce/order/header/title-empty.php:28
|
6198 |
msgid "Whoops!"
|
6199 |
msgstr ""
|
6200 |
|
6201 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:286 src/Tribe/Tickets.php:4333
|
6202 |
msgctxt "The %s will change based on the error produced."
|
6203 |
msgid "You have %s ticket(s) with a field that requires information."
|
6204 |
msgstr ""
|
8419 |
msgid "New!"
|
8420 |
msgstr ""
|
8421 |
|
8422 |
+
#. Translators: %s: Name of payment gateway.
|
8423 |
+
#: src/admin-views/settings/tickets-commerce/gateways/button.php:32
|
8424 |
+
msgid "Connect to %s"
|
8425 |
+
msgstr ""
|
8426 |
+
|
8427 |
+
#. Translators: %s: Name of payment gateway.
|
8428 |
+
#: src/admin-views/settings/tickets-commerce/gateways/button.php:39
|
8429 |
+
msgid "Edit %s Connection"
|
8430 |
+
msgstr ""
|
8431 |
+
|
8432 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-access-token.php:37
|
8433 |
msgid "Refresh Access Token"
|
8434 |
msgstr ""
|
8435 |
|
8436 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-connection.php:40
|
8437 |
msgid "Resync payment connection"
|
8438 |
msgstr ""
|
8439 |
|
8440 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-user-info.php:38
|
8441 |
msgid "Refresh User Info"
|
8442 |
msgstr ""
|
8443 |
|
8444 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-webhook.php:38
|
8445 |
msgid "Refresh Webhook"
|
8446 |
msgstr ""
|
8447 |
|
8448 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php:35
|
8449 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/connection.php:25
|
8450 |
msgid "Connected as:"
|
8451 |
msgstr ""
|
8452 |
|
8453 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php:45
|
8454 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/connection.php:35
|
8455 |
msgid "Disconnect"
|
8456 |
msgstr ""
|
8457 |
|
8458 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php:26
|
8459 |
msgid "PayPal Status:"
|
8460 |
msgstr ""
|
8461 |
|
8462 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php:30
|
8463 |
msgid "Connected"
|
8464 |
msgstr ""
|
8465 |
|
8466 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/webhooks.php:35
|
8467 |
msgid "Webhooks:"
|
8468 |
msgstr ""
|
8469 |
|
8470 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/webhooks.php:52
|
8471 |
msgid "payment connection error"
|
8472 |
msgstr ""
|
8473 |
|
8476 |
msgstr ""
|
8477 |
|
8478 |
#: src/admin-views/settings/tickets-commerce/paypal/connect/help-links/troubleshooting.php:24
|
8479 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/help-links/troubleshooting.php:23
|
8480 |
msgid "Get troubleshooting help"
|
8481 |
msgstr ""
|
8482 |
|
8483 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php:25
|
8484 |
msgid "Accept online payments with PayPal!"
|
8485 |
msgstr ""
|
8486 |
|
8487 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php:30
|
8488 |
msgid ""
|
8489 |
"Start selling tickets to your events today with PayPal. Attendees can "
|
8490 |
"purchase tickets directly on your site using debit or credit cards with no "
|
8500 |
msgstr ""
|
8501 |
|
8502 |
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:25
|
8503 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/logo/features.php:24
|
8504 |
msgid "Accept payments from around the world"
|
8505 |
msgstr ""
|
8506 |
|
8507 |
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:28
|
8508 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/logo/features.php:27
|
8509 |
msgid "Supports 3D Secure payments"
|
8510 |
msgstr ""
|
8511 |
|
8512 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php:23
|
8513 |
msgid "PayPal Logo Image"
|
8514 |
msgstr ""
|
8515 |
|
8516 |
#. Translators: %1$s: opening `a` tag to the knowledge base article. %2$s:
|
8517 |
#. closing `a` tag to the knowledge base article.
|
8518 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:20
|
8519 |
msgid ""
|
8520 |
"PayPal allows you to accept credit or debit cards directly on your website. "
|
8521 |
"Because of this, your site needs to maintain %1$sPCI-DSS compliance%2$s."
|
8522 |
msgstr ""
|
8523 |
|
8524 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:27
|
8525 |
msgid ""
|
8526 |
"Event Tickets never stores sensitive information like card details to your "
|
8527 |
"server and works seamlessly with SSL certificates."
|
8528 |
msgstr ""
|
8529 |
|
8530 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:29
|
8531 |
msgid "Compliance is comprised of, but not limited to:"
|
8532 |
msgstr ""
|
8533 |
|
8534 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:33
|
8535 |
msgid ""
|
8536 |
"Using a trusted, secure hosting provider — preferably one which claims "
|
8537 |
"and actively promotes PCI compliance."
|
8538 |
msgstr ""
|
8539 |
|
8540 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:39
|
8541 |
msgid "Implement an SSL certificate to keep your ticket sales secure."
|
8542 |
msgstr ""
|
8543 |
|
8544 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:42
|
8545 |
msgid ""
|
8546 |
"Keep WordPress and plugins up to date to ensure latest security fixes are "
|
8547 |
"present."
|
8548 |
msgstr ""
|
8549 |
|
8550 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:52
|
8551 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:65
|
8552 |
msgid "Close this modal window"
|
8553 |
msgstr ""
|
8554 |
|
8555 |
+
#: src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php:54
|
8556 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:67
|
8557 |
msgid "Got it, thanks!"
|
8558 |
msgstr ""
|
8559 |
|
8569 |
msgid "Connect Automatically with <i>PayPal</i>"
|
8570 |
msgstr ""
|
8571 |
|
8572 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/button.php:30
|
8573 |
+
msgid "Edit Your Stripe Settings"
|
8574 |
+
msgstr ""
|
8575 |
+
|
8576 |
+
#. Translators: %1$s is the Stripe currency, %2$s is the Tickets Commerce
|
8577 |
+
#. currency symbol.
|
8578 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-currency.php:31
|
8579 |
+
msgid ""
|
8580 |
+
"Your Stripe account is set to %1$s, but your Tickets Commerce site is set to "
|
8581 |
+
"%2$s. Using different currencies for Tickets Commerce and Stripe may not be "
|
8582 |
+
"supported by all payment methods available in %2$s, and may result in "
|
8583 |
+
"exchange rates and conversions from %2$s to %1$s being handled by Stripe."
|
8584 |
+
msgstr ""
|
8585 |
+
|
8586 |
+
#. Translators: %1$s The opening `<a>` tag with the stripe link, %2$s The
|
8587 |
+
#. closing `</a>` tag.
|
8588 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-currency.php:38
|
8589 |
+
msgid ""
|
8590 |
+
"Please be sure to enable all the payment methods you want to use for this "
|
8591 |
+
"currency on your %1$sstripe dashboard%2$s."
|
8592 |
+
msgstr ""
|
8593 |
+
|
8594 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-currency.php:51
|
8595 |
+
msgid "Stripe currency:"
|
8596 |
+
msgstr ""
|
8597 |
+
|
8598 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php:25
|
8599 |
+
msgid "Payments status:"
|
8600 |
+
msgstr ""
|
8601 |
+
|
8602 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php:40
|
8603 |
+
msgid "Disabled"
|
8604 |
+
msgstr ""
|
8605 |
+
|
8606 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php:40
|
8607 |
+
msgid "Enabled"
|
8608 |
+
msgstr ""
|
8609 |
+
|
8610 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php:51
|
8611 |
+
msgid "Requirements"
|
8612 |
+
msgstr ""
|
8613 |
+
|
8614 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php:64
|
8615 |
+
msgid "Future Requirements"
|
8616 |
+
msgstr ""
|
8617 |
+
|
8618 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/help-links/configuring.php:28
|
8619 |
+
msgid "Learn more about configuring Stripe payments"
|
8620 |
+
msgstr ""
|
8621 |
+
|
8622 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/inactive.php:22
|
8623 |
+
msgid "Accept online payments with Stripe!"
|
8624 |
+
msgstr ""
|
8625 |
+
|
8626 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/inactive.php:27
|
8627 |
+
msgid ""
|
8628 |
+
"Start selling tickets to your events today with Stripe integration for "
|
8629 |
+
"Tickets Commerce. Enable highly-configurable credit and debit card checkout "
|
8630 |
+
"with enhanced features like Afterpay, AliPay, Degiro, Klarna and more.<br>"
|
8631 |
+
msgstr ""
|
8632 |
+
|
8633 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/logo/features.php:18
|
8634 |
+
msgid "Credit, debit card payments and more!"
|
8635 |
+
msgstr ""
|
8636 |
+
|
8637 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/logo/features.php:21
|
8638 |
+
msgid "Easy, streamlined connection"
|
8639 |
+
msgstr ""
|
8640 |
+
|
8641 |
+
#: src/admin-views/settings/tickets-commerce/stripe/connect/logo/image.php:22
|
8642 |
+
msgid "Stripe Logo Image"
|
8643 |
+
msgstr ""
|
8644 |
+
|
8645 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:16
|
8646 |
+
msgid "Currency"
|
8647 |
+
msgstr ""
|
8648 |
+
|
8649 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:18
|
8650 |
+
msgid ""
|
8651 |
+
"Be sure that your Stripe currency matches the currency you have configured "
|
8652 |
+
"for Tickets Commerce, to avoid any issues or unexpected conversion fees."
|
8653 |
+
msgstr ""
|
8654 |
+
|
8655 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:23
|
8656 |
+
msgid "Payment methods"
|
8657 |
+
msgstr ""
|
8658 |
+
|
8659 |
+
#. Translators: %1$s: opening `a` tag to stripe's dashboard. %2$s: closing `a`
|
8660 |
+
#. tag.
|
8661 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:27
|
8662 |
+
msgid ""
|
8663 |
+
"You will have to confirm that the payments methods you have selected to sell "
|
8664 |
+
"tickets are enabled on the %1$sStripe payment methods section%2$s."
|
8665 |
+
msgstr ""
|
8666 |
+
|
8667 |
+
#. Translators: %1$s: opening `a` tag to the knowledge base article. %2$s:
|
8668 |
+
#. closing `a` tag.
|
8669 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:39
|
8670 |
+
msgid ""
|
8671 |
+
"In order for ticket sales to be marked as complete for some payment methods "
|
8672 |
+
"on your Stripe gateway for your Event Tickets site, you must configure the "
|
8673 |
+
"webhook at Stripe. %1$sLearn how to set up webhooks here%2$s."
|
8674 |
+
msgstr ""
|
8675 |
+
|
8676 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:47
|
8677 |
+
msgid "PCI Compliance"
|
8678 |
+
msgstr ""
|
8679 |
+
|
8680 |
+
#. Translators: %1$s: opening `a` tag to the knowledge base article. %2$s:
|
8681 |
+
#. closing `a` tag.
|
8682 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php:51
|
8683 |
+
msgid ""
|
8684 |
+
"Stripe allows you to accept credit or debit cards directly on your website. "
|
8685 |
+
"Because of this, your site needs to maintain %1$sPCI-DSS compliance%2$s."
|
8686 |
+
msgstr ""
|
8687 |
+
|
8688 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/notice-test-mode.php:23
|
8689 |
+
msgid ""
|
8690 |
+
"Your connection is active, but Tickets Commerce is set to test mode. While "
|
8691 |
+
"in test mode no live transactions are processed."
|
8692 |
+
msgstr ""
|
8693 |
+
|
8694 |
+
#: src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete.php:24
|
8695 |
+
msgid "You are now connected to Stripe! What's next?"
|
8696 |
+
msgstr ""
|
8697 |
+
|
8698 |
+
#: src/admin-views/settings/tickets-commerce/stripe/signup-link.php:23
|
8699 |
+
msgid "Get Connected with <i>Stripe</i>"
|
8700 |
+
msgstr ""
|
8701 |
+
|
8702 |
#: src/admin-views/ticket-type-history.php:13
|
8703 |
msgctxt "ticket type history"
|
8704 |
msgid "%s history:"
|
8712 |
msgid "Click to hide history"
|
8713 |
msgstr ""
|
8714 |
|
8715 |
+
#: src/admin-views/tribe-commerce-settings.php:9
|
8716 |
+
msgid "Check it out!"
|
8717 |
+
msgstr ""
|
8718 |
+
|
8719 |
#: src/admin-views/tribe-commerce-settings.php:13
|
8720 |
msgctxt "about Tribe Commerce"
|
8721 |
msgid ""
|
9461 |
|
9462 |
#: src/views/registration/attendees/fields.php:15
|
9463 |
#: src/views/registration-js/attendees/fields.php:19
|
9464 |
+
#: src/views/tickets/email.php:454
|
9465 |
msgid "Attendee"
|
9466 |
msgstr ""
|
9467 |
|
9473 |
msgid "Back to cart"
|
9474 |
msgstr ""
|
9475 |
|
|
|
|
|
|
|
|
|
9476 |
#: src/views/registration/cart-empty.php:15
|
9477 |
msgid "You currently have no events awaiting registration"
|
9478 |
msgstr ""
|
9582 |
msgstr[0] ""
|
9583 |
msgstr[1] ""
|
9584 |
|
9585 |
+
#: src/views/tickets/email.php:439
|
9586 |
msgid "Ticket #"
|
9587 |
msgstr ""
|
9588 |
|
9589 |
+
#: src/views/tickets/email.php:446
|
9590 |
msgctxt "ticket type email heading"
|
9591 |
msgid "%s Type"
|
9592 |
msgstr ""
|
9789 |
msgid "Less info"
|
9790 |
msgstr ""
|
9791 |
|
9792 |
+
#: src/views/v2/commerce/checkout/footer/gateway-error.php:43
|
9793 |
+
#: src/views/v2/commerce/checkout.php:29
|
9794 |
msgid "Checkout Unavailable!"
|
9795 |
msgstr ""
|
9796 |
|
9797 |
+
#: src/views/v2/commerce/checkout/footer/gateway-error.php:44
|
9798 |
msgid ""
|
9799 |
"Checkout is not available at this time because a payment method has not been "
|
9800 |
"set up. Please notify the site administrator."
|
9801 |
msgstr ""
|
9802 |
|
9803 |
+
#: src/views/v2/commerce/checkout/gateways.php:37
|
9804 |
+
msgid "Payment"
|
9805 |
+
msgstr ""
|
9806 |
+
|
9807 |
#. Translators: %1$s: Singular `event` in lowercase.
|
9808 |
#: src/views/v2/commerce/checkout/header/links/back.php:36
|
9809 |
msgid "back to %1$s"
|
9815 |
|
9816 |
#. Translators: %1$s: Plural `Tickets` label.
|
9817 |
#: src/views/v2/commerce/checkout/header/title.php:31
|
9818 |
+
#: src/views/v2/commerce/gateway/stripe/card-element.php:58
|
9819 |
+
#: src/views/v2/commerce/gateway/stripe/payment-element.php:30
|
9820 |
msgid "Purchase %1$s"
|
9821 |
msgstr ""
|
9822 |
|
9833 |
msgid "create a new account"
|
9834 |
msgstr ""
|
9835 |
|
9836 |
+
#: src/views/v2/commerce/checkout/purchaser-info/email.php:34
|
9837 |
+
msgid "Email address:"
|
9838 |
+
msgstr ""
|
9839 |
+
|
9840 |
+
#: src/views/v2/commerce/checkout/purchaser-info/email.php:47
|
9841 |
+
msgid "Your tickets will be sent to this address"
|
9842 |
+
msgstr ""
|
9843 |
+
|
9844 |
+
#: src/views/v2/commerce/checkout/purchaser-info/name.php:33
|
9845 |
+
msgid "Person purchasing tickets:"
|
9846 |
+
msgstr ""
|
9847 |
+
|
9848 |
+
#: src/views/v2/commerce/checkout/purchaser-info.php:27
|
9849 |
+
msgid "Purchaser info"
|
9850 |
+
msgstr ""
|
9851 |
+
|
9852 |
+
#: src/views/v2/commerce/checkout.php:30
|
9853 |
msgid ""
|
9854 |
"Checkout is not available at this time because a payment method has not been "
|
9855 |
"set up for this event. Please notify the site administrator."
|
9856 |
msgstr ""
|
9857 |
|
9858 |
+
#: src/views/v2/commerce/checkout.php:54
|
9859 |
msgid "Checkout Error!"
|
9860 |
msgstr ""
|
9861 |
|
9888 |
msgid "PayPal Capture ID:"
|
9889 |
msgstr ""
|
9890 |
|
9891 |
+
#: src/views/v2/commerce/gateway/stripe/card-element.php:40
|
9892 |
+
msgid "Zip Code"
|
9893 |
+
msgstr ""
|
9894 |
+
|
9895 |
#: src/views/v2/commerce/order/description/order-empty.php:28
|
9896 |
msgid "No order information is available because no purchase was made."
|
9897 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Event Tickets ===
|
2 |
|
3 |
-
Contributors: theeventscalendar, brianjessee, camwynsp,
|
4 |
Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 5.6
|
6 |
-
Tested up to: 5.9.
|
7 |
-
Stable tag: 5.
|
8 |
Requires PHP: 7.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -17,6 +17,8 @@ Manage tickets and RSVPs for free with [Event Tickets](https://evnt.is/1ao8), fr
|
|
17 |
|
18 |
This plugin makes it easy to sell tickets and collect registration for in-person or virtual events. Plus, it comes with features backed by our world-class team of developers and designers. Integrate Event Tickets with your PayPal business account and manage attendees from your WordPress dashboard.
|
19 |
|
|
|
|
|
20 |
https://vimeo.com/480516958
|
21 |
|
22 |
= 🎟️ Ticketing and Registration for WordPress =
|
@@ -37,6 +39,7 @@ Whether your vision is big or small, you're in good company. Thousands of small
|
|
37 |
|
38 |
✔️ Attendees can RSVP to events
|
39 |
✔️ Attendees can purchase tickets to events
|
|
|
40 |
✔️ Add RSVPs and tickets to posts, pages, or custom post types
|
41 |
✔️ Collect ticket fees by connecting your PayPal business account
|
42 |
✔️ Generate sales and attendee reports
|
@@ -44,7 +47,7 @@ Whether your vision is big or small, you're in good company. Thousands of small
|
|
44 |
✔️ Automatic ticket confirmation emails
|
45 |
✔️ Works out of the box with [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
|
46 |
✔️ Responsive design works on all devices
|
47 |
-
✔️ Tested on the major theme frameworks such as Avada, Genesis,
|
48 |
✔️ Internationalized & translated
|
49 |
✔️ Extensive template tags for customization
|
50 |
✔️ Hooks & filters galore
|
@@ -60,7 +63,8 @@ Additional helpful links:
|
|
60 |
|
61 |
* [Guide: Getting Started with Event Tickets](https://theeventscalendar.com/knowledgebase/guide/event-tickets/)
|
62 |
* [Installing Event Tickets Video](https://evnt.is/1ao9)
|
63 |
-
* [
|
|
|
64 |
* [How to Make Money with Virtual Events](https://evnt.is/1aob)
|
65 |
|
66 |
If you have any questions about this plugin, you can post a thread in the WordPress.org forum. Please search existing threads before starting a new on
|
@@ -143,7 +147,7 @@ If you're already an [Event Tickets Plus](https://evnt.is/18wk) subscriber, you'
|
|
143 |
|
144 |
Event Tickets is our free ticketing plugin that has all the basics you need to sell tickets and collect RSVPs on your website. You can use Event Tickets with or without The Events Calendar.
|
145 |
|
146 |
-
[Event Tickets Plus](https://evnt.is/18wk) is a premium plugin that runs alongside Event Tickets and enhances it with extra features, including custom registration fields, shortcodes, WooCommerce integration, our [mobile ticketing app](https://evnt.is/1aof) and more.
|
147 |
|
148 |
[Read more to learn which plugin is right for you.](https://evnt.is/1aoa)
|
149 |
|
@@ -179,6 +183,18 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
= [5.2.4.1] 2022-02-17 =
|
183 |
|
184 |
* Fix - Classic Editor compatibility problems with the Ticket Form resolved [GTRIA-738]
|
@@ -207,63 +223,4 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
|
|
207 |
* Fix - Fixed toggling of shared capacity data for tickets. [ETP-497]
|
208 |
* Language - 7 new strings added, 99 updated, 0 fuzzied, and 0 obsoleted
|
209 |
|
210 |
-
= [5.2.2] 2021-12-15 =
|
211 |
-
|
212 |
-
* Feature - Included Price, Currency and Value classes to improve monetary handling for Tickets Commerce [ET-1331]
|
213 |
-
* Enhancement - Allow for filtering of tickets within the RSVP template block handler. [ETP-763]
|
214 |
-
* Fix - Remove use of `wp_cache_flush()` and use conditional when using an external object cache. (props to @r-a-y for this change!) [ET-1343]
|
215 |
-
* Fix - Fixes error being caused by an endless loop when currency settings are saved. [ET-1344]
|
216 |
-
* Fix - Fixed an issue where shared capacity on the ticket block page wasn't calculated correctly. [ET-1291]
|
217 |
-
* Fix - Fixed the `Add Attendee` modal from generating a 500 error when two or more tickets have been enabled for an event. [ETP-764]
|
218 |
-
* Language - 0 new strings added, 50 updated, 0 fuzzied, and 0 obsoleted
|
219 |
-
|
220 |
-
= [5.2.1] 2021-11-17 =
|
221 |
-
|
222 |
-
* Enhancement - Auto generate checkout page when enabling Tickets Commerce. [ET-1232]
|
223 |
-
* Enhancement - Auto generate order success page when enabling Tickets Commerce. [ET-1233]
|
224 |
-
* Enhancement - Added filter `tribe_tickets_manual_attendee_allow_email_resend` to allow customization of email resending via Manual Attendees depending on status. [ETP-703]
|
225 |
-
* Enhancement - Add `getPrice` method to utilities JS object to centralize the way we get ticket prices. [ET-1238]
|
226 |
-
* Enhancement - Add a modal with more information about the PayPal connection after connecting with PayPal via Tickets Commerce. [ET-1321]
|
227 |
-
* Fix - Fixes error being caused when trying to load attendee information. [ET-1320]
|
228 |
-
* Fix - Added `allow_resending_email` method which can be used to enable or disable resending email. [ETP-703]
|
229 |
-
* Fix - Fixed ticket total formatting within the attendee registration modal when using custom thousands and decimal separators. [ET-1216]
|
230 |
-
* Fix - QR Code API generation settings not working if `The Events Calendar` plugin was not active. [ETP-754]
|
231 |
-
* Fix - Fixed the event cost formatting issues showing the wrong currency symbol, symbol location and separators. [ET-1251]
|
232 |
-
* Fix - Disable "Connect to PayPal" button while a new URL is not available, after changing countries. [ET-1318]
|
233 |
-
* Fix - Searching Ticket Holder Email / Ticket Holder Name through the Attendee page now functions as expected. [ET-1171]\
|
234 |
-
* Fix - Working with PayPal accounts in currencies other than USD now works as expected. [ET-1330]
|
235 |
-
* Language - 17 new strings added, 41 updated, 0 fuzzied, and 0 obsoleted
|
236 |
-
|
237 |
-
= [5.2.0.1] 2021-11-10 =
|
238 |
-
|
239 |
-
* Fix - Ensures that Tickets Commerce attendees get archived properly when an order is canceled or not completed. [ET-1322]
|
240 |
-
|
241 |
-
= [5.2.0] 2021-11-04 =
|
242 |
-
|
243 |
-
* Feature - Introduction of Tickets Commerce, the new and improved solution you can set up to sell tickets with Event Tickets.
|
244 |
-
* Language - 840 new strings added, 432 updated, 26 fuzzied, and 16 obsoleted
|
245 |
-
|
246 |
-
= [5.1.10] 2021-09-27 =
|
247 |
-
|
248 |
-
* Enhancement - When editing an RSVP or ticket in the block editor, allow title to wrap to multiple lines. [ET-1089]
|
249 |
-
* Enhancement - Ensure that text for the RSVP going/not going dropdown on front end isn't cut off and arrows aren't hidden. [ET-1169]
|
250 |
-
* Tweak - Added a new filter `tribe_tickets_get_provider_query_slug` to allow customization of the provider URL variable name. [ET-543]
|
251 |
-
* Tweak - Changed the `provider` URL variable name to `tickets_provider`. The filter `tribe_tickets_get_provider_query_slug` allows for customization. [ET-543]
|
252 |
-
* Fix - Fixed ticket total formatting when using custom thousands and decimal separators. [ET-1197]
|
253 |
-
* Fix - Show warning while creating new tickets with `0` price for TribeCommerce. [ET-1201]
|
254 |
-
* Fix - Prevent text overlapping description in the ticket AR modal. [ET-1179]
|
255 |
-
* Fix - Removed the ability to resend tickets from the Attendees page to Attendees who cancelled or refunded their ticket. [ETP-703]
|
256 |
-
* Language - 26 new strings added, 116 updated, 2 fuzzied, and 35 obsoleted
|
257 |
-
|
258 |
-
= [5.1.9.1] 2021-09-08 =
|
259 |
-
|
260 |
-
* Fix - Fixed conflict with WooCommerce Payments plugin showing error on Ticket Form. [ET-1174]
|
261 |
-
|
262 |
-
= [5.1.9] 2021-08-31 =
|
263 |
-
|
264 |
-
* Fix - Fixed cart calculation inconsistency with WooCommerce when the "Number of decimals" setting was set to `0`. [ETP-324]
|
265 |
-
* Fix - Removed RSVP V2 preview templates and functionality. [ET-1162]
|
266 |
-
* Fix - Updated deprecated hook `block_categories` to use `block_categories_all`. [ET-1156]
|
267 |
-
* Language - 37 new strings added, 162 updated, 6 fuzzied, and 20 obsoleted
|
268 |
-
|
269 |
[See changelog for all versions](https://raw.githubusercontent.com/the-events-calendar/event-tickets/master/changelog.txt)
|
1 |
=== Event Tickets ===
|
2 |
|
3 |
+
Contributors: theeventscalendar, brianjessee, camwynsp, aguseo, bordoni, borkweb, GeoffBel, jentheo, leahkoerper, lucatume, neillmcshea, vicskf, zbtirrell, juanfra, moraleida.me
|
4 |
Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 5.6
|
6 |
+
Tested up to: 5.9.1
|
7 |
+
Stable tag: 5.3.0
|
8 |
Requires PHP: 7.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
17 |
|
18 |
This plugin makes it easy to sell tickets and collect registration for in-person or virtual events. Plus, it comes with features backed by our world-class team of developers and designers. Integrate Event Tickets with your PayPal business account and manage attendees from your WordPress dashboard.
|
19 |
|
20 |
+
Use our free commerce solution, Tickets Commerce, to sell tickets with PayPal and/or Stripe.
|
21 |
+
|
22 |
https://vimeo.com/480516958
|
23 |
|
24 |
= 🎟️ Ticketing and Registration for WordPress =
|
39 |
|
40 |
✔️ Attendees can RSVP to events
|
41 |
✔️ Attendees can purchase tickets to events
|
42 |
+
✔️ Sell tickets with PayPal and/or Stripe using our free commerce solution, Tickets Commerce.
|
43 |
✔️ Add RSVPs and tickets to posts, pages, or custom post types
|
44 |
✔️ Collect ticket fees by connecting your PayPal business account
|
45 |
✔️ Generate sales and attendee reports
|
47 |
✔️ Automatic ticket confirmation emails
|
48 |
✔️ Works out of the box with [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
|
49 |
✔️ Responsive design works on all devices
|
50 |
+
✔️ Tested on the major theme frameworks such as Avada, Genesis, Kadence, Thesis and many more.
|
51 |
✔️ Internationalized & translated
|
52 |
✔️ Extensive template tags for customization
|
53 |
✔️ Hooks & filters galore
|
63 |
|
64 |
* [Guide: Getting Started with Event Tickets](https://theeventscalendar.com/knowledgebase/guide/event-tickets/)
|
65 |
* [Installing Event Tickets Video](https://evnt.is/1ao9)
|
66 |
+
* [Using Tickets Commerce Video](https://www.youtube.com/watch?v=2MZnZDMjpCk)
|
67 |
+
* [Do I need Event Tickets or Event Tickets Plus?](https://evnt.is/1aoa)
|
68 |
* [How to Make Money with Virtual Events](https://evnt.is/1aob)
|
69 |
|
70 |
If you have any questions about this plugin, you can post a thread in the WordPress.org forum. Please search existing threads before starting a new on
|
147 |
|
148 |
Event Tickets is our free ticketing plugin that has all the basics you need to sell tickets and collect RSVPs on your website. You can use Event Tickets with or without The Events Calendar.
|
149 |
|
150 |
+
[Event Tickets Plus](https://evnt.is/18wk) is a premium plugin that runs alongside Event Tickets and enhances it with extra features, including custom registration fields, shortcodes, WooCommerce integration, enhanced Stripe functionality for Stripe for Tickets Commerce, our [mobile ticketing app](https://evnt.is/1aof) and more.
|
151 |
|
152 |
[Read more to learn which plugin is right for you.](https://evnt.is/1aoa)
|
153 |
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= [5.3.0] 2022-02-24 =
|
187 |
+
|
188 |
+
* Version - Event Tickets 5.3.0 is only compatible with Event Tickets Plus 5.4.0 and higher
|
189 |
+
* Feature - Introduction of Stripe for Tickets Commerce. [ET-1342]
|
190 |
+
* Feature - Collect purchaser name and email for anonymous purchases using Tickets Commerce. [ET-1378]
|
191 |
+
* Feature - Introduce automatic handling of zero-decimal currencies in Tickets Commerce [ET-1414][ET-1420]
|
192 |
+
* Fix - Remove anonymous purchase notice for Tickets Commerce after ET-1378 was implemented. [ET-1379]
|
193 |
+
* Tweak - Added filters: `tec_tickets_commerce_order_purchaser_data`, `tec_tickets_commerce_order_purchaser_data`, `tec_tickets_commerce_stripe_checkout_localized_data`, `tec_tickets_commerce_stripe_order_endpoint_error_messages`, `tec_tickets_commerce_stripe_settings`, `tec_tickets_commerce_stripe_settings`, `tec_tickets_commerce_stripe_payment_methods_by_currency`, `tec_tickets_commerce_stripe_payment_methods_available`, `tec_tickets_commerce_stripe_fee_is_applied_notice`, `tec_tickets_commerce_gateway_stripe_webhook_event_handlers`, `tec_tickets_commerce_gateway_stripe_webhook_status`, `tec_tickets_commerce_gateway_stripe_webhook_events_labels_map`, `tec_tickets_commerce_payments_tab_sections`, `tec_tickets_commerce_currency_{$code}_name`, `tec_tickets_commerce_currency_name`, `tec_tickets_commerce_currency_{$code}_precision`, `tec_tickets_commerce_currency_precision`
|
194 |
+
* Tweak - Removed filters: `tec_tickets_commerce_gateway_paypal_tracking_id`
|
195 |
+
* Tweak - Changed views: `tickets/email`, `v2/commerce/checkout`, `v2/commerce/checkout/cart`, `v2/commerce/checkout/footer/gateway-error`, `v2/commerce/checkout/gateways`, `v2/commerce/checkout/purchaser-info`, `v2/commerce/checkout/purchaser-info/email`, `v2/commerce/checkout/purchaser-info/name`, `v2/commerce/gateway/paypal/container`, `v2/commerce/gateway/stripe/card-element`, `v2/commerce/gateway/stripe/container`, `v2/commerce/gateway/stripe/payment-element`
|
196 |
+
* Language - 102 new strings added, 164 updated, 0 fuzzied, and 3 obsoleted
|
197 |
+
|
198 |
= [5.2.4.1] 2022-02-17 =
|
199 |
|
200 |
* Fix - Classic Editor compatibility problems with the Ticket Form resolved [GTRIA-738]
|
223 |
* Fix - Fixed toggling of shared capacity data for tickets. [ETP-497]
|
224 |
* Language - 7 new strings added, 99 updated, 0 fuzzied, and 0 obsoleted
|
225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
[See changelog for all versions](https://raw.githubusercontent.com/the-events-calendar/event-tickets/master/changelog.txt)
|
src/Tickets/Commerce/Abstract_Order.php
CHANGED
@@ -19,8 +19,118 @@ abstract class Abstract_Order {
|
|
19 |
* @return Value;
|
20 |
*/
|
21 |
public function get_value_total( $items ) {
|
22 |
-
$sub_totals
|
23 |
$total_value = Value::create();
|
|
|
24 |
return $total_value->total( $sub_totals );
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
19 |
* @return Value;
|
20 |
*/
|
21 |
public function get_value_total( $items ) {
|
22 |
+
$sub_totals = Value::build_list( array_filter( wp_list_pluck( $items, 'sub_total' ) ) );
|
23 |
$total_value = Value::create();
|
24 |
+
|
25 |
return $total_value->total( $sub_totals );
|
26 |
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Prepare purchaser data received from the checkout page to include in orders.
|
30 |
+
*
|
31 |
+
* @since 5.3.0
|
32 |
+
*
|
33 |
+
* @param array $data user data input in the checkout page
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function prepare_purchaser_data( $data ) {
|
38 |
+
$purchaser = [
|
39 |
+
'purchaser_user_id' => 0,
|
40 |
+
'purchaser_full_name' => static::$placeholder_name,
|
41 |
+
'purchaser_first_name' => static::$placeholder_name,
|
42 |
+
'purchaser_last_name' => static::$placeholder_name,
|
43 |
+
'purchaser_email' => '',
|
44 |
+
];
|
45 |
+
|
46 |
+
if ( empty( $data['billing_details'] ) && is_user_logged_in() ) {
|
47 |
+
$user = wp_get_current_user();
|
48 |
+
$purchaser['purchaser_user_id'] = $user->ID;
|
49 |
+
$purchaser['purchaser_full_name'] = $user->first_name . ' ' . $user->last_name;
|
50 |
+
$purchaser['purchaser_first_name'] = $user->first_name;
|
51 |
+
$purchaser['purchaser_last_name'] = $user->last_name;
|
52 |
+
$purchaser['purchaser_email'] = $user->user_email;
|
53 |
+
|
54 |
+
return $purchaser;
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( ! empty( $data['billing_details']['first_name'] ) ) {
|
58 |
+
$purchaser['purchaser_first_name'] = sanitize_text_field( $data['billing_details']['first_name'] );
|
59 |
+
}
|
60 |
+
if ( ! empty( $data['billing_details']['last_name'] ) ) {
|
61 |
+
$purchaser['purchaser_last_name'] = sanitize_text_field( $data['billing_details']['last_name'] );
|
62 |
+
}
|
63 |
+
if ( ! empty( $data['billing_details']['name'] ) ) {
|
64 |
+
$purchaser['purchaser_full_name'] = sanitize_text_field( $data['billing_details']['name'] );
|
65 |
+
}
|
66 |
+
if ( ! empty( $data['billing_details']['email'] ) ) {
|
67 |
+
$purchaser['purchaser_email'] = sanitize_email( $data['billing_details']['email'] );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Allows filtering the billing details gathered before creating an order
|
72 |
+
*
|
73 |
+
* @since 5.3.0
|
74 |
+
*
|
75 |
+
* @param array $purchaser the list of billing details gathered from the front-end and/or logged-in users
|
76 |
+
* @param array $data the entire data array received from the checkout page
|
77 |
+
*/
|
78 |
+
return apply_filters( 'tec_tickets_commerce_order_purchaser_data', $purchaser, $data );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Prepare purchaser data received from the checkout page to include in orders.
|
83 |
+
*
|
84 |
+
* @since 5.3.0
|
85 |
+
*
|
86 |
+
* @param array $data user data input in the checkout page.
|
87 |
+
*
|
88 |
+
* @return array | \WP_Error
|
89 |
+
*
|
90 |
+
*/
|
91 |
+
public function get_purchaser_data( $data ) {
|
92 |
+
|
93 |
+
if ( is_user_logged_in() ) {
|
94 |
+
$user = wp_get_current_user();
|
95 |
+
$purchaser['purchaser_user_id'] = $user->ID;
|
96 |
+
$purchaser['purchaser_full_name'] = $user->first_name . ' ' . $user->last_name;
|
97 |
+
$purchaser['purchaser_first_name'] = $user->first_name;
|
98 |
+
$purchaser['purchaser_last_name'] = $user->last_name;
|
99 |
+
$purchaser['purchaser_email'] = $user->user_email;
|
100 |
+
|
101 |
+
return $purchaser;
|
102 |
+
}
|
103 |
+
|
104 |
+
if ( ! isset( $data['purchaser'] ) || empty( $data['purchaser'] ) ) {
|
105 |
+
return new \WP_Error( 'invalid-purchaser-info', __( 'Please provide a valid purchaser name and email.', 'event-tickets' ), [ 'status' => 400 ] );
|
106 |
+
}
|
107 |
+
|
108 |
+
$purchaser_data = array_map( 'sanitize_text_field', $data['purchaser'] );
|
109 |
+
|
110 |
+
if ( ! isset( $purchaser_data['name'] ) || empty( $purchaser_data['name'] ) ) {
|
111 |
+
return new \WP_Error( 'invalid-purchaser-info', __( 'Please provide a valid purchaser name.', 'event-tickets' ), [ 'status' => 400 ] );
|
112 |
+
}
|
113 |
+
|
114 |
+
if ( ! isset( $purchaser_data['email'] ) || empty( $purchaser_data['email'] ) || ! is_email( $purchaser_data['email'] ) ) {
|
115 |
+
return new \WP_Error( 'invalid-purchaser-info', __( 'Please provide a valid purchaser email.', 'event-tickets' ), [ 'status' => 400 ] );
|
116 |
+
}
|
117 |
+
|
118 |
+
$purchaser = [
|
119 |
+
'purchaser_user_id' => 0,
|
120 |
+
'purchaser_full_name' => $purchaser_data['name'],
|
121 |
+
'purchaser_first_name' => $purchaser_data['name'],
|
122 |
+
'purchaser_last_name' => '',
|
123 |
+
'purchaser_email' => sanitize_email( $purchaser_data['email'] ),
|
124 |
+
];
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Filter the purchaser details for creating an order.
|
128 |
+
*
|
129 |
+
* @since 5.3.0
|
130 |
+
*
|
131 |
+
* @param array $purchaser the list of purchaser info gathered from the front-end and/or logged-in users.
|
132 |
+
* @param array $data the entire data array received from the checkout page.
|
133 |
+
*/
|
134 |
+
return apply_filters( 'tec_tickets_commerce_order_purchaser_data', $purchaser, $data );
|
135 |
+
}
|
136 |
}
|
src/Tickets/Commerce/Abstract_Settings.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
* @since 5.1.6
|
5 |
-
*
|
6 |
-
* @package TEC\Tickets\Commerce
|
7 |
-
*/
|
8 |
-
|
9 |
-
namespace TEC\Tickets\Commerce;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* The gateway settings related functionality.
|
13 |
-
*
|
14 |
-
* @since 5.1.6
|
15 |
-
* @package Tribe\Tickets\Commerce\Tickets_Commerce\Gateways
|
16 |
-
*
|
17 |
-
*/
|
18 |
-
abstract class Abstract_Settings {
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get the list of settings for the gateway.
|
22 |
-
*
|
23 |
-
* @since 5.1.6
|
24 |
-
*
|
25 |
-
* @return array The list of settings for the gateway.
|
26 |
-
*/
|
27 |
-
abstract public function get_settings();
|
28 |
-
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Admin/Featured_Settings.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Admin;
|
4 |
+
|
5 |
+
use \Tribe__Template;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Featured Settings for TC Payments Tab.
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Admin
|
13 |
+
*/
|
14 |
+
class Featured_Settings {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Stores the instance of the template engine that we will use for rendering the elements.
|
18 |
+
*
|
19 |
+
* @since 5.3.0
|
20 |
+
*
|
21 |
+
* @var Tribe__Template
|
22 |
+
*/
|
23 |
+
protected $template;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Gets the template instance used to setup the rendering html.
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*
|
30 |
+
* @return Tribe__Template
|
31 |
+
*/
|
32 |
+
public function get_template() {
|
33 |
+
if ( empty( $this->template ) ) {
|
34 |
+
$this->template = new \Tribe__Template();
|
35 |
+
$this->template->set_template_origin( \Tribe__Tickets__Main::instance() );
|
36 |
+
$this->template->set_template_folder( 'src/admin-views/settings/featured' );
|
37 |
+
$this->template->set_template_context_extract( true );
|
38 |
+
}
|
39 |
+
|
40 |
+
return $this->template;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Returns html of the featured settings block.
|
45 |
+
*
|
46 |
+
* @since 5.3.0
|
47 |
+
*
|
48 |
+
* @param array $context Context of template.
|
49 |
+
* @param boolean $echo Whether or not to output the HTML or just return it.
|
50 |
+
*
|
51 |
+
* @return Tribe__Template
|
52 |
+
*/
|
53 |
+
public function get_html( $context = [], $echo = false ) {
|
54 |
+
$defaults = [
|
55 |
+
'title' => '',
|
56 |
+
'description' => '',
|
57 |
+
'links' => [],
|
58 |
+
'content_template' => '',
|
59 |
+
'classes' => [],
|
60 |
+
];
|
61 |
+
$template = $this->get_template();
|
62 |
+
|
63 |
+
return $template->template( 'container', wp_parse_args( $context, $defaults ), $echo );
|
64 |
+
}
|
65 |
+
}
|
src/Tickets/Commerce/Admin/Notices.php
CHANGED
@@ -6,7 +6,6 @@ use \tad_DI52_ServiceProvider;
|
|
6 |
use TEC\Tickets\Commerce\Checkout;
|
7 |
use TEC\Tickets\Commerce\Success;
|
8 |
use \Tribe__Settings;
|
9 |
-
use \Tribe__Main;
|
10 |
|
11 |
/**
|
12 |
* Class Notices
|
@@ -35,66 +34,6 @@ class Notices extends tad_DI52_ServiceProvider {
|
|
35 |
[ 'dismiss' => false, 'type' => 'error' ],
|
36 |
[ $this, 'should_render_success_notice' ]
|
37 |
);
|
38 |
-
|
39 |
-
tribe_notice(
|
40 |
-
'event-tickets-tickets-commerce-anonymous-purchases',
|
41 |
-
[ $this, 'render_anonymous_purchases_notice' ],
|
42 |
-
[ 'dismiss' => false, 'type' => 'error' ],
|
43 |
-
[ $this, 'should_render_anonymous_purchases_notice' ]
|
44 |
-
);
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Display a notice when Tickets Commerce is enabled, but users aren't required to log in.
|
49 |
-
*
|
50 |
-
* @since 5.2.3
|
51 |
-
*
|
52 |
-
* @return bool
|
53 |
-
*/
|
54 |
-
public function should_render_anonymous_purchases_notice() {
|
55 |
-
// If we're not on our own settings page, bail.
|
56 |
-
if ( Tribe__Settings::$parent_slug !== tribe_get_request_var( 'page' ) ) {
|
57 |
-
return false;
|
58 |
-
}
|
59 |
-
|
60 |
-
$options = get_option( Tribe__Main::OPTIONNAME, [] );
|
61 |
-
|
62 |
-
if (
|
63 |
-
empty( $options[ 'ticket-authentication-requirements' ] ) ||
|
64 |
-
! is_array( $options[ 'ticket-authentication-requirements' ] ) ||
|
65 |
-
! in_array( 'event-tickets_all', $options[ 'ticket-authentication-requirements' ] )
|
66 |
-
) {
|
67 |
-
return true;
|
68 |
-
}
|
69 |
-
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Gets the HTML for the notice that is shown when users aren't required to log in.
|
75 |
-
*
|
76 |
-
* @since 5.2.3
|
77 |
-
*
|
78 |
-
* @return string Notice HTML.
|
79 |
-
*/
|
80 |
-
public function render_anonymous_purchases_notice() {
|
81 |
-
$notice_link = sprintf(
|
82 |
-
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
|
83 |
-
esc_url( 'https://evnt.is/1b1t' ),
|
84 |
-
esc_html__( 'Learn More', 'event-tickets' )
|
85 |
-
);
|
86 |
-
$notice_header = esc_html__( 'Anonymous purchases are enabled', 'event-tickets' );
|
87 |
-
$notice_text = sprintf(
|
88 |
-
// translators: %1$s: Link to knowledgebase article.
|
89 |
-
esc_html__( 'It is recommended that you require users to log in before purchasing tickets on the Settings > Tickets page. Otherwise, it is possible for users to purchase a ticket and never receive the tickets via email. %1$s', 'event-tickets' ),
|
90 |
-
$notice_link
|
91 |
-
);
|
92 |
-
|
93 |
-
return sprintf(
|
94 |
-
'<p><strong>%1$s</strong></p><p>%2$s</p>',
|
95 |
-
$notice_header,
|
96 |
-
$notice_text
|
97 |
-
);
|
98 |
}
|
99 |
|
100 |
/**
|
6 |
use TEC\Tickets\Commerce\Checkout;
|
7 |
use TEC\Tickets\Commerce\Success;
|
8 |
use \Tribe__Settings;
|
|
|
9 |
|
10 |
/**
|
11 |
* Class Notices
|
34 |
[ 'dismiss' => false, 'type' => 'error' ],
|
35 |
[ $this, 'should_render_success_notice' ]
|
36 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
/**
|
src/Tickets/Commerce/Assets.php
CHANGED
@@ -86,5 +86,24 @@ class Assets extends tad_DI52_ServiceProvider {
|
|
86 |
],
|
87 |
null
|
88 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
}
|
86 |
],
|
87 |
null
|
88 |
);
|
89 |
+
|
90 |
+
tribe_asset(
|
91 |
+
$tickets_main,
|
92 |
+
'tribe-tickets-commerce-base-gateway-checkout-toggler',
|
93 |
+
'commerce/gateway/toggler.js',
|
94 |
+
[],
|
95 |
+
null,
|
96 |
+
[
|
97 |
+
'localize' => [
|
98 |
+
'name' => 'tecTicketsCommerceCheckoutToggleText',
|
99 |
+
'data' => static function () {
|
100 |
+
return [
|
101 |
+
'default' => __( 'Default checkout', 'event-tickets' ),
|
102 |
+
'additional' => __( 'Additional payment options', 'event-tickets' ),
|
103 |
+
];
|
104 |
+
}
|
105 |
+
]
|
106 |
+
]
|
107 |
+
);
|
108 |
}
|
109 |
}
|
src/Tickets/Commerce/Gateways/Abstract_Gateway.php
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
* @since 5.1.6
|
5 |
-
*
|
6 |
-
* @package TEC\Tickets\Commerce\Gateways
|
7 |
-
*/
|
8 |
-
|
9 |
-
namespace TEC\Tickets\Commerce\Gateways;
|
10 |
-
|
11 |
-
use TEC\Tickets\Commerce;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* The gateway related functionality.
|
15 |
-
*
|
16 |
-
* @since 5.1.6
|
17 |
-
* @package TEC\Tickets\Commerce\Gateways
|
18 |
-
*
|
19 |
-
*/
|
20 |
-
abstract class Abstract_Gateway implements Interface_Gateway {
|
21 |
-
|
22 |
-
/**
|
23 |
-
* The Gateway key.
|
24 |
-
*
|
25 |
-
* @since 5.1.6
|
26 |
-
*/
|
27 |
-
protected static $key;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @inheritDoc
|
31 |
-
*/
|
32 |
-
public static function get_key() {
|
33 |
-
return static::$key;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @inheritDoc
|
38 |
-
*/
|
39 |
-
public static function get_provider_key() {
|
40 |
-
return Commerce::PROVIDER . '-' . static::get_key();
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @inheritDoc
|
45 |
-
*/
|
46 |
-
public function register_gateway( array $gateways ) {
|
47 |
-
$gateways[ static::get_key() ] = $this;
|
48 |
-
|
49 |
-
return $gateways;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* @inheritDoc
|
54 |
-
*/
|
55 |
-
public static function is_connected() {
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @inheritDoc
|
61 |
-
*/
|
62 |
-
public static function is_active() {
|
63 |
-
return false;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @inheritDoc
|
68 |
-
*/
|
69 |
-
public static function should_show() {
|
70 |
-
return true;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* @inheritDoc
|
75 |
-
*/
|
76 |
-
public function get_settings() {
|
77 |
-
return [];
|
78 |
-
}
|
79 |
-
|
80 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php
ADDED
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @since 5.3.0
|
5 |
+
*
|
6 |
+
* @package TEC\Tickets\Commerce\Gateways
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
10 |
+
|
11 |
+
use TEC\Tickets\Commerce;
|
12 |
+
use TEC\Tickets\Commerce\Gateways\Manager;
|
13 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
14 |
+
use Tribe__Settings;
|
15 |
+
use Tribe__Utils__Array as Arr;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Abstract Gateway Contract.
|
19 |
+
*
|
20 |
+
* @since 5.3.0
|
21 |
+
*
|
22 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
23 |
+
*/
|
24 |
+
abstract class Abstract_Gateway implements Gateway_Interface {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The Gateway key.
|
28 |
+
*
|
29 |
+
* @since 5.3.0
|
30 |
+
*/
|
31 |
+
protected static $key;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The Gateway settings class
|
35 |
+
*
|
36 |
+
* @since 5.3.0
|
37 |
+
*
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
protected static $settings;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* The Gateway merchant class
|
44 |
+
*
|
45 |
+
* @since 5.3.0
|
46 |
+
*
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
protected static $merchant;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* The option name prefix that configured whether or not a gateway is enabled.
|
53 |
+
* It is followed by the gateway 'key'
|
54 |
+
*
|
55 |
+
* @since 5.3.0
|
56 |
+
*
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
public static $option_enabled_prefix = '_tickets_commerce_gateway_enabled_';
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Default name for the checkout template.
|
63 |
+
*
|
64 |
+
* @since 5.3.0
|
65 |
+
*
|
66 |
+
* @var string
|
67 |
+
*/
|
68 |
+
public static $checkout_container_template_name = 'container';
|
69 |
+
|
70 |
+
/**
|
71 |
+
* @inheritDoc
|
72 |
+
*/
|
73 |
+
public static function get_key() {
|
74 |
+
return static::$key;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @inheritDoc
|
79 |
+
*/
|
80 |
+
public static function get_provider_key() {
|
81 |
+
return Commerce::PROVIDER . '-' . static::get_key();
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @inheritDoc
|
86 |
+
*/
|
87 |
+
public function register_gateway( array $gateways ) {
|
88 |
+
$gateways[ static::get_key() ] = $this;
|
89 |
+
|
90 |
+
return $gateways;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @inheritDoc
|
95 |
+
*/
|
96 |
+
public static function is_connected() {
|
97 |
+
// If this gateway shouldn't be shown, then don't change the active status.
|
98 |
+
if ( ! static::should_show() ) {
|
99 |
+
return false;
|
100 |
+
}
|
101 |
+
|
102 |
+
return tribe( static::$merchant )->is_connected();
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @inheritDoc
|
107 |
+
*/
|
108 |
+
public static function is_active() {
|
109 |
+
// If this gateway shouldn't be shown, then don't change the active status.
|
110 |
+
if ( ! static::should_show() ) {
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
|
114 |
+
return tribe( static::$merchant )->is_active();
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Determine whether Tickets Commerce is in test mode.
|
119 |
+
*
|
120 |
+
* @since 5.1.6
|
121 |
+
*
|
122 |
+
* @return bool Whether Tickets Commerce is in test mode.
|
123 |
+
*/
|
124 |
+
public static function is_test_mode() {
|
125 |
+
|
126 |
+
if ( Commerce\Settings::is_test_mode() ) {
|
127 |
+
return true;
|
128 |
+
}
|
129 |
+
|
130 |
+
return tribe_is_truthy( tribe( static::$settings )->is_gateway_test_mode() );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @inheritDoc
|
135 |
+
*/
|
136 |
+
public static function should_show() {
|
137 |
+
return true;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @inheritDoc
|
142 |
+
*/
|
143 |
+
public function get_settings() {
|
144 |
+
return tribe( static::$settings )->get_settings();
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* @inheritDoc
|
149 |
+
*/
|
150 |
+
public static function get_settings_url( array $args = [] ) {
|
151 |
+
// Force the Tickets Commerce section to be this gateway.
|
152 |
+
$args[ Payments_Tab::$key_current_section_get_var ] = static::get_key();
|
153 |
+
|
154 |
+
// Pass it to the get_url of the payments tab.
|
155 |
+
return tribe( Payments_Tab::class )->get_url( $args );
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @inheritDoc
|
160 |
+
*/
|
161 |
+
public function handle_invalid_response( $response, $message, $slug = 'error' ) {
|
162 |
+
|
163 |
+
$notices = tribe( Commerce\Notice_Handler::class );
|
164 |
+
$body = (array) json_decode( wp_remote_retrieve_body( $response ) );
|
165 |
+
|
166 |
+
$error = isset( $body['error'] ) ? $body['error'] : __( 'Something went wrong!', 'event-tickets' );
|
167 |
+
$error_message = isset( $body['error_description'] ) ? $body['error_description'] : __( 'Unexpected response recieved.', 'event-tickets' );
|
168 |
+
|
169 |
+
$notices->trigger_admin(
|
170 |
+
$slug,
|
171 |
+
[
|
172 |
+
'content' => sprintf( 'Error - %s : %s - %s', $error, $error_message, $message ),
|
173 |
+
'type' => 'error',
|
174 |
+
]
|
175 |
+
);
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Generates a Tracking ID for this website.
|
180 |
+
*
|
181 |
+
* The Tracking ID is a site-specific identifier that links the client and platform accounts in the Payment Gateway
|
182 |
+
* without exposing sensitive data. By default, the identifier generated is a URL in the format:
|
183 |
+
*
|
184 |
+
* {SITE_URL}?v={GATEWAY_VERSION}-{RANDOM_6_CHAR_HASH}
|
185 |
+
*
|
186 |
+
* @since 5.3.0 moved to Abstract_Gateway
|
187 |
+
* @since 5.1.9
|
188 |
+
*
|
189 |
+
* @return string
|
190 |
+
*/
|
191 |
+
public function generate_unique_tracking_id() {
|
192 |
+
$id = wp_generate_password( 6, false, false );;
|
193 |
+
$url_frags = wp_parse_url( home_url() );
|
194 |
+
$url = Arr::get( $url_frags, 'host' ) . Arr::get( $url_frags, 'path' );
|
195 |
+
$url = add_query_arg( [
|
196 |
+
'v' => static::VERSION . '-' . $id,
|
197 |
+
], $url );
|
198 |
+
|
199 |
+
// Always limit it to 127 chars.
|
200 |
+
return substr( $url, 0, 127 );
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Get URL for the display logo.
|
205 |
+
*
|
206 |
+
* @since 5.3.0
|
207 |
+
*
|
208 |
+
* @return string
|
209 |
+
*/
|
210 |
+
public function get_logo_url(): string {
|
211 |
+
return '';
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Get text to use a subtitle when listing gateways.
|
216 |
+
*
|
217 |
+
* @since 5.3.0
|
218 |
+
*
|
219 |
+
* @return string
|
220 |
+
*/
|
221 |
+
public function get_subtitle(): string {
|
222 |
+
return '';
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Returns the enabled option key.
|
227 |
+
*
|
228 |
+
* @since 5.3.0
|
229 |
+
*
|
230 |
+
* @return string
|
231 |
+
*/
|
232 |
+
public static function get_enabled_option_key(): string {
|
233 |
+
return static::$option_enabled_prefix . self::get_key();
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Returns if gateway is enabled.
|
238 |
+
*
|
239 |
+
* @since 5.3.0
|
240 |
+
*
|
241 |
+
* @return boolean
|
242 |
+
*/
|
243 |
+
public static function is_enabled(): bool {
|
244 |
+
if ( ! static::should_show() ) {
|
245 |
+
return false;
|
246 |
+
}
|
247 |
+
|
248 |
+
return tribe_is_truthy( tribe_get_option( static::get_enabled_option_key() ) );
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Returns status text.
|
253 |
+
*
|
254 |
+
* @since 5.3.0
|
255 |
+
*
|
256 |
+
* @return string
|
257 |
+
*/
|
258 |
+
public static function get_status_text(): string {
|
259 |
+
if ( ! static::is_enabled() || ! static::is_active() ) {
|
260 |
+
return '';
|
261 |
+
}
|
262 |
+
|
263 |
+
return __( 'Enabled for Checkout', 'event-tickets' );
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Returns name of the container template within the `views/v2/commerce/gateway/{key}/` folder.
|
268 |
+
*
|
269 |
+
* @since 5.3.0
|
270 |
+
*
|
271 |
+
* @return string
|
272 |
+
*/
|
273 |
+
public static function get_checkout_container_template_name() {
|
274 |
+
return self::$checkout_container_template_name;
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* @inheritDoc
|
279 |
+
*/
|
280 |
+
public static function get_checkout_template_vars() {
|
281 |
+
return [];
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* @inheritDoc
|
286 |
+
*/
|
287 |
+
public function render_checkout_template( \Tribe__Template $template ): string {
|
288 |
+
return '';
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Disable the gateway toggle.
|
293 |
+
*
|
294 |
+
* @since 5.3.0
|
295 |
+
*
|
296 |
+
* @return bool
|
297 |
+
*/
|
298 |
+
public static function disable() {
|
299 |
+
if ( ! static::is_enabled() ) {
|
300 |
+
return true;
|
301 |
+
}
|
302 |
+
|
303 |
+
return tribe_remove_option( static::get_enabled_option_key() );
|
304 |
+
}
|
305 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_Merchant.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Traits\Has_Mode;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Abstract Merchant Contract.
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
13 |
+
*/
|
14 |
+
abstract class Abstract_Merchant implements Merchant_Interface {
|
15 |
+
|
16 |
+
use Has_Mode;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Handle initial setup for the object singleton.
|
20 |
+
*
|
21 |
+
* @since 5.1.9
|
22 |
+
*/
|
23 |
+
public function init() {
|
24 |
+
$this->from_array( $this->get_details_data(), false );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Make Merchant object from array.
|
29 |
+
*
|
30 |
+
* @since 5.1.9
|
31 |
+
*
|
32 |
+
* @param array $data Which values need to .
|
33 |
+
* @param boolean $needs_save Determines if the proprieties saved need to save to the DB.
|
34 |
+
*
|
35 |
+
* @return boolean
|
36 |
+
*/
|
37 |
+
public function from_array( array $data, $needs_save = true ) {
|
38 |
+
if ( ! $this->validate( $data ) ) {
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
|
42 |
+
$this->setup_properties( $data, $needs_save );
|
43 |
+
|
44 |
+
return true;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Gets the value stored for the Client ID.
|
49 |
+
*
|
50 |
+
* @since 5.3.0 moved to Abstract_Merchant
|
51 |
+
* @since 5.1.9
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function get_client_id() {
|
56 |
+
return $this->client_id;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Save merchant details.
|
61 |
+
*
|
62 |
+
* @since 5.3.0 moved to Abstract_Merchant
|
63 |
+
* @since 5.1.9
|
64 |
+
*
|
65 |
+
* @return bool
|
66 |
+
*/
|
67 |
+
public function save() {
|
68 |
+
if ( false === $this->needs_save() ) {
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
|
72 |
+
$saved = update_option( $this->get_account_key(), $this->to_array() );
|
73 |
+
|
74 |
+
// If we were able to save, we reset the needs save.
|
75 |
+
if ( $saved ) {
|
76 |
+
$this->needs_save = false;
|
77 |
+
}
|
78 |
+
|
79 |
+
return $saved;
|
80 |
+
}
|
81 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_REST_Endpoint.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Abstract REST Endpoint Contract
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
abstract class Abstract_REST_Endpoint implements REST_Endpoint_Interface, \Tribe__Documentation__Swagger__Provider_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The REST API endpoint path.
|
16 |
+
*
|
17 |
+
* @since 5.3.0
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
protected $path;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @inheritDoc
|
25 |
+
*/
|
26 |
+
public function get_endpoint_path() {
|
27 |
+
return $this->path;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @inheritDoc
|
32 |
+
*/
|
33 |
+
public function get_route_url() {
|
34 |
+
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
35 |
+
|
36 |
+
return rest_url( '/' . $namespace . $this->get_endpoint_path(), 'https' );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Gets the Return URL pointing to this on boarding route.
|
41 |
+
*
|
42 |
+
* @since 5.3.0 moved to Abstract_REST_Endpoint
|
43 |
+
* @since 5.1.9
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function get_return_url( $hash = null ) {
|
48 |
+
$arguments = [
|
49 |
+
'hash' => $hash,
|
50 |
+
];
|
51 |
+
|
52 |
+
return add_query_arg( $arguments, $this->get_route_url() );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Sanitize a request argument based on details registered to the route.
|
57 |
+
*
|
58 |
+
* @since 5.3.0 moved to Abstract_REST_Endpoint
|
59 |
+
* @since 5.1.9
|
60 |
+
*
|
61 |
+
* @param mixed $value Value of the 'filter' argument.
|
62 |
+
*
|
63 |
+
* @return string|array
|
64 |
+
*/
|
65 |
+
public function sanitize_callback( $value ) {
|
66 |
+
if ( is_array( $value ) ) {
|
67 |
+
return array_map( 'sanitize_text_field', $value );
|
68 |
+
}
|
69 |
+
|
70 |
+
return sanitize_text_field( $value );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* {@inheritDoc}
|
75 |
+
*
|
76 |
+
* @TODO We need to make sure Swagger documentation is present.
|
77 |
+
*
|
78 |
+
* @since 5.3.0 moved to Abstract_REST_Endpoint
|
79 |
+
* @since 5.1.9
|
80 |
+
*
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function get_documentation() {
|
84 |
+
return [];
|
85 |
+
}
|
86 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_Requests.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
use Tribe__Utils__Array as Arr;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Abstract Requests Contract.
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
13 |
+
*/
|
14 |
+
abstract class Abstract_Requests implements Requests_Interface {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @inheritDoc
|
18 |
+
*/
|
19 |
+
public static function post( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
20 |
+
return static::request( 'POST', $endpoint, $query_args, $request_arguments, $raw );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @inheritDoc
|
25 |
+
*/
|
26 |
+
public static function get( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
27 |
+
return static::request( 'GET', $endpoint, $query_args, $request_arguments, $raw );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @inheritDoc
|
32 |
+
*/
|
33 |
+
public static function patch( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
34 |
+
return static::request( 'PATCH', $endpoint, $query_args, $request_arguments, $raw );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @inheritDoc
|
39 |
+
*/
|
40 |
+
public static function delete( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
41 |
+
return static::request( 'DELETE', $endpoint, $query_args, $request_arguments, $raw );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @inheritDoc
|
46 |
+
*/
|
47 |
+
public static function request( $method, $url, array $query_args = [], array $request_arguments = [], $raw = false, $retries = 0 ) {
|
48 |
+
$method = strtoupper( $method );
|
49 |
+
|
50 |
+
// If the endpoint passed is a full URL don't try to append anything.
|
51 |
+
$url = 0 !== strpos( $url, 'https://' )
|
52 |
+
? static::get_api_url( $url, $query_args )
|
53 |
+
: add_query_arg( $query_args, $url );
|
54 |
+
|
55 |
+
$default_arguments = [
|
56 |
+
'headers' => [
|
57 |
+
'Authorization' => 'Bearer ' . tribe( static::$merchant )->get_client_secret(),
|
58 |
+
],
|
59 |
+
];
|
60 |
+
|
61 |
+
// By default, it's important that we have a body set for any method that is not the GET method.
|
62 |
+
if ( 'GET' !== $method ) {
|
63 |
+
$default_arguments['body'] = [];
|
64 |
+
}
|
65 |
+
|
66 |
+
foreach ( $default_arguments as $key => $default_argument ) {
|
67 |
+
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( 'GET' !== $method ) {
|
71 |
+
$content_type = Arr::get( $request_arguments, [ 'headers', 'Content-Type' ] );
|
72 |
+
if ( empty( $content_type ) ) {
|
73 |
+
$content_type = Arr::get( $request_arguments, [ 'headers', 'content-type' ] );
|
74 |
+
}
|
75 |
+
|
76 |
+
// For all other methods we try to make the body into the correct type.
|
77 |
+
if (
|
78 |
+
! empty( $request_arguments['body'] )
|
79 |
+
&& 'application/json' === strtolower( $content_type )
|
80 |
+
) {
|
81 |
+
$request_arguments['body'] = wp_json_encode( $request_arguments[ $key ] );
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
if ( 'GET' === $method ) {
|
86 |
+
$response = wp_remote_get( $url, $request_arguments );
|
87 |
+
} elseif ( 'POST' === $method ) {
|
88 |
+
$response = wp_remote_post( $url, $request_arguments );
|
89 |
+
} else {
|
90 |
+
$request_arguments['method'] = $method;
|
91 |
+
$response = wp_remote_request( $url, $request_arguments );
|
92 |
+
}
|
93 |
+
|
94 |
+
$response = static::process_response( $response );
|
95 |
+
|
96 |
+
if ( is_wp_error( $response ) ) {
|
97 |
+
return static::prepare_errors_to_display( $response );
|
98 |
+
}
|
99 |
+
|
100 |
+
// When raw is true means we dont do any logic.
|
101 |
+
if ( true === $raw ) {
|
102 |
+
return $response;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @todo Determine if Stripe might need a retry pattern like PayPal.
|
107 |
+
*/
|
108 |
+
|
109 |
+
/**
|
110 |
+
* @todo we need to log and be more verbose about the responses. Specially around failed JSON strings.
|
111 |
+
*/
|
112 |
+
$response_body = wp_remote_retrieve_body( $response );
|
113 |
+
$response_body = @json_decode( $response_body, true );
|
114 |
+
if ( empty( $response_body ) ) {
|
115 |
+
return $response;
|
116 |
+
}
|
117 |
+
|
118 |
+
if ( ! is_array( $response_body ) ) {
|
119 |
+
tribe( 'logger' )->log_error( sprintf( '[%s] Unexpected Gateway %s response', $url, $method ), 'tickets-commerce' );
|
120 |
+
|
121 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-client-unexpected', null, [
|
122 |
+
'method' => $method,
|
123 |
+
'url' => $url,
|
124 |
+
'query_args' => $query_args,
|
125 |
+
'request_arguments' => $request_arguments,
|
126 |
+
'response' => $response,
|
127 |
+
'gateway' => static::$gateway::$key,
|
128 |
+
] );
|
129 |
+
}
|
130 |
+
|
131 |
+
return $response_body;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* @inheritDoc
|
136 |
+
*/
|
137 |
+
public static function process_response( $response ) {
|
138 |
+
|
139 |
+
if ( is_wp_error( $response ) ) {
|
140 |
+
return $response;
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( ! empty( $response['response']['code'] ) && 200 !== $response['response']['code'] && ! empty( $response['body'] ) ) {
|
144 |
+
$body = json_decode( $response['body'] );
|
145 |
+
|
146 |
+
if ( ! empty( $body->error ) ) {
|
147 |
+
return new \WP_Error( $response['response']['code'], $body->error->message, $body->error );
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
return $response;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* @inheritDoc
|
156 |
+
*/
|
157 |
+
public static function prepare_errors_to_display( \WP_Error $errors ) {
|
158 |
+
$error = $errors->get_error_data();
|
159 |
+
|
160 |
+
if ( ! $error ) {
|
161 |
+
$return[] = [ $errors->get_error_code(), $errors->get_error_message() ];
|
162 |
+
} elseif ( isset( $error->type ) && isset( $error->message ) ) {
|
163 |
+
$return[] = [ $error->type, $error->message ];
|
164 |
+
} elseif ( isset( $error->code ) && isset( $error->message ) ) {
|
165 |
+
$return[] = [ $error->code, $error->message ];
|
166 |
+
} else {
|
167 |
+
$return[] = $error;
|
168 |
+
}
|
169 |
+
|
170 |
+
return [ 'errors' => $return ];
|
171 |
+
}
|
172 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_Settings.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @since 5.1.6
|
5 |
+
*
|
6 |
+
* @package TEC\Tickets\Commerce
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Abstract Settings
|
13 |
+
*
|
14 |
+
* @since 5.3.0
|
15 |
+
*
|
16 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
17 |
+
*/
|
18 |
+
abstract class Abstract_Settings {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The option key for the gateway-specific sandbox.
|
22 |
+
*
|
23 |
+
* @since 5.3.0
|
24 |
+
*
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
public static $option_sandbox;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Get the list of settings for the gateway.
|
31 |
+
*
|
32 |
+
* @since 5.1.6
|
33 |
+
*
|
34 |
+
* @return array The list of settings for the gateway.
|
35 |
+
*/
|
36 |
+
abstract public function get_settings();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get the HTML for the connection box in the admin
|
40 |
+
*
|
41 |
+
* @since 5.3.0
|
42 |
+
*
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
abstract function get_connection_settings_html();
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Check if this gateway is currently in test mode.
|
49 |
+
*
|
50 |
+
* @since 5.3.0
|
51 |
+
*
|
52 |
+
* @return bool
|
53 |
+
*/
|
54 |
+
public function is_gateway_test_mode() {
|
55 |
+
return tribe_is_truthy( tribe_get_option( static::$option_sandbox ) );
|
56 |
+
}
|
57 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_Signup.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Abstract Signup Contract
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
abstract class Abstract_Signup implements Signup_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Holds the transient key used to store hash passed to PayPal.
|
16 |
+
*
|
17 |
+
* @since 5.3.0 moved to Abstract_Signup
|
18 |
+
* @since 5.1.9
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
public static $signup_hash_meta_key;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Holds the transient key used to link PayPal to this site.
|
26 |
+
*
|
27 |
+
* @since 5.3.0 moved to Abstract_Signup
|
28 |
+
* @since 5.1.9
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
public static $signup_data_meta_key;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Must be implemented in each Signup class, represents the folder from which to load the
|
36 |
+
* templates.
|
37 |
+
*
|
38 |
+
* @since 5.3.0
|
39 |
+
*
|
40 |
+
* @var string
|
41 |
+
*/
|
42 |
+
public $template_folder;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Stores the instance of the template engine that we will use for rendering the page.
|
46 |
+
*
|
47 |
+
* @since 5.3.0 moved to Abstract_Signup
|
48 |
+
* @since 5.1.9
|
49 |
+
*
|
50 |
+
* @var \Tribe__Template
|
51 |
+
*/
|
52 |
+
protected $template;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @inheritDoc
|
56 |
+
*/
|
57 |
+
public function get_template() {
|
58 |
+
if ( empty( $this->template ) ) {
|
59 |
+
$this->template = new \Tribe__Template();
|
60 |
+
$this->template->set_template_origin( \Tribe__Tickets__Main::instance() );
|
61 |
+
$this->template->set_template_folder( $this->template_folder );
|
62 |
+
$this->template->set_template_context_extract( true );
|
63 |
+
}
|
64 |
+
|
65 |
+
return $this->template;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @inheritDoc
|
70 |
+
*/
|
71 |
+
public function get_transient_data() {
|
72 |
+
return get_transient( static::$signup_data_meta_key );
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* @inheritDoc
|
77 |
+
*/
|
78 |
+
public function update_transient_data( $value ) {
|
79 |
+
return set_transient( static::$signup_data_meta_key, $value, DAY_IN_SECONDS );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @inheritDoc
|
84 |
+
*/
|
85 |
+
public function delete_transient_data() {
|
86 |
+
return delete_transient( static::$signup_data_meta_key );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @inheritDoc
|
91 |
+
*/
|
92 |
+
public function get_link_html() {
|
93 |
+
$template_vars = [
|
94 |
+
'url' => $this->generate_url(),
|
95 |
+
];
|
96 |
+
|
97 |
+
return $this->get_template()->template( 'signup-link', $template_vars, false );
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_Webhooks.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
use Tribe__Utils__Array as Arr;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Abstract_Webhooks.
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
13 |
+
*/
|
14 |
+
abstract class Abstract_Webhooks {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Gets the gateway for this webhook.
|
18 |
+
*
|
19 |
+
* @since 5.3.0
|
20 |
+
*
|
21 |
+
* @return Abstract_Gateway
|
22 |
+
*/
|
23 |
+
abstract public function get_gateway() : Abstract_Gateway;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Gets the merchant for this webhook.
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*
|
30 |
+
* @return Abstract_Merchant
|
31 |
+
*/
|
32 |
+
abstract public function get_merchant() : Abstract_Merchant;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Returns the options key for webhook settings in the merchant mode.
|
36 |
+
*
|
37 |
+
* @since 5.3.0
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function get_settings_key() : string {
|
42 |
+
$gateway = $this->get_gateway();
|
43 |
+
$gateway_key = $gateway::get_key();
|
44 |
+
$merchant_mode = $this->get_merchant()->get_mode();
|
45 |
+
|
46 |
+
return "tec_tickets_commerce_{$gateway_key}_{$merchant_mode}_webhooks_settings";
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Retrieves the settings for the webhooks from the database.
|
51 |
+
*
|
52 |
+
* @since 5.3.0
|
53 |
+
*
|
54 |
+
* @param array|string $key Specify each nested index in order.
|
55 |
+
* Example: array( 'lvl1', 'lvl2' );
|
56 |
+
* @param mixed $default Default value if the search finds nothing.
|
57 |
+
*
|
58 |
+
* @return mixed
|
59 |
+
*/
|
60 |
+
public function get_setting( $key, $default = null ) {
|
61 |
+
$settings = get_option( $this->get_settings_key(), null );
|
62 |
+
|
63 |
+
return Arr::get( $settings, $key, $default );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Saves the webhook settings in the database.
|
68 |
+
*
|
69 |
+
* @since 5.3.0
|
70 |
+
*
|
71 |
+
* @param array $settings []
|
72 |
+
*
|
73 |
+
* @return bool
|
74 |
+
*/
|
75 |
+
public function update_settings( array $settings = [] ) {
|
76 |
+
return update_option( $this->get_settings_key(), $settings );
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Retrieves the settings for the webhooks from the database.
|
81 |
+
*
|
82 |
+
* @since 5.3.0
|
83 |
+
*
|
84 |
+
* @return array|null
|
85 |
+
*/
|
86 |
+
public function get_settings() {
|
87 |
+
$settings = get_option( $this->get_settings_key(), null );
|
88 |
+
|
89 |
+
// Without an ID, the webhook settings are invalid.
|
90 |
+
if ( empty( $settings['id'] ) ) {
|
91 |
+
return null;
|
92 |
+
}
|
93 |
+
|
94 |
+
return $settings;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Deletes the stored webhook settings.
|
99 |
+
*
|
100 |
+
* @since 5.3.0
|
101 |
+
*
|
102 |
+
* @return bool
|
103 |
+
*/
|
104 |
+
public function delete_settings() {
|
105 |
+
return delete_option( $this->get_settings_key() );
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Abstract_WhoDat.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
use Tribe__Utils__Array as Arr;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Abstract class to handle WhoDat connections
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
13 |
+
*/
|
14 |
+
abstract class Abstract_WhoDat implements WhoDat_Interface {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Public WhoDat URL, used to authenticate accounts with gateway payment providers
|
18 |
+
*
|
19 |
+
* @since 5.3.0
|
20 |
+
*
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $api_base_url = 'https://whodat.theeventscalendar.com/commerce/v1';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Returns the gateway-specific endpoint to use
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*
|
30 |
+
* @return string
|
31 |
+
*/
|
32 |
+
private function get_gateway_endpoint() {
|
33 |
+
return $this->api_endpoint;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Returns the WhoDat URL to use.
|
38 |
+
*
|
39 |
+
* @since 5.3.0
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
private function get_api_base_url() {
|
44 |
+
|
45 |
+
if ( defined( 'TEC_TC_WHODAT_DEV_URL' ) && TEC_TC_WHODAT_DEV_URL ) {
|
46 |
+
return TEC_TC_WHODAT_DEV_URL;
|
47 |
+
}
|
48 |
+
|
49 |
+
return $this->api_base_url;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @inheritDoc
|
54 |
+
*/
|
55 |
+
public function get_api_url( $endpoint, array $query_args = [] ) {
|
56 |
+
return add_query_arg( $query_args, "{$this->get_api_base_url()}/{$this->get_gateway_endpoint()}/{$endpoint}" );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @inheritDoc
|
61 |
+
*/
|
62 |
+
public function get( $endpoint, array $query_args ) {
|
63 |
+
$url = $this->get_api_url( $endpoint, $query_args );
|
64 |
+
|
65 |
+
$request = wp_remote_get( $url );
|
66 |
+
|
67 |
+
if ( is_wp_error( $request ) ) {
|
68 |
+
$this->log_error( 'WhoDat request error:', $request->get_error_message(), $url );
|
69 |
+
|
70 |
+
return null;
|
71 |
+
}
|
72 |
+
|
73 |
+
$body = wp_remote_retrieve_body( $request );
|
74 |
+
$body = json_decode( $body, true );
|
75 |
+
|
76 |
+
return $body;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* @inheritDoc
|
81 |
+
*/
|
82 |
+
public function post( $endpoint, array $query_args = [], array $request_arguments = [] ) {
|
83 |
+
$url = $this->get_api_url( $endpoint, $query_args );
|
84 |
+
|
85 |
+
$default_arguments = [
|
86 |
+
'body' => [],
|
87 |
+
];
|
88 |
+
|
89 |
+
foreach ( $default_arguments as $key => $default_argument ) {
|
90 |
+
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
91 |
+
}
|
92 |
+
$request_arguments = array_filter( $request_arguments );
|
93 |
+
$request = wp_remote_post( $url, $request_arguments );
|
94 |
+
|
95 |
+
if ( is_wp_error( $request ) ) {
|
96 |
+
$this->log_error( 'WhoDat request error:', $request->get_error_message(), $url );
|
97 |
+
|
98 |
+
return null;
|
99 |
+
}
|
100 |
+
|
101 |
+
$body = wp_remote_retrieve_body( $request );
|
102 |
+
$body = json_decode( $body, true );
|
103 |
+
|
104 |
+
if ( ! is_array( $body ) ) {
|
105 |
+
$this->log_error( 'WhoDat unexpected response:', $body, $url );
|
106 |
+
$this->log_error( 'Response:', print_r( $request, true ), '--->' );
|
107 |
+
|
108 |
+
return null;
|
109 |
+
}
|
110 |
+
|
111 |
+
return $body;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @inheritDoc
|
116 |
+
*/
|
117 |
+
public function log_error( $type, $message, $url ) {
|
118 |
+
$log = sprintf(
|
119 |
+
'[%s] %s %s',
|
120 |
+
$url,
|
121 |
+
$type,
|
122 |
+
$message
|
123 |
+
);
|
124 |
+
tribe( 'logger' )->log_error( $log, 'whodat-connection' );
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Gateway_Interface.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Gateway Interface
|
7 |
+
*
|
8 |
+
* @since 5.1.6
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
interface Gateway_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Get's the key for this Commerce Gateway.
|
16 |
+
*
|
17 |
+
* @since 5.1.6
|
18 |
+
*
|
19 |
+
* @return string What is the Key used.
|
20 |
+
*/
|
21 |
+
public static function get_key();
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Get the provider key for this Commerce Gateway.
|
25 |
+
*
|
26 |
+
* @since 5.1.9
|
27 |
+
*
|
28 |
+
* @return string What is the ORM Provider Key used.
|
29 |
+
*/
|
30 |
+
public static function get_provider_key();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get the label for this Commerce Gateway.
|
34 |
+
*
|
35 |
+
* @since 5.1.6
|
36 |
+
*
|
37 |
+
* @return string What label we are using for this gateway.
|
38 |
+
*/
|
39 |
+
public static function get_label();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get the settings url for this Commerce Gateway section.
|
43 |
+
*
|
44 |
+
* @since 5.3.0
|
45 |
+
*
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
+
public static function get_settings_url();
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get the list of settings for the gateway.
|
52 |
+
*
|
53 |
+
* @since 5.1.6
|
54 |
+
*
|
55 |
+
* @return array The list of settings for the gateway.
|
56 |
+
*/
|
57 |
+
public function get_settings();
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Determine whether the gateway is active.
|
61 |
+
*
|
62 |
+
* @since 5.1.6
|
63 |
+
*
|
64 |
+
* @return bool Whether the gateway is active.
|
65 |
+
*/
|
66 |
+
public static function is_active();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Determine whether the gateway is connected.
|
70 |
+
*
|
71 |
+
* @since 5.2.0
|
72 |
+
*
|
73 |
+
* @return bool Whether the gateway is connected.
|
74 |
+
*/
|
75 |
+
public static function is_connected();
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Determine whether the gateway should be shown as an available gateway.
|
79 |
+
*
|
80 |
+
* @since 5.1.6
|
81 |
+
*
|
82 |
+
* @return bool Whether the gateway should be shown as an available gateway.
|
83 |
+
*/
|
84 |
+
public static function should_show();
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Register the gateway for Tickets Commerce.
|
88 |
+
*
|
89 |
+
* @since 5.1.6
|
90 |
+
*
|
91 |
+
* @param array $gateways The list of registered Tickets Commerce gateways.
|
92 |
+
*
|
93 |
+
* @return Abstract_Gateway[] The list of registered Tickets Commerce gateways.
|
94 |
+
*/
|
95 |
+
public function register_gateway( array $gateways );
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Get all the admin notices.
|
99 |
+
*
|
100 |
+
* @since 5.2.0.
|
101 |
+
*
|
102 |
+
* @return array
|
103 |
+
*/
|
104 |
+
public function get_admin_notices();
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Displays error notice for invalid API responses, with error message from API response data.
|
108 |
+
*
|
109 |
+
* @since 5.2.0
|
110 |
+
*
|
111 |
+
* @param array $response Raw Response data.
|
112 |
+
* @param string $message Additional message to show with error message.
|
113 |
+
* @param string $slug Slug for notice container.
|
114 |
+
*/
|
115 |
+
public function handle_invalid_response( $response, $message, $slug = 'error' );
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Renders the template for the checkout.
|
119 |
+
*
|
120 |
+
* @since 5.3.0
|
121 |
+
*
|
122 |
+
* @param \Tribe__Template $template Template used to render the checkout.
|
123 |
+
*
|
124 |
+
* @return string
|
125 |
+
*/
|
126 |
+
public function render_checkout_template( \Tribe__Template $template ): string;
|
127 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Merchant_Interface.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Merchant Interface
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
interface Merchant_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Gets the account key.
|
16 |
+
*
|
17 |
+
* @since 5.3.0
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public function get_account_key();
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Save merchant data.
|
25 |
+
*
|
26 |
+
* @since 5.3.0
|
27 |
+
*
|
28 |
+
* @return boolean
|
29 |
+
*/
|
30 |
+
public function save();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Transforms the Merchant data into an array.
|
34 |
+
*
|
35 |
+
* @since 5.3.0
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function to_array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Creates this object from an array.
|
43 |
+
*
|
44 |
+
* @since 5.3.0
|
45 |
+
*
|
46 |
+
* @param array $data
|
47 |
+
* @param boolean $needs_save
|
48 |
+
*
|
49 |
+
* @return boolean
|
50 |
+
*/
|
51 |
+
public function from_array( array $data, $needs_save = true );
|
52 |
+
|
53 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/REST_Endpoint_Interface.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* REST Endpoint Interface.
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
interface REST_Endpoint_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Register the actual endpoint on WP Rest API.
|
16 |
+
*
|
17 |
+
* @since 5.3.0 made part of the REST_Endpoint_Interface
|
18 |
+
* @since 5.1.9
|
19 |
+
*/
|
20 |
+
public function register();
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Gets the Endpoint path for this route.
|
24 |
+
*
|
25 |
+
* @since 5.3.0 moved to Abstract_REST_Endpoint
|
26 |
+
* @since 5.1.9
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function get_endpoint_path();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get the REST API route URL.
|
34 |
+
*
|
35 |
+
* @since 5.3.0 moved to Abstract_REST_Endpoint
|
36 |
+
* @since 5.1.9
|
37 |
+
*
|
38 |
+
* @return string The REST API route URL.
|
39 |
+
*/
|
40 |
+
public function get_route_url();
|
41 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Requests_Interface.php
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Requests Interface for gateways.
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts;
|
11 |
+
*/
|
12 |
+
interface Requests_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Send a GET request to the Stripe API.
|
16 |
+
*
|
17 |
+
* @since 5.3.0
|
18 |
+
*
|
19 |
+
* @param string $endpoint
|
20 |
+
* @param array $query_args
|
21 |
+
* @param array $request_arguments
|
22 |
+
* @param bool $raw
|
23 |
+
*
|
24 |
+
* @return array|null
|
25 |
+
*/
|
26 |
+
public static function get( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false );
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Send a POST request.
|
30 |
+
*
|
31 |
+
* @since 5.3.0
|
32 |
+
*
|
33 |
+
* @param string $endpoint
|
34 |
+
* @param array $query_args
|
35 |
+
* @param array $request_arguments
|
36 |
+
* @param bool $raw
|
37 |
+
*
|
38 |
+
* @return array|null
|
39 |
+
*/
|
40 |
+
public static function post( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Send a PATCH request to the Stripe API.
|
44 |
+
*
|
45 |
+
* @since 5.3.0
|
46 |
+
*
|
47 |
+
* @param string $endpoint
|
48 |
+
* @param array $query_args
|
49 |
+
* @param array $request_arguments
|
50 |
+
* @param bool $raw
|
51 |
+
*
|
52 |
+
* @return array|null
|
53 |
+
*/
|
54 |
+
public static function patch( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false );
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Send a DELETE request to the Stripe API.
|
58 |
+
*
|
59 |
+
* @since 5.3.0
|
60 |
+
*
|
61 |
+
* @param string $endpoint
|
62 |
+
* @param array $query_args
|
63 |
+
* @param array $request_arguments
|
64 |
+
* @param bool $raw
|
65 |
+
*
|
66 |
+
* @return array|null
|
67 |
+
*/
|
68 |
+
public static function delete( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false );
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Send a given method request to a given URL in the Stripe API.
|
72 |
+
*
|
73 |
+
* @since 5.3.0
|
74 |
+
*
|
75 |
+
* @param string $method
|
76 |
+
* @param string $url
|
77 |
+
* @param array $query_args
|
78 |
+
* @param array $request_arguments
|
79 |
+
* @param bool $raw
|
80 |
+
* @param int $retries Param used to determine the amount of time this particular request was retried.
|
81 |
+
*
|
82 |
+
* @return array|\WP_Error
|
83 |
+
*/
|
84 |
+
public static function request( $method, $url, array $query_args = [], array $request_arguments = [], $raw = false, $retries = 0 );
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Process Request responses to catch any error code and transform in a WP_Error.
|
88 |
+
* Returns the request array if no errors are found. Or a WP_Error object.
|
89 |
+
*
|
90 |
+
* @since 5.3.0
|
91 |
+
*
|
92 |
+
* @param array|\WP_Error $response Array of server data.
|
93 |
+
*
|
94 |
+
* @return array|\WP_Error
|
95 |
+
*/
|
96 |
+
public static function process_response( $response );
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Format user-facing errors to the list structure expected in the checkout script.
|
100 |
+
*
|
101 |
+
* @since 5.3.0
|
102 |
+
*
|
103 |
+
* @param \WP_Error $errors WP_Error instance.
|
104 |
+
*
|
105 |
+
* @return array[]
|
106 |
+
*/
|
107 |
+
public static function prepare_errors_to_display( \WP_Error $errors );
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Get REST API endpoint URL for requests.
|
111 |
+
*
|
112 |
+
* @since 5.3.0
|
113 |
+
*
|
114 |
+
* @param string $endpoint The endpoint path.
|
115 |
+
* @param array $query_args Query args appended to the URL.
|
116 |
+
*
|
117 |
+
* @return string The API URL.
|
118 |
+
*
|
119 |
+
*/
|
120 |
+
public static function get_api_url( $endpoint, array $query_args = [] );
|
121 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Signup_Interface.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Signup Interface.
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
interface Signup_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Gets the content for the template used for the sign-up link.
|
16 |
+
*
|
17 |
+
* @since 5.3.0
|
18 |
+
*
|
19 |
+
* @return false|string
|
20 |
+
*/
|
21 |
+
public function get_link_html();
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Gets the template instance used to setup the rendering of the page.
|
25 |
+
*
|
26 |
+
* @since 5.3.0 moved to Abstract_Signup
|
27 |
+
* @since 5.1.9
|
28 |
+
*
|
29 |
+
* @return \Tribe__Template
|
30 |
+
*/
|
31 |
+
public function get_template();
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Gets the saved hash for a given user, empty when non-existent.
|
35 |
+
*
|
36 |
+
* @since 5.3.0 moved to Abstract_Signup
|
37 |
+
* @since 5.1.9
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_transient_data();
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Saves the URL in a transient for later use.
|
45 |
+
*
|
46 |
+
* @since 5.3.0 moved to Abstract_Signup
|
47 |
+
* @since 5.1.9
|
48 |
+
*
|
49 |
+
* @param string $value URL for signup.
|
50 |
+
*
|
51 |
+
* @return bool
|
52 |
+
*/
|
53 |
+
public function update_transient_data( $value );
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Delete url transient from the DB.
|
57 |
+
*
|
58 |
+
* @since 5.3.0 moved to Abstract_Signup
|
59 |
+
* @since 5.1.9
|
60 |
+
*
|
61 |
+
* @return bool
|
62 |
+
*/
|
63 |
+
public function delete_transient_data();
|
64 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/Webhook_Event_Interface.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Status\Status_Interface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Interface for Webhook Event handler classes.
|
9 |
+
*/
|
10 |
+
interface Webhook_Event_Interface {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Generic handler for webhook events.
|
14 |
+
*
|
15 |
+
* @since 5.3.0
|
16 |
+
*
|
17 |
+
* @param array $event
|
18 |
+
* @param Status_Interface $new_status
|
19 |
+
* @param \WP_REST_Request $request
|
20 |
+
* @param \WP_REST_Response $response
|
21 |
+
*
|
22 |
+
* @return \WP_REST_Response|\WP_Error
|
23 |
+
*/
|
24 |
+
public static function handle( array $event, Status_Interface $new_status, \WP_REST_Request $request, \WP_REST_Response $response );
|
25 |
+
}
|
src/Tickets/Commerce/Gateways/Contracts/WhoDat_Interface.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Contracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* WhoDat Interface
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Contracts
|
11 |
+
*/
|
12 |
+
interface WhoDat_Interface {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Send a GET request to WhoDat.
|
16 |
+
*
|
17 |
+
* @since 5.3.0 moved to Abstract_WhoDat.
|
18 |
+
* @since 5.1.9
|
19 |
+
*
|
20 |
+
* @param string $endpoint
|
21 |
+
* @param array $query_args
|
22 |
+
*
|
23 |
+
* @return mixed|null
|
24 |
+
*/
|
25 |
+
public function get( $endpoint, array $query_args );
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Get REST API endpoint URL for requests.
|
29 |
+
*
|
30 |
+
* @since 5.3.0 moved to Abstract_WhoDat.
|
31 |
+
* @since 5.1.9
|
32 |
+
*
|
33 |
+
* @param string $endpoint The endpoint path.
|
34 |
+
* @param array $query_args Query args appended to the URL.
|
35 |
+
*
|
36 |
+
* @return string The API URL.
|
37 |
+
*/
|
38 |
+
public function get_api_url( $endpoint, array $query_args = [] );
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Log WhoDat errors.
|
42 |
+
*
|
43 |
+
* @since 5.3.0 moved to Abstract_WhoDat and made public.
|
44 |
+
* @since 5.1.9
|
45 |
+
*
|
46 |
+
* @param string $type
|
47 |
+
* @param string $message
|
48 |
+
* @param string $url
|
49 |
+
*/
|
50 |
+
public function log_error( $type, $message, $url );
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Send a POST request to WhoDat.
|
54 |
+
*
|
55 |
+
* @since 5.3.0 moved to Abstract_WhoDat.
|
56 |
+
* @since 5.1.9
|
57 |
+
*
|
58 |
+
* @param string $endpoint
|
59 |
+
* @param array $query_args
|
60 |
+
* @param array $request_arguments
|
61 |
+
*
|
62 |
+
* @return array|null
|
63 |
+
*/
|
64 |
+
public function post( $endpoint, array $query_args = [], array $request_arguments = [] );
|
65 |
+
}
|
src/Tickets/Commerce/Gateways/Interface_Gateway.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class Interface_Gateway
|
7 |
-
*
|
8 |
-
* @since 5.1.6
|
9 |
-
*
|
10 |
-
* @package TEC\Tickets\Commerce\Gateways
|
11 |
-
*/
|
12 |
-
interface Interface_Gateway {
|
13 |
-
/**
|
14 |
-
* Get's the key for this Commerce Gateway.
|
15 |
-
*
|
16 |
-
* @since 5.1.6
|
17 |
-
*
|
18 |
-
* @return string What is the Key used.
|
19 |
-
*/
|
20 |
-
public static function get_key();
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Get's the provider key for this Commerce Gateway.
|
24 |
-
*
|
25 |
-
* @since 5.1.9
|
26 |
-
*
|
27 |
-
* @return string What is the ORM Provider Key used.
|
28 |
-
*/
|
29 |
-
public static function get_provider_key();
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Get's the label for this Commerce Gateway.
|
33 |
-
*
|
34 |
-
* @since 5.1.6
|
35 |
-
*
|
36 |
-
* @return string What label we are using for this gateway.
|
37 |
-
*/
|
38 |
-
public static function get_label();
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Determine whether the gateway is active.
|
42 |
-
*
|
43 |
-
* @since 5.1.6
|
44 |
-
*
|
45 |
-
* @return bool Whether the gateway is active.
|
46 |
-
*/
|
47 |
-
public static function is_active();
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Determine whether the gateway is connected.
|
51 |
-
*
|
52 |
-
* @since 5.2.0
|
53 |
-
*
|
54 |
-
* @return bool Whether the gateway is connected.
|
55 |
-
*/
|
56 |
-
public static function is_connected();
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Determine whether the gateway should be shown as an available gateway.
|
60 |
-
*
|
61 |
-
* @since 5.1.6
|
62 |
-
*
|
63 |
-
* @return bool Whether the gateway should be shown as an available gateway.
|
64 |
-
*/
|
65 |
-
public static function should_show();
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Register the gateway for Tickets Commerce.
|
69 |
-
*
|
70 |
-
* @since 5.1.6
|
71 |
-
*
|
72 |
-
* @param array $gateways The list of registered Tickets Commerce gateways.
|
73 |
-
*
|
74 |
-
* @return Abstract_Gateway[] The list of registered Tickets Commerce gateways.
|
75 |
-
*/
|
76 |
-
public function register_gateway( array $gateways );
|
77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/Manager.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways;
|
4 |
|
|
|
5 |
use TEC\Tickets\Settings;
|
6 |
|
7 |
/**
|
@@ -20,7 +21,7 @@ class Manager {
|
|
20 |
* @var string
|
21 |
*/
|
22 |
public static $option_gateway = '_tickets_commerce_gateway';
|
23 |
-
|
24 |
/**
|
25 |
* Get the list of registered Tickets Commerce gateways.
|
26 |
*
|
@@ -96,8 +97,15 @@ class Manager {
|
|
96 |
* @return Abstract_Gateway
|
97 |
*/
|
98 |
public function get_gateway_by_key( $key ) {
|
|
|
|
|
|
|
|
|
99 |
$gateways = $this->get_gateways();
|
|
|
|
|
|
|
100 |
|
101 |
-
return
|
102 |
}
|
103 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
6 |
use TEC\Tickets\Settings;
|
7 |
|
8 |
/**
|
21 |
* @var string
|
22 |
*/
|
23 |
public static $option_gateway = '_tickets_commerce_gateway';
|
24 |
+
|
25 |
/**
|
26 |
* Get the list of registered Tickets Commerce gateways.
|
27 |
*
|
97 |
* @return Abstract_Gateway
|
98 |
*/
|
99 |
public function get_gateway_by_key( $key ) {
|
100 |
+
if ( empty( $key ) ) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
$gateways = $this->get_gateways();
|
105 |
+
if ( ! isset( $gateways[ $key ] ) ) {
|
106 |
+
return;
|
107 |
+
}
|
108 |
|
109 |
+
return $gateways[ $key ];
|
110 |
}
|
111 |
}
|
src/Tickets/Commerce/Gateways/Manual/Gateway.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\Manual;
|
4 |
|
5 |
-
use TEC\Tickets\Commerce\Gateways\Abstract_Gateway;
|
6 |
|
7 |
/**
|
8 |
* Class Manual Gateway.
|
@@ -53,4 +53,13 @@ class Gateway extends Abstract_Gateway {
|
|
53 |
public static function should_show() {
|
54 |
return false;
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\Manual;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
6 |
|
7 |
/**
|
8 |
* Class Manual Gateway.
|
53 |
public static function should_show() {
|
54 |
return false;
|
55 |
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @inheritDoc
|
59 |
+
*
|
60 |
+
* @since 5.3.0
|
61 |
+
*/
|
62 |
+
public function get_admin_notices() {
|
63 |
+
return [];
|
64 |
+
}
|
65 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Assets.php
CHANGED
@@ -9,6 +9,7 @@
|
|
9 |
|
10 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
11 |
|
|
|
12 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\On_Boarding_Endpoint;
|
13 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\Order_Endpoint;
|
14 |
|
@@ -91,10 +92,12 @@ class Assets extends \tad_DI52_ServiceProvider {
|
|
91 |
'tribe-tickets-loader',
|
92 |
'tribe-tickets-commerce-js',
|
93 |
'tribe-tickets-commerce-notice-js',
|
|
|
94 |
],
|
95 |
null,
|
96 |
[
|
97 |
'groups' => [
|
|
|
98 |
'tec-tickets-commerce-gateway-paypal',
|
99 |
],
|
100 |
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
@@ -187,7 +190,7 @@ class Assets extends \tad_DI52_ServiceProvider {
|
|
187 |
* @return bool If the `PayPal` assets should be enqueued or not.
|
188 |
*/
|
189 |
public function should_enqueue_assets() {
|
190 |
-
return tribe( Gateway::class )->is_active();
|
191 |
}
|
192 |
|
193 |
/**
|
9 |
|
10 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
11 |
|
12 |
+
use TEC\Tickets\Commerce\Checkout;
|
13 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\On_Boarding_Endpoint;
|
14 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\Order_Endpoint;
|
15 |
|
92 |
'tribe-tickets-loader',
|
93 |
'tribe-tickets-commerce-js',
|
94 |
'tribe-tickets-commerce-notice-js',
|
95 |
+
'tribe-tickets-commerce-base-gateway-checkout-toggler',
|
96 |
],
|
97 |
null,
|
98 |
[
|
99 |
'groups' => [
|
100 |
+
'tribe-tickets-commerce-checkout',
|
101 |
'tec-tickets-commerce-gateway-paypal',
|
102 |
],
|
103 |
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
190 |
* @return bool If the `PayPal` assets should be enqueued or not.
|
191 |
*/
|
192 |
public function should_enqueue_assets() {
|
193 |
+
return tribe( Checkout::class )->is_current_page() && tribe( Gateway::class )->is_active();
|
194 |
}
|
195 |
|
196 |
/**
|
src/Tickets/Commerce/Gateways/PayPal/Buttons.php
CHANGED
@@ -43,32 +43,20 @@ class Buttons {
|
|
43 |
return $this->template;
|
44 |
}
|
45 |
|
|
|
46 |
/**
|
47 |
-
*
|
48 |
*
|
49 |
-
* @since 5.
|
50 |
*
|
51 |
-
* @return
|
52 |
*/
|
53 |
-
public function
|
54 |
-
// Bail if PayPal is not configured and active.
|
55 |
-
if ( ! tribe( Merchant::class )->is_active() ) {
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
|
59 |
-
$items = tribe( Cart::class )->get_items_in_cart( true );
|
60 |
-
|
61 |
-
// Bail if there are no tickets in cart.
|
62 |
-
if ( empty( $items ) ) {
|
63 |
-
return;
|
64 |
-
}
|
65 |
-
|
66 |
$client = tribe( Client::class );
|
67 |
-
|
68 |
$template_vars = [
|
69 |
'url' => $client->get_js_sdk_url(),
|
70 |
'attribution_id' => Gateway::ATTRIBUTION_ID,
|
71 |
-
'must_login' => $must_login,
|
72 |
];
|
73 |
|
74 |
$client_token_data = $client->get_client_token();
|
@@ -79,59 +67,10 @@ class Buttons {
|
|
79 |
$template_vars['client_token_expires_in'] = $client_token_expires_in - 60;
|
80 |
}
|
81 |
|
82 |
-
$
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
return $html;
|
87 |
-
}
|
88 |
-
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Include the payment buttons from PayPal into the Checkout page.
|
92 |
-
*
|
93 |
-
* @since 5.2.0
|
94 |
-
*
|
95 |
-
* @param string $file Which file we are loading.
|
96 |
-
* @param string $name Name of file file
|
97 |
-
* @param \Tribe__Template $template Which Template object is being used.
|
98 |
-
*
|
99 |
-
*/
|
100 |
-
public function include_payment_buttons( $file, $name, $template ) {
|
101 |
-
$must_login = ! is_user_logged_in() && tribe( Module::class )->login_required();
|
102 |
-
|
103 |
-
$template->template( 'gateway/paypal/buttons', [ 'must_login' => $must_login ] );
|
104 |
-
}
|
105 |
-
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Include the advanced payment fields from PayPal into the Checkout page.
|
109 |
-
*
|
110 |
-
* @since 5.2.0
|
111 |
-
*
|
112 |
-
* @param string $file Which file we are loading.
|
113 |
-
* @param string $name Name of file file
|
114 |
-
* @param \Tribe__Template $template Which Template object is being used.
|
115 |
-
*
|
116 |
-
*/
|
117 |
-
public function include_advanced_payments( $file, $name, $template ) {
|
118 |
-
$items = tribe( Cart::class )->get_items_in_cart( true );
|
119 |
-
|
120 |
-
// Bail if there are no tickets in cart.
|
121 |
-
if ( empty( $items ) ) {
|
122 |
-
return;
|
123 |
-
}
|
124 |
-
|
125 |
-
$must_login = ! is_user_logged_in() && tribe( Module::class )->login_required();
|
126 |
-
$merchant = tribe( Merchant::class );
|
127 |
|
128 |
-
$
|
129 |
-
'gateway/paypal/advanced-payments',
|
130 |
-
[
|
131 |
-
'supports_custom_payments' => $merchant->get_supports_custom_payments(),
|
132 |
-
'active_custom_payments' => $merchant->get_active_custom_payments(),
|
133 |
-
'must_login' => $must_login,
|
134 |
-
]
|
135 |
-
);
|
136 |
}
|
137 |
}
|
43 |
return $this->template;
|
44 |
}
|
45 |
|
46 |
+
|
47 |
/**
|
48 |
+
* Returns the variables for gateway's checkout template.
|
49 |
*
|
50 |
+
* @since 5.3.0
|
51 |
*
|
52 |
+
* @return []
|
53 |
*/
|
54 |
+
public function get_checkout_template_vars() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
$client = tribe( Client::class );
|
56 |
+
|
57 |
$template_vars = [
|
58 |
'url' => $client->get_js_sdk_url(),
|
59 |
'attribution_id' => Gateway::ATTRIBUTION_ID,
|
|
|
60 |
];
|
61 |
|
62 |
$client_token_data = $client->get_client_token();
|
67 |
$template_vars['client_token_expires_in'] = $client_token_expires_in - 60;
|
68 |
}
|
69 |
|
70 |
+
$merchant = tribe( Merchant::class );
|
71 |
+
$template_vars['supports_custom_payments'] = $merchant->get_supports_custom_payments();
|
72 |
+
$template_vars['active_custom_payments'] = $merchant->get_active_custom_payments();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
return $template_vars;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Gateway.php
CHANGED
@@ -2,8 +2,9 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
-
use TEC\Tickets\Commerce\Gateways\Abstract_Gateway;
|
6 |
use TEC\Tickets\Commerce\Notice_Handler;
|
|
|
7 |
|
8 |
/**
|
9 |
* Class Gateway
|
@@ -18,7 +19,17 @@ class Gateway extends Abstract_Gateway {
|
|
18 |
protected static $key = 'paypal';
|
19 |
|
20 |
/**
|
21 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
*
|
23 |
* @since 5.1.6
|
24 |
*
|
@@ -47,136 +58,101 @@ class Gateway extends Abstract_Gateway {
|
|
47 |
/**
|
48 |
* @inheritDoc
|
49 |
*/
|
50 |
-
public static function is_connected() {
|
51 |
-
// If this gateway shouldn't be shown, then don't change the active status.
|
52 |
-
if ( ! static::should_show() ) {
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
|
56 |
-
return tribe( Merchant::class )->is_connected();
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @inheritDoc
|
61 |
-
*/
|
62 |
-
public static function is_active() {
|
63 |
-
// If this gateway shouldn't be shown, then don't change the active status.
|
64 |
-
if ( ! static::should_show() ) {
|
65 |
-
return false;
|
66 |
-
}
|
67 |
-
|
68 |
-
return tribe( Merchant::class )->is_active();
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Get the list of settings for the gateway.
|
73 |
-
*
|
74 |
-
* @since 5.1.6
|
75 |
-
*
|
76 |
-
* @return array The list of settings for the gateway.
|
77 |
-
*/
|
78 |
-
public function get_settings() {
|
79 |
-
return tribe( Settings::class )->get_settings();
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Determine whether Tickets Commerce is in test mode.
|
84 |
-
*
|
85 |
-
* @since 5.1.6
|
86 |
-
*
|
87 |
-
* @return bool Whether Tickets Commerce is in test mode.
|
88 |
-
*/
|
89 |
-
public static function is_test_mode() {
|
90 |
-
return tribe_is_truthy( tribe_get_option( \TEC\Tickets\Commerce\Settings::$option_sandbox ) );
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Get all the admin notices.
|
95 |
-
*
|
96 |
-
* @since 5.2.0.
|
97 |
-
*
|
98 |
-
* @return array
|
99 |
-
*/
|
100 |
public function get_admin_notices() {
|
101 |
$notices = [
|
102 |
[
|
103 |
-
'slug'
|
104 |
-
'content'
|
105 |
-
'type'
|
106 |
],
|
107 |
[
|
108 |
-
'slug'
|
109 |
-
'content'
|
110 |
-
'type'
|
111 |
],
|
112 |
[
|
113 |
-
'slug'
|
114 |
-
'content'
|
115 |
-
'type'
|
116 |
],
|
117 |
[
|
118 |
-
'slug'
|
119 |
-
'content'
|
120 |
-
'type'
|
121 |
],
|
122 |
[
|
123 |
-
'slug'
|
124 |
-
'content'
|
125 |
-
'type'
|
126 |
],
|
127 |
[
|
128 |
-
'slug'
|
129 |
-
'content'
|
130 |
-
'type'
|
131 |
],
|
132 |
[
|
133 |
-
'slug'
|
134 |
-
'content'
|
135 |
-
'type'
|
136 |
],
|
137 |
[
|
138 |
-
'slug'
|
139 |
-
'content'
|
140 |
-
'type'
|
141 |
],
|
142 |
[
|
143 |
-
'slug'
|
144 |
-
'content'
|
145 |
-
'type'
|
146 |
],
|
147 |
[
|
148 |
-
'slug'
|
149 |
-
'content'
|
150 |
-
'type'
|
151 |
],
|
152 |
];
|
153 |
|
154 |
-
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
-
*
|
159 |
-
*
|
160 |
-
* @since 5.2.0
|
161 |
-
*
|
162 |
-
* @param array $response Raw Response data.
|
163 |
-
* @param string $message Additional message to show with error message.
|
164 |
-
* @param string $slug Slug for notice container.
|
165 |
*/
|
166 |
-
public function
|
|
|
|
|
167 |
|
168 |
-
|
169 |
-
|
|
|
|
|
|
|
|
|
170 |
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
-
$
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}
|
182 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
6 |
use TEC\Tickets\Commerce\Notice_Handler;
|
7 |
+
use \Tribe__Tickets__Main;
|
8 |
|
9 |
/**
|
10 |
* Class Gateway
|
19 |
protected static $key = 'paypal';
|
20 |
|
21 |
/**
|
22 |
+
* @inheritDoc
|
23 |
+
*/
|
24 |
+
protected static $settings = Settings::class;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @inheritDoc
|
28 |
+
*/
|
29 |
+
protected static $merchant = Merchant::class;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* PayPal's attribution ID for requests.
|
33 |
*
|
34 |
* @since 5.1.6
|
35 |
*
|
58 |
/**
|
59 |
* @inheritDoc
|
60 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
public function get_admin_notices() {
|
62 |
$notices = [
|
63 |
[
|
64 |
+
'slug' => 'tc-paypal-signup-complete',
|
65 |
+
'content' => __( 'PayPal is now connected.', 'event-tickets' ),
|
66 |
+
'type' => 'info',
|
67 |
],
|
68 |
[
|
69 |
+
'slug' => 'tc-paypal-disconnect-failed',
|
70 |
+
'content' => __( 'Failed to disconnect PayPal account.', 'event-tickets' ),
|
71 |
+
'type' => 'error',
|
72 |
],
|
73 |
[
|
74 |
+
'slug' => 'tc-paypal-disconnected',
|
75 |
+
'content' => __( 'Disconnected PayPal account.', 'event-tickets' ),
|
76 |
+
'type' => 'info',
|
77 |
],
|
78 |
[
|
79 |
+
'slug' => 'tc-paypal-refresh-token-failed',
|
80 |
+
'content' => __( 'Failed to refresh PayPal access token.', 'event-tickets' ),
|
81 |
+
'type' => 'error',
|
82 |
],
|
83 |
[
|
84 |
+
'slug' => 'tc-paypal-refresh-token',
|
85 |
+
'content' => __( 'PayPal access token was refreshed successfully.', 'event-tickets' ),
|
86 |
+
'type' => 'info',
|
87 |
],
|
88 |
[
|
89 |
+
'slug' => 'tc-paypal-refresh-user-info-failed',
|
90 |
+
'content' => __( 'Failed to refresh PayPal user info.', 'event-tickets' ),
|
91 |
+
'type' => 'error',
|
92 |
],
|
93 |
[
|
94 |
+
'slug' => 'tc-paypal-refresh-user-info',
|
95 |
+
'content' => __( 'PayPal user info was refreshed successfully.', 'event-tickets' ),
|
96 |
+
'type' => 'info',
|
97 |
],
|
98 |
[
|
99 |
+
'slug' => 'tc-paypal-refresh-webhook-failed',
|
100 |
+
'content' => __( 'Failed to refresh PayPal webhooks.', 'event-tickets' ),
|
101 |
+
'type' => 'error',
|
102 |
],
|
103 |
[
|
104 |
+
'slug' => 'tc-paypal-refresh-webhook-success',
|
105 |
+
'content' => __( 'PayPal webhooks refreshed successfully.', 'event-tickets' ),
|
106 |
+
'type' => 'info',
|
107 |
],
|
108 |
[
|
109 |
+
'slug' => 'tc-paypal-ssl-not-available',
|
110 |
+
'content' => __( 'A valid SSL certificate is required to set up your PayPal account and accept payments', 'event-tickets' ),
|
111 |
+
'type' => 'error',
|
112 |
],
|
113 |
];
|
114 |
|
115 |
+
return $notices;
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
+
* @inheritDoc
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
*/
|
121 |
+
public function get_logo_url(): string {
|
122 |
+
return Tribe__Tickets__Main::instance()->plugin_url . 'src/resources/images/admin/paypal_logo.png';
|
123 |
+
}
|
124 |
|
125 |
+
/**
|
126 |
+
* @inheritDoc
|
127 |
+
*/
|
128 |
+
public function get_subtitle(): string {
|
129 |
+
return __( 'Enable payments through PayPal, Venmo, and credit card.', 'event-tickets' );
|
130 |
+
}
|
131 |
|
132 |
+
/**
|
133 |
+
* @inheritDoc
|
134 |
+
*/
|
135 |
+
public static function is_enabled(): bool {
|
136 |
+
if ( ! static::should_show() ) {
|
137 |
+
return false;
|
138 |
+
}
|
139 |
|
140 |
+
$option_value = tribe_get_option( static::get_enabled_option_key() );
|
141 |
+
if ( '' !== $option_value ) {
|
142 |
+
return (bool) $option_value;
|
143 |
+
}
|
144 |
+
|
145 |
+
// If option is not explicitly set, the default will be if PayPal is connected.
|
146 |
+
return static::is_connected();
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* @inheritDoc
|
151 |
+
*/
|
152 |
+
public function render_checkout_template( \Tribe__Template $template ): string {
|
153 |
+
$gateway_key = static::get_key();
|
154 |
+
$template_path = "gateway/{$gateway_key}/container";
|
155 |
+
|
156 |
+
return $template->template( $template_path, tribe( Buttons::class )->get_checkout_template_vars() );
|
157 |
}
|
158 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Hooks.php
CHANGED
@@ -60,9 +60,6 @@ class Hooks extends \tad_DI52_ServiceProvider {
|
|
60 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-webhook', [ $this, 'handle_action_refresh_webhook' ] );
|
61 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-resync-connection', [ $this, 'handle_action_refresh_connection' ] );
|
62 |
|
63 |
-
add_action( 'tribe_template_after_include:tickets/v2/commerce/checkout/footer', [ $this, 'include_payment_buttons' ], 15, 3 );
|
64 |
-
add_action( 'tribe_template_after_include:tickets/v2/commerce/checkout/footer', [ $this, 'include_advanced_payments' ], 20, 3 );
|
65 |
-
add_action( 'tribe_template_after_include:tickets/v2/commerce/checkout/footer', [ $this, 'include_client_js_sdk_script' ], 30, 3 );
|
66 |
add_action( 'wp_ajax_tec_tickets_commerce_gateway_paypal_refresh_connect_url', [ $this, 'ajax_refresh_connect_url' ] );
|
67 |
add_action( 'admin_init', [ $this, 'render_ssl_notice' ] );
|
68 |
|
@@ -126,46 +123,6 @@ class Hooks extends \tad_DI52_ServiceProvider {
|
|
126 |
return $template_vars;
|
127 |
}
|
128 |
|
129 |
-
/**
|
130 |
-
* Include the Client JS SDK script into checkout.
|
131 |
-
*
|
132 |
-
* @since 5.1.9
|
133 |
-
*
|
134 |
-
* @param string $file Which file we are loading.
|
135 |
-
* @param string $name Name of file file
|
136 |
-
* @param \Tribe__Template $template Which Template object is being used.
|
137 |
-
*
|
138 |
-
*/
|
139 |
-
public function include_client_js_sdk_script( $file, $name, $template ) {
|
140 |
-
echo tribe( Buttons::class )->get_checkout_script();
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Include the payment buttons from PayPal into the Checkout page.
|
145 |
-
*
|
146 |
-
* @since 5.1.9
|
147 |
-
*
|
148 |
-
* @param string $file Which file we are loading.
|
149 |
-
* @param string $name Name of file file
|
150 |
-
* @param \Tribe__Template $template Which Template object is being used.
|
151 |
-
*/
|
152 |
-
public function include_payment_buttons( $file, $name, $template ) {
|
153 |
-
$this->container->make( Buttons::class )->include_payment_buttons( $file, $name, $template );
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Include the advanced payment fields from PayPal in the Checkout page.
|
158 |
-
*
|
159 |
-
* @since 5.2.0
|
160 |
-
*
|
161 |
-
* @param string $file Which file we are loading.
|
162 |
-
* @param string $name Name of file file
|
163 |
-
* @param \Tribe__Template $template Which Template object is being used.
|
164 |
-
*/
|
165 |
-
public function include_advanced_payments( $file, $name, $template ) {
|
166 |
-
$this->container->make( Buttons::class )->include_advanced_payments( $file, $name, $template );
|
167 |
-
}
|
168 |
-
|
169 |
/**
|
170 |
* Handles the disconnecting of the merchant.
|
171 |
*
|
@@ -183,6 +140,7 @@ class Hooks extends \tad_DI52_ServiceProvider {
|
|
183 |
return;
|
184 |
}
|
185 |
|
|
|
186 |
$notices->trigger_admin( 'tc-paypal-disconnected' );
|
187 |
}
|
188 |
|
60 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-webhook', [ $this, 'handle_action_refresh_webhook' ] );
|
61 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-resync-connection', [ $this, 'handle_action_refresh_connection' ] );
|
62 |
|
|
|
|
|
|
|
63 |
add_action( 'wp_ajax_tec_tickets_commerce_gateway_paypal_refresh_connect_url', [ $this, 'ajax_refresh_connect_url' ] );
|
64 |
add_action( 'admin_init', [ $this, 'render_ssl_notice' ] );
|
65 |
|
123 |
return $template_vars;
|
124 |
}
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
/**
|
127 |
* Handles the disconnecting of the merchant.
|
128 |
*
|
140 |
return;
|
141 |
}
|
142 |
|
143 |
+
Gateway::disable();
|
144 |
$notices->trigger_admin( 'tc-paypal-disconnected' );
|
145 |
}
|
146 |
|
src/Tickets/Commerce/Gateways/PayPal/Merchant.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
|
|
5 |
use Tribe__Utils__Array as Arr;
|
6 |
use Tribe__Date_Utils as Dates;
|
7 |
use TEC\Tickets\Commerce\Traits\Has_Mode;
|
@@ -13,8 +14,7 @@ use TEC\Tickets\Commerce\Traits\Has_Mode;
|
|
13 |
*
|
14 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
15 |
*/
|
16 |
-
class Merchant {
|
17 |
-
use Has_Mode;
|
18 |
|
19 |
/**
|
20 |
* All account Props we use for the merchant
|
@@ -233,17 +233,6 @@ class Merchant {
|
|
233 |
$this->set_value( 'merchant_id_in_paypal', $value, $needs_save );
|
234 |
}
|
235 |
|
236 |
-
/**
|
237 |
-
* Gets the value stored for the Client ID.
|
238 |
-
*
|
239 |
-
* @since 5.1.9
|
240 |
-
*
|
241 |
-
* @return string
|
242 |
-
*/
|
243 |
-
public function get_client_id() {
|
244 |
-
return $this->client_id;
|
245 |
-
}
|
246 |
-
|
247 |
/**
|
248 |
* Sets the value for Merchant ID locally, in this instance of the Merchant.
|
249 |
*
|
@@ -501,15 +490,6 @@ class Merchant {
|
|
501 |
return "tec_tickets_commerce_{$gateway_key}_{$merchant_mode}_user_info";
|
502 |
}
|
503 |
|
504 |
-
/**
|
505 |
-
* Handle initial setup for the object singleton.
|
506 |
-
*
|
507 |
-
* @since 5.1.9
|
508 |
-
*/
|
509 |
-
public function init() {
|
510 |
-
$this->set_mode( tec_tickets_commerce_is_sandbox_mode() ? 'sandbox' : 'live' );
|
511 |
-
$this->from_array( $this->get_details_data(), false );
|
512 |
-
}
|
513 |
|
514 |
/**
|
515 |
* Return array of merchant details.
|
@@ -534,25 +514,6 @@ class Merchant {
|
|
534 |
];
|
535 |
}
|
536 |
|
537 |
-
/**
|
538 |
-
* Make Merchant object from array.
|
539 |
-
*
|
540 |
-
* @since 5.1.9
|
541 |
-
*
|
542 |
-
* @param array $data Which values need to .
|
543 |
-
* @param boolean $needs_save Determines if the proprieties saved need to save to the DB.
|
544 |
-
*
|
545 |
-
* @return boolean
|
546 |
-
*/
|
547 |
-
public function from_array( array $data, $needs_save = true ) {
|
548 |
-
if ( ! $this->validate( $data ) ) {
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
|
552 |
-
$this->setup_properties( $data, $needs_save );
|
553 |
-
|
554 |
-
return true;
|
555 |
-
}
|
556 |
|
557 |
/**
|
558 |
* Saves a given base value into the class props.
|
@@ -634,28 +595,6 @@ class Merchant {
|
|
634 |
return true;
|
635 |
}
|
636 |
|
637 |
-
/**
|
638 |
-
* Save merchant details.
|
639 |
-
*
|
640 |
-
* @since 5.1.9
|
641 |
-
*
|
642 |
-
* @return bool
|
643 |
-
*/
|
644 |
-
public function save() {
|
645 |
-
if ( false === $this->needs_save() ) {
|
646 |
-
return false;
|
647 |
-
}
|
648 |
-
|
649 |
-
$saved = update_option( $this->get_account_key(), $this->to_array() );
|
650 |
-
|
651 |
-
// If we were able to save, we reset the needs save.
|
652 |
-
if ( $saved ) {
|
653 |
-
$this->needs_save = false;
|
654 |
-
}
|
655 |
-
|
656 |
-
return $saved;
|
657 |
-
}
|
658 |
-
|
659 |
/**
|
660 |
* Get the merchant details data.
|
661 |
*
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Merchant;
|
6 |
use Tribe__Utils__Array as Arr;
|
7 |
use Tribe__Date_Utils as Dates;
|
8 |
use TEC\Tickets\Commerce\Traits\Has_Mode;
|
14 |
*
|
15 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
16 |
*/
|
17 |
+
class Merchant extends Abstract_Merchant {
|
|
|
18 |
|
19 |
/**
|
20 |
* All account Props we use for the merchant
|
233 |
$this->set_value( 'merchant_id_in_paypal', $value, $needs_save );
|
234 |
}
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
/**
|
237 |
* Sets the value for Merchant ID locally, in this instance of the Merchant.
|
238 |
*
|
490 |
return "tec_tickets_commerce_{$gateway_key}_{$merchant_mode}_user_info";
|
491 |
}
|
492 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
/**
|
495 |
* Return array of merchant details.
|
514 |
];
|
515 |
}
|
516 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
|
518 |
/**
|
519 |
* Saves a given base value into the class props.
|
595 |
return true;
|
596 |
}
|
597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
/**
|
599 |
* Get the merchant details data.
|
600 |
*
|
src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
|
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
|
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\Refresh_Token;
|
8 |
|
@@ -10,7 +12,7 @@ use TEC\Tickets\Commerce\Gateways\PayPal\Signup;
|
|
10 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
11 |
use TEC\Tickets\Commerce\Gateways\PayPal\WhoDat;
|
12 |
use TEC\Tickets\Commerce\Notice_Handler;
|
13 |
-
use
|
14 |
use Tribe__Settings;
|
15 |
use Tribe__Utils__Array as Arr;
|
16 |
|
@@ -27,21 +29,15 @@ use WP_REST_Server;
|
|
27 |
*
|
28 |
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
29 |
*/
|
30 |
-
class On_Boarding_Endpoint
|
31 |
|
32 |
/**
|
33 |
-
*
|
34 |
-
*
|
35 |
-
* @since 5.1.9
|
36 |
-
*
|
37 |
-
* @var string
|
38 |
*/
|
39 |
protected $path = '/commerce/paypal/on-boarding';
|
40 |
|
41 |
/**
|
42 |
-
*
|
43 |
-
*
|
44 |
-
* @since 5.1.9
|
45 |
*/
|
46 |
public function register() {
|
47 |
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
@@ -72,45 +68,6 @@ class On_Boarding_Endpoint implements Tribe__Documentation__Swagger__Provider_In
|
|
72 |
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
73 |
}
|
74 |
|
75 |
-
/**
|
76 |
-
* Gets the Endpoint path for the on boarding process.
|
77 |
-
*
|
78 |
-
* @since 5.1.9
|
79 |
-
*
|
80 |
-
* @return string
|
81 |
-
*/
|
82 |
-
public function get_endpoint_path() {
|
83 |
-
return $this->path;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Get the REST API route URL.
|
88 |
-
*
|
89 |
-
* @since 5.1.9
|
90 |
-
*
|
91 |
-
* @return string The REST API route URL.
|
92 |
-
*/
|
93 |
-
public function get_route_url() {
|
94 |
-
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
95 |
-
|
96 |
-
return rest_url( '/' . $namespace . $this->get_endpoint_path(), 'https' );
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Gets the Return URL pointing to this on boarding route.
|
101 |
-
*
|
102 |
-
* @since 5.1.9
|
103 |
-
*
|
104 |
-
* @return string
|
105 |
-
*/
|
106 |
-
public function get_return_url( $hash = null ) {
|
107 |
-
$arguments = [
|
108 |
-
'hash' => $hash,
|
109 |
-
];
|
110 |
-
|
111 |
-
return add_query_arg( $arguments, $this->get_route_url() );
|
112 |
-
}
|
113 |
-
|
114 |
/**
|
115 |
* Handles the request that happens in parallel to the User Signup on PayPal but before we redirect the user from
|
116 |
* the mini browser. So when passing error messages, they need to be registered to be fetched in the FE.
|
@@ -167,7 +124,10 @@ class On_Boarding_Endpoint implements Tribe__Documentation__Swagger__Provider_In
|
|
167 |
$signup = tribe( Signup::class );
|
168 |
$existing_hash = $signup->get_transient_hash();
|
169 |
$request_hash = $request->get_param( 'hash' );
|
170 |
-
$return_url = Tribe__Settings::instance()->get_url( [
|
|
|
|
|
|
|
171 |
|
172 |
if ( $request_hash !== $existing_hash ) {
|
173 |
$this->redirect_with( 'invalid-paypal-signup-hash', $return_url );
|
@@ -415,34 +375,4 @@ class On_Boarding_Endpoint implements Tribe__Documentation__Swagger__Provider_In
|
|
415 |
],
|
416 |
];
|
417 |
}
|
418 |
-
|
419 |
-
/**
|
420 |
-
* Sanitize a request argument based on details registered to the route.
|
421 |
-
*
|
422 |
-
* @since 5.1.9
|
423 |
-
*
|
424 |
-
* @param mixed $value Value of the 'filter' argument.
|
425 |
-
*
|
426 |
-
* @return string|array
|
427 |
-
*/
|
428 |
-
public function sanitize_callback( $value ) {
|
429 |
-
if ( is_array( $value ) ) {
|
430 |
-
return array_map( 'sanitize_text_field', $value );
|
431 |
-
}
|
432 |
-
|
433 |
-
return sanitize_text_field( $value );
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* {@inheritDoc}
|
438 |
-
*
|
439 |
-
* @TODO We need to make sure Swagger documentation is present.
|
440 |
-
*
|
441 |
-
* @since 5.1.9
|
442 |
-
*
|
443 |
-
* @return array
|
444 |
-
*/
|
445 |
-
public function get_documentation() {
|
446 |
-
return [];
|
447 |
-
}
|
448 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_REST_Endpoint;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Gateway;
|
8 |
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
9 |
use TEC\Tickets\Commerce\Gateways\PayPal\Refresh_Token;
|
10 |
|
12 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
13 |
use TEC\Tickets\Commerce\Gateways\PayPal\WhoDat;
|
14 |
use TEC\Tickets\Commerce\Notice_Handler;
|
15 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
16 |
use Tribe__Settings;
|
17 |
use Tribe__Utils__Array as Arr;
|
18 |
|
29 |
*
|
30 |
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
31 |
*/
|
32 |
+
class On_Boarding_Endpoint extends Abstract_REST_Endpoint {
|
33 |
|
34 |
/**
|
35 |
+
* @inheritDoc
|
|
|
|
|
|
|
|
|
36 |
*/
|
37 |
protected $path = '/commerce/paypal/on-boarding';
|
38 |
|
39 |
/**
|
40 |
+
* @inheritDoc
|
|
|
|
|
41 |
*/
|
42 |
public function register() {
|
43 |
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
68 |
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
69 |
}
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
/**
|
72 |
* Handles the request that happens in parallel to the User Signup on PayPal but before we redirect the user from
|
73 |
* the mini browser. So when passing error messages, they need to be registered to be fetched in the FE.
|
124 |
$signup = tribe( Signup::class );
|
125 |
$existing_hash = $signup->get_transient_hash();
|
126 |
$request_hash = $request->get_param( 'hash' );
|
127 |
+
$return_url = Tribe__Settings::instance()->get_url( [
|
128 |
+
'tab' => Payments_Tab::$slug,
|
129 |
+
tribe( Payments_Tab::class)::$key_current_section_get_var => tribe( Gateway::class )->get_key(),
|
130 |
+
] );
|
131 |
|
132 |
if ( $request_hash !== $existing_hash ) {
|
133 |
$this->redirect_with( 'invalid-paypal-signup-hash', $return_url );
|
375 |
],
|
376 |
];
|
377 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
}
|
src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php
CHANGED
@@ -2,29 +2,17 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
5 |
-
use tad\WPBrowser\Adapters\WP;
|
6 |
use TEC\Tickets\Commerce\Cart;
|
|
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\Gateway;
|
8 |
use TEC\Tickets\Commerce\Gateways\PayPal\Status;
|
9 |
use TEC\Tickets\Commerce\Order;
|
10 |
|
11 |
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
12 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
13 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Refresh_Token;
|
14 |
-
|
15 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Signup;
|
16 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\WhoDat;
|
17 |
-
|
18 |
-
|
19 |
-
use TEC\Tickets\Commerce\Module;
|
20 |
use TEC\Tickets\Commerce\Status\Denied;
|
21 |
use TEC\Tickets\Commerce\Status\Pending;
|
22 |
-
use TEC\Tickets\Commerce\Status\Completed;
|
23 |
-
use TEC\Tickets\Commerce\Status\Created;
|
24 |
use TEC\Tickets\Commerce\Status\Status_Handler;
|
25 |
use TEC\Tickets\Commerce\Success;
|
26 |
-
use Tribe__Documentation__Swagger__Provider_Interface;
|
27 |
-
use Tribe__Settings;
|
28 |
use Tribe__Utils__Array as Arr;
|
29 |
|
30 |
use WP_Error;
|
@@ -40,7 +28,7 @@ use WP_REST_Server;
|
|
40 |
*
|
41 |
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
42 |
*/
|
43 |
-
class Order_Endpoint
|
44 |
|
45 |
/**
|
46 |
* The REST API endpoint path.
|
@@ -96,30 +84,6 @@ class Order_Endpoint implements Tribe__Documentation__Swagger__Provider_Interfac
|
|
96 |
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
97 |
}
|
98 |
|
99 |
-
/**
|
100 |
-
* Gets the Endpoint path for the on boarding process.
|
101 |
-
*
|
102 |
-
* @since 5.1.9
|
103 |
-
*
|
104 |
-
* @return string
|
105 |
-
*/
|
106 |
-
public function get_endpoint_path() {
|
107 |
-
return $this->path;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Get the REST API route URL.
|
112 |
-
*
|
113 |
-
* @since 5.1.9
|
114 |
-
*
|
115 |
-
* @return string The REST API route URL.
|
116 |
-
*/
|
117 |
-
public function get_route_url() {
|
118 |
-
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
119 |
-
|
120 |
-
return rest_url( '/' . $namespace . $this->get_endpoint_path(), 'https' );
|
121 |
-
}
|
122 |
-
|
123 |
/**
|
124 |
* Handles the request that creates an order with Tickets Commerce and the PayPal gateway.
|
125 |
*
|
@@ -135,12 +99,18 @@ class Order_Endpoint implements Tribe__Documentation__Swagger__Provider_Interfac
|
|
135 |
];
|
136 |
|
137 |
$messages = $this->get_error_messages();
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
-
$order = tribe( Order::class )->create_from_cart( tribe( Gateway::class ) );
|
140 |
|
141 |
$unit = [
|
142 |
'reference_id' => $order->ID,
|
143 |
-
'value' => $order->total_value->get_decimal(),
|
144 |
'currency' => $order->currency,
|
145 |
'first_name' => $order->purchaser['first_name'],
|
146 |
'last_name' => $order->purchaser['last_name'],
|
@@ -151,9 +121,9 @@ class Order_Endpoint implements Tribe__Documentation__Swagger__Provider_Interfac
|
|
151 |
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
152 |
$unit['items'][] = [
|
153 |
'name' => $ticket->name,
|
154 |
-
'unit_amount' => [ 'value' => $item['price'], 'currency_code' => $order->currency ],
|
155 |
'quantity' => $item['quantity'],
|
156 |
-
'item_total' => [ 'value' => $item['sub_total'], 'currency_code' => $order->currency ],
|
157 |
'sku' => $ticket->sku,
|
158 |
];
|
159 |
}
|
@@ -434,19 +404,6 @@ class Order_Endpoint implements Tribe__Documentation__Swagger__Provider_Interfac
|
|
434 |
return sanitize_text_field( $value );
|
435 |
}
|
436 |
|
437 |
-
/**
|
438 |
-
* {@inheritDoc}
|
439 |
-
*
|
440 |
-
* @TODO We need to make sure Swagger documentation is present.
|
441 |
-
*
|
442 |
-
* @since 5.1.9
|
443 |
-
*
|
444 |
-
* @return array
|
445 |
-
*/
|
446 |
-
public function get_documentation() {
|
447 |
-
return [];
|
448 |
-
}
|
449 |
-
|
450 |
/**
|
451 |
* Returns an array of error messages that are used by the API responses.
|
452 |
*
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
|
|
5 |
use TEC\Tickets\Commerce\Cart;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_REST_Endpoint;
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\Gateway;
|
8 |
use TEC\Tickets\Commerce\Gateways\PayPal\Status;
|
9 |
use TEC\Tickets\Commerce\Order;
|
10 |
|
11 |
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
use TEC\Tickets\Commerce\Status\Denied;
|
13 |
use TEC\Tickets\Commerce\Status\Pending;
|
|
|
|
|
14 |
use TEC\Tickets\Commerce\Status\Status_Handler;
|
15 |
use TEC\Tickets\Commerce\Success;
|
|
|
|
|
16 |
use Tribe__Utils__Array as Arr;
|
17 |
|
18 |
use WP_Error;
|
28 |
*
|
29 |
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
30 |
*/
|
31 |
+
class Order_Endpoint extends Abstract_REST_Endpoint {
|
32 |
|
33 |
/**
|
34 |
* The REST API endpoint path.
|
84 |
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
/**
|
88 |
* Handles the request that creates an order with Tickets Commerce and the PayPal gateway.
|
89 |
*
|
99 |
];
|
100 |
|
101 |
$messages = $this->get_error_messages();
|
102 |
+
$data = $request->get_json_params();
|
103 |
+
$purchaser = tribe( Order::class )->get_purchaser_data( $data );
|
104 |
+
|
105 |
+
if ( is_wp_error( $purchaser ) ) {
|
106 |
+
return $purchaser;
|
107 |
+
}
|
108 |
|
109 |
+
$order = tribe( Order::class )->create_from_cart( tribe( Gateway::class ), $purchaser );
|
110 |
|
111 |
$unit = [
|
112 |
'reference_id' => $order->ID,
|
113 |
+
'value' => (string) $order->total_value->get_decimal(),
|
114 |
'currency' => $order->currency,
|
115 |
'first_name' => $order->purchaser['first_name'],
|
116 |
'last_name' => $order->purchaser['last_name'],
|
121 |
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
122 |
$unit['items'][] = [
|
123 |
'name' => $ticket->name,
|
124 |
+
'unit_amount' => [ 'value' => (string) $item['price'], 'currency_code' => $order->currency ],
|
125 |
'quantity' => $item['quantity'],
|
126 |
+
'item_total' => [ 'value' => (string) $item['sub_total'], 'currency_code' => $order->currency ],
|
127 |
'sku' => $ticket->sku,
|
128 |
];
|
129 |
}
|
404 |
return sanitize_text_field( $value );
|
405 |
}
|
406 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
/**
|
408 |
* Returns an array of error messages that are used by the API responses.
|
409 |
*
|
src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php
CHANGED
@@ -2,16 +2,10 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
|
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
8 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
9 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Headers;
|
10 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Completed;
|
11 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Validation;
|
12 |
-
use Tribe__Documentation__Swagger__Provider_Interface;
|
13 |
-
use Tribe__REST__Endpoints__CREATE_Endpoint_Interface;
|
14 |
-
use Tribe__Tickets__REST__V1__Endpoints__Base;
|
15 |
use WP_Error;
|
16 |
use WP_REST_Request;
|
17 |
use WP_REST_Response;
|
@@ -23,7 +17,7 @@ use WP_REST_Server;
|
|
23 |
* @since 5.1.6
|
24 |
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
25 |
*/
|
26 |
-
class Webhook_Endpoint
|
27 |
|
28 |
/**
|
29 |
* The REST API endpoint path.
|
@@ -57,30 +51,6 @@ class Webhook_Endpoint implements Tribe__Documentation__Swagger__Provider_Interf
|
|
57 |
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
58 |
}
|
59 |
|
60 |
-
/**
|
61 |
-
* Gets the Endpoint path for the on boarding process.
|
62 |
-
*
|
63 |
-
* @since 5.1.9
|
64 |
-
*
|
65 |
-
* @return string
|
66 |
-
*/
|
67 |
-
public function get_endpoint_path() {
|
68 |
-
return $this->path;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Get the REST API route URL.
|
73 |
-
*
|
74 |
-
* @since 5.1.9
|
75 |
-
*
|
76 |
-
* @return string The REST API route URL.
|
77 |
-
*/
|
78 |
-
public function get_route_url() {
|
79 |
-
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
80 |
-
|
81 |
-
return rest_url( '/' . $namespace . $this->get_endpoint_path(), 'https' );
|
82 |
-
}
|
83 |
-
|
84 |
/**
|
85 |
* This grabs the headers from the webhook request to be used in the signature verification
|
86 |
*
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_REST_Endpoint;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
|
|
8 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
use WP_Error;
|
10 |
use WP_REST_Request;
|
11 |
use WP_REST_Response;
|
17 |
* @since 5.1.6
|
18 |
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
19 |
*/
|
20 |
+
class Webhook_Endpoint extends Abstract_REST_Endpoint {
|
21 |
|
22 |
/**
|
23 |
* The REST API endpoint path.
|
51 |
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* This grabs the headers from the webhook request to be used in the signature verification
|
56 |
*
|
src/Tickets/Commerce/Gateways/PayPal/Settings.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
-
use TEC\Tickets\Commerce\Abstract_Settings;
|
6 |
|
7 |
use Tribe__Languages__Locations;
|
8 |
use Tribe__Tickets__Admin__Views;
|
@@ -15,12 +15,14 @@ use Tribe__Tickets__Main;
|
|
15 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
16 |
*/
|
17 |
class Settings extends Abstract_Settings {
|
|
|
18 |
/**
|
19 |
-
*
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
24 |
*/
|
25 |
public function get_settings() {
|
26 |
$home_url = home_url();
|
@@ -52,7 +54,7 @@ class Settings extends Abstract_Settings {
|
|
52 |
/** @var Tribe__Tickets__Admin__Views $admin_views */
|
53 |
$admin_views = tribe( 'tickets.admin.views' );
|
54 |
$merchant = tribe( Merchant::class );
|
55 |
-
$signup = tribe(
|
56 |
|
57 |
$context = [
|
58 |
'plugin_url' => Tribe__Tickets__Main::instance()->plugin_url,
|
@@ -60,11 +62,12 @@ class Settings extends Abstract_Settings {
|
|
60 |
'is_merchant_connected' => $merchant->is_connected(),
|
61 |
'is_merchant_active' => $merchant->is_active(),
|
62 |
'signup' => $signup,
|
|
|
63 |
];
|
64 |
|
65 |
$admin_views->add_template_globals( $context );
|
66 |
|
67 |
-
return $admin_views->template( 'settings/tickets-commerce/paypal/main',
|
68 |
}
|
69 |
|
70 |
/**
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Settings;
|
6 |
|
7 |
use Tribe__Languages__Locations;
|
8 |
use Tribe__Tickets__Admin__Views;
|
15 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
16 |
*/
|
17 |
class Settings extends Abstract_Settings {
|
18 |
+
|
19 |
/**
|
20 |
+
* @inheritDoc
|
21 |
+
*/
|
22 |
+
public static $option_sandbox = 'tickets-commerce-paypal-sandbox';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @inheritDoc
|
26 |
*/
|
27 |
public function get_settings() {
|
28 |
$home_url = home_url();
|
54 |
/** @var Tribe__Tickets__Admin__Views $admin_views */
|
55 |
$admin_views = tribe( 'tickets.admin.views' );
|
56 |
$merchant = tribe( Merchant::class );
|
57 |
+
$signup = tribe( Signup::class );
|
58 |
|
59 |
$context = [
|
60 |
'plugin_url' => Tribe__Tickets__Main::instance()->plugin_url,
|
62 |
'is_merchant_connected' => $merchant->is_connected(),
|
63 |
'is_merchant_active' => $merchant->is_active(),
|
64 |
'signup' => $signup,
|
65 |
+
'gateway_key' => tribe( Gateway::class )->get_key(),
|
66 |
];
|
67 |
|
68 |
$admin_views->add_template_globals( $context );
|
69 |
|
70 |
+
return $admin_views->template( 'settings/tickets-commerce/paypal/main', $context, false );
|
71 |
}
|
72 |
|
73 |
/**
|
src/Tickets/Commerce/Gateways/PayPal/Signup.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
|
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\Location\Country;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\REST\On_Boarding_Endpoint;
|
7 |
use TEC\Tickets\Commerce\Settings;
|
8 |
use Tribe__Utils__Array as Arr;
|
9 |
|
@@ -14,7 +14,7 @@ use Tribe__Utils__Array as Arr;
|
|
14 |
*
|
15 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
16 |
*/
|
17 |
-
class Signup {
|
18 |
|
19 |
/**
|
20 |
* Holds the transient key used to store hash passed to PayPal.
|
@@ -35,31 +35,9 @@ class Signup {
|
|
35 |
public static $signup_data_meta_key = 'tec_tc_paypal_signup_data';
|
36 |
|
37 |
/**
|
38 |
-
*
|
39 |
-
*
|
40 |
-
* @since 5.1.9
|
41 |
-
*
|
42 |
-
* @var \Tribe__Template
|
43 |
-
*/
|
44 |
-
protected $template;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Gets the template instance used to setup the rendering of the page.
|
48 |
-
*
|
49 |
-
* @since 5.1.9
|
50 |
-
*
|
51 |
-
* @return \Tribe__Template
|
52 |
*/
|
53 |
-
public
|
54 |
-
if ( empty( $this->template ) ) {
|
55 |
-
$this->template = new \Tribe__Template();
|
56 |
-
$this->template->set_template_origin( \Tribe__Tickets__Main::instance() );
|
57 |
-
$this->template->set_template_folder( 'src/admin-views/settings/tickets-commerce/paypal' );
|
58 |
-
$this->template->set_template_context_extract( true );
|
59 |
-
}
|
60 |
-
|
61 |
-
return $this->template;
|
62 |
-
}
|
63 |
|
64 |
/**
|
65 |
* Gets the saved hash for a given user, empty when non-existent.
|
@@ -96,41 +74,6 @@ class Signup {
|
|
96 |
return delete_transient( static::$signup_hash_meta_key );
|
97 |
}
|
98 |
|
99 |
-
/**
|
100 |
-
* Gets the saved hash for a given user, empty when non-existent.
|
101 |
-
*
|
102 |
-
* @since 5.1.9
|
103 |
-
*
|
104 |
-
* @return array
|
105 |
-
*/
|
106 |
-
public function get_transient_data() {
|
107 |
-
return get_transient( static::$signup_data_meta_key );
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Saves the URL in a transient for later use.
|
112 |
-
*
|
113 |
-
* @since 5.1.9
|
114 |
-
*
|
115 |
-
* @param string $value URL for signup.
|
116 |
-
*
|
117 |
-
* @return bool
|
118 |
-
*/
|
119 |
-
public function update_transient_data( $value ) {
|
120 |
-
return set_transient( static::$signup_data_meta_key, $value, DAY_IN_SECONDS );
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Delete url transient from the DB.
|
125 |
-
*
|
126 |
-
* @since 5.1.9
|
127 |
-
*
|
128 |
-
* @return bool
|
129 |
-
*/
|
130 |
-
public function delete_transient_data() {
|
131 |
-
return delete_transient( static::$signup_data_meta_key );
|
132 |
-
}
|
133 |
-
|
134 |
/**
|
135 |
* Generate a Unique Hash for signup. It will always be 20 characters long.
|
136 |
*
|
@@ -150,34 +93,6 @@ class Signup {
|
|
150 |
return substr( str_shuffle( implode( '-', $keys ) ), 0, 45 );
|
151 |
}
|
152 |
|
153 |
-
/**
|
154 |
-
* Generates a Tracking it for this website.
|
155 |
-
*
|
156 |
-
* @since 5.1.9
|
157 |
-
*
|
158 |
-
* @return string
|
159 |
-
*/
|
160 |
-
public function generate_unique_tracking_id() {
|
161 |
-
$id = wp_generate_password( 6, false, false );;
|
162 |
-
$url_frags = wp_parse_url( home_url() );
|
163 |
-
$url = Arr::get( $url_frags, 'host' ) . Arr::get( $url_frags, 'path' );
|
164 |
-
$url = add_query_arg( [
|
165 |
-
'v' => Gateway::VERSION . '-' . $id,
|
166 |
-
], $url );
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Tracking ID sent to PayPal.
|
170 |
-
*
|
171 |
-
* @since 5.1.9
|
172 |
-
*
|
173 |
-
* @param string $url Which ID we are using normally a URL, cannot be longer than 127 chars.
|
174 |
-
*/
|
175 |
-
$url = apply_filters( 'tec_tickets_commerce_gateway_paypal_tracking_id', $url );
|
176 |
-
|
177 |
-
// Always limit it to 127 chars.
|
178 |
-
return substr( (string) $url, 0, 127 );
|
179 |
-
}
|
180 |
-
|
181 |
/**
|
182 |
* Request the signup link that redirects the seller to PayPal.
|
183 |
*
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Signup;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Location\Country;
|
|
|
7 |
use TEC\Tickets\Commerce\Settings;
|
8 |
use Tribe__Utils__Array as Arr;
|
9 |
|
14 |
*
|
15 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
16 |
*/
|
17 |
+
class Signup extends Abstract_Signup {
|
18 |
|
19 |
/**
|
20 |
* Holds the transient key used to store hash passed to PayPal.
|
35 |
public static $signup_data_meta_key = 'tec_tc_paypal_signup_data';
|
36 |
|
37 |
/**
|
38 |
+
* @inheritDoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
*/
|
40 |
+
public $template_folder = 'src/admin-views/settings/tickets-commerce/paypal';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
/**
|
43 |
* Gets the saved hash for a given user, empty when non-existent.
|
74 |
return delete_transient( static::$signup_hash_meta_key );
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
/**
|
78 |
* Generate a Unique Hash for signup. It will always be 20 characters long.
|
79 |
*
|
93 |
return substr( str_shuffle( implode( '-', $keys ) ), 0, 45 );
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
/**
|
97 |
* Request the signup link that redirects the seller to PayPal.
|
98 |
*
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks.php
CHANGED
@@ -4,6 +4,10 @@ namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
|
4 |
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\Webhook_Endpoint;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Events;
|
|
|
|
|
|
|
|
|
7 |
use Tribe__Utils__Array as Arr;
|
8 |
|
9 |
/**
|
@@ -13,79 +17,20 @@ use Tribe__Utils__Array as Arr;
|
|
13 |
*
|
14 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
15 |
*/
|
16 |
-
class Webhooks {
|
17 |
|
18 |
/**
|
19 |
-
*
|
20 |
-
*
|
21 |
-
* @since 5.1.10
|
22 |
-
*
|
23 |
-
* @return string
|
24 |
*/
|
25 |
-
public function
|
26 |
-
|
27 |
-
$merchant_mode = tribe( Merchant::class )->get_mode();
|
28 |
-
|
29 |
-
return "tec_tickets_commerce_{$gateway_key}_{$merchant_mode}_webhooks_settings";
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
-
*
|
34 |
-
*
|
35 |
-
* @since 5.1.10
|
36 |
-
*
|
37 |
-
* @param array|string $key Specify each nested index in order.
|
38 |
-
* Example: array( 'lvl1', 'lvl2' );
|
39 |
-
* @param mixed $default Default value if the search finds nothing.
|
40 |
-
*
|
41 |
-
* @return mixed
|
42 |
-
*/
|
43 |
-
public function get_setting( $key, $default = null ) {
|
44 |
-
$settings = get_option( $this->get_settings_key(), null );
|
45 |
-
|
46 |
-
return Arr::get( $settings, $key, $default );
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Saves the webhook settings in the database.
|
51 |
-
*
|
52 |
-
* @since 5.1.10
|
53 |
-
*
|
54 |
-
* @param array $settings []
|
55 |
-
*
|
56 |
-
* @return bool
|
57 |
-
*/
|
58 |
-
public function update_settings( array $settings = [] ) {
|
59 |
-
return update_option( $this->get_settings_key(), $settings );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Retrieves the settings for the webhooks from the database.
|
64 |
-
*
|
65 |
-
* @since 5.1.10
|
66 |
-
*
|
67 |
-
* @return array|null
|
68 |
-
*/
|
69 |
-
public function get_settings() {
|
70 |
-
$settings = get_option( $this->get_settings_key(), null );
|
71 |
-
|
72 |
-
// Without an ID, the webhook settings are invalid.
|
73 |
-
if ( empty( $settings['id'] ) ) {
|
74 |
-
return null;
|
75 |
-
}
|
76 |
-
|
77 |
-
return $settings;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Deletes the stored webhook settings.
|
82 |
-
*
|
83 |
-
* @since 5.1.10
|
84 |
-
*
|
85 |
-
* @return bool
|
86 |
*/
|
87 |
-
public function
|
88 |
-
return
|
89 |
}
|
90 |
|
91 |
/**
|
4 |
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\Webhook_Endpoint;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Events;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
8 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Merchant;
|
9 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Webhooks;
|
10 |
+
|
11 |
use Tribe__Utils__Array as Arr;
|
12 |
|
13 |
/**
|
17 |
*
|
18 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
19 |
*/
|
20 |
+
class Webhooks extends Abstract_Webhooks {
|
21 |
|
22 |
/**
|
23 |
+
* @inheritDoc
|
|
|
|
|
|
|
|
|
24 |
*/
|
25 |
+
public function get_gateway(): Abstract_Gateway {
|
26 |
+
return tribe( Gateway::class );
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
+
* @inheritDoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
*/
|
32 |
+
public function get_merchant(): Abstract_Merchant {
|
33 |
+
return tribe( Merchant::class );
|
34 |
}
|
35 |
|
36 |
/**
|
src/Tickets/Commerce/Gateways/PayPal/WhoDat.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
|
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\On_Boarding_Endpoint;
|
6 |
-
use Tribe__Utils__Array as Arr;
|
7 |
|
8 |
/**
|
9 |
* Class Connect_Client
|
@@ -12,29 +12,16 @@ use Tribe__Utils__Array as Arr;
|
|
12 |
*
|
13 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
14 |
*/
|
15 |
-
class WhoDat {
|
16 |
-
/**
|
17 |
-
* The API URL.
|
18 |
-
*
|
19 |
-
* @since 5.1.6
|
20 |
-
*
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
protected $api_url = 'https://whodat.theeventscalendar.com/commerce/v1/paypal';
|
24 |
|
25 |
/**
|
26 |
-
*
|
27 |
-
*
|
28 |
-
* @since 5.1.9
|
29 |
*
|
30 |
-
* @
|
31 |
-
* @param array $query_args Query args appended to the URL.
|
32 |
*
|
33 |
-
* @
|
34 |
*/
|
35 |
-
public
|
36 |
-
return add_query_arg( $query_args, "{$this->api_url}/{$endpoint}" );
|
37 |
-
}
|
38 |
|
39 |
/**
|
40 |
* Fetch the signup link from PayPal.
|
@@ -55,7 +42,7 @@ class WhoDat {
|
|
55 |
$query_args = [
|
56 |
'mode' => tribe( Merchant::class )->get_mode(),
|
57 |
'nonce' => $hash,
|
58 |
-
'tracking_id' => urlencode( tribe(
|
59 |
'return_url' => esc_url( $return_url ),
|
60 |
'country' => $country,
|
61 |
];
|
@@ -117,92 +104,4 @@ class WhoDat {
|
|
117 |
return $this->post( 'seller/credentials', $query_args );
|
118 |
}
|
119 |
|
120 |
-
/**
|
121 |
-
* Send a GET request to WhoDat.
|
122 |
-
*
|
123 |
-
* @since 5.1.9
|
124 |
-
*
|
125 |
-
* @param string $endpoint
|
126 |
-
* @param array $query_args
|
127 |
-
*
|
128 |
-
* @return mixed|null
|
129 |
-
*/
|
130 |
-
public function get( $endpoint, array $query_args ) {
|
131 |
-
$url = $this->get_api_url( $endpoint, $query_args );
|
132 |
-
|
133 |
-
$request = wp_remote_get( $url );
|
134 |
-
|
135 |
-
if ( is_wp_error( $request ) ) {
|
136 |
-
$this->log_error( 'WhoDat request error:', $request->get_error_message(), $url );
|
137 |
-
|
138 |
-
return null;
|
139 |
-
}
|
140 |
-
|
141 |
-
$body = wp_remote_retrieve_body( $request );
|
142 |
-
$body = json_decode( $body, true );
|
143 |
-
|
144 |
-
return $body;
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Send a POST request to WhoDat.
|
149 |
-
*
|
150 |
-
* @since 5.1.9
|
151 |
-
*
|
152 |
-
* @param string $endpoint
|
153 |
-
* @param array $query_args
|
154 |
-
* @param array $request_arguments
|
155 |
-
*
|
156 |
-
* @return array|null
|
157 |
-
*/
|
158 |
-
public function post( $endpoint, array $query_args = [], array $request_arguments = [] ) {
|
159 |
-
$url = $this->get_api_url( $endpoint, $query_args );
|
160 |
-
|
161 |
-
$default_arguments = [
|
162 |
-
'body' => [],
|
163 |
-
];
|
164 |
-
|
165 |
-
foreach ( $default_arguments as $key => $default_argument ) {
|
166 |
-
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
167 |
-
}
|
168 |
-
$request_arguments = array_filter( $request_arguments );
|
169 |
-
$request = wp_remote_post( $url, $request_arguments );
|
170 |
-
|
171 |
-
if ( is_wp_error( $request ) ) {
|
172 |
-
$this->log_error( 'WhoDat request error:', $request->get_error_message(), $url );
|
173 |
-
|
174 |
-
return null;
|
175 |
-
}
|
176 |
-
|
177 |
-
$body = wp_remote_retrieve_body( $request );
|
178 |
-
$body = json_decode( $body, true );
|
179 |
-
|
180 |
-
if ( ! is_array( $body ) ) {
|
181 |
-
$this->log_error( 'WhoDat unexpected response:', $body, $url );
|
182 |
-
$this->log_error( 'Response:', print_r( $request, true ), '--->' );
|
183 |
-
|
184 |
-
return null;
|
185 |
-
}
|
186 |
-
|
187 |
-
return $body;
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Log WhoDat errors.
|
192 |
-
*
|
193 |
-
* @since 5.1.9
|
194 |
-
*
|
195 |
-
* @param string $type
|
196 |
-
* @param string $message
|
197 |
-
* @param string $url
|
198 |
-
*/
|
199 |
-
protected function log_error( $type, $message, $url ) {
|
200 |
-
$log = sprintf(
|
201 |
-
'[%s] %s %s',
|
202 |
-
$url,
|
203 |
-
$type,
|
204 |
-
$message
|
205 |
-
);
|
206 |
-
tribe( 'logger' )->log_error( $log, 'whodat-connection' );
|
207 |
-
}
|
208 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_WhoDat;
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST\On_Boarding_Endpoint;
|
|
|
7 |
|
8 |
/**
|
9 |
* Class Connect_Client
|
12 |
*
|
13 |
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
14 |
*/
|
15 |
+
class WhoDat extends Abstract_WhoDat {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
/**
|
18 |
+
* The API Path.
|
|
|
|
|
19 |
*
|
20 |
+
* @since 5.3.0
|
|
|
21 |
*
|
22 |
+
* @var string
|
23 |
*/
|
24 |
+
public $api_endpoint = 'paypal';
|
|
|
|
|
25 |
|
26 |
/**
|
27 |
* Fetch the signup link from PayPal.
|
42 |
$query_args = [
|
43 |
'mode' => tribe( Merchant::class )->get_mode(),
|
44 |
'nonce' => $hash,
|
45 |
+
'tracking_id' => urlencode( tribe( Gateway::class )->generate_unique_tracking_id() ),
|
46 |
'return_url' => esc_url( $return_url ),
|
47 |
'country' => $country,
|
48 |
];
|
104 |
return $this->post( 'seller/credentials', $query_args );
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
src/Tickets/Commerce/Gateways/Stripe/Application_Fee.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Settings;
|
6 |
+
use TEC\Tickets\Commerce\Utils\Value;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The Stripe Application_Fee class
|
10 |
+
*
|
11 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
12 |
+
*/
|
13 |
+
class Application_Fee {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The percentage applied to Stripe transactions. Currently set at 2%.
|
17 |
+
*
|
18 |
+
* @since 5.3.0
|
19 |
+
*
|
20 |
+
* @var float
|
21 |
+
*/
|
22 |
+
const FIXED_FEE = 0.02;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Calculate the fee value that needs to be applied to the PaymentIntent.
|
26 |
+
*
|
27 |
+
* @since 5.3.0
|
28 |
+
*
|
29 |
+
* @param Value $value the value over which to calculate the fee.
|
30 |
+
*
|
31 |
+
* @return Value;
|
32 |
+
*/
|
33 |
+
public static function calculate( Value $value ) {
|
34 |
+
|
35 |
+
if ( Settings::is_licensed_plugin() ) {
|
36 |
+
return Value::create();
|
37 |
+
}
|
38 |
+
|
39 |
+
// Otherwise, calculate it over the total value.
|
40 |
+
return Value::create( $value->get_decimal() * static::get_application_fee_percentage() );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Returns the application fee percentage value.
|
45 |
+
*
|
46 |
+
* @since 5.3.0
|
47 |
+
*
|
48 |
+
* @return float
|
49 |
+
*/
|
50 |
+
private static function get_application_fee_percentage() {
|
51 |
+
return static::FIXED_FEE;
|
52 |
+
}
|
53 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Assets.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Checkout;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\REST\Order_Endpoint;
|
7 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class Assets.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
15 |
+
*/
|
16 |
+
class Assets extends \tad_DI52_ServiceProvider {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The nonce action to use when requesting the creation of a new order
|
20 |
+
*
|
21 |
+
* @since 5.3.0
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
const ORDER_NONCE_ACTION = 'tec_stripe_order';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @inheritDoc
|
29 |
+
*/
|
30 |
+
public function register() {
|
31 |
+
$plugin = \Tribe__Tickets__Main::instance();
|
32 |
+
|
33 |
+
tribe_asset(
|
34 |
+
$plugin,
|
35 |
+
'tec-tickets-commerce-gateway-stripe-base',
|
36 |
+
'https://js.stripe.com/v3/',
|
37 |
+
[],
|
38 |
+
null,
|
39 |
+
[
|
40 |
+
'type' => 'js',
|
41 |
+
]
|
42 |
+
);
|
43 |
+
|
44 |
+
tribe_asset(
|
45 |
+
$plugin,
|
46 |
+
'tec-tickets-commerce-gateway-stripe-checkout',
|
47 |
+
'commerce/gateway/stripe/checkout.js',
|
48 |
+
[
|
49 |
+
'jquery',
|
50 |
+
'tribe-common',
|
51 |
+
'tec-ky',
|
52 |
+
'tribe-query-string',
|
53 |
+
'tec-tickets-commerce-gateway-stripe-base',
|
54 |
+
'tribe-tickets-loader',
|
55 |
+
'tribe-tickets-commerce-js',
|
56 |
+
'tribe-tickets-commerce-notice-js',
|
57 |
+
'tribe-tickets-commerce-base-gateway-checkout-toggler',
|
58 |
+
],
|
59 |
+
null,
|
60 |
+
[
|
61 |
+
'module' => true,
|
62 |
+
'groups' => [
|
63 |
+
'tribe-tickets-commerce-checkout',
|
64 |
+
'tec-tickets-commerce-gateway-stripe',
|
65 |
+
],
|
66 |
+
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
67 |
+
'localize' => [
|
68 |
+
'name' => 'tecTicketsCommerceGatewayStripeCheckout',
|
69 |
+
'data' => static function () {
|
70 |
+
return apply_filters( 'tec_tickets_commerce_stripe_checkout_localized_data', [
|
71 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
72 |
+
'orderEndpoint' => tribe( Order_Endpoint::class )->get_route_url(),
|
73 |
+
'paymentElement' => tribe( Stripe_Elements::class )->include_payment_element(),
|
74 |
+
'cardElementType' => tribe( Stripe_Elements::class )->card_element_type(),
|
75 |
+
'publishableKey' => tribe( Merchant::class )->get_publishable_key(),
|
76 |
+
'paymentIntentData' => tribe( Payment_Intent_Handler::class )->get_publishable_payment_intent_data(),
|
77 |
+
'elementsAppearance' => [
|
78 |
+
'variables' => [
|
79 |
+
'borderRadius' => '4px',
|
80 |
+
'colorPrimary' => '#334aff',
|
81 |
+
'fontFamily' => 'Helvetica Neue, Helvetica, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif',
|
82 |
+
],
|
83 |
+
'rules' => [
|
84 |
+
'.Tab' => [
|
85 |
+
'borderColor' => '#d5d5d5',
|
86 |
+
'boxShadow' => 'none'
|
87 |
+
],
|
88 |
+
'.Tab--selected' => [
|
89 |
+
'borderWidth' => '2px'
|
90 |
+
],
|
91 |
+
'.TabLabel' => [
|
92 |
+
'paddingTop' => '6px'
|
93 |
+
],
|
94 |
+
'.Input' => [
|
95 |
+
'boxShadow' => 'none',
|
96 |
+
'fontSize' => '14px',
|
97 |
+
],
|
98 |
+
'.Label' => [
|
99 |
+
'fontSize' => '14px',
|
100 |
+
'marginBotton' => '4px',
|
101 |
+
]
|
102 |
+
]
|
103 |
+
],
|
104 |
+
'cardElementStyle' => [
|
105 |
+
'base' => [
|
106 |
+
'color' => '#23282d'
|
107 |
+
]
|
108 |
+
]
|
109 |
+
] );
|
110 |
+
},
|
111 |
+
],
|
112 |
+
]
|
113 |
+
);
|
114 |
+
|
115 |
+
// Tickets Commerce Stripe main frontend styles.
|
116 |
+
tribe_asset(
|
117 |
+
$plugin,
|
118 |
+
'tribe-tickets-commerce-stripe-style',
|
119 |
+
'tickets-commerce/gateway/stripe.css',
|
120 |
+
[
|
121 |
+
'tribe-common-skeleton-style',
|
122 |
+
'tribe-common-full-style',
|
123 |
+
],
|
124 |
+
null,
|
125 |
+
[
|
126 |
+
'groups' => [
|
127 |
+
'tribe-tickets-commerce',
|
128 |
+
'tribe-tickets-commerce-checkout',
|
129 |
+
],
|
130 |
+
'print' => true,
|
131 |
+
]
|
132 |
+
);
|
133 |
+
|
134 |
+
// Administration JS for Webhooks.
|
135 |
+
tribe_asset(
|
136 |
+
$plugin,
|
137 |
+
'tec-tickets-commerce-gateway-stripe-admin-webhooks',
|
138 |
+
'admin/gateway/stripe/webhooks.js',
|
139 |
+
[
|
140 |
+
'tribe-clipboard',
|
141 |
+
'tribe-common',
|
142 |
+
'tec-ky',
|
143 |
+
],
|
144 |
+
'admin_enqueue_scripts',
|
145 |
+
[
|
146 |
+
'conditionals' => [ $this, 'is_stripe_section' ]
|
147 |
+
]
|
148 |
+
);
|
149 |
+
|
150 |
+
// Administration JS for Webhooks.
|
151 |
+
tribe_asset(
|
152 |
+
$plugin,
|
153 |
+
'tec-tickets-commerce-gateway-stripe-admin-webhooks-styles',
|
154 |
+
'tickets-commerce/admin/gateway/stripe/webhooks.css',
|
155 |
+
[
|
156 |
+
],
|
157 |
+
'admin_enqueue_scripts',
|
158 |
+
[
|
159 |
+
'conditionals' => [ $this, 'is_stripe_section' ]
|
160 |
+
]
|
161 |
+
);
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Determines if we are currently on the stripe section of the settings.
|
166 |
+
*
|
167 |
+
* @since 5.3.0
|
168 |
+
*
|
169 |
+
* @return bool
|
170 |
+
*/
|
171 |
+
public function is_stripe_section() : bool {
|
172 |
+
return Gateway::get_key() === tribe_get_request_var( Payments_Tab::$key_current_section_get_var );
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Define if the assets for `Stripe` should be enqueued or not.
|
177 |
+
*
|
178 |
+
* @since 5.3.0
|
179 |
+
*
|
180 |
+
* @return bool If the `Stripe` assets should be enqueued or not.
|
181 |
+
*/
|
182 |
+
public function should_enqueue_assets() {
|
183 |
+
return tribe( Gateway::class )->is_active() && tribe( Checkout::class )->is_current_page();
|
184 |
+
}
|
185 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Gateway.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\REST\Return_Endpoint;
|
7 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
8 |
+
use \Tribe__Tickets__Main;
|
9 |
+
use Tribe__Utils__Array as Arr;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class Gateway
|
13 |
+
*
|
14 |
+
* @since 5.3.0
|
15 |
+
*
|
16 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
17 |
+
*/
|
18 |
+
class Gateway extends Abstract_Gateway {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @inheritDoc
|
22 |
+
*/
|
23 |
+
protected static $key = 'stripe';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @inheritDoc
|
27 |
+
*/
|
28 |
+
protected static $settings = Settings::class;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @inheritDoc
|
32 |
+
*/
|
33 |
+
protected static $merchant = Merchant::class;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Stripe tracking ID version.
|
37 |
+
*
|
38 |
+
* This shouldn't be updated unless we are modifying something on the Stripe user level.
|
39 |
+
*
|
40 |
+
* @since 5.3.0
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
const VERSION = '1.0.0';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @inheritDoc
|
48 |
+
*/
|
49 |
+
public static function get_label() {
|
50 |
+
return __( 'Stripe', 'event-tickets' );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @inheritDoc
|
55 |
+
*/
|
56 |
+
public function get_admin_notices() {
|
57 |
+
$notices = [
|
58 |
+
[
|
59 |
+
'slug' => 'tc-stripe-signup-error',
|
60 |
+
'content' => __( "Stripe wasn't able to complete your connection request. Try again.", 'event-tickets' ),
|
61 |
+
'type' => 'error',
|
62 |
+
],
|
63 |
+
[
|
64 |
+
'slug' => 'tc-stripe-token-error',
|
65 |
+
'content' => __( 'Stripe signup was successful but the authentication tokens could not be retrieved. Try refreshing the tokens.', 'event-tickets' ),
|
66 |
+
'type' => 'error',
|
67 |
+
],
|
68 |
+
[
|
69 |
+
'slug' => 'tc-stripe-disconnect-error',
|
70 |
+
'content' => __( 'Disconnecting from Stripe failed. Please try again.', 'event-tickets' ),
|
71 |
+
'type' => 'error',
|
72 |
+
],
|
73 |
+
[
|
74 |
+
'slug' => 'tc-stripe-currency-mismatch',
|
75 |
+
'type' => 'notice',
|
76 |
+
'dismiss' => true,
|
77 |
+
],
|
78 |
+
[
|
79 |
+
'slug' => 'tc-stripe-country-denied',
|
80 |
+
'content' => __( 'Due to Regulatory Issues between Stripe and the country listed in your Stripe account, the free version of Event Tickets cannot accept connections from accounts in your country. Please use a Stripe account from a different country or purchase Event Tickets Plus to continue.', 'event-tickets' ),
|
81 |
+
'type' => 'error',
|
82 |
+
],
|
83 |
+
[
|
84 |
+
'slug' => 'tc-stripe-account-disconnected',
|
85 |
+
'content' => sprintf(
|
86 |
+
// Translators: %1$s is the opening <a> tag for the Payments Tab page link. %2$s is the closing <a> tag.
|
87 |
+
__( 'Your stripe account was disconnected from the Stripe dashboard. If you believe this is an error, you can re-connect in the %1$sPayments Tab of the Settings Page%2$s.', 'event-tickets' ),
|
88 |
+
'<a href="' . tribe( Payments_Tab::class )->get_url( [ 'tc-section' => Gateway::get_key() ] ) . '">',
|
89 |
+
'</a>' ),
|
90 |
+
'type' => 'error',
|
91 |
+
'dismiss' => true,
|
92 |
+
],
|
93 |
+
];
|
94 |
+
|
95 |
+
return $notices;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @inheritDoc
|
100 |
+
*/
|
101 |
+
public function get_logo_url(): string {
|
102 |
+
return Tribe__Tickets__Main::instance()->plugin_url . 'src/resources/images/admin/stripe-logo.png';
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @inheritDoc
|
107 |
+
*/
|
108 |
+
public function get_subtitle(): string {
|
109 |
+
return __( 'Enable credit card payments, Afterpay, AliPay, Giropay, Klarna and more.', 'event-tickets' );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @inheritDoc
|
114 |
+
*/
|
115 |
+
public function generate_unique_tracking_id() {
|
116 |
+
return tribe( Return_Endpoint::class )->get_route_url();
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* @inheritDoc
|
121 |
+
*/
|
122 |
+
public function render_checkout_template( \Tribe__Template $template ): string {
|
123 |
+
$gateway_key = static::get_key();
|
124 |
+
$template_path = "gateway/{$gateway_key}/container";
|
125 |
+
|
126 |
+
return $template->template( $template_path, tribe( Stripe_Elements::class )->get_checkout_template_vars() );
|
127 |
+
}
|
128 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Hooks.php
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Module;
|
6 |
+
use TEC\Tickets\Commerce\Notice_Handler;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Hooks
|
10 |
+
*
|
11 |
+
* @since 5.3.0
|
12 |
+
*
|
13 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
14 |
+
*/
|
15 |
+
class Hooks extends \tad_DI52_ServiceProvider {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @inheritDoc
|
19 |
+
*/
|
20 |
+
public function register() {
|
21 |
+
$this->add_actions();
|
22 |
+
$this->add_filters();
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Adds the actions required by each Stripe component.
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*/
|
30 |
+
protected function add_actions() {
|
31 |
+
add_action( 'rest_api_init', [ $this, 'register_endpoints' ] );
|
32 |
+
add_action( 'wp', [ $this, 'maybe_create_stripe_payment_intent' ] );
|
33 |
+
|
34 |
+
add_action( 'admin_init', [ $this, 'handle_stripe_errors' ] );
|
35 |
+
|
36 |
+
add_action( 'wp_ajax_tec_tickets_commerce_gateway_stripe_test_webhooks', [ $this, 'action_handle_testing_webhooks_field' ] );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Adds the filters required by each Stripe component.
|
41 |
+
*
|
42 |
+
* @since 5.3.0
|
43 |
+
*/
|
44 |
+
protected function add_filters() {
|
45 |
+
add_filter( 'tec_tickets_commerce_gateways', [ $this, 'filter_add_gateway' ], 5, 2 );
|
46 |
+
add_filter( 'tec_tickets_commerce_notice_messages', [ $this, 'include_admin_notices' ] );
|
47 |
+
add_filter( 'tec_tickets_commerce_stripe_settings', [ $this, 'include_webhook_settings' ], 20 );
|
48 |
+
add_filter( 'tribe_field_div_end', [ $this, 'filter_include_webhooks_copy' ], 10, 2 );
|
49 |
+
add_filter( 'tribe_settings_save_field_value', [ $this, 'validate_payment_methods' ], 10, 2 );
|
50 |
+
add_filter( 'tribe_settings_validate_field_value', [ $this, 'provide_defaults_for_hidden_fields'], 10, 3 );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Add this gateway to the list of available.
|
55 |
+
*
|
56 |
+
* @since 5.3.0
|
57 |
+
*
|
58 |
+
* @param array $gateways List of available gateways.
|
59 |
+
*
|
60 |
+
* @return array
|
61 |
+
*/
|
62 |
+
public function filter_add_gateway( array $gateways = [] ) : array {
|
63 |
+
return $this->container->make( Gateway::class )->register_gateway( $gateways );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Modify the HTML of the Webhooks field to include a copy button.
|
68 |
+
*
|
69 |
+
* @since 5.3.0
|
70 |
+
*
|
71 |
+
* @param string $html
|
72 |
+
* @param \Tribe__Field $field
|
73 |
+
*
|
74 |
+
* @return string
|
75 |
+
*/
|
76 |
+
public function filter_include_webhooks_copy( string $html, \Tribe__Field $field ) : string {
|
77 |
+
return $this->container->make( Webhooks::class )->include_webhooks_copy_button( $html, $field );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Register the Endpoints from Stripe.
|
82 |
+
*
|
83 |
+
* @since 5.3.0
|
84 |
+
*/
|
85 |
+
public function register_endpoints() : void {
|
86 |
+
$this->container->make( REST::class )->register_endpoints();
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Handles the validation of the signing key on the settings page.
|
91 |
+
*
|
92 |
+
* @since 5.3.0
|
93 |
+
*/
|
94 |
+
public function action_handle_testing_webhooks_field() : void {
|
95 |
+
$this->container->make( Webhooks::class )->handle_validation();
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Handle stripe errors into the admin UI.
|
100 |
+
*
|
101 |
+
* @since 5.3.0
|
102 |
+
*/
|
103 |
+
public function handle_stripe_errors() {
|
104 |
+
|
105 |
+
$merchant_denied = tribe( Merchant::class )->is_merchant_unauthorized();
|
106 |
+
|
107 |
+
if ( $merchant_denied ) {
|
108 |
+
return tribe( Notice_Handler::class )->trigger_admin( $merchant_denied );
|
109 |
+
}
|
110 |
+
|
111 |
+
$merchant_disconnected = tribe( Merchant::class )->is_merchant_deauthorized();
|
112 |
+
|
113 |
+
if ( $merchant_disconnected ) {
|
114 |
+
return tribe( Notice_Handler::class )->trigger_admin( $merchant_disconnected );
|
115 |
+
}
|
116 |
+
|
117 |
+
tribe( Settings::class )->alert_currency_mismatch();
|
118 |
+
|
119 |
+
if ( empty( tribe_get_request_var( 'tc-stripe-error' ) ) ) {
|
120 |
+
return;
|
121 |
+
}
|
122 |
+
|
123 |
+
return tribe( Notice_Handler::class )->trigger_admin( tribe_get_request_var( 'tc-stripe-error' ) );
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Include Stripe admin notices for Ticket Commerce.
|
128 |
+
*
|
129 |
+
* @since 5.3.0
|
130 |
+
*
|
131 |
+
* @param array $messages Array of messages.
|
132 |
+
*
|
133 |
+
* @return array
|
134 |
+
*/
|
135 |
+
public function include_admin_notices( $messages ) {
|
136 |
+
return array_merge( $messages, $this->container->make( Gateway::class )->get_admin_notices() );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Checks if Stripe is active and can be used to check out in the current cart and, if so,
|
141 |
+
* generates a payment intent
|
142 |
+
*
|
143 |
+
* @since 5.3.0
|
144 |
+
*/
|
145 |
+
public function maybe_create_stripe_payment_intent() {
|
146 |
+
|
147 |
+
if ( ! tribe( Merchant::class )->is_connected() || ! tribe( Module::class )->is_checkout_page() ) {
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
|
151 |
+
tribe( Payment_Intent_Handler::class )->create_payment_intent_for_cart();
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Intercept saving settings to check if any new payment methods would break Stripe payment intents.
|
156 |
+
*
|
157 |
+
* @since 5.3.0
|
158 |
+
*
|
159 |
+
* @param mixed $value The new value.
|
160 |
+
* @param string $field_id The field id in the options.
|
161 |
+
*
|
162 |
+
* @return mixed
|
163 |
+
*/
|
164 |
+
public function validate_payment_methods( $value, $field_id ) {
|
165 |
+
|
166 |
+
if ( $field_id !== Settings::$option_checkout_element_payment_methods ) {
|
167 |
+
return $value;
|
168 |
+
}
|
169 |
+
|
170 |
+
return Payment_Intent::validate_payment_methods( $value, $field_id );
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Add Webhook settings fields
|
175 |
+
*
|
176 |
+
* @since 5.3.0
|
177 |
+
*
|
178 |
+
* @param array $settings Array of settings for the Stripe gateway.
|
179 |
+
*
|
180 |
+
* @return mixed
|
181 |
+
*/
|
182 |
+
public function include_webhook_settings( $settings ) {
|
183 |
+
if ( ! tribe( Merchant::class )->is_connected() ) {
|
184 |
+
return $settings;
|
185 |
+
}
|
186 |
+
|
187 |
+
return array_merge( $settings, tribe( Webhooks::class )->get_fields() );
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Makes sure mandatory fields have values when hidden.
|
192 |
+
*
|
193 |
+
* @since 5.3.0
|
194 |
+
*
|
195 |
+
* @param mixed $value Field value submitted.
|
196 |
+
* @param string $field_id Field key in the settings array.
|
197 |
+
* @param array $field Entire field array.
|
198 |
+
*
|
199 |
+
* @return mixed
|
200 |
+
*/
|
201 |
+
public function provide_defaults_for_hidden_fields( $value, $field_id, $field ) {
|
202 |
+
return tribe( Settings::class )->reset_hidden_field_values( $value, $field_id, $field );
|
203 |
+
}
|
204 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Merchant.php
ADDED
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Merchant;
|
6 |
+
use Tribe__Utils__Array as Arr;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Merchant
|
10 |
+
*
|
11 |
+
* @since 5.3.0
|
12 |
+
*
|
13 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
14 |
+
*/
|
15 |
+
class Merchant extends Abstract_Merchant {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* List of countries that are unauthorized to work with the TEC Provider for regulatory reasons.
|
19 |
+
*
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
+
const UNAUTHORIZED_COUNTRIES = [
|
23 |
+
'BR',
|
24 |
+
];
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Option key to save the information regarding merchant status.
|
28 |
+
*
|
29 |
+
* @since 5.3.0
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public static $merchant_unauthorized_option_key = 'tickets-commerce-merchant-unauthorized';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Option key to save the information regarding merchant authorization.
|
37 |
+
*
|
38 |
+
* @since 5.3.0
|
39 |
+
*
|
40 |
+
* @var string
|
41 |
+
*/
|
42 |
+
public static $merchant_deauthorized_option_key = 'tickets-commerce-merchant-deauthorized';
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Option key to save the information regarding merchant default currency.
|
46 |
+
*
|
47 |
+
* @since 5.3.0
|
48 |
+
*
|
49 |
+
* @var string
|
50 |
+
*/
|
51 |
+
public static $merchant_default_currency_option_key = 'tickets-commerce-merchant-currency';
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Determines if Merchant is active. For Stripe this is the same as being connected.
|
55 |
+
*
|
56 |
+
* @since 5.3.0
|
57 |
+
*
|
58 |
+
* @return bool
|
59 |
+
*/
|
60 |
+
public function is_active( $recheck = false ) {
|
61 |
+
return $this->is_connected( $recheck );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Determines if the Merchant is connected.
|
66 |
+
*
|
67 |
+
* @since 5.3.0
|
68 |
+
*
|
69 |
+
* @return bool
|
70 |
+
*/
|
71 |
+
public function is_connected( $recheck = false ) {
|
72 |
+
$client_data = $this->to_array();
|
73 |
+
|
74 |
+
if ( empty( $client_data['client_id'] )
|
75 |
+
|| empty( $client_data['client_secret'] )
|
76 |
+
|| empty( $client_data['publishable_key'] )
|
77 |
+
) {
|
78 |
+
return false;
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( $recheck ) {
|
82 |
+
$status = $this->check_account_status( $client_data );
|
83 |
+
|
84 |
+
if ( false === $status['connected'] ) {
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Returns the options key for the account in the merchant mode.
|
94 |
+
*
|
95 |
+
* @since 5.3.0
|
96 |
+
*
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function get_account_key() {
|
100 |
+
$gateway_key = Gateway::get_key();
|
101 |
+
|
102 |
+
return "tec_tickets_commerce_{$gateway_key}_account";
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Returns the data retrieved from the signup process.
|
107 |
+
*
|
108 |
+
* Uses normal WP options to be saved, instead of the normal tribe_update_option.
|
109 |
+
*
|
110 |
+
* @since 5.3.0
|
111 |
+
*
|
112 |
+
* @return string
|
113 |
+
*/
|
114 |
+
public function get_signup_data_key() {
|
115 |
+
$gateway_key = Gateway::get_key();
|
116 |
+
|
117 |
+
return "tec_tickets_commerce_{$gateway_key}_signup_data";
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Returns the stripe client secret stored for server-side transactions.
|
122 |
+
*
|
123 |
+
* @since 5.3.0
|
124 |
+
*
|
125 |
+
* @return string
|
126 |
+
*/
|
127 |
+
public function get_client_secret() {
|
128 |
+
$keys = get_option( $this->get_signup_data_key() );
|
129 |
+
|
130 |
+
if ( empty( $keys[ $this->get_mode() ]->access_token ) ) {
|
131 |
+
return '';
|
132 |
+
}
|
133 |
+
|
134 |
+
return $keys[ $this->get_mode() ]->access_token;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Fetch the Publishable key for the user.
|
139 |
+
*
|
140 |
+
* @since 5.3.0
|
141 |
+
*
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function get_publishable_key() {
|
145 |
+
$keys = get_option( $this->get_signup_data_key() );
|
146 |
+
|
147 |
+
if ( empty( $keys[ $this->get_mode() ]->publishable_key ) ) {
|
148 |
+
return '';
|
149 |
+
}
|
150 |
+
|
151 |
+
return $keys[ $this->get_mode() ]->publishable_key;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Returns the stripe client id stored for server-side transactions.
|
156 |
+
*
|
157 |
+
* @since 5.3.0
|
158 |
+
*
|
159 |
+
* @return string
|
160 |
+
*/
|
161 |
+
public function get_client_id() {
|
162 |
+
$keys = get_option( $this->get_signup_data_key() );
|
163 |
+
|
164 |
+
if ( empty( $keys['stripe_user_id'] ) ) {
|
165 |
+
return '';
|
166 |
+
}
|
167 |
+
|
168 |
+
return $keys['stripe_user_id'];
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Return array of merchant details.
|
173 |
+
*
|
174 |
+
* @since 5.3.0
|
175 |
+
*
|
176 |
+
* @return array
|
177 |
+
*/
|
178 |
+
public function to_array() {
|
179 |
+
return [
|
180 |
+
'client_id' => $this->get_client_id(),
|
181 |
+
'client_secret' => $this->get_client_secret(),
|
182 |
+
'publishable_key' => $this->get_client_id(),
|
183 |
+
];
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Saves signup data from the redirect into permanent option.
|
188 |
+
*
|
189 |
+
* @since 5.3.0
|
190 |
+
*
|
191 |
+
* @param array $signup_data
|
192 |
+
*
|
193 |
+
* @return bool
|
194 |
+
*/
|
195 |
+
public function save_signup_data( array $signup_data ) {
|
196 |
+
unset( $signup_data['whodat'] );
|
197 |
+
unset( $signup_data['state'] );
|
198 |
+
|
199 |
+
return update_option( $this->get_signup_data_key(), $signup_data );
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Returns the list of enabled payment method types for the Payment Element, or the Card type
|
204 |
+
* for the Card Element.
|
205 |
+
*
|
206 |
+
* @since 5.3.0
|
207 |
+
*
|
208 |
+
* @return string[]
|
209 |
+
*/
|
210 |
+
public function get_payment_method_types( $fallback = false ) {
|
211 |
+
|
212 |
+
if ( $fallback || Settings::CARD_ELEMENT_SLUG === tribe_get_option( Settings::$option_checkout_element ) ) {
|
213 |
+
return [ 'card' ];
|
214 |
+
}
|
215 |
+
|
216 |
+
return tribe_get_option( Settings::$option_checkout_element_payment_methods, [ 'card' ] );
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Query the Stripe API to gather information about the current connected account.
|
221 |
+
*
|
222 |
+
* @since 5.3.0
|
223 |
+
*
|
224 |
+
* @param array $client_data Connection data from the database.
|
225 |
+
*
|
226 |
+
* @return array
|
227 |
+
*/
|
228 |
+
public function check_account_status( $client_data = [] ) {
|
229 |
+
|
230 |
+
if ( empty( $client_data ) ) {
|
231 |
+
$client_data = $this->to_array();
|
232 |
+
}
|
233 |
+
|
234 |
+
$return = [
|
235 |
+
'connected' => false,
|
236 |
+
'charges_enabled' => false,
|
237 |
+
'errors' => [],
|
238 |
+
'capabilities' => [],
|
239 |
+
];
|
240 |
+
|
241 |
+
if ( empty( $client_data['client_id'] )
|
242 |
+
|| empty( $client_data['client_secret'] )
|
243 |
+
|| empty( $client_data['publishable_key'] )
|
244 |
+
) {
|
245 |
+
return $return;
|
246 |
+
}
|
247 |
+
|
248 |
+
$url = sprintf( '/accounts/%s', urlencode( $client_data['client_id'] ) );
|
249 |
+
|
250 |
+
$response = Requests::get( $url, [], [] );
|
251 |
+
|
252 |
+
if ( ! empty( $response['object'] ) && 'account' === $response['object'] ) {
|
253 |
+
$return['connected'] = true;
|
254 |
+
$return['charges_enabled'] = tribe_is_truthy( Arr::get( $response, 'charges_enabled', false ) );
|
255 |
+
$return['country'] = Arr::get( $response, 'country', false );
|
256 |
+
$return['default_currency'] = Arr::get( $response, 'default_currency', false );
|
257 |
+
$return['capabilities'] = Arr::get( $response, 'capabilities', false );
|
258 |
+
$return['statement_descriptor'] = Arr::get( $response, 'statement_descriptor', false );
|
259 |
+
|
260 |
+
if ( empty( $return['statement_descriptor'] ) && ! empty( $response['settings']['payments']['statement_descriptor'] ) ) {
|
261 |
+
$return['statement_descriptor'] = $response['settings']['payments']['statement_descriptor'];
|
262 |
+
}
|
263 |
+
|
264 |
+
if ( ! empty( $response['requirements']['errors'] ) ) {
|
265 |
+
$return['errors']['requirements'] = $response['requirements']['errors'];
|
266 |
+
}
|
267 |
+
|
268 |
+
if ( ! empty( $response['future_requirements']['errors'] ) ) {
|
269 |
+
$return['errors']['future_requirements'] = $response['future_requirements']['errors'];
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
if ( ! empty( $response['type'] ) && in_array( $response['type'], [
|
274 |
+
'api_error',
|
275 |
+
'card_error',
|
276 |
+
'idempotency_error',
|
277 |
+
'invalid_request_error',
|
278 |
+
], true ) ) {
|
279 |
+
|
280 |
+
$return['request_error'] = $response;
|
281 |
+
}
|
282 |
+
|
283 |
+
return $return;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Empty the signup data option and void the connection.
|
288 |
+
*
|
289 |
+
* @since 5.3.0
|
290 |
+
*
|
291 |
+
* @return bool
|
292 |
+
*/
|
293 |
+
public function delete_signup_data() {
|
294 |
+
return update_option( $this->get_signup_data_key(), [] );
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Validate if this Merchant is allowed to connect to the TEC Provider.
|
299 |
+
*
|
300 |
+
* @since 5.3.0
|
301 |
+
*
|
302 |
+
* @return string 'valid' if the account is permitted, or a string with the notice slug if not.
|
303 |
+
*/
|
304 |
+
public function validate_account_is_permitted() {
|
305 |
+
$status = tribe( Settings::class )->connection_status;
|
306 |
+
if ( empty( $status ) ) {
|
307 |
+
tribe( Settings::class )->set_connection_status();
|
308 |
+
$status = tribe( Settings::class )->connection_status;
|
309 |
+
}
|
310 |
+
|
311 |
+
$is_licensed = \TEC\Tickets\Commerce\Settings::is_licensed_plugin();
|
312 |
+
|
313 |
+
if ( $is_licensed ) {
|
314 |
+
return 'valid';
|
315 |
+
}
|
316 |
+
|
317 |
+
if ( $this->country_is_unauthorized( $status ) ) {
|
318 |
+
return 'tc-stripe-country-denied';
|
319 |
+
}
|
320 |
+
|
321 |
+
return 'valid';
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Determine if a stripe account is listed in an unauthorized country.
|
326 |
+
*
|
327 |
+
* @since 5.3.0
|
328 |
+
*
|
329 |
+
* @param array $status The connection status array.
|
330 |
+
*
|
331 |
+
* @return bool
|
332 |
+
*/
|
333 |
+
public function country_is_unauthorized( $status ) {
|
334 |
+
return in_array( $status['country'], static::UNAUTHORIZED_COUNTRIES, true );
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Check if merchant is set as unauthorized.
|
339 |
+
*
|
340 |
+
* Unauthorized accounts are accounts that cannot be authorized to connect, usually due to regulatory reasons.
|
341 |
+
*
|
342 |
+
* @since 5.3.0
|
343 |
+
*
|
344 |
+
* @return bool
|
345 |
+
*/
|
346 |
+
public function is_merchant_unauthorized() {
|
347 |
+
return get_option( static::$merchant_unauthorized_option_key, false );
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Set merchant as unauthorized.
|
352 |
+
*
|
353 |
+
* @since 5.3.0
|
354 |
+
*
|
355 |
+
* @param string $validation_key Refusal reason, must be the same as the notice slug for the corresponding error.
|
356 |
+
*/
|
357 |
+
public function set_merchant_unauthorized( $validation_key ) {
|
358 |
+
\Tribe__Admin__Notices::instance()->undismiss_for_all( $validation_key );
|
359 |
+
update_option( static::$merchant_unauthorized_option_key, $validation_key );
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Unset merchant as unauthorized.
|
364 |
+
*
|
365 |
+
* @since 5.3.0
|
366 |
+
*/
|
367 |
+
public function unset_merchant_unauthorized() {
|
368 |
+
delete_option( static::$merchant_unauthorized_option_key );
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Check if merchant is set as de-authorized.
|
373 |
+
*
|
374 |
+
* De-authorized accounts are accounts that were previously connected and whose connection has been revoked in the
|
375 |
+
* Stripe Dashboard. These accounts can be re-connected with the proper credentials.
|
376 |
+
*
|
377 |
+
* @since 5.3.0
|
378 |
+
*
|
379 |
+
* @return bool
|
380 |
+
*/
|
381 |
+
public function is_merchant_deauthorized() {
|
382 |
+
return get_option( static::$merchant_deauthorized_option_key, false );
|
383 |
+
}
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Set merchant as de-authorized.
|
387 |
+
*
|
388 |
+
* @since 5.3.0
|
389 |
+
*
|
390 |
+
* @param string $validation_key De-authorization reason, must be the same as the notice slug for the corresponding error.
|
391 |
+
*/
|
392 |
+
public function set_merchant_deauthorized( $validation_key ) {
|
393 |
+
\Tribe__Admin__Notices::instance()->undismiss_for_all( $validation_key );
|
394 |
+
update_option( static::$merchant_deauthorized_option_key, $validation_key );
|
395 |
+
}
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Unset merchant as de-authorized.
|
399 |
+
*
|
400 |
+
* @since 5.3.0
|
401 |
+
*/
|
402 |
+
public function unset_merchant_deauthorized() {
|
403 |
+
delete_option( static::$merchant_deauthorized_option_key );
|
404 |
+
}
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Get the merchant default currency.
|
408 |
+
*
|
409 |
+
* @since 5.3.0
|
410 |
+
*
|
411 |
+
* @return string
|
412 |
+
*/
|
413 |
+
public function get_merchant_currency() {
|
414 |
+
return get_option( static::$merchant_default_currency_option_key );
|
415 |
+
}
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Updates an existing merchant account.
|
419 |
+
*
|
420 |
+
* @since 5.3.0
|
421 |
+
*
|
422 |
+
* @param array $data Array of data to be passed directly to the body of the update request.
|
423 |
+
*
|
424 |
+
* @return array|\WP_Error|null
|
425 |
+
*/
|
426 |
+
public function update( $data ) {
|
427 |
+
$query_args = [];
|
428 |
+
$args = [
|
429 |
+
'body' => $data,
|
430 |
+
];
|
431 |
+
|
432 |
+
$url = sprintf( '/accounts/%s', urlencode( $this->get_client_id() ) );
|
433 |
+
|
434 |
+
return Requests::post( $url, $query_args, $args );
|
435 |
+
}
|
436 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Payment_Intent.php
ADDED
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Cart;
|
6 |
+
use TEC\Tickets\Commerce\Order;
|
7 |
+
use TEC\Tickets\Commerce\Utils\Currency;
|
8 |
+
use TEC\Tickets\Commerce\Utils\Value;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Stripe orders aka Payment Intents class.
|
12 |
+
*
|
13 |
+
* @since 5.3.0
|
14 |
+
*
|
15 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
16 |
+
*/
|
17 |
+
class Payment_Intent {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The minimum amount to charge for the current currency is multiplied by this value to produce the test creation amount.
|
21 |
+
*
|
22 |
+
* @since 5.3.0
|
23 |
+
*
|
24 |
+
* @var float
|
25 |
+
*/
|
26 |
+
const TEST_MULTIPLIER = 3.14;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The key used to identify payment intents created to validate configurations.
|
30 |
+
*
|
31 |
+
* @since 5.3.0
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
public static $test_metadata_key = 'payment_intent_validation_test';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Create a simple payment intent with the designated payment methods to check for errors.
|
39 |
+
*
|
40 |
+
* If the payment intent succeeds it is cancelled. If it fails we display a notice to the user and not apply their
|
41 |
+
* settings.
|
42 |
+
*
|
43 |
+
* @since 5.3.0
|
44 |
+
*
|
45 |
+
* @param array $payment_methods a list of payment_methods to allow in the Payment Intent.
|
46 |
+
*
|
47 |
+
* @return bool|\WP_Error
|
48 |
+
*/
|
49 |
+
public static function test_creation( $payment_methods, $retry = false ) {
|
50 |
+
// Payment Intents for cards only are always valid.
|
51 |
+
if ( 1 === count( $payment_methods ) && in_array( 'card', $payment_methods, true ) ) {
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
|
55 |
+
$value = Value::create( static::get_charge_amount() );
|
56 |
+
$fee = Application_Fee::calculate( $value );
|
57 |
+
|
58 |
+
$query_args = [];
|
59 |
+
$body = [
|
60 |
+
'currency' => $value->get_currency_code(),
|
61 |
+
'amount' => (string) $value->get_integer(),
|
62 |
+
'payment_method_types' => $payment_methods,
|
63 |
+
'application_fee_amount' => (string) $fee->get_integer(),
|
64 |
+
'metadata' => [ static::$test_metadata_key => true ],
|
65 |
+
];
|
66 |
+
|
67 |
+
$args = [
|
68 |
+
'body' => $body,
|
69 |
+
];
|
70 |
+
|
71 |
+
$url = 'payment_intents';
|
72 |
+
|
73 |
+
$payment_intent = Requests::post( $url, $query_args, $args );
|
74 |
+
|
75 |
+
if ( ! isset( $payment_intent['id'] ) && ! empty( $payment_intent['errors'] ) ) {
|
76 |
+
$compiled_errors = static::compile_errors( $payment_intent );
|
77 |
+
|
78 |
+
return new \WP_Error(
|
79 |
+
'tec-tc-stripe-test-payment-intent-failed',
|
80 |
+
// Translators: %s is the html-formatted response from Stripe servers containing the error messages.
|
81 |
+
sprintf( __( 'Stripe reports that it is unable to process charges with the selected Payment Methods. Usually this means that one of the methods selected is not available or not configured in your Stripe account. The errors you see below were returned from Stripe, please correct any inconsistencies or contact Stripe support, then try again: <div class="stripe-errors">%s</div>', 'event-tickets' ), $compiled_errors )
|
82 |
+
);
|
83 |
+
}
|
84 |
+
|
85 |
+
static::cancel( $payment_intent['id'] );
|
86 |
+
|
87 |
+
return true;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Calls the Stripe API and returns a new PaymentIntent object, used to authenticate
|
92 |
+
* front-end payment requests.
|
93 |
+
*
|
94 |
+
* @since 5.3.0
|
95 |
+
*
|
96 |
+
* @param Value $value The value object to create a payment intent for.
|
97 |
+
* @param bool $retry Is this a retry?
|
98 |
+
*
|
99 |
+
* @return mixed
|
100 |
+
*/
|
101 |
+
public static function create( Value $value, $retry = false ) {
|
102 |
+
$fee = Application_Fee::calculate( $value );
|
103 |
+
|
104 |
+
$query_args = [];
|
105 |
+
$body = [
|
106 |
+
'currency' => $value->get_currency_code(),
|
107 |
+
'amount' => (string) $value->get_integer(),
|
108 |
+
'payment_method_types' => tribe( Merchant::class )->get_payment_method_types( $retry ),
|
109 |
+
'application_fee_amount' => (string) $fee->get_integer(),
|
110 |
+
];
|
111 |
+
|
112 |
+
$stripe_statement_descriptor = tribe_get_option( Settings::$option_statement_descriptor );
|
113 |
+
|
114 |
+
if ( ! empty( $stripe_statement_descriptor ) ) {
|
115 |
+
$body['statement_descriptor'] = substr( $stripe_statement_descriptor, 0, 22 );
|
116 |
+
}
|
117 |
+
|
118 |
+
$args = [
|
119 |
+
'body' => $body,
|
120 |
+
];
|
121 |
+
|
122 |
+
$url = 'payment_intents';
|
123 |
+
|
124 |
+
return Requests::post( $url, $query_args, $args );
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Creates a Payment Intent from cart.
|
129 |
+
*
|
130 |
+
* @since 5.3.0
|
131 |
+
*
|
132 |
+
* @param Cart $cart
|
133 |
+
* @param bool $retry
|
134 |
+
*
|
135 |
+
* @return array
|
136 |
+
*/
|
137 |
+
public static function create_from_cart( Cart $cart, $retry = false ) {
|
138 |
+
$items = tribe( Order::class )->prepare_cart_items_for_order( $cart );
|
139 |
+
|
140 |
+
if ( empty( $items ) ) {
|
141 |
+
return [];
|
142 |
+
}
|
143 |
+
|
144 |
+
$value = tribe( Order::class )->get_value_total( array_filter( $items ) );
|
145 |
+
|
146 |
+
return static::create( $value, $retry );
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Calls the Stripe API and returns an existing Payment Intent.
|
151 |
+
*
|
152 |
+
* @since 5.3.0
|
153 |
+
*
|
154 |
+
* @param string $payment_intent_id Payment Intent ID.
|
155 |
+
*
|
156 |
+
* @return array|\WP_Error
|
157 |
+
*/
|
158 |
+
public static function get( $payment_intent_id ) {
|
159 |
+
$query_args = [];
|
160 |
+
$body = [
|
161 |
+
];
|
162 |
+
$args = [
|
163 |
+
'body' => $body,
|
164 |
+
];
|
165 |
+
|
166 |
+
$url = sprintf( '/payment_intents/%s', urlencode( $payment_intent_id ) );
|
167 |
+
|
168 |
+
return Requests::get( $url, $query_args, $args );
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Updates an existing payment intent to add any necessary data before confirming the purchase.
|
173 |
+
*
|
174 |
+
* @since 5.3.0
|
175 |
+
*
|
176 |
+
* @param array $data The purchase data received from the front-end.
|
177 |
+
*
|
178 |
+
* @return array|\WP_Error|null
|
179 |
+
*/
|
180 |
+
public static function update( $payment_intent_id, $data ) {
|
181 |
+
$query_args = [];
|
182 |
+
$args = [
|
183 |
+
'body' => $data,
|
184 |
+
];
|
185 |
+
|
186 |
+
$url = sprintf( '/payment_intents/%s', urlencode( $payment_intent_id ) );
|
187 |
+
|
188 |
+
return Requests::post( $url, $query_args, $args );
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Issue an API request to cancel a Payment Intent.
|
193 |
+
*
|
194 |
+
* @since 5.3.0
|
195 |
+
*
|
196 |
+
* @param string $payment_intent_id the payment intent to cancel.
|
197 |
+
*/
|
198 |
+
public static function cancel( $payment_intent_id ) {
|
199 |
+
$query_args = [];
|
200 |
+
$body = [];
|
201 |
+
$args = [
|
202 |
+
'body' => $body,
|
203 |
+
];
|
204 |
+
|
205 |
+
$url = sprintf( '/payment_intents/%s/cancel', urlencode( $payment_intent_id ) );
|
206 |
+
|
207 |
+
Requests::post( $url, $query_args, $args );
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Compile errors caught when creating a Payment Intent into a proper html notice for the admin.
|
212 |
+
*
|
213 |
+
* @since 5.3.0
|
214 |
+
*
|
215 |
+
* @param array $errors List of errors returned from Stripe.
|
216 |
+
*
|
217 |
+
* @return string
|
218 |
+
*/
|
219 |
+
public static function compile_errors( $errors ) {
|
220 |
+
$compiled = '';
|
221 |
+
|
222 |
+
if ( empty( $errors['errors'] ) ) {
|
223 |
+
return $compiled;
|
224 |
+
}
|
225 |
+
|
226 |
+
if ( ! is_array( $errors['errors'] ) ) {
|
227 |
+
return $errors['errors'];
|
228 |
+
}
|
229 |
+
|
230 |
+
foreach ( $errors['errors'] as $error ) {
|
231 |
+
$compiled .= sprintf( '<p><em>%s</em></p>', esc_html( $error[1] ) );
|
232 |
+
}
|
233 |
+
|
234 |
+
return $compiled;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Calculates the minimum charge amount allowed for the current currency
|
239 |
+
*
|
240 |
+
* @since 5.3.0
|
241 |
+
*
|
242 |
+
* @return int|float|null returns an int or float with the minimum value allowed, null if Stripe does not support
|
243 |
+
* the currency.
|
244 |
+
*/
|
245 |
+
public static function get_charge_amount() {
|
246 |
+
$currency = Currency::get_currency_code();
|
247 |
+
$currency_map = Currency::get_default_currency_map();
|
248 |
+
|
249 |
+
return static::TEST_MULTIPLIER * $currency_map[ $currency ]['stripe_minimum_charge'];
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Intercept saving settings to check if any new payment methods would break Stripe payment intents.
|
254 |
+
*
|
255 |
+
* @since 5.3.0
|
256 |
+
*
|
257 |
+
* @param mixed $value The new value.
|
258 |
+
* @param string $field_id The field id in the options.
|
259 |
+
*
|
260 |
+
* @return array
|
261 |
+
*/
|
262 |
+
public static function validate_payment_methods( $value, $field_id ) {
|
263 |
+
|
264 |
+
if ( ! tribe( Merchant::class )->is_connected() ) {
|
265 |
+
return $value;
|
266 |
+
}
|
267 |
+
|
268 |
+
if ( ! isset( $_POST['tribeSaveSettings'] ) || ! isset( $_POST['current-settings-tab'] ) ) {
|
269 |
+
return $value;
|
270 |
+
}
|
271 |
+
|
272 |
+
$checkout_type = tribe_get_request_var( Settings::$option_checkout_element );
|
273 |
+
$payment_methods = tribe_get_request_var( $field_id );
|
274 |
+
$current_methods = tribe_get_option( $field_id, [] );
|
275 |
+
|
276 |
+
if ( empty( $payment_methods ) ) {
|
277 |
+
if ( $checkout_type === Settings::PAYMENT_ELEMENT_SLUG ) {
|
278 |
+
\Tribe__Settings::instance()->errors[] = esc_html__( 'Payment methods accepted cannot be empty', 'event-tickets' );
|
279 |
+
}
|
280 |
+
|
281 |
+
// Revert value to the previous configuration.
|
282 |
+
return $current_methods;
|
283 |
+
}
|
284 |
+
|
285 |
+
sort( $payment_methods );
|
286 |
+
sort( $current_methods );
|
287 |
+
|
288 |
+
// If the two arrays are equal, there's no need to create a new test.
|
289 |
+
if ( $payment_methods === $current_methods ) {
|
290 |
+
return $current_methods;
|
291 |
+
}
|
292 |
+
|
293 |
+
$payment_intent_test = static::test_creation( $payment_methods );
|
294 |
+
|
295 |
+
if ( ! is_wp_error( $payment_intent_test ) ) {
|
296 |
+
// Payment Settings are working, great!
|
297 |
+
return $value;
|
298 |
+
}
|
299 |
+
|
300 |
+
// Payment attempt failed. Provide an alert in the Dashboard.
|
301 |
+
\Tribe__Settings::instance()->errors[] = $payment_intent_test->get_error_message();
|
302 |
+
|
303 |
+
// Revert value to the previous configuration.
|
304 |
+
return tribe_get_option( $field_id, [] );
|
305 |
+
}
|
306 |
+
|
307 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Cart;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\REST\Webhook_Endpoint;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Payment Intent Handler
|
10 |
+
*
|
11 |
+
* @since 5.3.0
|
12 |
+
*
|
13 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
14 |
+
*/
|
15 |
+
class Payment_Intent_Handler {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Base string to use when composing payment intent transient names.
|
19 |
+
*
|
20 |
+
* @since 5.3.0
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
public $payment_intent_transient_prefix = 'paymentintent-';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Transient name to store payment intents.
|
28 |
+
*
|
29 |
+
* @since 5.3.0
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $payment_intent_transient_name;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Counter for how many times we've re-tried creating a PaymentIntent.
|
37 |
+
*
|
38 |
+
* @since 5.3.0
|
39 |
+
*
|
40 |
+
* @var int
|
41 |
+
*/
|
42 |
+
protected $payment_element_fallback_retries = 0;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Max number of retries to create a PaymentIntent.
|
46 |
+
*
|
47 |
+
* @since 5.3.0
|
48 |
+
*
|
49 |
+
* @var int
|
50 |
+
*/
|
51 |
+
protected $payment_intent_max_retries = 2;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Increment the retry counter if under max_retries.
|
55 |
+
*
|
56 |
+
* @return bool True if incremented, false if no more retries are allowed.
|
57 |
+
*/
|
58 |
+
public function count_retries() {
|
59 |
+
if ( $this->payment_intent_max_retries <= $this->payment_element_fallback_retries ) {
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
|
63 |
+
$this->payment_element_fallback_retries ++;
|
64 |
+
|
65 |
+
return true;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Calls the Stripe API and returns a new PaymentIntent object, used to authenticate
|
70 |
+
* front-end payment requests.
|
71 |
+
*
|
72 |
+
* @since 5.3.0
|
73 |
+
*
|
74 |
+
* @param string $currency 3-letter ISO code for the desired currency. Not all currencies are supported.
|
75 |
+
* @param int $value The payment value in the smallest currency unit (e.g: cents, if the purchase is in USD).
|
76 |
+
*/
|
77 |
+
public function create_payment_intent_for_cart( $retry = false ) {
|
78 |
+
$this->set_payment_intent_transient_name();
|
79 |
+
$payment_intent = Payment_Intent::create_from_cart( tribe( Cart::class ), $retry );
|
80 |
+
|
81 |
+
if ( ! isset( $payment_intent['id'] ) && ! empty( $payment_intent['errors'] ) ) {
|
82 |
+
|
83 |
+
if ( $this->count_retries() ) {
|
84 |
+
$this->delete_payment_intent_transient();
|
85 |
+
|
86 |
+
return $this->create_payment_intent_for_cart( true );
|
87 |
+
}
|
88 |
+
|
89 |
+
// We're over the max retries, display an error to the end user and move on.
|
90 |
+
$payment_intent['errors'][0] = [
|
91 |
+
'et_could_not_create_stripe_order',
|
92 |
+
__( 'There was an error enabling Stripe on your cart. More information is available in the Event Tickets settings dashboard. Please contact the site administrator for support.', 'event-tickets' ),
|
93 |
+
];
|
94 |
+
}
|
95 |
+
|
96 |
+
return $this->store_payment_intent( $payment_intent );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Updates an existing payment intent to add any necessary data before confirming the purchase.
|
101 |
+
*
|
102 |
+
* @since 5.3.0
|
103 |
+
*
|
104 |
+
* @param array $data The purchase data received from the front-end.
|
105 |
+
* @param \WP_Post $order The order object.
|
106 |
+
*
|
107 |
+
* @return array|\WP_Error|null
|
108 |
+
*/
|
109 |
+
public function update_payment_intent( $data, \WP_Post $order ) {
|
110 |
+
$body = [];
|
111 |
+
$payment_intent_id = $data['payment_intent']['id'];
|
112 |
+
|
113 |
+
$stripe_receipt_emails = tribe_get_option( Settings::$option_stripe_receipt_emails );
|
114 |
+
$payment_intent = Payment_Intent::get( $payment_intent_id );
|
115 |
+
|
116 |
+
// Add the Order ID as metadata to the Payment Intent
|
117 |
+
$metadata = $payment_intent['metadata'];
|
118 |
+
$metadata['order_id'] = $order->ID;
|
119 |
+
$metadata['return_url'] = tribe( Webhook_Endpoint::class )->get_route_url();
|
120 |
+
$body['metadata'] = $metadata;
|
121 |
+
|
122 |
+
if ( $stripe_receipt_emails ) {
|
123 |
+
if ( is_user_logged_in() ) {
|
124 |
+
$user = wp_get_current_user();
|
125 |
+
$body['receipt_email'] = $user->get( 'user_email' );
|
126 |
+
}
|
127 |
+
|
128 |
+
if ( ! empty( $data['purchaser']['email'] ) ) {
|
129 |
+
$body['receipt_email'] = $data['purchaser']['email'];
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
return Payment_Intent::update( $payment_intent_id, $body );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Assembles basic data about the payment intent created at page-load to use in javascript.
|
138 |
+
*
|
139 |
+
* @since 5.3.0
|
140 |
+
*
|
141 |
+
* @return array
|
142 |
+
*/
|
143 |
+
public function get_publishable_payment_intent_data() {
|
144 |
+
$pi = $this->get_payment_intent_transient();
|
145 |
+
|
146 |
+
if ( empty( $pi ) ) {
|
147 |
+
return [];
|
148 |
+
}
|
149 |
+
|
150 |
+
if ( ! empty( $pi['errors'] ) ) {
|
151 |
+
return $pi;
|
152 |
+
}
|
153 |
+
|
154 |
+
return [
|
155 |
+
'id' => $pi['id'],
|
156 |
+
'key' => $pi['client_secret'],
|
157 |
+
'name' => $this->get_payment_intent_transient_name(),
|
158 |
+
];
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Compose the transient name used for payment intent transients.
|
163 |
+
*
|
164 |
+
* @since 5.3.0
|
165 |
+
*/
|
166 |
+
public function set_payment_intent_transient_name() {
|
167 |
+
$this->payment_intent_transient_name = $this->payment_intent_transient_prefix . md5( tribe( Cart::class )->get_cart_hash() );
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Returns the transient name used for payment intent transients.
|
172 |
+
*
|
173 |
+
* @since 5.3.0
|
174 |
+
*
|
175 |
+
* @return string
|
176 |
+
*/
|
177 |
+
public function get_payment_intent_transient_name() {
|
178 |
+
|
179 |
+
if ( empty( $this->payment_intent_transient_name ) ) {
|
180 |
+
$this->set_payment_intent_transient_name();
|
181 |
+
}
|
182 |
+
|
183 |
+
return $this->payment_intent_transient_name;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Retrieve a stored payment intent referring to the current cart.
|
188 |
+
*
|
189 |
+
* @since 5.3.0
|
190 |
+
*
|
191 |
+
* @return array|false
|
192 |
+
*/
|
193 |
+
public function get_payment_intent_transient() {
|
194 |
+
return get_transient( $this->get_payment_intent_transient_name() );
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Delete the payment intent transient.
|
199 |
+
*
|
200 |
+
* @since 5.3.0
|
201 |
+
*
|
202 |
+
* @return bool
|
203 |
+
*/
|
204 |
+
public function delete_payment_intent_transient() {
|
205 |
+
return delete_transient( $this->get_payment_intent_transient_name() );
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Store a payment intent array in a transient.
|
210 |
+
*
|
211 |
+
* @since 5.3.0
|
212 |
+
*
|
213 |
+
* @param array $payment_intent Payment intent data from Stripe.
|
214 |
+
*/
|
215 |
+
public function store_payment_intent( $payment_intent ) {
|
216 |
+
set_transient( $this->get_payment_intent_transient_name(), $payment_intent, 6 * HOUR_IN_SECONDS );
|
217 |
+
}
|
218 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Provider.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Webhooks\Account_Webhook;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Webhooks\Charge_Webhook;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Webhooks\Payment_Intent_Webhook;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class Provider
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
15 |
+
*/
|
16 |
+
class Provider extends \tad_DI52_ServiceProvider {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @inheritDoc
|
20 |
+
*/
|
21 |
+
public function register() {
|
22 |
+
$this->container->singleton( Gateway::class );
|
23 |
+
$this->container->singleton( Merchant::class );
|
24 |
+
$this->container->singleton( REST::class );
|
25 |
+
$this->container->singleton( Settings::class );
|
26 |
+
$this->container->singleton( Signup::class );
|
27 |
+
$this->container->singleton( Stripe_Elements::class );
|
28 |
+
$this->container->singleton( Status::class );
|
29 |
+
$this->container->singleton( WhoDat::class );
|
30 |
+
$this->container->singleton( Webhooks::class );
|
31 |
+
$this->container->singleton( Payment_Intent_Handler::class );
|
32 |
+
|
33 |
+
// Webhooks.
|
34 |
+
$this->container->singleton( Account_Webhook::class );
|
35 |
+
$this->container->singleton( Charge_Webhook::class );
|
36 |
+
$this->container->singleton( Payment_Intent_Webhook::class );
|
37 |
+
|
38 |
+
$this->register_hooks();
|
39 |
+
$this->register_assets();
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Registers the provider handling all the 1st level filters and actions for this Service Provider.
|
44 |
+
*
|
45 |
+
* @since 5.3.0
|
46 |
+
*/
|
47 |
+
protected function register_hooks() {
|
48 |
+
$hooks = new Hooks( $this->container );
|
49 |
+
$hooks->register();
|
50 |
+
|
51 |
+
// Allow Hooks to be removed, by having the them registered to the container
|
52 |
+
$this->container->singleton( Hooks::class, $hooks );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Registers the provider handling all the 1st level filters and actions for this Service Provider
|
57 |
+
*
|
58 |
+
* @since 5.3.0
|
59 |
+
*/
|
60 |
+
protected function register_assets() {
|
61 |
+
$assets = new Assets( $this->container );
|
62 |
+
$assets->register();
|
63 |
+
|
64 |
+
$this->container->singleton( Assets::class, $assets );
|
65 |
+
}
|
66 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/REST.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class REST
|
7 |
+
*
|
8 |
+
* @since 5.3.0
|
9 |
+
*
|
10 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
11 |
+
*/
|
12 |
+
class REST extends \tad_DI52_ServiceProvider {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @inheritDoc
|
16 |
+
*/
|
17 |
+
public function register() {
|
18 |
+
$this->container->singleton( REST\Order_Endpoint::class );
|
19 |
+
$this->container->singleton( REST\Return_Endpoint::class );
|
20 |
+
$this->container->singleton( REST\Webhook_Endpoint::class );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Register the endpoints for handling webhooks.
|
25 |
+
*
|
26 |
+
* @since 5.3.0
|
27 |
+
*/
|
28 |
+
public function register_endpoints() {
|
29 |
+
$this->container->make( REST\Order_Endpoint::class )->register();
|
30 |
+
$this->container->make( REST\Return_Endpoint::class )->register();
|
31 |
+
$this->container->make( REST\Webhook_Endpoint::class )->register();
|
32 |
+
}
|
33 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\REST;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Cart;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_REST_Endpoint;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Gateway;
|
8 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Payment_Intent;
|
9 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Payment_Intent_Handler;
|
10 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Status;
|
11 |
+
use TEC\Tickets\Commerce\Order;
|
12 |
+
|
13 |
+
use TEC\Tickets\Commerce\Status\Pending;
|
14 |
+
use TEC\Tickets\Commerce\Success;
|
15 |
+
|
16 |
+
use Tribe__Utils__Array as Arr;
|
17 |
+
|
18 |
+
use WP_Error;
|
19 |
+
use WP_REST_Request;
|
20 |
+
use WP_REST_Response;
|
21 |
+
use WP_REST_Server;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Class Order Endpoint.
|
25 |
+
*
|
26 |
+
* @since 5.3.0
|
27 |
+
*
|
28 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\REST
|
29 |
+
*/
|
30 |
+
class Order_Endpoint extends Abstract_REST_Endpoint {
|
31 |
+
|
32 |
+
/**
|
33 |
+
* The REST API endpoint path.
|
34 |
+
*
|
35 |
+
* @since 5.3.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
protected $path = '/commerce/stripe/order';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Register the actual endpoint on WP Rest API.
|
43 |
+
*
|
44 |
+
* @since 5.3.0
|
45 |
+
*/
|
46 |
+
public function register() {
|
47 |
+
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
48 |
+
$documentation = tribe( 'tickets.rest-v1.endpoints.documentation' );
|
49 |
+
|
50 |
+
register_rest_route(
|
51 |
+
$namespace,
|
52 |
+
$this->get_endpoint_path(),
|
53 |
+
[
|
54 |
+
'methods' => WP_REST_Server::CREATABLE,
|
55 |
+
'args' => $this->create_order_args(),
|
56 |
+
'callback' => [ $this, 'handle_create_order' ],
|
57 |
+
'permission_callback' => '__return_true',
|
58 |
+
]
|
59 |
+
);
|
60 |
+
|
61 |
+
register_rest_route(
|
62 |
+
$namespace,
|
63 |
+
$this->get_endpoint_path() . '/(?P<order_id>[0-9a-zA-Z_-]+)',
|
64 |
+
[
|
65 |
+
'methods' => WP_REST_Server::CREATABLE,
|
66 |
+
'args' => $this->update_order_args(),
|
67 |
+
'callback' => [ $this, 'handle_update_order' ],
|
68 |
+
'permission_callback' => '__return_true',
|
69 |
+
]
|
70 |
+
);
|
71 |
+
|
72 |
+
register_rest_route(
|
73 |
+
$namespace,
|
74 |
+
$this->get_endpoint_path() . '/(?P<order_id>[0-9a-zA-Z_-]+)',
|
75 |
+
[
|
76 |
+
'methods' => WP_REST_Server::DELETABLE,
|
77 |
+
'args' => $this->fail_order_args(),
|
78 |
+
'callback' => [ $this, 'handle_fail_order' ],
|
79 |
+
'permission_callback' => '__return_true',
|
80 |
+
]
|
81 |
+
);
|
82 |
+
|
83 |
+
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Arguments used for the endpoint.
|
88 |
+
*
|
89 |
+
* @since 5.3.0
|
90 |
+
*
|
91 |
+
* @return array
|
92 |
+
*/
|
93 |
+
public function create_order_args() {
|
94 |
+
return [];
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Handles the request that creates an order with Tickets Commerce and the Stripe gateway.
|
99 |
+
*
|
100 |
+
* @since 5.3.0
|
101 |
+
*
|
102 |
+
* @param WP_REST_Request $request The request object.
|
103 |
+
*
|
104 |
+
* @return WP_Error|WP_REST_Response An array containing the data on success or a WP_Error instance on failure.
|
105 |
+
*/
|
106 |
+
public function handle_create_order( WP_REST_Request $request ) {
|
107 |
+
$response = [
|
108 |
+
'success' => false,
|
109 |
+
];
|
110 |
+
|
111 |
+
$messages = $this->get_error_messages();
|
112 |
+
$data = $request->get_json_params();
|
113 |
+
$purchaser = tribe( Order::class )->get_purchaser_data( $data );
|
114 |
+
|
115 |
+
if ( is_wp_error( $purchaser ) ) {
|
116 |
+
return $purchaser;
|
117 |
+
}
|
118 |
+
|
119 |
+
$order = tribe( Order::class )->create_from_cart( tribe( Gateway::class ), $purchaser );
|
120 |
+
|
121 |
+
$payment_intent = tribe( Payment_Intent_Handler::class )->update_payment_intent( $data, $order );
|
122 |
+
|
123 |
+
if ( is_wp_error( $payment_intent ) ) {
|
124 |
+
return new WP_Error( 'tec-tc-gateway-stripe-failed-creating-payment-intent', $messages['failed-creating-payment-intent'], $order );
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( empty( $payment_intent['id'] ) || empty( $payment_intent['created'] ) ) {
|
128 |
+
return new WP_Error( 'tec-tc-gateway-stripe-failed-creating-order', $messages['failed-creating-order'], $order );
|
129 |
+
}
|
130 |
+
|
131 |
+
// Orders need to pass the Pending status always.
|
132 |
+
$updated = tribe( Order::class )->modify_status( $order->ID, Pending::SLUG, [
|
133 |
+
'gateway_payload' => $payment_intent,
|
134 |
+
'gateway_order_id' => $payment_intent['id'],
|
135 |
+
] );
|
136 |
+
|
137 |
+
if ( is_wp_error( $updated ) ) {
|
138 |
+
return $updated;
|
139 |
+
}
|
140 |
+
|
141 |
+
// Respond with the client_secret for Stripe Usage.
|
142 |
+
$response['success'] = true;
|
143 |
+
$response['order_id'] = $order->ID;
|
144 |
+
$response['client_secret'] = $payment_intent['client_secret'];
|
145 |
+
$response['redirect_url'] = add_query_arg( [ 'tc-order-id' => $payment_intent['id'] ], tribe( Success::class )->get_url() );
|
146 |
+
|
147 |
+
return new WP_REST_Response( $response );
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Arguments used for the updating order endpoint.
|
152 |
+
*
|
153 |
+
* @since 5.3.0
|
154 |
+
*
|
155 |
+
* @return array
|
156 |
+
*/
|
157 |
+
public function update_order_args() {
|
158 |
+
return [
|
159 |
+
'order_id' => [
|
160 |
+
'description' => __( 'Order ID (Payment Intent ID) in Stripe', 'event-tickets' ),
|
161 |
+
'required' => true,
|
162 |
+
'type' => 'string',
|
163 |
+
'validate_callback' => static function ( $value ) {
|
164 |
+
if ( ! is_string( $value ) ) {
|
165 |
+
return new WP_Error( 'rest_invalid_param', 'The Order ID (Payment Intent ID) argument must be a string.', [ 'status' => 400 ] );
|
166 |
+
}
|
167 |
+
|
168 |
+
return $value;
|
169 |
+
},
|
170 |
+
'sanitize_callback' => [ $this, 'sanitize_callback' ],
|
171 |
+
],
|
172 |
+
'client_secret' => [
|
173 |
+
'description' => __( 'Client Secret from Stripe', 'event-tickets' ),
|
174 |
+
'required' => false,
|
175 |
+
'type' => 'string',
|
176 |
+
'validate_callback' => static function ( $value ) {
|
177 |
+
if ( ! is_string( $value ) ) {
|
178 |
+
return new WP_Error( 'rest_invalid_param', 'The Client Secret argument must be a string.', [ 'status' => 400 ] );
|
179 |
+
}
|
180 |
+
|
181 |
+
return $value;
|
182 |
+
},
|
183 |
+
'sanitize_callback' => [ $this, 'sanitize_callback' ],
|
184 |
+
],
|
185 |
+
];
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Handles the request that creates an order with Tickets Commerce and the Stripe gateway.
|
190 |
+
*
|
191 |
+
* @since 5.3.0
|
192 |
+
*
|
193 |
+
* @param WP_REST_Request $request The request object.
|
194 |
+
*
|
195 |
+
* @return WP_Error|WP_REST_Response An array containing the data on success or a WP_Error instance on failure.
|
196 |
+
*/
|
197 |
+
public function handle_update_order( WP_REST_Request $request ) {
|
198 |
+
$response = [
|
199 |
+
'success' => false,
|
200 |
+
];
|
201 |
+
|
202 |
+
$messages = $this->get_error_messages();
|
203 |
+
$gateway_order_id = $request->get_param( 'order_id' );
|
204 |
+
|
205 |
+
$order = tec_tc_orders()->by_args( [
|
206 |
+
'status' => 'any',
|
207 |
+
'gateway_order_id' => $gateway_order_id,
|
208 |
+
] )->first();
|
209 |
+
|
210 |
+
if ( is_wp_error( $order ) || empty( $order ) ) {
|
211 |
+
return new WP_Error( 'tec-tc-gateway-stripe-order-not-found', $messages['order-not-found'], $order );
|
212 |
+
}
|
213 |
+
|
214 |
+
$client_secret = $request->get_param( 'client_secret' );
|
215 |
+
$payment_intent = Payment_Intent::get( $gateway_order_id );
|
216 |
+
|
217 |
+
if ( is_wp_error( $payment_intent ) ) {
|
218 |
+
return new WP_Error( 'tec-tc-gateway-stripe-failed-getting-payment-intent', $messages['failed-getting-payment-intent'], $order );
|
219 |
+
}
|
220 |
+
|
221 |
+
if ( empty( $payment_intent['id'] ) || $payment_intent['id'] !== $gateway_order_id ) {
|
222 |
+
return new WP_Error( 'tec-tc-gateway-stripe-failed-payment-intent-id', $messages['failed-payment-intent-id'], $order );
|
223 |
+
}
|
224 |
+
|
225 |
+
if ( $payment_intent['client_secret'] !== $client_secret ) {
|
226 |
+
return new WP_Error( 'tec-tc-gateway-stripe-failed-payment-intent-secret', $messages['failed-payment-intent-secret'], $order );
|
227 |
+
}
|
228 |
+
|
229 |
+
$payment_intent_status = Arr::get( $payment_intent, [ 'status' ] );
|
230 |
+
$status = tribe( Status::class )->convert_to_commerce_status( $payment_intent_status );
|
231 |
+
|
232 |
+
if ( ! $status ) {
|
233 |
+
return new WP_Error( 'tec-tc-gateway-stripe-invalid-payment-intent-status', $messages['invalid-payment-intent-status'], $payment_intent_status );
|
234 |
+
}
|
235 |
+
|
236 |
+
$updated = tribe( Order::class )->modify_status( $order->ID, $status->get_slug(), [
|
237 |
+
'gateway_payload' => $payment_intent,
|
238 |
+
'gateway_order_id' => $payment_intent['id'],
|
239 |
+
] );
|
240 |
+
|
241 |
+
if ( is_wp_error( $updated ) ) {
|
242 |
+
return $updated;
|
243 |
+
}
|
244 |
+
|
245 |
+
// Respond with the client_secret for Stripe Usage.
|
246 |
+
$response['success'] = true;
|
247 |
+
$response['status'] = $status->get_slug();
|
248 |
+
$response['order_id'] = $order->ID;
|
249 |
+
$response['gateway_order_id'] = $gateway_order_id;
|
250 |
+
|
251 |
+
// When we have success we clear the cart.
|
252 |
+
tribe( Cart::class )->clear_cart();
|
253 |
+
|
254 |
+
$response['redirect_url'] = add_query_arg( [ 'tc-order-id' => $gateway_order_id ], tribe( Success::class )->get_url() );
|
255 |
+
|
256 |
+
return new WP_REST_Response( $response );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Arguments used for the fail order endpoint.e
|
261 |
+
*
|
262 |
+
* @since 5.3.0
|
263 |
+
*
|
264 |
+
* @return array
|
265 |
+
*/
|
266 |
+
public function fail_order_args() {
|
267 |
+
return [
|
268 |
+
'order_id' => [
|
269 |
+
'description' => __( 'Order ID in Stripe', 'event-tickets' ),
|
270 |
+
'required' => true,
|
271 |
+
'type' => 'string',
|
272 |
+
'validate_callback' => static function ( $value ) {
|
273 |
+
if ( ! is_string( $value ) ) {
|
274 |
+
return new WP_Error( 'rest_invalid_param', 'The order ID argument must be a string.', [ 'status' => 400 ] );
|
275 |
+
}
|
276 |
+
|
277 |
+
return $value;
|
278 |
+
},
|
279 |
+
'sanitize_callback' => [ $this, 'sanitize_callback' ],
|
280 |
+
],
|
281 |
+
'failed_status' => [
|
282 |
+
'description' => __( 'To which status the failing should change this order to', 'event-tickets' ),
|
283 |
+
'required' => false,
|
284 |
+
'type' => 'string',
|
285 |
+
'validate_callback' => static function ( $value ) {
|
286 |
+
if ( ! is_string( $value ) ) {
|
287 |
+
return new WP_Error( 'rest_invalid_param', 'The failed status argument must be a string.', [ 'status' => 400 ] );
|
288 |
+
}
|
289 |
+
|
290 |
+
return $value;
|
291 |
+
},
|
292 |
+
'sanitize_callback' => [ $this, 'sanitize_callback' ],
|
293 |
+
],
|
294 |
+
'failed_reason' => [
|
295 |
+
'description' => __( 'Why this particular order has failed.', 'event-tickets' ),
|
296 |
+
'required' => false,
|
297 |
+
'type' => 'string',
|
298 |
+
'validate_callback' => static function ( $value ) {
|
299 |
+
if ( ! is_string( $value ) ) {
|
300 |
+
return new WP_Error( 'rest_invalid_param', 'The failed reason argument must be a string.', [ 'status' => 400 ] );
|
301 |
+
}
|
302 |
+
|
303 |
+
return $value;
|
304 |
+
},
|
305 |
+
'sanitize_callback' => [ $this, 'sanitize_callback' ],
|
306 |
+
],
|
307 |
+
];
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Handles the request that creates an order with Tickets Commerce and the Stripe gateway.
|
312 |
+
*
|
313 |
+
* @since 5.3.0
|
314 |
+
*
|
315 |
+
* @param WP_REST_Request $request The request object.
|
316 |
+
*
|
317 |
+
* @return WP_Error|WP_REST_Response An array containing the data on success or a WP_Error instance on failure.
|
318 |
+
*/
|
319 |
+
public function handle_fail_order( WP_REST_Request $request ) {
|
320 |
+
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Returns an array of error messages that are used by the API responses.
|
325 |
+
*
|
326 |
+
* @since 5.3.0
|
327 |
+
*
|
328 |
+
* @return array $messages Array of error messages.
|
329 |
+
*/
|
330 |
+
public function get_error_messages() {
|
331 |
+
$messages = [
|
332 |
+
'failed-completing-payment-intent' => __( 'Completing the Stripe PaymentIntent failed. Please try again.', 'event-tickets' ),
|
333 |
+
'failed-creating-payment-intent' => __( 'Creating new Stripe PaymentIntent failed. Please try again.', 'event-tickets' ),
|
334 |
+
'failed-creating-order' => __( 'Creating new Stripe order failed. Please try again.', 'event-tickets' ),
|
335 |
+
];
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Filter the error messages for Stripe checkout.
|
339 |
+
*
|
340 |
+
* @since 5.3.0
|
341 |
+
*
|
342 |
+
* @param array $messages Array of error messages.
|
343 |
+
*/
|
344 |
+
return apply_filters( 'tec_tickets_commerce_stripe_order_endpoint_error_messages', $messages );
|
345 |
+
}
|
346 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/REST/Return_Endpoint.php
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\REST;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_REST_Endpoint;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Gateway;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Merchant;
|
8 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Settings;
|
9 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Signup;
|
10 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
11 |
+
use Tribe__Settings;
|
12 |
+
|
13 |
+
use WP_REST_Server;
|
14 |
+
use WP_REST_Request;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class Return Endpoint.
|
18 |
+
*
|
19 |
+
* @since 5.3.0
|
20 |
+
*
|
21 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\REST
|
22 |
+
*/
|
23 |
+
class Return_Endpoint extends Abstract_REST_Endpoint {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The REST API endpoint path.
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
protected $path = '/commerce/stripe/return';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Register the actual endpoint on WP Rest API.
|
36 |
+
*
|
37 |
+
* @since 5.3.0
|
38 |
+
*/
|
39 |
+
public function register() {
|
40 |
+
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
41 |
+
$documentation = tribe( 'tickets.rest-v1.endpoints.documentation' );
|
42 |
+
|
43 |
+
register_rest_route(
|
44 |
+
$namespace,
|
45 |
+
$this->get_endpoint_path(),
|
46 |
+
[
|
47 |
+
'methods' => WP_REST_Server::READABLE,
|
48 |
+
'args' => $this->create_order_args(),
|
49 |
+
'callback' => [ $this, 'handle_stripe_return' ],
|
50 |
+
'permission_callback' => '__return_true',
|
51 |
+
]
|
52 |
+
);
|
53 |
+
|
54 |
+
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Arguments used for the endpoint.
|
59 |
+
*
|
60 |
+
* @since 5.3.0
|
61 |
+
*
|
62 |
+
* @return array
|
63 |
+
*/
|
64 |
+
public function create_order_args() {
|
65 |
+
return [];
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Handles the request that creates an order with Tickets Commerce and the Stripe gateway.
|
70 |
+
*
|
71 |
+
* @since 5.3.0
|
72 |
+
*
|
73 |
+
* @param WP_REST_Request $request The request object.
|
74 |
+
*/
|
75 |
+
public function handle_stripe_return( WP_REST_Request $request ) {
|
76 |
+
$stripe_obj = tribe_get_request_var( 'stripe' );
|
77 |
+
$disconnected = tribe_get_request_var( 'stripe_disconnected' );
|
78 |
+
|
79 |
+
if ( ! empty( $stripe_obj ) ) {
|
80 |
+
$response = $this->decode_payload( $stripe_obj );
|
81 |
+
|
82 |
+
if ( ! empty( $response->{'tc-stripe-error'} ) ) {
|
83 |
+
$this->handle_connection_error( $response );
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( ! empty( $response->stripe_disconnected ) && $response->stripe_disconnected ) {
|
87 |
+
$this->handle_connection_terminated();
|
88 |
+
}
|
89 |
+
|
90 |
+
$this->handle_connection_established( $response );
|
91 |
+
}
|
92 |
+
|
93 |
+
if ( ! empty( $disconnected ) ) {
|
94 |
+
$this->handle_connection_terminated();
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Decode the payload received from WhoDat.
|
100 |
+
*
|
101 |
+
* @since 5.3.0
|
102 |
+
*
|
103 |
+
* @param string $payload json payload.
|
104 |
+
*
|
105 |
+
* @return object
|
106 |
+
*/
|
107 |
+
public function decode_payload( $payload ) {
|
108 |
+
|
109 |
+
if ( empty( $payload ) ) {
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
|
113 |
+
return json_decode( base64_decode( $payload ) );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Handle successful account connections.
|
118 |
+
*
|
119 |
+
* @since 5.3.0
|
120 |
+
*
|
121 |
+
* @param object $payload data returned from WhoDat.
|
122 |
+
*/
|
123 |
+
public function handle_connection_established( $payload ) {
|
124 |
+
|
125 |
+
tribe( Merchant::class )->save_signup_data( (array) $payload );
|
126 |
+
tribe( Settings::class )->setup_account_defaults();
|
127 |
+
|
128 |
+
$validate = tribe( Merchant::class )->validate_account_is_permitted();
|
129 |
+
|
130 |
+
if ( 'valid' !== $validate ) {
|
131 |
+
tribe( Merchant::class )->set_merchant_unauthorized( $validate );
|
132 |
+
$disconnect_url = tribe( Signup::class )->generate_disconnect_url();
|
133 |
+
|
134 |
+
tribe( Merchant::class )->delete_signup_data();
|
135 |
+
wp_redirect( $disconnect_url );
|
136 |
+
exit();
|
137 |
+
}
|
138 |
+
|
139 |
+
tribe( Merchant::class )->unset_merchant_unauthorized();
|
140 |
+
$url = Tribe__Settings::instance()->get_url(
|
141 |
+
[
|
142 |
+
'tab' => Payments_Tab::$slug,
|
143 |
+
'tc-section' => Gateway::get_key(),
|
144 |
+
'tc-status' => 'stripe-signup-complete',
|
145 |
+
]
|
146 |
+
);
|
147 |
+
|
148 |
+
wp_safe_redirect( $url );
|
149 |
+
exit();
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Handle unsuccessful account connections.
|
154 |
+
*
|
155 |
+
* @since 5.3.0
|
156 |
+
*
|
157 |
+
* @param object $payload data returned from WhoDat.
|
158 |
+
*/
|
159 |
+
public function handle_connection_error( $payload ) {
|
160 |
+
$url = Tribe__Settings::instance()->get_url( [
|
161 |
+
'tab' => Payments_Tab::$slug,
|
162 |
+
'tc-section' => Gateway::get_key(),
|
163 |
+
'tc-stripe-error' => $payload->{'tc-stripe-error'},
|
164 |
+
] );
|
165 |
+
|
166 |
+
wp_safe_redirect( $url );
|
167 |
+
exit();
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Handle account disconnections.
|
172 |
+
*
|
173 |
+
* @since 5.3.0
|
174 |
+
*/
|
175 |
+
public function handle_connection_terminated( $reason = [] ) {
|
176 |
+
tribe( Merchant::class )->delete_signup_data();
|
177 |
+
Gateway::disable();
|
178 |
+
|
179 |
+
$query_args = [
|
180 |
+
'tab' => Payments_Tab::$slug,
|
181 |
+
'tc-section' => Gateway::get_key(),
|
182 |
+
'stripe_disconnected' => 1,
|
183 |
+
];
|
184 |
+
|
185 |
+
$url_args = array_merge( $query_args, $reason );
|
186 |
+
|
187 |
+
$url = Tribe__Settings::instance()->get_url( $url_args );
|
188 |
+
|
189 |
+
wp_safe_redirect( $url );
|
190 |
+
exit();
|
191 |
+
}
|
192 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/REST/Webhook_Endpoint.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\REST;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_REST_Endpoint;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Webhooks;
|
7 |
+
use WP_REST_Server;
|
8 |
+
use WP_REST_Request;
|
9 |
+
use WP_REST_Response;
|
10 |
+
|
11 |
+
use Tribe__Utils__Array as Arr;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class Webhook Endpoint.
|
15 |
+
*
|
16 |
+
* @since 5.3.0
|
17 |
+
*
|
18 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\REST
|
19 |
+
*/
|
20 |
+
class Webhook_Endpoint extends Abstract_REST_Endpoint {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The REST API endpoint path.
|
24 |
+
*
|
25 |
+
* @since 5.3.0
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
protected $path = '/commerce/stripe/webhook';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Register the actual endpoint on WP Rest API.
|
33 |
+
*
|
34 |
+
* @since 5.3.0
|
35 |
+
*/
|
36 |
+
public function register(): void {
|
37 |
+
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
38 |
+
$documentation = tribe( 'tickets.rest-v1.endpoints.documentation' );
|
39 |
+
|
40 |
+
register_rest_route(
|
41 |
+
$namespace,
|
42 |
+
$this->get_endpoint_path(),
|
43 |
+
[
|
44 |
+
'methods' => WP_REST_Server::CREATABLE,
|
45 |
+
'args' => $this->incoming_request_args(),
|
46 |
+
'callback' => [ $this, 'handle_incoming_request' ],
|
47 |
+
'permission_callback' => [ $this, 'verify_incoming_request_permission' ],
|
48 |
+
]
|
49 |
+
);
|
50 |
+
|
51 |
+
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Arguments for the incoming request endpoint.
|
56 |
+
*
|
57 |
+
* @since 5.3.0
|
58 |
+
*
|
59 |
+
* @return array
|
60 |
+
*/
|
61 |
+
public function incoming_request_args(): array {
|
62 |
+
return [];
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Handles the request that creates an order with Tickets Commerce and the Stripe gateway.
|
67 |
+
*
|
68 |
+
* If there is any request related error handling it should happen here, webhook related ones should go in
|
69 |
+
* the Handler methods.
|
70 |
+
*
|
71 |
+
* @since 5.3.0
|
72 |
+
*
|
73 |
+
* @param WP_REST_Request $request The request object.
|
74 |
+
*
|
75 |
+
* @return WP_REST_Response|\WP_Error
|
76 |
+
*/
|
77 |
+
public function handle_incoming_request( WP_REST_Request $request ) {
|
78 |
+
// Setup a base response.
|
79 |
+
$response = new WP_REST_Response( null, 200 );
|
80 |
+
|
81 |
+
// Flag that the webhooks are working as expected.
|
82 |
+
tribe_update_option( Webhooks::$option_is_valid_webhooks, true );
|
83 |
+
|
84 |
+
// After this point we are ready to do individual modifications based on the Webhook value.
|
85 |
+
return Webhooks\Handler::process_webhook_response( $request, $response );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Given a WP Rest request we determine if it has the correct Stripe signature.
|
90 |
+
*
|
91 |
+
* @since 5.3.0
|
92 |
+
*
|
93 |
+
* @param WP_REST_Request $request Which request we are validating.
|
94 |
+
*
|
95 |
+
* @return bool
|
96 |
+
*/
|
97 |
+
public function verify_incoming_request_permission( WP_REST_Request $request ): bool {
|
98 |
+
return $this->signature_is_valid( $request->get_header( 'Stripe-Signature' ), $request->get_body() );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Verifies the Stripe-Signature against the stored Webhook Signing Secret to make sure it's authentic.
|
103 |
+
*
|
104 |
+
* @link https://stripe.com/docs/webhooks/signatures
|
105 |
+
*
|
106 |
+
* @since 5.3.0
|
107 |
+
*
|
108 |
+
* @param string $header the Stripe-Signature request header
|
109 |
+
* @param string $body the raw json request body
|
110 |
+
*
|
111 |
+
* @return bool
|
112 |
+
*/
|
113 |
+
protected function signature_is_valid( string $header, string $body ): bool {
|
114 |
+
if ( ! $header || ! $body ) {
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
|
118 |
+
if ( defined( 'TEC_TC_STRIPE_SIGNING_SECRET' ) && TEC_TC_STRIPE_SIGNING_SECRET ) {
|
119 |
+
$signing_secret = TEC_TC_STRIPE_SIGNING_SECRET;
|
120 |
+
}
|
121 |
+
|
122 |
+
if ( empty ( $signing_secret ) ) {
|
123 |
+
$signing_secret = tribe_get_option( Webhooks::$option_webhooks_signing_key );
|
124 |
+
}
|
125 |
+
|
126 |
+
if ( empty( $signing_secret ) ) {
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
|
130 |
+
$time = time();
|
131 |
+
$header_parts = explode( ',', $header );
|
132 |
+
$signature_parts = [];
|
133 |
+
|
134 |
+
foreach ( $header_parts as $part ) {
|
135 |
+
$pair = explode( '=', $part );
|
136 |
+
|
137 |
+
if ( in_array( $pair[0], [ 't', 'v1' ], true ) ) {
|
138 |
+
$signature_parts[ $pair[0] ] = $pair[1];
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
if ( empty( $signature_parts['t'] ) || empty( $signature_parts['v1'] ) ) {
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
|
146 |
+
// By default, we are using the same 5 minutes threshold that the official Stripe libs do.
|
147 |
+
if ( ( $time - (int) $signature_parts['t'] ) > 5 * MINUTE_IN_SECONDS ) {
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
|
151 |
+
$signed_payload = implode( '', [ $signature_parts['t'], '.', $body ] );
|
152 |
+
$hmac_signature = hash_hmac( 'sha256', $signed_payload, $signing_secret );
|
153 |
+
|
154 |
+
return hash_equals( $signature_parts['v1'], $hmac_signature );
|
155 |
+
}
|
156 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Requests.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Requests;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Stripe Requests.
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe;
|
13 |
+
*/
|
14 |
+
class Requests extends Abstract_Requests {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The Merchant class reference to use.
|
18 |
+
*
|
19 |
+
* @since 5.3.0
|
20 |
+
*
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
public static $merchant = Merchant::class;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The Gateway class reference to use.
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
public static $gateway = Gateway::class;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The Stripe API base URL.
|
36 |
+
*
|
37 |
+
* @since 5.3.0
|
38 |
+
*
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private static $api_base_url = 'https://api.stripe.com/v1';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @inheritDoc
|
45 |
+
*/
|
46 |
+
public static function get_api_url( $endpoint, array $query_args = [] ) {
|
47 |
+
$base_url = static::get_environment_url();
|
48 |
+
$endpoint = ltrim( $endpoint, '/' );
|
49 |
+
|
50 |
+
return add_query_arg( $query_args, "{$base_url}/{$endpoint}" );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get environment base URL.
|
55 |
+
*
|
56 |
+
* @since 5.3.0
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public static function get_environment_url() {
|
61 |
+
return static::$api_base_url;
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Settings.php
ADDED
@@ -0,0 +1,489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Settings;
|
6 |
+
use TEC\Tickets\Commerce\Notice_Handler;
|
7 |
+
use TEC\Tickets\Commerce\Utils\Currency;
|
8 |
+
use Tribe__Tickets__Main;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* The Stripe specific settings.
|
12 |
+
*
|
13 |
+
* @since 5.3.0
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
15 |
+
*/
|
16 |
+
class Settings extends Abstract_Settings {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* DB identifier for the Payment Element selection
|
20 |
+
*
|
21 |
+
* @since 5.3.0
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
const PAYMENT_ELEMENT_SLUG = 'payment';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* DB identifier for the Card Element selection
|
29 |
+
*
|
30 |
+
* @since 5.3.0
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
const CARD_ELEMENT_SLUG = 'card';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* DB identifier for the Card Element Compact Layout
|
38 |
+
*
|
39 |
+
* @since 5.3.0
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
const COMPACT_CARD_ELEMENT_SLUG = 'compact';
|
44 |
+
|
45 |
+
/**
|
46 |
+
* DB identifier for the Card Element Separate Layout
|
47 |
+
*
|
48 |
+
* @since 5.3.0
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
const SEPARATE_CARD_ELEMENT_SLUG = 'separate';
|
53 |
+
|
54 |
+
/**
|
55 |
+
* DB identifier for the default methods set for the Payment Element
|
56 |
+
*
|
57 |
+
* @since 5.3.0
|
58 |
+
*
|
59 |
+
* @var array
|
60 |
+
*/
|
61 |
+
const DEFAULT_PAYMENT_ELEMENT_METHODS = [ 'card' ];
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Connection details fetched from the Stripe API on page-load
|
65 |
+
*
|
66 |
+
* @since 5.3.0
|
67 |
+
*
|
68 |
+
* @var array
|
69 |
+
*/
|
70 |
+
public $connection_status;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @inheritDoc
|
74 |
+
*/
|
75 |
+
public static $option_sandbox = 'tickets-commerce-stripe-sandbox';
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Option name for the statement descriptor field
|
79 |
+
*
|
80 |
+
* @since 5.3.0
|
81 |
+
*
|
82 |
+
* @var string
|
83 |
+
*/
|
84 |
+
public static $option_statement_descriptor = 'tickets-commerce-stripe-statement-descriptor';
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Option name for the collect billing details field
|
88 |
+
*
|
89 |
+
* @since 5.3.0
|
90 |
+
*
|
91 |
+
* @var string
|
92 |
+
*/
|
93 |
+
public static $option_collect_billing_details = 'tickets-commerce-stripe-billing-details';
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Option name for the stripe receipt emails field
|
97 |
+
*
|
98 |
+
* @since 5.3.0
|
99 |
+
*
|
100 |
+
* @var string
|
101 |
+
*/
|
102 |
+
public static $option_stripe_receipt_emails = 'tickets-commerce-stripe-receipt-emails';
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Option name for the stripe checkout element field
|
106 |
+
*
|
107 |
+
* @since 5.3.0
|
108 |
+
*
|
109 |
+
* @var string
|
110 |
+
*/
|
111 |
+
public static $option_checkout_element = 'tickets-commerce-stripe-checkout-element';
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Option name for the card element credit card fields to use
|
115 |
+
*
|
116 |
+
* @since 5.3.0
|
117 |
+
*
|
118 |
+
* @var string
|
119 |
+
*/
|
120 |
+
public static $option_checkout_element_card_fields = 'tickets-commerce-stripe-checkout-element-card-fields';
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Option name for the payment element payment methods allowed
|
124 |
+
*
|
125 |
+
* @since 5.3.0
|
126 |
+
*
|
127 |
+
* @var string
|
128 |
+
*/
|
129 |
+
public static $option_checkout_element_payment_methods = 'tickets-commerce-stripe-checkout-element-payment-methods';
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Constructor
|
133 |
+
*/
|
134 |
+
public function __construct() {
|
135 |
+
$this->set_connection_status();
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Set the internal parameter w/ account details received from the Stripe API
|
140 |
+
*
|
141 |
+
* @since 5.3.0
|
142 |
+
*/
|
143 |
+
public function set_connection_status() {
|
144 |
+
$this->connection_status = tribe( Merchant::class )->check_account_status();
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Trigger a dismissible admin notice if Tickets Commerce and Stripe currencies are not the same.
|
149 |
+
*
|
150 |
+
* @since 5.3.0
|
151 |
+
*/
|
152 |
+
public function alert_currency_mismatch() {
|
153 |
+
$merchant = tribe( Merchant::class );
|
154 |
+
|
155 |
+
// Bail if merchant is not connected.
|
156 |
+
if ( ! $merchant->is_connected() ) {
|
157 |
+
return;
|
158 |
+
}
|
159 |
+
|
160 |
+
$stripe_currency = strtoupper( $merchant->get_merchant_currency() );
|
161 |
+
$site_currency = strtoupper( Currency::get_currency_code() );
|
162 |
+
|
163 |
+
// Bail if no currency is set for the Stripe connection.
|
164 |
+
if ( empty( $stripe_currency ) ) {
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
|
168 |
+
if ( $site_currency === $stripe_currency ) {
|
169 |
+
return;
|
170 |
+
}
|
171 |
+
|
172 |
+
tribe( Notice_Handler::class )->trigger_admin(
|
173 |
+
'tc-stripe-currency-mismatch',
|
174 |
+
[
|
175 |
+
'content' =>
|
176 |
+
sprintf(
|
177 |
+
// Translators: %1$s The tickets commerce currency. %2$s: The currency from the Stripe account.
|
178 |
+
__( 'Tickets Commerce is configured to use %1$s as its currency but the default currency for the connected stripe account is %2$s. Using different currencies for Tickets Commerce and Stripe may not be supported by all payment methods available in %1$s, and may result in exchange rates and conversions from %1$s to %2$s being handled by Stripe. If you believe this is an error, you can modify the Tickets Commerce currency in the main Payments tab.', 'event-tickets' ),
|
179 |
+
$site_currency,
|
180 |
+
$stripe_currency
|
181 |
+
),
|
182 |
+
]
|
183 |
+
);
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* @inheritDoc
|
188 |
+
*/
|
189 |
+
public function get_settings() {
|
190 |
+
$currency_code = Currency::get_currency_code();
|
191 |
+
$currency_name = Currency::get_currency_name( $currency_code );
|
192 |
+
$plus_link_faq = sprintf(
|
193 |
+
'<a href="https://evnt.is/1b3u" target="_blank" rel="noopener noreferrer">%s</a>',
|
194 |
+
esc_html__( 'Learn more', 'event-tickets' )
|
195 |
+
);
|
196 |
+
|
197 |
+
$checkout_type_tooltip = sprintf(
|
198 |
+
// Translators: %1$s: Opening `<a>` tag for KB article link. %2$s: Closing `<a>` tag.
|
199 |
+
__( 'Additional payment methods are available based on currency and location and must be enabled individually within your Stripe account. %1$sLearn more%2$s', 'event-tickets' ),
|
200 |
+
'<a href="https://evnt.is/1axw" target="_blank" rel="noopener noreferrer">',
|
201 |
+
'</a>'
|
202 |
+
);
|
203 |
+
|
204 |
+
$payment_methods_tooltip = sprintf(
|
205 |
+
// Translators: %1$s: Opening `<span>` tag. %2$s: The currency name. %3$s: Closing `</span>` tag. %4$s: Opening `<a>` tag for Stripe link. %5$s: Closing `</a>` tag.
|
206 |
+
__( '%1$sPayment methods available for %2$s%3$s.<br /><br /> The payment methods listed here are dependent on the currency selected for Tickets Commerce and the currency each payment method support. You can review the payment methods and their availablity for each currency on %4$sStripe\'s documentation%5$s.<br /><br />', 'event-tickets' ),
|
207 |
+
'<span class="tec-tickets__admin-settings-tickets-commerce-gateway-currency">',
|
208 |
+
$currency_name,
|
209 |
+
'</span>',
|
210 |
+
'<a href="https://stripe.com/docs/payments/payment-methods/integration-options" target="_blank" rel="noopener noreferrer">',
|
211 |
+
'</a>'
|
212 |
+
);
|
213 |
+
|
214 |
+
$stripe_message = sprintf(
|
215 |
+
// Translators: %1$s: The Event Tickets Plus link.
|
216 |
+
esc_html__( 'You are using the free Stripe payment gateway integration. This includes an additional 2%% fee for processing ticket sales. This fee is removed if you have an active subscription to Event Tickets Plus. %1$s.', 'event-tickets' ),
|
217 |
+
$plus_link_faq
|
218 |
+
);
|
219 |
+
$main_settings = [
|
220 |
+
'tickets-commerce-stripe-commerce-description' => [
|
221 |
+
'type' => 'html',
|
222 |
+
'html' => '<div class="tec-tickets__admin-settings-tickets-commerce-description">' . $stripe_message . '</div>',
|
223 |
+
],
|
224 |
+
'tickets-commerce-stripe-commerce-configure' => [
|
225 |
+
'type' => 'wrapped_html',
|
226 |
+
'html' => $this->get_connection_settings_html(),
|
227 |
+
'validation_type' => 'html',
|
228 |
+
],
|
229 |
+
];
|
230 |
+
|
231 |
+
// If gateway isn't connected/active, only show the connection settings.
|
232 |
+
$is_connected = tribe( Merchant::class )->is_connected();
|
233 |
+
if ( ! $is_connected ) {
|
234 |
+
/**
|
235 |
+
* Allow filtering the list of Stripe settings.
|
236 |
+
*
|
237 |
+
* @since 5.3.0
|
238 |
+
*
|
239 |
+
* @param array $settings The list of Stripe Commerce settings.
|
240 |
+
* @param bool $is_connected Whether or not gateway is connected.
|
241 |
+
*/
|
242 |
+
return apply_filters( 'tec_tickets_commerce_stripe_settings', $main_settings, $is_connected );
|
243 |
+
}
|
244 |
+
|
245 |
+
$connected_settings = [
|
246 |
+
'tickets-commerce-stripe-settings-heading' => [
|
247 |
+
'type' => 'html',
|
248 |
+
'html' => '<h3 class="tribe-dependent -input">' . __( 'Stripe Settings', 'event-tickets' ) . '</h3><div class="clear"></div>',
|
249 |
+
],
|
250 |
+
'tickets-commerce-gateway-settings-group-header-general' => [
|
251 |
+
'type' => 'html',
|
252 |
+
'html' => '<h4 class="tec-tickets__admin-settings-tickets-commerce-gateway-group-header">' . __( 'General', 'event-tickets' ) . '</h4><div class="clear"></div>',
|
253 |
+
],
|
254 |
+
static::$option_statement_descriptor => [
|
255 |
+
'type' => 'text',
|
256 |
+
'label' => esc_html__( 'Statement Descriptor', 'event-tickets' ),
|
257 |
+
'tooltip' => esc_html__( 'This is the text that appears on the ticket purchaser bank statements. If left blank, the descriptor set in Stripe will be used.', 'event-tickets' ),
|
258 |
+
'size' => 'medium',
|
259 |
+
'default' => '',
|
260 |
+
'validation_callback' => 'is_string',
|
261 |
+
'validation_type' => 'textarea',
|
262 |
+
'placeholder' => ! empty( $this->connection_status['statement_descriptor'] ) ? esc_textarea( $this->connection_status['statement_descriptor'] ) : '',
|
263 |
+
],
|
264 |
+
static::$option_stripe_receipt_emails => [
|
265 |
+
'type' => 'checkbox_bool',
|
266 |
+
'label' => esc_html__( 'Enable Stripe Receipt Emails', 'event-tickets' ),
|
267 |
+
'tooltip' => esc_html__( 'If this option is selected, ticket buyers will get stripe receipts, as well as Event Tickets confirmation emails.', 'event-tickets' ),
|
268 |
+
'default' => false,
|
269 |
+
'validation_type' => 'boolean',
|
270 |
+
],
|
271 |
+
'tickets-commerce-stripe-checkout-settings-heading' => [
|
272 |
+
'type' => 'html',
|
273 |
+
'html' => '<h3 class="tribe-dependent -input">' . __( 'Checkout Settings', 'event-tickets' ) . '</h3><div class="clear"></div>',
|
274 |
+
],
|
275 |
+
|
276 |
+
'tickets-commerce-gateway-settings-group-header-checkout' => [
|
277 |
+
'type' => 'html',
|
278 |
+
'html' => '<h4 class="tec-tickets__admin-settings-tickets-commerce-gateway-group-header">' . __( 'Checkout', 'event-tickets' ) . '</h4><div class="clear"></div>',
|
279 |
+
],
|
280 |
+
static::$option_checkout_element => [
|
281 |
+
'type' => 'radio',
|
282 |
+
'label' => esc_html__( 'Checkout Type', 'event-tickets' ),
|
283 |
+
'tooltip' => $checkout_type_tooltip,
|
284 |
+
'default' => self::CARD_ELEMENT_SLUG,
|
285 |
+
'validation_type' => 'options',
|
286 |
+
'options' => [
|
287 |
+
self::CARD_ELEMENT_SLUG => esc_html__( 'Accept only credit card payments.', 'event-tickets' ),
|
288 |
+
self::PAYMENT_ELEMENT_SLUG => esc_html__( 'Accept credit card payments and additional payment methods configured in Stripe.', 'event-tickets' ),
|
289 |
+
],
|
290 |
+
],
|
291 |
+
static::$option_checkout_element_card_fields => [
|
292 |
+
'type' => 'radio',
|
293 |
+
'label' => esc_html__( 'Credit Card field format', 'event-tickets' ),
|
294 |
+
'default' => self::COMPACT_CARD_ELEMENT_SLUG,
|
295 |
+
'fieldset_attributes' => [
|
296 |
+
'data-depends' => '#tribe-field-' . static::$option_checkout_element . '-' . self::CARD_ELEMENT_SLUG,
|
297 |
+
'data-condition-is-checked' => true,
|
298 |
+
],
|
299 |
+
'class' => 'tribe-dependent',
|
300 |
+
'validation_type' => 'options',
|
301 |
+
'options' => [
|
302 |
+
self::COMPACT_CARD_ELEMENT_SLUG => sprintf(
|
303 |
+
// Translators: %1$s: Opening `<span>` tag. %2$s: Closing `</span>` tag.
|
304 |
+
__( 'Single field. %1$sFor streamlined checkout.%2$s', 'event-tickets' ),
|
305 |
+
'<span class="tribe_soft_note">',
|
306 |
+
'</span>'
|
307 |
+
),
|
308 |
+
self::SEPARATE_CARD_ELEMENT_SLUG => sprintf(
|
309 |
+
// Translators: %1$s: Opening `<span>` tag. %2$s: Closing `</span>` tag.
|
310 |
+
__( 'Multiple fields. %1$sFor standard checkout.%2$s', 'event-tickets' ),
|
311 |
+
'<span class="tribe_soft_note">',
|
312 |
+
'</span>'
|
313 |
+
),
|
314 |
+
],
|
315 |
+
],
|
316 |
+
static::$option_checkout_element_payment_methods => [
|
317 |
+
'type' => 'checkbox_list',
|
318 |
+
'label' => esc_html__( 'Payment methods accepted', 'event-tickets' ),
|
319 |
+
'tooltip' => $payment_methods_tooltip,
|
320 |
+
'default' => self::DEFAULT_PAYMENT_ELEMENT_METHODS,
|
321 |
+
'can_be_empty' => false,
|
322 |
+
'fieldset_attributes' => [
|
323 |
+
'data-depends' => '#tribe-field-' . static::$option_checkout_element . '-' . self::PAYMENT_ELEMENT_SLUG,
|
324 |
+
'data-condition-is-checked' => true,
|
325 |
+
],
|
326 |
+
'class' => 'tribe-dependent',
|
327 |
+
'validation_type' => 'options_multi',
|
328 |
+
'options' => $this->get_payment_methods_available_by_currency(),
|
329 |
+
],
|
330 |
+
];
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Allow filtering the list of Stripe settings.
|
334 |
+
*
|
335 |
+
* @since 5.3.0
|
336 |
+
*
|
337 |
+
* @param array $settings The list of Stripe Commerce settings.
|
338 |
+
* @param bool $is_connected Whether or not gateway is connected.
|
339 |
+
*/
|
340 |
+
return apply_filters( 'tec_tickets_commerce_stripe_settings', array_merge( $main_settings, $connected_settings ), $is_connected );
|
341 |
+
}
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Filters the general list of payment methods to grab only those available to the currency configured in Tickets
|
345 |
+
* Commerce.
|
346 |
+
*
|
347 |
+
* @since 5.3.0
|
348 |
+
*
|
349 |
+
* @return array
|
350 |
+
*/
|
351 |
+
public function get_payment_methods_available_by_currency() {
|
352 |
+
$currency = Currency::get_currency_code();
|
353 |
+
$payment_methods = $this->get_payment_methods_available();
|
354 |
+
$available_methods = [
|
355 |
+
'card' => esc_html__( 'Credit Cards', 'event-tickets' ),
|
356 |
+
];
|
357 |
+
|
358 |
+
foreach ( $payment_methods as $method => $configs ) {
|
359 |
+
if ( ! in_array( $currency, $configs['currencies'], true ) ) {
|
360 |
+
continue;
|
361 |
+
}
|
362 |
+
|
363 |
+
$available_methods[ $method ] = $configs['label'];
|
364 |
+
}
|
365 |
+
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Allows filtering the list of available Payment Methods
|
369 |
+
*
|
370 |
+
* @since 5.3.0
|
371 |
+
*
|
372 |
+
* @param array $available_methods the list of payment methods available to the current currency
|
373 |
+
* @param string $currency the currency configured for Tickets Commerce
|
374 |
+
* @param array[] $payment_methods the complete list of available Payment Methods in Stripe
|
375 |
+
*/
|
376 |
+
return apply_filters( 'tec_tickets_commerce_stripe_payment_methods_by_currency', $available_methods, $currency, $payment_methods );
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Returns the list of available Payment Methods.
|
381 |
+
*
|
382 |
+
* @link https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support
|
383 |
+
*
|
384 |
+
* @since 5.3.0
|
385 |
+
*
|
386 |
+
* @return array[]
|
387 |
+
*/
|
388 |
+
private function get_payment_methods_available() {
|
389 |
+
$available_methods = [
|
390 |
+
'afterpay_clearpay' => [
|
391 |
+
'currencies' => [ 'AUD', 'CAD', 'GBP', 'NZD', 'USD' ],
|
392 |
+
'label' => esc_html__( 'AfterPay and ClearPay', 'event-tickets' ),
|
393 |
+
],
|
394 |
+
'alipay' => [
|
395 |
+
'currencies' => [ 'AUD', 'CAD', 'CNY', 'EUR', 'GBP', 'HKD', 'JPY', 'MYR', 'NZD', 'SGD', 'USD' ],
|
396 |
+
'label' => esc_html__( 'Alipay', 'event-tickets' ),
|
397 |
+
],
|
398 |
+
'giropay' => [
|
399 |
+
'currencies' => [ 'EUR' ],
|
400 |
+
'label' => esc_html__( 'Giropay', 'event-tickets' ),
|
401 |
+
],
|
402 |
+
'klarna' => [
|
403 |
+
'currencies' => [ 'DKK', 'EUR', 'GBP', 'NOK', 'SEK', 'USD' ],
|
404 |
+
'label' => esc_html__( 'Klarna', 'event-tickets' ),
|
405 |
+
],
|
406 |
+
];
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Allows for filtering the list of available payment methods.
|
410 |
+
*
|
411 |
+
* @since 5.3.0
|
412 |
+
*
|
413 |
+
* @param array $available_methods the list of payment methods available.
|
414 |
+
*/
|
415 |
+
return apply_filters( 'tec_tickets_commerce_stripe_payment_methods_available', $available_methods );
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Setup basic defaults once a new account is onboarded.
|
420 |
+
*
|
421 |
+
* @since 5.3.0
|
422 |
+
*/
|
423 |
+
public function setup_account_defaults() {
|
424 |
+
if ( empty( $this->connection_status ) ) {
|
425 |
+
$this->set_connection_status();
|
426 |
+
}
|
427 |
+
|
428 |
+
update_option( Merchant::$merchant_default_currency_option_key, $this->connection_status['default_currency'] );
|
429 |
+
|
430 |
+
if ( empty( tribe_get_option( static::$option_checkout_element ) ) ) {
|
431 |
+
tribe_update_option( static::$option_checkout_element, static::PAYMENT_ELEMENT_SLUG );
|
432 |
+
}
|
433 |
+
|
434 |
+
if ( empty( tribe_get_option( static::$option_checkout_element_card_fields ) ) ) {
|
435 |
+
tribe_update_option( static::$option_checkout_element_card_fields, static::COMPACT_CARD_ELEMENT_SLUG );
|
436 |
+
}
|
437 |
+
|
438 |
+
if ( empty( tribe_get_option( static::$option_checkout_element_payment_methods ) ) ) {
|
439 |
+
tribe_update_option( static::$option_checkout_element_payment_methods, static::DEFAULT_PAYMENT_ELEMENT_METHODS );
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
/**
|
444 |
+
* @inheritDoc
|
445 |
+
*/
|
446 |
+
public function get_connection_settings_html() {
|
447 |
+
/** @var \Tribe__Tickets__Admin__Views $admin_views */
|
448 |
+
$admin_views = tribe( 'tickets.admin.views' );
|
449 |
+
|
450 |
+
$context = [
|
451 |
+
'plugin_url' => Tribe__Tickets__Main::instance()->plugin_url,
|
452 |
+
'merchant_status' => $this->connection_status,
|
453 |
+
'signup' => tribe( Signup::class ),
|
454 |
+
'merchant' => tribe( Merchant::class ),
|
455 |
+
'fee_is_applied' => apply_filters( 'tec_tickets_commerce_stripe_fee_is_applied_notice', true ),
|
456 |
+
];
|
457 |
+
|
458 |
+
return $admin_views->template( 'settings/tickets-commerce/stripe/main', $context, false );
|
459 |
+
}
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Resets the values of payment methods and card options if they are no longer in use and avoid a settings
|
463 |
+
* notice for empty values.
|
464 |
+
*
|
465 |
+
* @since 5.3.0
|
466 |
+
*
|
467 |
+
* @param mixed $value Field value submitted.
|
468 |
+
* @param string $field_id Field key in the settings array.
|
469 |
+
* @param array $field Entire field array.
|
470 |
+
*
|
471 |
+
* @return mixed
|
472 |
+
*/
|
473 |
+
public function reset_hidden_field_values( $value, $field_id, $field ) {
|
474 |
+
|
475 |
+
if ( $value ) {
|
476 |
+
return $value;
|
477 |
+
}
|
478 |
+
|
479 |
+
if ( $field_id === static::$option_checkout_element_payment_methods ) {
|
480 |
+
return tribe_get_option( static::$option_checkout_element_payment_methods, self::DEFAULT_PAYMENT_ELEMENT_METHODS );
|
481 |
+
}
|
482 |
+
|
483 |
+
if ( $field_id === static::$option_checkout_element_card_fields ) {
|
484 |
+
return tribe_get_option( static::$option_checkout_element_card_fields, self::COMPACT_CARD_ELEMENT_SLUG );
|
485 |
+
}
|
486 |
+
|
487 |
+
return $value;
|
488 |
+
}
|
489 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Signup.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Signup;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Signup.
|
9 |
+
*
|
10 |
+
* @since 5.3.0
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
13 |
+
*/
|
14 |
+
class Signup extends Abstract_Signup {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @inheritDoc
|
18 |
+
*/
|
19 |
+
public static $signup_data_meta_key = 'tec_tc_stripe_signup_data';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The return path the user will be redirected to after signing up or disconnecting.
|
23 |
+
*
|
24 |
+
* @since 5.3.0
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $signup_return_path = '/tribe/tickets/v1/commerce/stripe/return';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @inheritDoc
|
32 |
+
*/
|
33 |
+
public $template_folder = 'src/admin-views/settings/tickets-commerce/stripe';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Generates a stripe connection URL from WhoDat.
|
37 |
+
*
|
38 |
+
* @since 5.3.0
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
public function generate_signup_url() {
|
43 |
+
|
44 |
+
return tribe( WhoDat::class )->get_api_url(
|
45 |
+
'connect',
|
46 |
+
[
|
47 |
+
'token' => $this->get_client_id(),
|
48 |
+
'return_url' => tribe( WhoDat::class )->get_api_url( 'connected' ),
|
49 |
+
] );
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Generates a stripe disconnection URL from WhoDat
|
55 |
+
*
|
56 |
+
* @since 5.3.0
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function generate_disconnect_url() {
|
61 |
+
|
62 |
+
return tribe( WhoDat::class )->get_api_url(
|
63 |
+
'disconnect',
|
64 |
+
[
|
65 |
+
'stripe_user_id' => tribe( Merchant::class )->get_client_id(),
|
66 |
+
'return_url' => rest_url( $this->signup_return_path ),
|
67 |
+
]
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @inheritDoc
|
73 |
+
*/
|
74 |
+
public function get_link_html() {
|
75 |
+
$template_vars = [
|
76 |
+
'url' => $this->generate_signup_url(),
|
77 |
+
];
|
78 |
+
|
79 |
+
$this->get_template()->template( 'signup-link', $template_vars );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get a unique tracking ID to identify this client on stripe.
|
84 |
+
*
|
85 |
+
* @since 5.3.0
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public function get_client_id() {
|
90 |
+
return tribe( Gateway::class )->generate_unique_tracking_id();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Determines if the signup was successful.
|
95 |
+
*
|
96 |
+
* @since 5.3.0
|
97 |
+
*
|
98 |
+
* @param array $data
|
99 |
+
*
|
100 |
+
* @return bool
|
101 |
+
*/
|
102 |
+
public function is_success( $data ) {
|
103 |
+
|
104 |
+
return ! empty( $data->stripe_user_id )
|
105 |
+
&& ! empty( $data->live->access_token )
|
106 |
+
&& ! empty( $data->sandbox->access_token );
|
107 |
+
}
|
108 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Status.php
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Status as Commerce_Status;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Status.
|
9 |
+
*
|
10 |
+
* @todo Create a Contract between this and PayPal.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
15 |
+
*/
|
16 |
+
class Status {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Order Status in Stripe for when the payment intent is first created or when payment is denied.
|
20 |
+
*
|
21 |
+
* @since 5.3.0
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
const REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Order Status in Stripe for when the payment intent is first created or when payment is denied.
|
29 |
+
*
|
30 |
+
* @since 5.3.0
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
const REQUIRES_SOURCE = 'requires_source';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Order Status in Stripe for created and waiting for automatic confirmation to start processing.
|
38 |
+
*
|
39 |
+
* @since 5.3.0
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
const REQUIRES_CONFIRMATION = 'requires_confirmation';
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Order Status in Stripe for created and waiting for user confirmation to start processing.
|
47 |
+
*
|
48 |
+
* @since 5.3.0
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
const REQUIRES_ACTION = 'requires_action';
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Order Status in Stripe for created and waiting for user confirmation to start processing.
|
56 |
+
*
|
57 |
+
* @since 5.3.0
|
58 |
+
*
|
59 |
+
* @var string
|
60 |
+
*/
|
61 |
+
const REQUIRES_SOURCE_ACTION = 'requires_source_action';
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Order Status in Stripe for processing.
|
65 |
+
*
|
66 |
+
* @since 5.3.0
|
67 |
+
*
|
68 |
+
* @var string
|
69 |
+
*/
|
70 |
+
const PROCESSING = 'processing';
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Order Status in Stripe for a successful hold on funds, waiting for settlement.
|
74 |
+
*
|
75 |
+
* @since 5.3.0
|
76 |
+
*
|
77 |
+
* @var string
|
78 |
+
*/
|
79 |
+
const REQUIRES_CAPTURE = 'requires_capture';
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Order Status in Stripe for completed with success.
|
83 |
+
*
|
84 |
+
* @since 5.3.0
|
85 |
+
*
|
86 |
+
* @var string
|
87 |
+
*/
|
88 |
+
const SUCCEEDED = 'succeeded';
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Order Status in Stripe for manually cancelled and invalidated.
|
92 |
+
*
|
93 |
+
* @since 5.3.0
|
94 |
+
*
|
95 |
+
* @var string
|
96 |
+
*/
|
97 |
+
const CANCELED = 'canceled';
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Default mapping from Stripe Status to Tickets Commerce
|
101 |
+
*
|
102 |
+
* This list MUST be kept in order of order stripe status progression, from creation to completion/refusal, as
|
103 |
+
* described in the link below:
|
104 |
+
*
|
105 |
+
* @link https://stripe.com/docs/payments/intents
|
106 |
+
*
|
107 |
+
* @since 5.3.0
|
108 |
+
*
|
109 |
+
* @var array
|
110 |
+
*/
|
111 |
+
protected $default_map = [
|
112 |
+
self::REQUIRES_PAYMENT_METHOD => Commerce_Status\Created::SLUG,
|
113 |
+
self::REQUIRES_SOURCE => Commerce_Status\Created::SLUG,
|
114 |
+
self::REQUIRES_CONFIRMATION => Commerce_Status\Action_Required::SLUG,
|
115 |
+
self::REQUIRES_ACTION => Commerce_Status\Action_Required::SLUG,
|
116 |
+
self::REQUIRES_SOURCE_ACTION => Commerce_Status\Action_Required::SLUG,
|
117 |
+
self::REQUIRES_CAPTURE => Commerce_Status\Action_Required::SLUG,
|
118 |
+
self::PROCESSING => Commerce_Status\Pending::SLUG,
|
119 |
+
self::SUCCEEDED => Commerce_Status\Completed::SLUG,
|
120 |
+
self::CANCELED => Commerce_Status\Denied::SLUG,
|
121 |
+
];
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Gets the valid mapping of the statuses.
|
125 |
+
*
|
126 |
+
* @since 5.3.0
|
127 |
+
*
|
128 |
+
* @return array
|
129 |
+
*/
|
130 |
+
public function get_valid_statuses() {
|
131 |
+
return $this->default_map;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Checks if a given Stripe status is valid.
|
136 |
+
*
|
137 |
+
* @since 5.3.0
|
138 |
+
*
|
139 |
+
* @param string $status Status from Stripe.
|
140 |
+
*
|
141 |
+
* @return bool
|
142 |
+
*/
|
143 |
+
public function is_valid_status( $status ) {
|
144 |
+
$statuses = $this->get_valid_statuses();
|
145 |
+
|
146 |
+
return isset( $statuses[ $status ] );
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Converts a valid Stripe status into a commerce status object.
|
151 |
+
*
|
152 |
+
* @since 5.3.0
|
153 |
+
*
|
154 |
+
* @param string $stripe_status A Stripe status string.
|
155 |
+
*
|
156 |
+
* @return false|Commerce_Status\Status_Interface|null
|
157 |
+
*/
|
158 |
+
public function convert_to_commerce_status( $stripe_status ) {
|
159 |
+
if ( ! $this->is_valid_status( $stripe_status ) ) {
|
160 |
+
return false;
|
161 |
+
}
|
162 |
+
$statuses = $this->get_valid_statuses();
|
163 |
+
|
164 |
+
return tribe( Commerce_Status\Status_Handler::class )->get_by_slug( $statuses[ $stripe_status ] );
|
165 |
+
}
|
166 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Stripe_Elements.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Cart;
|
6 |
+
use TEC\Tickets\Commerce\Module;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Payment_Element
|
10 |
+
*
|
11 |
+
* @since 5.3.0
|
12 |
+
*
|
13 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
14 |
+
*/
|
15 |
+
class Stripe_Elements {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Are we forcing users to log in before checking out?
|
19 |
+
*
|
20 |
+
* @since 5.3.0
|
21 |
+
*
|
22 |
+
* @return bool
|
23 |
+
*/
|
24 |
+
public function must_login() {
|
25 |
+
return ! is_user_logged_in() && tribe( Module::class )->login_required();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Returns the variables for gateway's checkout template.
|
30 |
+
*
|
31 |
+
* @since 5.3.0
|
32 |
+
*
|
33 |
+
* @return []
|
34 |
+
*/
|
35 |
+
public function get_checkout_template_vars() {
|
36 |
+
return [
|
37 |
+
'payment_element' => $this->include_payment_element(),
|
38 |
+
'card_element_type' => $this->card_element_type(),
|
39 |
+
];
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Include the Stripe Payment Element form.
|
44 |
+
*
|
45 |
+
* @since 5.3.0
|
46 |
+
*
|
47 |
+
* @return bool
|
48 |
+
*/
|
49 |
+
public function include_payment_element() {
|
50 |
+
return tribe_get_option( Settings::$option_checkout_element ) === Settings::PAYMENT_ELEMENT_SLUG;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Include the Stripe Card Element form.
|
55 |
+
*
|
56 |
+
* @since 5.3.0
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function card_element_type() {
|
61 |
+
return tribe_get_option( Settings::$option_checkout_element_card_fields );
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks.php
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Merchant;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Webhooks;
|
8 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\REST\Webhook_Endpoint;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Webhooks
|
12 |
+
*
|
13 |
+
* @since 5.3.0
|
14 |
+
*
|
15 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
16 |
+
*/
|
17 |
+
class Webhooks extends Abstract_Webhooks {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Option key that determines if the webhooks are valid.
|
21 |
+
*
|
22 |
+
* @since 5.3.0
|
23 |
+
*
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
public static $option_is_valid_webhooks = 'tickets-commerce-stripe-is-valid-webhooks';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Option key that determines if the webhooks are valid.
|
30 |
+
*
|
31 |
+
* @since 5.3.0
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
public static $nonce_key_handle_validation = 'tickets-commerce-stripe-webhook-handle_validation';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Option key that we use to allow customers to copy.
|
39 |
+
*
|
40 |
+
* @since 5.3.0
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
public static $option_webhooks_value = 'tickets-commerce-stripe-webhooks-value';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Option name for the option to store the webhook signing key
|
48 |
+
*
|
49 |
+
* @since 5.3.0
|
50 |
+
*
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
public static $option_webhooks_signing_key = 'tickets-commerce-stripe-webhooks-signing-key';
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @inheritDoc
|
57 |
+
*/
|
58 |
+
public function get_gateway(): Abstract_Gateway {
|
59 |
+
return tribe( Gateway::class );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @inheritDoc
|
64 |
+
*/
|
65 |
+
public function get_merchant(): Abstract_Merchant {
|
66 |
+
return tribe( Merchant::class );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Testing if given Signing Key is valid on an AJAX request.
|
71 |
+
*
|
72 |
+
* @since 5.3.0
|
73 |
+
*
|
74 |
+
* @return void
|
75 |
+
*/
|
76 |
+
public function handle_validation(): void {
|
77 |
+
$nonce = tribe_get_request_var( 'tc_nonce' );
|
78 |
+
$status = esc_html__( 'Webhooks not validated yet.', 'event-tickets' );
|
79 |
+
|
80 |
+
if ( ! wp_verify_nonce( $nonce, static::$nonce_key_handle_validation ) ) {
|
81 |
+
wp_send_json_error( [ 'updated' => false, 'status' => $status ] );
|
82 |
+
exit;
|
83 |
+
}
|
84 |
+
|
85 |
+
$signing_key = tribe_get_request_var( 'signing_key' );
|
86 |
+
$updated = tribe_update_option( static::$option_webhooks_signing_key, $signing_key );
|
87 |
+
|
88 |
+
if ( empty( $signing_key ) ) {
|
89 |
+
// If we updated and the value was empty we need to reset the validity of the key.
|
90 |
+
if ( $updated ) {
|
91 |
+
tribe_update_option( static::$option_is_valid_webhooks, false );
|
92 |
+
}
|
93 |
+
|
94 |
+
wp_send_json_error( [ 'updated' => $updated, 'status' => $status ] );
|
95 |
+
exit;
|
96 |
+
}
|
97 |
+
|
98 |
+
$account_data_update = [
|
99 |
+
'metadata' => [
|
100 |
+
'tec_tc_enabled_webhooks' => 1,
|
101 |
+
],
|
102 |
+
];
|
103 |
+
|
104 |
+
// This doesn't work on a Sandbox account, so we might need to add some text about .
|
105 |
+
$response = tribe( Merchant::class )->update( $account_data_update );
|
106 |
+
|
107 |
+
// We sleep for 5 seconds to allow the API to reach the website after the update.
|
108 |
+
sleep( 10 );
|
109 |
+
|
110 |
+
// Reset cache so it fetches from DB again.
|
111 |
+
wp_cache_init();
|
112 |
+
tribe_unset_var( \Tribe__Settings_Manager::OPTION_CACHE_VAR_NAME );
|
113 |
+
|
114 |
+
$is_valid = tribe_get_option( static::$option_is_valid_webhooks, false );
|
115 |
+
if ( $is_valid ) {
|
116 |
+
$status = esc_html__( 'Webhooks were properly validated for sales.', 'event-tickets' );
|
117 |
+
}
|
118 |
+
|
119 |
+
wp_send_json_success( [ 'is_valid_webhook' => $is_valid, 'updated' => $updated, 'status' => $status ] );
|
120 |
+
exit;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Includes a Copy button to the webhook UI.
|
125 |
+
*
|
126 |
+
* @since 5.3.0
|
127 |
+
*
|
128 |
+
* @param string $html
|
129 |
+
* @param \Tribe__Field $field
|
130 |
+
*
|
131 |
+
* @return string
|
132 |
+
*/
|
133 |
+
public function include_webhooks_copy_button( string $html, \Tribe__Field $field ): string {
|
134 |
+
if ( static::$option_webhooks_value !== $field->id ) {
|
135 |
+
return $html;
|
136 |
+
}
|
137 |
+
$copy_button = '<button class="tribe-field-tickets-commerce-stripe-webhooks-copy button-secondary" data-clipboard-target=".tribe-field-tickets-commerce-stripe-webhooks-copy-value"><span class="dashicons dashicons-clipboard"></span></button>';
|
138 |
+
|
139 |
+
return $copy_button . $html;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Return the fields related to webhooks.
|
144 |
+
*
|
145 |
+
* @since 5.3.0
|
146 |
+
*
|
147 |
+
* @return array
|
148 |
+
*/
|
149 |
+
public function get_fields(): array {
|
150 |
+
// The webhook value should always be empty.
|
151 |
+
tribe_remove_option( static::$option_webhooks_value );
|
152 |
+
$has_singing_key = tribe_get_option( static::$option_webhooks_signing_key );
|
153 |
+
$is_valid_signing_key = tribe_get_option( static::$option_is_valid_webhooks, false );
|
154 |
+
|
155 |
+
if ( ! $has_singing_key || ! $is_valid_signing_key ) {
|
156 |
+
$signing_key_tooltip = '<span class="dashicons dashicons-no"></span><span class="tribe-field-tickets-commerce-stripe-webhooks-signing-key-status">' . esc_html__( 'Webhooks not validated yet.', 'event-tickets' ) . '</span>';
|
157 |
+
} else {
|
158 |
+
$signing_key_tooltip = '<span class="dashicons dashicons-yes"></span><span class="tribe-field-tickets-commerce-stripe-webhooks-signing-key-status">' . esc_html__( 'Webhooks were properly validated for sales.', 'event-tickets' ) . '</span>';
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( tribe( Merchant::class )->is_sandbox() ) {
|
162 |
+
$signing_key_tooltip .= '<br /><b>' . esc_html__( 'Webhook validation will not work in Tickets Commerce test mode.', 'event-tickets' ) . '</b>';
|
163 |
+
}
|
164 |
+
|
165 |
+
return [
|
166 |
+
'tickets-commerce-gateway-settings-group-start-webhook' => [
|
167 |
+
'type' => 'html',
|
168 |
+
'html' => '<div class="tribe-settings-form-wrap">',
|
169 |
+
],
|
170 |
+
'tickets-commerce-gateway-settings-group-header-webhook' => [
|
171 |
+
'type' => 'html',
|
172 |
+
'html' => '<h4 class="tec-tickets__admin-settings-tickets-commerce-gateway-group-header">' . esc_html__( 'Webhooks', 'event-tickets' ) . '</h4><div class="clear"></div>',
|
173 |
+
],
|
174 |
+
'tickets-commerce-gateway-settings-group-description-webhook' => [
|
175 |
+
'type' => 'html',
|
176 |
+
'html' => '<p class="tec-tickets__admin-settings-tickets-commerce-gateway-group-description-stripe-webhooks contained">' .
|
177 |
+
wp_kses_post(
|
178 |
+
sprintf(
|
179 |
+
// Translators: %1$s A link to the KB article. %2$s closing `</a>` link.
|
180 |
+
__( 'Setting up webhooks will enable you to receive notifications on charge statuses and keep order information up to date for asynchronous payments. %1$sLearn more%2$s', 'event-tickets' ),
|
181 |
+
'<a target="_blank" rel="noopener noreferrer" href="https://evnt.is/1b3p">',
|
182 |
+
'</a>'
|
183 |
+
)
|
184 |
+
)
|
185 |
+
. '</p><div class="clear"></div>',
|
186 |
+
],
|
187 |
+
static::$option_webhooks_value => [
|
188 |
+
'type' => 'text',
|
189 |
+
'label' => esc_html__( 'Webhooks URL', 'event-tickets' ),
|
190 |
+
'tooltip' => '',
|
191 |
+
'size' => 'large',
|
192 |
+
'default' => tribe( Webhook_Endpoint::class )->get_route_url(),
|
193 |
+
'attributes' => [
|
194 |
+
'readonly' => 'readonly',
|
195 |
+
'class' => 'tribe-field-tickets-commerce-stripe-webhooks-copy-value',
|
196 |
+
],
|
197 |
+
],
|
198 |
+
static::$option_webhooks_signing_key => [
|
199 |
+
'type' => 'text',
|
200 |
+
'label' => esc_html__( 'Signing Secret', 'event-tickets' ),
|
201 |
+
'tooltip' => $signing_key_tooltip,
|
202 |
+
'size' => 'large',
|
203 |
+
'default' => '',
|
204 |
+
'validation_callback' => 'is_string',
|
205 |
+
'validation_type' => 'textarea',
|
206 |
+
'attributes' => [
|
207 |
+
'data-ajax-nonce' => wp_create_nonce( static::$nonce_key_handle_validation ),
|
208 |
+
'data-loading-text' => esc_attr__( 'Validating signing key with Stripe, please wait.', 'event-tickets' ),
|
209 |
+
'data-ajax-action' => 'tec_tickets_commerce_gateway_stripe_test_webhooks',
|
210 |
+
],
|
211 |
+
],
|
212 |
+
'tickets-commerce-gateway-settings-group-end-webhook' => [
|
213 |
+
'type' => 'html',
|
214 |
+
'html' => '<div class="clear"></div></div>',
|
215 |
+
],
|
216 |
+
];
|
217 |
+
}
|
218 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks/Account_Webhook.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Webhook_Event_Interface;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Gateway;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Merchant;
|
8 |
+
use TEC\Tickets\Commerce\Status\Status_Interface;
|
9 |
+
|
10 |
+
use WP_REST_Request;
|
11 |
+
use WP_REST_Response;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Webhook for Account operations
|
15 |
+
*
|
16 |
+
* @since 5.3.0
|
17 |
+
*
|
18 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\Webhooks
|
19 |
+
*/
|
20 |
+
class Account_Webhook implements Webhook_Event_Interface {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Handler for Stripe webhook events in the payment_intent family.
|
24 |
+
*
|
25 |
+
* @since 5.3.0
|
26 |
+
*
|
27 |
+
* @param array $event
|
28 |
+
* @param Status_Interface $new_status
|
29 |
+
* @param WP_REST_Request $request
|
30 |
+
*
|
31 |
+
* @return bool
|
32 |
+
*/
|
33 |
+
public static function handle( array $event, Status_Interface $new_status, WP_REST_Request $request, WP_REST_Response $response ): bool {
|
34 |
+
return true;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Process the webhook and just return a valid WP_REST_Response.
|
39 |
+
*
|
40 |
+
* These will be directly sent to the Rest API.
|
41 |
+
*
|
42 |
+
* @since 5.3.0
|
43 |
+
*
|
44 |
+
* @param WP_REST_Request $request
|
45 |
+
* @param WP_REST_Response $response
|
46 |
+
*
|
47 |
+
* @return WP_REST_Response
|
48 |
+
*/
|
49 |
+
public static function handle_account_updated( WP_REST_Request $request, WP_REST_Response $response ): WP_REST_Response {
|
50 |
+
return $response;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @todo We need to figure out what happens when this is the case.
|
55 |
+
*
|
56 |
+
* These will be directly sent to the Rest API.
|
57 |
+
*
|
58 |
+
* @since 5.3.0
|
59 |
+
*
|
60 |
+
* @param WP_REST_Request $request
|
61 |
+
* @param WP_REST_Response $response
|
62 |
+
*
|
63 |
+
* @return \WP_REST_Response|\WP_Error
|
64 |
+
*/
|
65 |
+
public static function handle_account_deauthorized( WP_REST_Request $request, WP_REST_Response $response ) {
|
66 |
+
|
67 |
+
$params = $request->get_json_params();
|
68 |
+
$account_id = $params['account'];
|
69 |
+
$current_id = tribe( Merchant::class )->get_client_id();
|
70 |
+
|
71 |
+
if ( $account_id !== $current_id ) {
|
72 |
+
return new \WP_Error( '400', __( 'Account deauthorized is not the same as account connected.', 'event-tickets' ) );
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
tribe( Merchant::class )->set_merchant_deauthorized( 'tc-stripe-account-disconnected' );
|
77 |
+
tribe( Merchant::class )->delete_signup_data();
|
78 |
+
Gateway::disable();
|
79 |
+
|
80 |
+
return $response;
|
81 |
+
}
|
82 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks/Charge_Webhook.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Order;
|
6 |
+
use TEC\Tickets\Commerce\Status\Status_Interface;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Webhook_Event_Interface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Webhook for Charge operations.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\Webhooks
|
15 |
+
*/
|
16 |
+
class Charge_Webhook implements Webhook_Event_Interface {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @inheritDoc
|
20 |
+
*/
|
21 |
+
public static function handle( array $event, Status_Interface $new_status, \WP_REST_Request $request, \WP_REST_Response $response ) {
|
22 |
+
$charge_data = static::get_charge_data( $event );
|
23 |
+
$payment_intent_id = $charge_data['payment_intent'];
|
24 |
+
|
25 |
+
$order = tribe( Order::class )->get_from_gateway_order_id( $payment_intent_id );
|
26 |
+
|
27 |
+
if ( empty( $order ) ) {
|
28 |
+
return new \WP_Error( 200, sprintf(
|
29 |
+
// Translators: %s is the payment intent id.
|
30 |
+
__( 'Payment Intent %s does not correspond to a known order.', 'event-tickets' ),
|
31 |
+
esc_html( $payment_intent_id )
|
32 |
+
) );
|
33 |
+
}
|
34 |
+
|
35 |
+
$meta = [
|
36 |
+
'gateway_payload' => $charge_data,
|
37 |
+
'gateway_order_id' => $payment_intent_id,
|
38 |
+
];
|
39 |
+
|
40 |
+
return Handler::update_order_status( $order, $new_status, $meta );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get the charge object array from the webhook event data.
|
45 |
+
*
|
46 |
+
* @since 5.3.0
|
47 |
+
*
|
48 |
+
* @param array $event Event data coming from the Webhook.
|
49 |
+
*
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
protected static function get_charge_data( array $event ): array {
|
53 |
+
return $event['data']['object'];
|
54 |
+
}
|
55 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Status as Commerce_Status;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Webhook Events.
|
9 |
+
*
|
10 |
+
* @link https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-enabled_events
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\Webhooks
|
15 |
+
*/
|
16 |
+
class Events {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Webhook Event name for when an application is deauthorized from the dashboard.
|
20 |
+
*
|
21 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
22 |
+
* @link https://stripe.com/docs/api/events/types#event_types-account.application.deauthorized
|
23 |
+
*
|
24 |
+
* @since 5.3.0
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Webhook Event name when the account was updated.
|
32 |
+
*
|
33 |
+
* @since 5.3.0
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public const ACCOUNT_UPDATED = 'account.updated';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Webhook Event name for when a charge expires before being captured.
|
41 |
+
*
|
42 |
+
* @since 5.3.0
|
43 |
+
*
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
public const CHARGE_EXPIRED = 'charge.expired';
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Webhook Event name for when a charge capture fails.
|
50 |
+
*
|
51 |
+
* @since 5.3.0
|
52 |
+
*
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
public const CHARGE_FAILED = 'charge.failed';
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Webhook Event name for when a charge is refunded.
|
59 |
+
*
|
60 |
+
* @since 5.3.0
|
61 |
+
*
|
62 |
+
* @var string
|
63 |
+
*/
|
64 |
+
public const CHARGE_REFUNDED = 'charge.refunded';
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Webhook Event name for when a charge is completed.
|
68 |
+
*
|
69 |
+
* @since 5.3.0
|
70 |
+
*
|
71 |
+
* @var string
|
72 |
+
*/
|
73 |
+
public const CHARGE_SUCCEEDED = 'charge.succeeded';
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Webhook Event name for a payment intent that was canceled.
|
77 |
+
*
|
78 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
79 |
+
*
|
80 |
+
* @since 5.3.0
|
81 |
+
*
|
82 |
+
* @var string
|
83 |
+
*/
|
84 |
+
public const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Webhook Event name for a payment intent that was created.
|
88 |
+
*
|
89 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
90 |
+
*
|
91 |
+
* @since 5.3.0
|
92 |
+
*
|
93 |
+
* @var string
|
94 |
+
*/
|
95 |
+
public const PAYMENT_INTENT_CREATED = 'payment_intent.created';
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Webhook Event name for a payment intent that failed to create a charge.
|
99 |
+
*
|
100 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
101 |
+
*
|
102 |
+
* @since 5.3.0
|
103 |
+
*
|
104 |
+
* @var string
|
105 |
+
*/
|
106 |
+
public const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Webhook Event name for a payment intent that is in process.
|
110 |
+
*
|
111 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
112 |
+
*
|
113 |
+
* @since 5.3.0
|
114 |
+
*
|
115 |
+
* @var string
|
116 |
+
*/
|
117 |
+
public const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Webhook Event name for a payment intent that requires user action to complete a charge.
|
121 |
+
*
|
122 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
123 |
+
*
|
124 |
+
* @since 5.3.0
|
125 |
+
*
|
126 |
+
* @var string
|
127 |
+
*/
|
128 |
+
public const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Webhook Event name for a payment intent that has successfully completed.
|
132 |
+
*
|
133 |
+
* @link https://stripe.com/docs/api/payment_intents/object
|
134 |
+
*
|
135 |
+
* @since 5.3.0
|
136 |
+
*
|
137 |
+
* @var string
|
138 |
+
*/
|
139 |
+
public const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Returns the handle to be used for each webhook event.
|
143 |
+
*
|
144 |
+
* @since 5.3.0
|
145 |
+
*
|
146 |
+
* @return array
|
147 |
+
*/
|
148 |
+
public static function get_event_handlers(): array {
|
149 |
+
$handlers = [
|
150 |
+
static::ACCOUNT_UPDATED => [ Account_Webhook::class, 'handle_account_updated' ],
|
151 |
+
static::ACCOUNT_APPLICATION_DEAUTHORIZED => [ Account_Webhook::class, 'handle_account_deauthorized' ],
|
152 |
+
static::CHARGE_EXPIRED => [ Charge_Webhook::class, 'handle' ],
|
153 |
+
static::CHARGE_FAILED => [ Charge_Webhook::class, 'handle' ],
|
154 |
+
static::CHARGE_REFUNDED => [ Charge_Webhook::class, 'handle' ],
|
155 |
+
static::CHARGE_SUCCEEDED => [ Charge_Webhook::class, 'handle' ],
|
156 |
+
static::PAYMENT_INTENT_PROCESSING => [ Payment_Intent_Webhook::class, 'handle' ],
|
157 |
+
static::PAYMENT_INTENT_REQUIRES_ACTION => [ Payment_Intent_Webhook::class, 'handle' ],
|
158 |
+
static::PAYMENT_INTENT_SUCCEEDED => [ Payment_Intent_Webhook::class, 'handle' ],
|
159 |
+
static::PAYMENT_INTENT_PAYMENT_FAILED => [ Payment_Intent_Webhook::class, 'handle' ],
|
160 |
+
static::PAYMENT_INTENT_CANCELED => [ Payment_Intent_Webhook::class, 'handle' ],
|
161 |
+
];
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Allows filtering of the Webhook map of events-to-handler-functions for each one of the types we listen for.
|
165 |
+
*
|
166 |
+
* @since 5.3.0
|
167 |
+
*
|
168 |
+
* @param array $events The default map of event handler functions.
|
169 |
+
*/
|
170 |
+
return (array) apply_filters( 'tec_tickets_commerce_gateway_stripe_webhook_event_handlers', $handlers );
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Returns a list of all valid webhook events.
|
175 |
+
* If it converts directly to a TC status it will be the status Class name, otherwise it will be callable.
|
176 |
+
*
|
177 |
+
* @since 5.3.0
|
178 |
+
*
|
179 |
+
* @return callable[]|Commerce_Status\Status_Interface[]
|
180 |
+
*/
|
181 |
+
public static function get_event_transition_status(): array {
|
182 |
+
$events = [
|
183 |
+
static::CHARGE_EXPIRED => Commerce_Status\Not_Completed::class,
|
184 |
+
static::CHARGE_FAILED => Commerce_Status\Denied::class,
|
185 |
+
static::CHARGE_REFUNDED => Commerce_Status\Refunded::class,
|
186 |
+
static::CHARGE_SUCCEEDED => Commerce_Status\Completed::class,
|
187 |
+
static::PAYMENT_INTENT_CANCELED => Commerce_Status\Denied::class,
|
188 |
+
static::PAYMENT_INTENT_CREATED => Commerce_Status\Created::class,
|
189 |
+
static::PAYMENT_INTENT_PAYMENT_FAILED => Commerce_Status\Not_Completed::class,
|
190 |
+
static::PAYMENT_INTENT_PROCESSING => Commerce_Status\Pending::class,
|
191 |
+
static::PAYMENT_INTENT_REQUIRES_ACTION => Commerce_Status\Action_Required::class,
|
192 |
+
static::PAYMENT_INTENT_SUCCEEDED => Commerce_Status\Completed::class,
|
193 |
+
];
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Allows filtering of the Webhook map of events-to-statuses for each one of the types we listen for.
|
197 |
+
*
|
198 |
+
* @since 5.3.0
|
199 |
+
*
|
200 |
+
* @param array $events The default map of which event statuses.
|
201 |
+
*/
|
202 |
+
return (array) apply_filters( 'tec_tickets_commerce_gateway_stripe_webhook_status', $events );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Return webhook label's "Nice name", it's only applicable if the webhook converts to a status.
|
207 |
+
*
|
208 |
+
* @since 5.3.0
|
209 |
+
*
|
210 |
+
* @param string $event_name A Stripe Event String.
|
211 |
+
*
|
212 |
+
* @return string The Webhook label, false on error.
|
213 |
+
*/
|
214 |
+
public function get_webhook_label( string $event_name ): string {
|
215 |
+
$labels = [
|
216 |
+
static::PAYMENT_INTENT_CANCELED => __( 'Canceled payments', 'event-tickets' ),
|
217 |
+
static::PAYMENT_INTENT_CREATED => __( 'Created payments', 'event-tickets' ),
|
218 |
+
static::PAYMENT_INTENT_PAYMENT_FAILED => __( 'Failed payments', 'event-tickets' ),
|
219 |
+
static::PAYMENT_INTENT_PROCESSING => __( 'Pending payments', 'event-tickets' ),
|
220 |
+
static::PAYMENT_INTENT_REQUIRES_ACTION => __( 'Action required payments', 'event-tickets' ),
|
221 |
+
static::PAYMENT_INTENT_SUCCEEDED => __( 'Successful payments', 'event-tickets' ),
|
222 |
+
];
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Allows filtering of the Webhook map of events for each one of the types we listen for.
|
226 |
+
*
|
227 |
+
* @since 5.3.0
|
228 |
+
*
|
229 |
+
* @param array $labels The default map of which event types that translate to a given label string.
|
230 |
+
* @param string $event_name Which event name we are looking for.
|
231 |
+
*/
|
232 |
+
$labels = apply_filters( 'tec_tickets_commerce_gateway_stripe_webhook_events_labels_map', $labels, $event_name );
|
233 |
+
|
234 |
+
if ( ! static::is_valid( $event_name ) ) {
|
235 |
+
return '';
|
236 |
+
}
|
237 |
+
|
238 |
+
if ( isset( $labels[ $event_name ] ) ) {
|
239 |
+
return $labels[ $event_name ];
|
240 |
+
}
|
241 |
+
|
242 |
+
return '';
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Checks if a given Stripe webhook event name is valid.
|
247 |
+
*
|
248 |
+
* @since 5.3.0
|
249 |
+
*
|
250 |
+
* @param string $event_name A Stripe Event String.
|
251 |
+
*
|
252 |
+
* @return bool
|
253 |
+
*/
|
254 |
+
public static function is_valid( string $event_name ): bool {
|
255 |
+
$events_map = static::get_event_handlers();
|
256 |
+
|
257 |
+
return isset( $events_map[ $event_name ] );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Converts a valid Stripe webhook event name into a commerce status object.
|
262 |
+
*
|
263 |
+
* @since 5.3.0
|
264 |
+
*
|
265 |
+
* @param string $event_name A Stripe Event String.
|
266 |
+
*
|
267 |
+
* @return false|Commerce_Status\Status_Interface|null
|
268 |
+
*/
|
269 |
+
public function convert_to_commerce_status( string $event_name ) {
|
270 |
+
if ( ! static::is_valid( $event_name ) ) {
|
271 |
+
return false;
|
272 |
+
}
|
273 |
+
|
274 |
+
$events = static::get_event_transition_status();
|
275 |
+
|
276 |
+
if ( ! isset( $events[ $event_name ] ) ) {
|
277 |
+
return false;
|
278 |
+
}
|
279 |
+
|
280 |
+
return tribe( Commerce_Status\Status_Handler::class )->get_by_class( $events[ $event_name ] );
|
281 |
+
}
|
282 |
+
|
283 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Status as Commerce_Status;
|
6 |
+
use TEC\Tickets\Commerce\Order;
|
7 |
+
|
8 |
+
use Tribe__Utils__Array as Arr;
|
9 |
+
|
10 |
+
use WP_Error;
|
11 |
+
use WP_REST_Request;
|
12 |
+
use WP_REST_Response;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Handler
|
16 |
+
*
|
17 |
+
* @since 5.3.0
|
18 |
+
*
|
19 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\Webhooks
|
20 |
+
*/
|
21 |
+
class Handler {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Process a given Stripe Webhook event, possibly updating the local order with the status sent by the request.
|
25 |
+
*
|
26 |
+
* These will be directly sent to the Rest API.
|
27 |
+
*
|
28 |
+
* @since 5.3.0
|
29 |
+
*
|
30 |
+
* @param WP_REST_Request $request
|
31 |
+
* @param WP_REST_Response $response
|
32 |
+
*
|
33 |
+
* @return WP_REST_Response|WP_Error
|
34 |
+
*/
|
35 |
+
public static function process_webhook_response( WP_REST_Request $request, WP_REST_Response $response ) {
|
36 |
+
$event = $request->get_json_params();
|
37 |
+
$object = Arr::get( $event, 'object' );
|
38 |
+
$type = Arr::get( $event, 'type' );
|
39 |
+
$id = Arr::get( $event, 'id' );
|
40 |
+
|
41 |
+
// Invalid event.
|
42 |
+
if ( empty( $type ) || 'event' !== $object ) {
|
43 |
+
return new WP_Error( 'tec-tickets-commerce-stripe-webhook-invalid-payload', null, [ 'event' => $event ] );
|
44 |
+
}
|
45 |
+
|
46 |
+
// Check if the event type matches.
|
47 |
+
if ( ! Events::is_valid( $type ) ) {
|
48 |
+
tribe( 'logger' )->log_debug(
|
49 |
+
sprintf(
|
50 |
+
// Translators: %s: The Stripe payment event.
|
51 |
+
__( 'Invalid event type for webhook event: %s', 'event-tickets' ),
|
52 |
+
json_encode( $event )
|
53 |
+
),
|
54 |
+
'tickets-commerce-gateway-stripe'
|
55 |
+
);
|
56 |
+
|
57 |
+
$response->set_status( 200 );
|
58 |
+
$response->set_data(
|
59 |
+
sprintf(
|
60 |
+
// Translators: %1$s is the event id and %2$s is the event type name.
|
61 |
+
__( 'Event %1$s was received but events of type %2$s are not currently handled.', 'event-tickets' ),
|
62 |
+
esc_html( $id ),
|
63 |
+
esc_html( $type )
|
64 |
+
)
|
65 |
+
);
|
66 |
+
|
67 |
+
return $response;
|
68 |
+
}
|
69 |
+
|
70 |
+
$new_status = tribe( Events::class )->convert_to_commerce_status( $type );
|
71 |
+
|
72 |
+
// When it's not a status we return with the callback.
|
73 |
+
if ( ! $new_status instanceof Commerce_Status\Status_Interface ) {
|
74 |
+
$handlers_map = Events::get_event_handlers();
|
75 |
+
|
76 |
+
return $handlers_map[ $type ]( $request, $response );
|
77 |
+
}
|
78 |
+
|
79 |
+
// Define where this request should be processed and call that method.
|
80 |
+
$event_handler = static::get_handler_method_for_event( $type );
|
81 |
+
|
82 |
+
// Stripe webhooks don't care for anything other than our response codes
|
83 |
+
// 200 we're good. Anything else we're not.
|
84 |
+
if ( is_wp_error( $event_handler ) ) {
|
85 |
+
return $event_handler;
|
86 |
+
}
|
87 |
+
|
88 |
+
return call_user_func_array( $event_handler, [ $event, $new_status, $request, $response ] );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get the class and method to call to handle this event.
|
93 |
+
*
|
94 |
+
* @since 5.3.0
|
95 |
+
*
|
96 |
+
* @param string $type The event type from Stripe.
|
97 |
+
*
|
98 |
+
* @return string|WP_REST_Response
|
99 |
+
*/
|
100 |
+
public static function get_handler_method_for_event( $type ) {
|
101 |
+
$handlers = Events::get_event_handlers();
|
102 |
+
|
103 |
+
if ( ! isset( $handlers[ $type ] ) ) {
|
104 |
+
return new WP_REST_Response(
|
105 |
+
sprintf(
|
106 |
+
// Translators: %1$s is the event type name.
|
107 |
+
__( 'Event was received but events of type %1$s are not currently handled.', 'event-tickets' ),
|
108 |
+
esc_html( $type )
|
109 |
+
),
|
110 |
+
200
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
return $handlers[ $type ];
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Generic handler to update order statuses to a defined Status.
|
120 |
+
*
|
121 |
+
* @since 5.3.0
|
122 |
+
*
|
123 |
+
* @param \WP_Post $order The order to update.
|
124 |
+
* @param Commerce_Status\Status_Interface $status The new status to use.
|
125 |
+
* @param array $metadata Any new meta to save with the order.
|
126 |
+
*
|
127 |
+
* @throws \Tribe__Repository__Usage_Error
|
128 |
+
*
|
129 |
+
* @return bool|WP_Error|null
|
130 |
+
*/
|
131 |
+
public static function update_order_status( \WP_Post $order, Commerce_Status\Status_Interface $status, array $metadata = [] ) {
|
132 |
+
return tribe( Order::class )->modify_status( $order->ID, $status->get_slug(), $metadata );
|
133 |
+
}
|
134 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Webhook_Event_Interface;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Payment_Intent;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\Status;
|
8 |
+
use TEC\Tickets\Commerce\Order;
|
9 |
+
use TEC\Tickets\Commerce\Status\Status_Interface;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Webhook for Payment_Intent operations
|
13 |
+
*
|
14 |
+
* @since 5.3.0
|
15 |
+
*
|
16 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe\Webhooks
|
17 |
+
*/
|
18 |
+
class Payment_Intent_Webhook implements Webhook_Event_Interface {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @inheritDoc
|
22 |
+
*/
|
23 |
+
public static function handle( array $event, Status_Interface $new_status, \WP_REST_Request $request, \WP_REST_Response $response ) {
|
24 |
+
$payment_intent = static::get_payment_intent_data( $event );
|
25 |
+
$payment_intent_id = $payment_intent['id'];
|
26 |
+
|
27 |
+
if ( ! empty( $payment_intent['metadata']['order_id'] ) ) {
|
28 |
+
$order = tec_tc_get_order( $payment_intent['metadata']['order_id'] );
|
29 |
+
}
|
30 |
+
|
31 |
+
if ( empty( $order ) ) {
|
32 |
+
$order = tribe( Order::class )->get_from_gateway_order_id( $payment_intent_id );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( empty( $order ) ) {
|
36 |
+
|
37 |
+
if ( ! empty( $payment_intent['metadata'][ Payment_Intent::$test_metadata_key ] ) ) {
|
38 |
+
$response->set_status( 200 );
|
39 |
+
$response->set_data(
|
40 |
+
__( 'Payment Intent Test Successful', 'event-tickets' )
|
41 |
+
);
|
42 |
+
|
43 |
+
return $response;
|
44 |
+
}
|
45 |
+
|
46 |
+
return new \WP_Error( 400, sprintf(
|
47 |
+
// Translators: %s is the payment intent id.
|
48 |
+
__( 'Payment Intent %s does not correspond to a known order.', 'event-tickets' ),
|
49 |
+
esc_html( $payment_intent_id )
|
50 |
+
) );
|
51 |
+
}
|
52 |
+
|
53 |
+
if ( ! static::should_payment_intent_be_updated( $payment_intent, $order->gateway_payload ) ) {
|
54 |
+
$response->set_status( 200 );
|
55 |
+
$response->set_data(
|
56 |
+
sprintf(
|
57 |
+
// Translators: %s is the payment intent id
|
58 |
+
__( 'Payment Intent %s does not require an update or is a duplicate of a past event.', 'event-tickets' ),
|
59 |
+
esc_html( $payment_intent_id )
|
60 |
+
)
|
61 |
+
);
|
62 |
+
}
|
63 |
+
|
64 |
+
$meta = [
|
65 |
+
'gateway_payload' => $payment_intent,
|
66 |
+
'gateway_order_id' => $payment_intent_id,
|
67 |
+
];
|
68 |
+
|
69 |
+
return Handler::update_order_status( $order, $new_status, $meta );
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get the payment intent id from the webhook event data.
|
75 |
+
*
|
76 |
+
* @since 5.3.0
|
77 |
+
*
|
78 |
+
* @param array $event Event data coming from the Webhook.
|
79 |
+
*
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
protected static function get_payment_intent_id( array $event ): string {
|
83 |
+
$payment_intent = static::get_payment_intent_data( $event );
|
84 |
+
|
85 |
+
return $payment_intent['id'];
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get the payment intent object array from the webhook event data.
|
90 |
+
*
|
91 |
+
* @since 5.3.0
|
92 |
+
*
|
93 |
+
* @param array $event Event data coming from the Webhook.
|
94 |
+
*
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
protected static function get_payment_intent_data( array $event ): array {
|
98 |
+
return $event['data']['object'];
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Checks if the payment intent contained in the event received has already been processed.
|
103 |
+
*
|
104 |
+
* @since 5.3.0
|
105 |
+
*
|
106 |
+
* @param array $payment_intent_received The payment intent data received
|
107 |
+
* @param array[] $payment_intents_stored The payment intent data stored from each update, keyed by status.
|
108 |
+
*
|
109 |
+
* @return bool
|
110 |
+
*/
|
111 |
+
public static function should_payment_intent_be_updated( $payment_intent_received, $payment_intents_stored ) {
|
112 |
+
// This payment intent was reset, or processing has re-started without invalidating.
|
113 |
+
if ( 1 < count( $payment_intents_stored ) && $payment_intent_received['status'] === Status::REQUIRES_PAYMENT_METHOD ) {
|
114 |
+
return true;
|
115 |
+
}
|
116 |
+
|
117 |
+
foreach ( $payment_intents_stored as $intent ) {
|
118 |
+
// This payment intent has already been processed and updated.
|
119 |
+
if ( $payment_intent_received['id'] === $intent['id'] ) {
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
return true;
|
125 |
+
}
|
126 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/Webhooks/events.json
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"date_updated": "2022-02-11",
|
3 |
+
"from": "https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-enabled_events",
|
4 |
+
"status_enabled": [
|
5 |
+
"account.updated",
|
6 |
+
"payment_intent.amount_capturable_updated",
|
7 |
+
"payment_intent.canceled",
|
8 |
+
"payment_intent.created",
|
9 |
+
"payment_intent.payment_failed",
|
10 |
+
"payment_intent.processing",
|
11 |
+
"payment_intent.requires_action",
|
12 |
+
"payment_intent.succeeded"
|
13 |
+
],
|
14 |
+
"status_available": {
|
15 |
+
"account.updated": "Occurs whenever an account status or property has changed.",
|
16 |
+
"account.application.authorized": "Occurs whenever a user authorizes an application. Sent to the related application only.",
|
17 |
+
"account.application.deauthorized": "Occurs whenever a user deauthorizes an application. Sent to the related application only.",
|
18 |
+
"account.external_account.created": "Occurs whenever an external account is created.",
|
19 |
+
"account.external_account.deleted": "Occurs whenever an external account is deleted.",
|
20 |
+
"account.external_account.updated": "Occurs whenever an external account is updated.",
|
21 |
+
"application_fee.created": "Occurs whenever an application fee is created on a charge.",
|
22 |
+
"application_fee.refunded": "Occurs whenever an application fee is refunded, whether from refunding a charge or from refunding the application fee directly. This includes partial refunds.",
|
23 |
+
"application_fee.refund.updated": "Occurs whenever an application fee refund is updated.",
|
24 |
+
"balance.available": "Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis.",
|
25 |
+
"billing_portal.configuration.created": "Occurs whenever a portal configuration is created.",
|
26 |
+
"billing_portal.configuration.updated": "Occurs whenever a portal configuration is updated.",
|
27 |
+
"capability.updated": "Occurs whenever a capability has new requirements or a new status.",
|
28 |
+
"charge.captured": "Occurs whenever a previously uncaptured charge is captured.",
|
29 |
+
"charge.expired": "Occurs whenever an uncaptured charge expires.",
|
30 |
+
"charge.failed": "Occurs whenever a failed charge attempt occurs.",
|
31 |
+
"charge.pending": "Occurs whenever a pending charge is created.",
|
32 |
+
"charge.refunded": "Occurs whenever a charge is refunded, including partial refunds.",
|
33 |
+
"charge.succeeded": "Occurs whenever a charge is successful.",
|
34 |
+
"charge.updated": "Occurs whenever a charge description or metadata is updated.",
|
35 |
+
"charge.dispute.closed": "Occurs when a dispute is closed and the dispute status changes to lost, warning_closed, or won.",
|
36 |
+
"charge.dispute.created": "Occurs whenever a customer disputes a charge with their bank.",
|
37 |
+
"charge.dispute.funds_reinstated": "Occurs when funds are reinstated to your account after a dispute is closed. This includes partially refunded payments.",
|
38 |
+
"charge.dispute.funds_withdrawn": "Occurs when funds are removed from your account due to a dispute.",
|
39 |
+
"charge.dispute.updated": "Occurs when the dispute is updated (usually with evidence).",
|
40 |
+
"charge.refund.updated": "Occurs whenever a refund is updated, on selected payment methods.",
|
41 |
+
"checkout.session.async_payment_failed": "Occurs when a payment intent using a delayed payment method fails.",
|
42 |
+
"checkout.session.async_payment_succeeded": "Occurs when a payment intent using a delayed payment method finally succeeds.",
|
43 |
+
"checkout.session.completed": "Occurs when a Checkout Session has been successfully completed.",
|
44 |
+
"checkout.session.expired": "Occurs when a Checkout Session is expired.",
|
45 |
+
"coupon.created": "Occurs whenever a coupon is created.",
|
46 |
+
"coupon.deleted": "Occurs whenever a coupon is deleted.",
|
47 |
+
"coupon.updated": "Occurs whenever a coupon is updated.",
|
48 |
+
"credit_note.created": "Occurs whenever a credit note is created.",
|
49 |
+
"credit_note.updated": "Occurs whenever a credit note is updated.",
|
50 |
+
"credit_note.voided": "Occurs whenever a credit note is voided.",
|
51 |
+
"customer.created": "Occurs whenever a new customer is created.",
|
52 |
+
"customer.deleted": "Occurs whenever a customer is deleted.",
|
53 |
+
"customer.updated": "Occurs whenever any property of a customer changes.",
|
54 |
+
"customer.discount.created": "Occurs whenever a coupon is attached to a customer.",
|
55 |
+
"customer.discount.deleted": "Occurs whenever a coupon is removed from a customer.",
|
56 |
+
"customer.discount.updated": "Occurs whenever a customer is switched from one coupon to another.",
|
57 |
+
"customer.source.created": "Occurs whenever a new source is created for a customer.",
|
58 |
+
"customer.source.deleted": "Occurs whenever a source is removed from a customer.",
|
59 |
+
"customer.source.expiring": "Occurs whenever a card or source will expire at the end of the month.",
|
60 |
+
"customer.source.updated": "Occurs whenever a source’s details are changed.",
|
61 |
+
"customer.subscription.created": "Occurs whenever a customer is signed up for a new plan.",
|
62 |
+
"customer.subscription.deleted": "Occurs whenever a customer’s subscription ends.",
|
63 |
+
"customer.subscription.pending_update_applied": "Occurs whenever a customer’s subscription’s pending update is applied, and the subscription is updated.",
|
64 |
+
"customer.subscription.pending_update_expired": "Occurs whenever a customer’s subscription’s pending update expires before the related invoice is paid.",
|
65 |
+
"customer.subscription.trial_will_end": "Occurs three days before a subscription’s trial period is scheduled to end, or when a trial is ended immediately (using trial_end=now).",
|
66 |
+
"customer.subscription.updated": "Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).",
|
67 |
+
"customer.tax_id.created": "Occurs whenever a tax ID is created for a customer.",
|
68 |
+
"customer.tax_id.deleted": "Occurs whenever a tax ID is deleted from a customer.",
|
69 |
+
"customer.tax_id.updated": "Occurs whenever a customer’s tax ID is updated.",
|
70 |
+
"file.created": "Occurs whenever a new Stripe-generated file is available for your account.",
|
71 |
+
"identity.verification_session.canceled": "Occurs whenever a VerificationSession is canceled.",
|
72 |
+
"identity.verification_session.created": "Occurs whenever a VerificationSession is created.",
|
73 |
+
"identity.verification_session.processing": "Occurs whenever a VerificationSession transitions to processing.",
|
74 |
+
"identity.verification_session.redacted": "Occurs whenever a VerificationSession is redacted.",
|
75 |
+
"identity.verification_session.requires_input": "Occurs whenever a VerificationSession transitions to require user input.",
|
76 |
+
"identity.verification_session.verified": "Occurs whenever a VerificationSession transitions to verified.",
|
77 |
+
"invoice.created": "Occurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see Using Webhooks with Subscriptions.",
|
78 |
+
"invoice.deleted": "Occurs whenever a draft invoice is deleted.",
|
79 |
+
"invoice.finalization_failed": "Occurs whenever a draft invoice cannot be finalized. See the invoice’s last finalization error for details.",
|
80 |
+
"invoice.finalized": "Occurs whenever a draft invoice is finalized and updated to be an open invoice.",
|
81 |
+
"invoice.marked_uncollectible": "Occurs whenever an invoice is marked uncollectible.",
|
82 |
+
"invoice.paid": "Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.",
|
83 |
+
"invoice.payment_action_required": "Occurs whenever an invoice payment attempt requires further user action to complete.",
|
84 |
+
"invoice.payment_failed": "Occurs whenever an invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method.",
|
85 |
+
"invoice.payment_succeeded": "Occurs whenever an invoice payment attempt succeeds.",
|
86 |
+
"invoice.sent": "Occurs whenever an invoice email is sent out.",
|
87 |
+
"invoice.upcoming": "Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your subscriptions settings. Note: The received Invoice object will not have an invoice ID.",
|
88 |
+
"invoice.updated": "Occurs whenever an invoice changes (e.g., the invoice amount).",
|
89 |
+
"invoice.voided": "Occurs whenever an invoice is voided.",
|
90 |
+
"invoiceitem.created": "Occurs whenever an invoice item is created.",
|
91 |
+
"invoiceitem.deleted": "Occurs whenever an invoice item is deleted.",
|
92 |
+
"invoiceitem.updated": "Occurs whenever an invoice item is updated.",
|
93 |
+
"issuing_authorization.created": "Occurs whenever an authorization is created.",
|
94 |
+
"issuing_authorization.request": "Represents a synchronous request for authorization, see Using your integration to handle authorization requests.",
|
95 |
+
"issuing_authorization.updated": "Occurs whenever an authorization is updated.",
|
96 |
+
"issuing_card.created": "Occurs whenever a card is created.",
|
97 |
+
"issuing_card.updated": "Occurs whenever a card is updated.",
|
98 |
+
"issuing_cardholder.created": "Occurs whenever a cardholder is created.",
|
99 |
+
"issuing_cardholder.updated": "Occurs whenever a cardholder is updated.",
|
100 |
+
"issuing_dispute.closed": "Occurs whenever a dispute is won, lost or expired.",
|
101 |
+
"issuing_dispute.created": "Occurs whenever a dispute is created.",
|
102 |
+
"issuing_dispute.funds_reinstated": "Occurs whenever funds are reinstated to your account for an Issuing dispute.",
|
103 |
+
"issuing_dispute.submitted": "Occurs whenever a dispute is submitted.",
|
104 |
+
"issuing_dispute.updated": "Occurs whenever a dispute is updated.",
|
105 |
+
"issuing_transaction.created": "Occurs whenever an issuing transaction is created.",
|
106 |
+
"issuing_transaction.updated": "Occurs whenever an issuing transaction is updated.",
|
107 |
+
"mandate.updated": "Occurs whenever a Mandate is updated.",
|
108 |
+
"order.created": "Occurs whenever an order is created.",
|
109 |
+
"order.payment_failed": "Occurs whenever an order payment attempt fails.",
|
110 |
+
"order.payment_succeeded": "Occurs whenever an order payment attempt succeeds.",
|
111 |
+
"order.updated": "Occurs whenever an order is updated.",
|
112 |
+
"order_return.created": "Occurs whenever an order return is created.",
|
113 |
+
"payment_intent.amount_capturable_updated": "Occurs when a PaymentIntent has funds to be captured. Check the amount_capturable property on the PaymentIntent to determine the amount that can be captured. You may capture the PaymentIntent with an amount_to_capture value up to the specified amount. Learn more about capturing PaymentIntents.",
|
114 |
+
"payment_intent.canceled": "Occurs when a PaymentIntent is canceled.",
|
115 |
+
"payment_intent.created": "Occurs when a new PaymentIntent is created.",
|
116 |
+
"payment_intent.payment_failed": "Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment.",
|
117 |
+
"payment_intent.processing": "Occurs when a PaymentIntent has started processing.",
|
118 |
+
"payment_intent.requires_action": "Occurs when a PaymentIntent transitions to requires_action state",
|
119 |
+
"payment_intent.succeeded": "Occurs when a PaymentIntent has successfully completed payment.",
|
120 |
+
"payment_link.created": "Occurs when a payment link is created.",
|
121 |
+
"payment_link.updated": "Occurs when a payment link is updated.",
|
122 |
+
"payment_method.attached": "Occurs whenever a new payment method is attached to a customer.",
|
123 |
+
"payment_method.automatically_updated": "Occurs whenever a payment method’s details are automatically updated by the network.",
|
124 |
+
"payment_method.detached": "Occurs whenever a payment method is detached from a customer.",
|
125 |
+
"payment_method.updated": "Occurs whenever a payment method is updated via the PaymentMethod update API.",
|
126 |
+
"payout.canceled": "Occurs whenever a payout is canceled.",
|
127 |
+
"payout.created": "Occurs whenever a payout is created.",
|
128 |
+
"payout.failed": "Occurs whenever a payout attempt fails.",
|
129 |
+
"payout.paid": "Occurs whenever a payout is expected to be available in the destination account. If the payout fails, a payout.failed notification is also sent, at a later time.",
|
130 |
+
"payout.updated": "Occurs whenever a payout is updated.",
|
131 |
+
"person.created": "Occurs whenever a person associated with an account is created.",
|
132 |
+
"person.deleted": "Occurs whenever a person associated with an account is deleted.",
|
133 |
+
"person.updated": "Occurs whenever a person associated with an account is updated.",
|
134 |
+
"plan.created": "Occurs whenever a plan is created.",
|
135 |
+
"plan.deleted": "Occurs whenever a plan is deleted.",
|
136 |
+
"plan.updated": "Occurs whenever a plan is updated.",
|
137 |
+
"price.created": "Occurs whenever a price is created.",
|
138 |
+
"price.deleted": "Occurs whenever a price is deleted.",
|
139 |
+
"price.updated": "Occurs whenever a price is updated.",
|
140 |
+
"product.created": "Occurs whenever a product is created.",
|
141 |
+
"product.deleted": "Occurs whenever a product is deleted.",
|
142 |
+
"product.updated": "Occurs whenever a product is updated.",
|
143 |
+
"promotion_code.created": "Occurs whenever a promotion code is created.",
|
144 |
+
"promotion_code.updated": "Occurs whenever a promotion code is updated.",
|
145 |
+
"quote.accepted": "Occurs whenever a quote is accepted.",
|
146 |
+
"quote.canceled": "Occurs whenever a quote is canceled.",
|
147 |
+
"quote.created": "Occurs whenever a quote is created.",
|
148 |
+
"quote.finalized": "Occurs whenever a quote is finalized.",
|
149 |
+
"radar.early_fraud_warning.created": "Occurs whenever an early fraud warning is created.",
|
150 |
+
"radar.early_fraud_warning.updated": "Occurs whenever an early fraud warning is updated.",
|
151 |
+
"recipient.created": "Occurs whenever a recipient is created.",
|
152 |
+
"recipient.deleted": "Occurs whenever a recipient is deleted.",
|
153 |
+
"recipient.updated": "Occurs whenever a recipient is updated.",
|
154 |
+
"reporting.report_run.failed": "Occurs whenever a requested ReportRun failed to complete.",
|
155 |
+
"reporting.report_run.succeeded": "Occurs whenever a requested ReportRun completed succesfully.",
|
156 |
+
"reporting.report_type.updated": "Occurs whenever a ReportType is updated (typically to indicate that a new day’s data has come available).",
|
157 |
+
"review.closed": "Occurs whenever a review is closed. The review’s reason field indicates why: approved, disputed, refunded, or refunded_as_fraud.",
|
158 |
+
"review.opened": "Occurs whenever a review is opened.",
|
159 |
+
"setup_intent.canceled": "Occurs when a SetupIntent is canceled.",
|
160 |
+
"setup_intent.created": "Occurs when a new SetupIntent is created.",
|
161 |
+
"setup_intent.requires_action": "Occurs when a SetupIntent is in requires_action state.",
|
162 |
+
"setup_intent.setup_failed": "Occurs when a SetupIntent has failed the attempt to setup a payment method.",
|
163 |
+
"setup_intent.succeeded": "Occurs when an SetupIntent has successfully setup a payment method.",
|
164 |
+
"sigma.scheduled_query_run.created": "Occurs whenever a Sigma scheduled query run finishes.",
|
165 |
+
"sku.created": "Occurs whenever a SKU is created.",
|
166 |
+
"sku.deleted": "Occurs whenever a SKU is deleted.",
|
167 |
+
"sku.updated": "Occurs whenever a SKU is updated.",
|
168 |
+
"source.canceled": "Occurs whenever a source is canceled.",
|
169 |
+
"source.chargeable": "Occurs whenever a source transitions to chargeable.",
|
170 |
+
"source.failed": "Occurs whenever a source fails.",
|
171 |
+
"source.mandate_notification": "Occurs whenever a source mandate notification method is set to manual.",
|
172 |
+
"source.refund_attributes_required": "Occurs whenever the refund attributes are required on a receiver source to process a refund or a mispayment.",
|
173 |
+
"source.transaction.created": "Occurs whenever a source transaction is created.",
|
174 |
+
"source.transaction.updated": "Occurs whenever a source transaction is updated.",
|
175 |
+
"subscription_schedule.aborted": "Occurs whenever a subscription schedule is canceled due to the underlying subscription being canceled because of delinquency.",
|
176 |
+
"subscription_schedule.canceled": "Occurs whenever a subscription schedule is canceled.",
|
177 |
+
"subscription_schedule.completed": "Occurs whenever a new subscription schedule is completed.",
|
178 |
+
"subscription_schedule.created": "Occurs whenever a new subscription schedule is created.",
|
179 |
+
"subscription_schedule.expiring": "Occurs 7 days before a subscription schedule will expire.",
|
180 |
+
"subscription_schedule.released": "Occurs whenever a new subscription schedule is released.",
|
181 |
+
"subscription_schedule.updated": "Occurs whenever a subscription schedule is updated.",
|
182 |
+
"tax_rate.created": "Occurs whenever a new tax rate is created.",
|
183 |
+
"tax_rate.updated": "Occurs whenever a tax rate is updated.",
|
184 |
+
"topup.canceled": "Occurs whenever a top-up is canceled.",
|
185 |
+
"topup.created": "Occurs whenever a top-up is created.",
|
186 |
+
"topup.failed": "Occurs whenever a top-up fails.",
|
187 |
+
"topup.reversed": "Occurs whenever a top-up is reversed.",
|
188 |
+
"topup.succeeded": "Occurs whenever a top-up succeeds.",
|
189 |
+
"transfer.created": "Occurs whenever a transfer is created.",
|
190 |
+
"transfer.failed": "Occurs whenever a transfer failed.",
|
191 |
+
"transfer.paid": "Occurs after a transfer is paid. For Instant Payouts, the event will typically be sent within 30 minutes.",
|
192 |
+
"transfer.reversed": "Occurs whenever a transfer is reversed, including partial reversals.",
|
193 |
+
"transfer.updated": "Occurs whenever a transfer’s description or metadata is updated."
|
194 |
+
}
|
195 |
+
}
|
src/Tickets/Commerce/Gateways/Stripe/WhoDat.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\Stripe;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_WhoDat;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\REST\On_Boarding_Endpoint;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Stripe\REST\Webhook_Endpoint;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class WhoDat. Handles connection to Stripe when the platform keys are needed.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\Stripe
|
15 |
+
*/
|
16 |
+
class WhoDat extends Abstract_WhoDat {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The API Path.
|
20 |
+
*
|
21 |
+
* @since 5.3.0
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
public $api_endpoint = 'stripe';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Creates a new account link for the client and redirects the user to setup the account details.
|
29 |
+
*
|
30 |
+
* @since 5.3.0
|
31 |
+
*
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function connect_account() {
|
35 |
+
$query_args = [
|
36 |
+
'token' => urlencode( tribe( Gateway::class )->generate_unique_tracking_id() ),
|
37 |
+
'return_url' => tribe( On_Boarding_Endpoint::class )->get_return_url(),
|
38 |
+
];
|
39 |
+
|
40 |
+
$connection_url = $this->get( 'connect', $query_args );
|
41 |
+
|
42 |
+
wp_safe_redirect( $connection_url );
|
43 |
+
exit();
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* De-authorize the current seller account in Stripe oAuth.
|
48 |
+
*
|
49 |
+
* @since 5.3.0
|
50 |
+
*
|
51 |
+
* @return string
|
52 |
+
*/
|
53 |
+
public function disconnect_account() {
|
54 |
+
$account_id = tribe( Merchant::class )->get_account_id();
|
55 |
+
|
56 |
+
$return_url = tribe( On_Boarding_Endpoint::class )->get_return_url();
|
57 |
+
$query_args = [
|
58 |
+
'stripe_user_id' => $account_id,
|
59 |
+
'return_url' => esc_url( $return_url ),
|
60 |
+
];
|
61 |
+
|
62 |
+
return $this->get( 'disconnect', $query_args );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Register a newly connected stripe account to the website.
|
67 |
+
*
|
68 |
+
* @since 5.3.0
|
69 |
+
*
|
70 |
+
* @param array $account_data array of data returned from stripe after a successful connection.
|
71 |
+
*/
|
72 |
+
public function onboard_account( $account_data ) {
|
73 |
+
|
74 |
+
$query_args = [
|
75 |
+
'grant_type' => 'authorization_code',
|
76 |
+
'code' => $account_data['code'],
|
77 |
+
];
|
78 |
+
|
79 |
+
return $this->get( 'token', $query_args );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Requests WhoDat to refresh the oAuth tokens.
|
84 |
+
*
|
85 |
+
* @since 5.3.0
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public function refresh_token() {
|
90 |
+
$refresh_token = tribe( Gateway::class )->get_current_refresh_token();
|
91 |
+
|
92 |
+
$query_args = [
|
93 |
+
'grant_type' => 'refresh_token',
|
94 |
+
'refresh_token' => $refresh_token,
|
95 |
+
];
|
96 |
+
|
97 |
+
return $this->get( 'token', $query_args );
|
98 |
+
}
|
99 |
+
}
|
src/Tickets/Commerce/Hooks.php
CHANGED
@@ -22,6 +22,7 @@ use TEC\Tickets\Commerce as Base_Commerce;
|
|
22 |
use TEC\Tickets\Commerce\Reports\Orders;
|
23 |
use TEC\Tickets\Commerce\Status\Completed;
|
24 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
|
|
25 |
use WP_Admin_Bar;
|
26 |
|
27 |
/**
|
@@ -123,6 +124,21 @@ class Hooks extends tad_DI52_ServiceProvider {
|
|
123 |
add_filter( 'tribe_template_context:tickets-plus/v2/tickets/submit/button-modal', [ $this, 'filter_showing_cart_button' ] );
|
124 |
|
125 |
add_filter( 'tec_tickets_commerce_payments_tab_settings', [ $this, 'filter_payments_tab_settings' ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
|
128 |
/**
|
22 |
use TEC\Tickets\Commerce\Reports\Orders;
|
23 |
use TEC\Tickets\Commerce\Status\Completed;
|
24 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
25 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
26 |
use WP_Admin_Bar;
|
27 |
|
28 |
/**
|
124 |
add_filter( 'tribe_template_context:tickets-plus/v2/tickets/submit/button-modal', [ $this, 'filter_showing_cart_button' ] );
|
125 |
|
126 |
add_filter( 'tec_tickets_commerce_payments_tab_settings', [ $this, 'filter_payments_tab_settings' ] );
|
127 |
+
|
128 |
+
add_filter( 'wp_redirect', [ $this, 'filter_redirect_url' ] );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Filters the redirect URL to determine whether or not section key needs to be added.
|
133 |
+
*
|
134 |
+
* @since 5.3.0
|
135 |
+
*
|
136 |
+
* @param string $url Redirect URL.
|
137 |
+
*
|
138 |
+
* @return string
|
139 |
+
*/
|
140 |
+
public function filter_redirect_url( $url ) {
|
141 |
+
return $this->container->make( Payments_Tab::class )->filter_redirect_url( $url );
|
142 |
}
|
143 |
|
144 |
/**
|
src/Tickets/Commerce/Module.php
CHANGED
@@ -11,7 +11,7 @@ use Tribe__Utils__Array as Arr;
|
|
11 |
*
|
12 |
* @since 5.1.9
|
13 |
*
|
14 |
-
* @package TEC\Tickets\Commerce
|
15 |
*/
|
16 |
class Module extends \Tribe__Tickets__Tickets {
|
17 |
|
11 |
*
|
12 |
* @since 5.1.9
|
13 |
*
|
14 |
+
* @package TEC\Tickets\Commerce
|
15 |
*/
|
16 |
class Module extends \Tribe__Tickets__Tickets {
|
17 |
|
src/Tickets/Commerce/Order.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce;
|
4 |
|
5 |
-
use TEC\Tickets\Commerce\Gateways\
|
6 |
use TEC\Tickets\Commerce\Utils\Value;
|
7 |
use Tribe__Date_Utils as Dates;
|
8 |
|
@@ -298,6 +298,34 @@ class Order extends Abstract_Order {
|
|
298 |
return (bool) $updated;
|
299 |
}
|
300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
/**
|
302 |
* Creates a order from the items in the cart.
|
303 |
*
|
@@ -307,7 +335,7 @@ class Order extends Abstract_Order {
|
|
307 |
*
|
308 |
* @return false|\WP_Post
|
309 |
*/
|
310 |
-
public function create_from_cart(
|
311 |
$cart = tribe( Cart::class );
|
312 |
|
313 |
$items = $cart->get_items_in_cart();
|
@@ -330,29 +358,19 @@ class Order extends Abstract_Order {
|
|
330 |
$total = $this->get_value_total( array_filter( $items ) );
|
331 |
|
332 |
$order_args = [
|
333 |
-
'title'
|
334 |
-
'total_value'
|
335 |
-
'items'
|
336 |
-
'gateway'
|
337 |
-
'hash'
|
338 |
-
'currency'
|
|
|
|
|
|
|
|
|
|
|
339 |
];
|
340 |
|
341 |
-
// When purchaser data-set is not passed we pull from the current user.
|
342 |
-
if ( empty( $purchaser ) && is_user_logged_in() && $user = wp_get_current_user() ) {
|
343 |
-
$order_args['purchaser_user_id'] = $user->ID;
|
344 |
-
$order_args['purchaser_full_name'] = $user->first_name . ' ' . $user->last_name;
|
345 |
-
$order_args['purchaser_first_name'] = $user->first_name;
|
346 |
-
$order_args['purchaser_last_name'] = $user->last_name;
|
347 |
-
$order_args['purchaser_email'] = $user->user_email;
|
348 |
-
} elseif ( empty( $purchaser ) ) {
|
349 |
-
$order_args['purchaser_user_id'] = 0;
|
350 |
-
$order_args['purchaser_full_name'] = static::$placeholder_name;
|
351 |
-
$order_args['purchaser_first_name'] = static::$placeholder_name;
|
352 |
-
$order_args['purchaser_last_name'] = static::$placeholder_name;
|
353 |
-
$order_args['purchaser_email'] = '';
|
354 |
-
}
|
355 |
-
|
356 |
$order = $this->create( $gateway, $order_args );
|
357 |
|
358 |
// We were unable to create the order bail from here.
|
@@ -368,14 +386,14 @@ class Order extends Abstract_Order {
|
|
368 |
*
|
369 |
* @since 5.2.0
|
370 |
*
|
371 |
-
* @
|
372 |
-
*
|
373 |
-
* @param Interface_Gateway $gateway
|
374 |
* @param array $args
|
375 |
*
|
|
|
|
|
376 |
* @return false|\WP_Post
|
377 |
*/
|
378 |
-
public function create(
|
379 |
$gateway_key = $gateway::get_key();
|
380 |
|
381 |
/**
|
@@ -384,7 +402,7 @@ class Order extends Abstract_Order {
|
|
384 |
* @since 5.2.0
|
385 |
*
|
386 |
* @param array $args
|
387 |
-
* @param
|
388 |
*/
|
389 |
$args = apply_filters( "tec_tickets_commerce_order_{$gateway_key}_create_args", $args, $gateway );
|
390 |
|
@@ -394,7 +412,7 @@ class Order extends Abstract_Order {
|
|
394 |
* @since 5.2.0
|
395 |
*
|
396 |
* @param array $args
|
397 |
-
* @param
|
398 |
*/
|
399 |
$args = apply_filters( 'tec_tickets_commerce_order_create_args', $args, $gateway );
|
400 |
|
@@ -526,4 +544,20 @@ class Order extends Abstract_Order {
|
|
526 |
|
527 |
return static::POSTTYPE === $order->post_type;
|
528 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Gateway_Interface;
|
6 |
use TEC\Tickets\Commerce\Utils\Value;
|
7 |
use Tribe__Date_Utils as Dates;
|
8 |
|
298 |
return (bool) $updated;
|
299 |
}
|
300 |
|
301 |
+
/**
|
302 |
+
* Prepares an array of cart items ready to go into an Order.
|
303 |
+
*
|
304 |
+
* @since 5.3.0
|
305 |
+
*
|
306 |
+
* @param Cart $cart The cart instance to get items from.
|
307 |
+
*
|
308 |
+
* @return array
|
309 |
+
*/
|
310 |
+
public function prepare_cart_items_for_order( Cart $cart ) {
|
311 |
+
return array_map(
|
312 |
+
static function ( $item ) {
|
313 |
+
/** @var Value $ticket_value */
|
314 |
+
$ticket_value = tribe( Ticket::class )->get_price_value( $item['ticket_id'] );
|
315 |
+
|
316 |
+
if ( null === $ticket_value ) {
|
317 |
+
return null;
|
318 |
+
}
|
319 |
+
|
320 |
+
$item['price'] = (string) $ticket_value->get_decimal();
|
321 |
+
$item['sub_total'] = (string) $ticket_value->sub_total( $item['quantity'] )->get_decimal();
|
322 |
+
|
323 |
+
return $item;
|
324 |
+
},
|
325 |
+
$cart->get_items_in_cart()
|
326 |
+
);
|
327 |
+
}
|
328 |
+
|
329 |
/**
|
330 |
* Creates a order from the items in the cart.
|
331 |
*
|
335 |
*
|
336 |
* @return false|\WP_Post
|
337 |
*/
|
338 |
+
public function create_from_cart( Gateway_Interface $gateway, $purchaser = null ) {
|
339 |
$cart = tribe( Cart::class );
|
340 |
|
341 |
$items = $cart->get_items_in_cart();
|
358 |
$total = $this->get_value_total( array_filter( $items ) );
|
359 |
|
360 |
$order_args = [
|
361 |
+
'title' => $this->generate_order_title( $items, $cart->get_cart_hash() ),
|
362 |
+
'total_value' => $total->get_decimal(),
|
363 |
+
'items' => $items,
|
364 |
+
'gateway' => $gateway::get_key(),
|
365 |
+
'hash' => $cart->get_cart_hash(),
|
366 |
+
'currency' => Utils\Currency::get_currency_code(),
|
367 |
+
'purchaser_user_id' => $purchaser['purchaser_user_id'],
|
368 |
+
'purchaser_full_name' => $purchaser['purchaser_full_name'],
|
369 |
+
'purchaser_first_name' => $purchaser['purchaser_first_name'],
|
370 |
+
'purchaser_last_name' => $purchaser['purchaser_last_name'],
|
371 |
+
'purchaser_email' => $purchaser['purchaser_email'],
|
372 |
];
|
373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
$order = $this->create( $gateway, $order_args );
|
375 |
|
376 |
// We were unable to create the order bail from here.
|
386 |
*
|
387 |
* @since 5.2.0
|
388 |
*
|
389 |
+
* @param Gateway_Interface $gateway
|
|
|
|
|
390 |
* @param array $args
|
391 |
*
|
392 |
+
* @throws \Tribe__Repository__Usage_Error
|
393 |
+
*
|
394 |
* @return false|\WP_Post
|
395 |
*/
|
396 |
+
public function create( Gateway_Interface $gateway, $args ) {
|
397 |
$gateway_key = $gateway::get_key();
|
398 |
|
399 |
/**
|
402 |
* @since 5.2.0
|
403 |
*
|
404 |
* @param array $args
|
405 |
+
* @param Gateway_Interface $gateway
|
406 |
*/
|
407 |
$args = apply_filters( "tec_tickets_commerce_order_{$gateway_key}_create_args", $args, $gateway );
|
408 |
|
412 |
* @since 5.2.0
|
413 |
*
|
414 |
* @param array $args
|
415 |
+
* @param Gateway_Interface $gateway
|
416 |
*/
|
417 |
$args = apply_filters( 'tec_tickets_commerce_order_create_args', $args, $gateway );
|
418 |
|
544 |
|
545 |
return static::POSTTYPE === $order->post_type;
|
546 |
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Get the order associated with a given gateway order id.
|
550 |
+
*
|
551 |
+
* @since 5.3.0
|
552 |
+
*
|
553 |
+
* @param string $gateway_order_id The gateway order id.
|
554 |
+
*
|
555 |
+
* @return mixed|\WP_Post|null
|
556 |
+
*/
|
557 |
+
public function get_from_gateway_order_id( string $gateway_order_id ) {
|
558 |
+
return tec_tc_orders()->by_args( [
|
559 |
+
'status' => 'any',
|
560 |
+
'gateway_order_id' => $gateway_order_id,
|
561 |
+
] )->first();
|
562 |
+
}
|
563 |
}
|
src/Tickets/Commerce/Payments_Tab.php
CHANGED
@@ -4,13 +4,18 @@ namespace TEC\Tickets\Commerce;
|
|
4 |
|
5 |
use TEC\Tickets\Commerce\Shortcodes\Checkout_Shortcode;
|
6 |
use TEC\Tickets\Commerce\Shortcodes\Success_Shortcode;
|
|
|
|
|
7 |
use TEC\Tickets\Settings as Tickets_Settings;
|
|
|
8 |
use \tad_DI52_ServiceProvider;
|
|
|
|
|
9 |
|
10 |
/**
|
11 |
* Class Payments_Tab
|
12 |
*
|
13 |
-
* @since
|
14 |
*
|
15 |
* @package TEC\Tickets\Commerce
|
16 |
*/
|
@@ -34,6 +39,52 @@ class Payments_Tab extends tad_DI52_ServiceProvider {
|
|
34 |
*/
|
35 |
public static $option_page_created_meta_key = 'tec_tc_payments_page_created';
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
/**
|
38 |
* @inheritdoc
|
39 |
*/
|
@@ -49,7 +100,7 @@ class Payments_Tab extends tad_DI52_ServiceProvider {
|
|
49 |
public function register_tab() {
|
50 |
$tab_settings = [
|
51 |
'priority' => 25,
|
52 |
-
'fields' => $this->
|
53 |
'show_save' => true,
|
54 |
];
|
55 |
|
@@ -58,65 +109,292 @@ class Payments_Tab extends tad_DI52_ServiceProvider {
|
|
58 |
new \Tribe__Settings_Tab( static::$slug, esc_html__( 'Payments', 'event-tickets' ), $tab_settings );
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
/**
|
63 |
-
*
|
64 |
*
|
65 |
-
* @since
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
*
|
67 |
* @return array[]
|
68 |
*/
|
69 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
'<a href="https://evnt.is/19zl" target="_blank" rel="noopener noreferrer">%s</a>',
|
73 |
esc_html__( 'Event Tickets Plus', 'event-tickets' )
|
74 |
);
|
75 |
-
|
76 |
-
'<a href="https://evnt.is/19zl" target="_blank" rel="noopener noreferrer">%s</a>',
|
77 |
-
esc_html__( 'Check it out!', 'event-tickets' )
|
78 |
-
);
|
79 |
$plus_message = sprintf(
|
80 |
-
// Translators: %1$s: The Event Tickets Plus link
|
81 |
-
esc_html_x( 'Tickets Commerce
|
82 |
-
$plus_link
|
83 |
-
esc_html( tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_about_tribe_commerce' ) ),
|
84 |
-
$plus_link_2
|
85 |
);
|
86 |
|
87 |
$is_tickets_commerce_enabled = tec_tickets_commerce_is_enabled();
|
88 |
|
89 |
-
$
|
90 |
-
'
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
class="tec-tickets__admin-settings-tickets-commerce-toggle-checkbox tribe-dependency tribe-dependency-verified">
|
104 |
-
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-switch"></span>
|
105 |
-
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-label">' . esc_html__( 'Enable Tickets Commerce', 'event-tickets' ) . '</span>
|
106 |
-
</label>
|
107 |
-
</div>',
|
108 |
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
'type' => 'html',
|
112 |
-
'html' => '<div class="
|
113 |
-
],
|
114 |
-
Tickets_Settings::$tickets_commerce_enabled => [
|
115 |
-
'type' => 'hidden',
|
116 |
-
'validation_type' => 'boolean',
|
117 |
],
|
118 |
];
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* Hook to modify the top level settings for Tickets Commerce.
|
122 |
*
|
@@ -124,7 +402,7 @@ class Payments_Tab extends tad_DI52_ServiceProvider {
|
|
124 |
*
|
125 |
* @param array[] $top_level_settings Top level settings.
|
126 |
*/
|
127 |
-
return apply_filters( 'tec_tickets_commerce_settings_top_level', $
|
128 |
}
|
129 |
|
130 |
/**
|
@@ -207,8 +485,8 @@ class Payments_Tab extends tad_DI52_ServiceProvider {
|
|
207 |
*
|
208 |
* @since 5.2.1
|
209 |
*
|
210 |
-
* @param string $page_slug
|
211 |
-
* @param string $page_name
|
212 |
* @param string $shortcode_name Shortcode name that needs to be inserted in page content.
|
213 |
*
|
214 |
* @return int|bool|\WP_Error
|
@@ -257,4 +535,4 @@ class Payments_Tab extends tad_DI52_ServiceProvider {
|
|
257 |
|
258 |
return (bool) $query->post_count;
|
259 |
}
|
260 |
-
}
|
4 |
|
5 |
use TEC\Tickets\Commerce\Shortcodes\Checkout_Shortcode;
|
6 |
use TEC\Tickets\Commerce\Shortcodes\Success_Shortcode;
|
7 |
+
use TEC\Tickets\Commerce\Gateways\Manager;
|
8 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway as Gateway;
|
9 |
use TEC\Tickets\Settings as Tickets_Settings;
|
10 |
+
use \Tribe__Settings;
|
11 |
use \tad_DI52_ServiceProvider;
|
12 |
+
use \Tribe__Template;
|
13 |
+
use Tribe__Tickets__Main;
|
14 |
|
15 |
/**
|
16 |
* Class Payments_Tab
|
17 |
*
|
18 |
+
* @since 5.2.0
|
19 |
*
|
20 |
* @package TEC\Tickets\Commerce
|
21 |
*/
|
39 |
*/
|
40 |
public static $option_page_created_meta_key = 'tec_tc_payments_page_created';
|
41 |
|
42 |
+
/**
|
43 |
+
* Meta key for page creation flag.
|
44 |
+
*
|
45 |
+
* @since 5.3.0
|
46 |
+
*
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
public static $option_gateway_enabled_prefix = 'tec_tc_payments_gateway_enabled_';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Key to determine current section.
|
53 |
+
*
|
54 |
+
* @since 5.3.0
|
55 |
+
*
|
56 |
+
* @var string
|
57 |
+
*/
|
58 |
+
public static $key_current_section = 'tec_tc_payments_current_section';
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Key to use in GET variable for currently selected section.
|
62 |
+
*
|
63 |
+
* @since 5.3.0
|
64 |
+
*
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
public static $key_current_section_get_var = 'tc-section';
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Key to use for section menu.
|
71 |
+
*
|
72 |
+
* @since 5.3.0
|
73 |
+
*
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
public static $key_section_menu = 'tec_tc_section_menu';
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Stores the instance of the template engine that we will use for rendering differentelements.
|
80 |
+
*
|
81 |
+
* @since 5.3.0
|
82 |
+
*
|
83 |
+
* @var Tribe__Template
|
84 |
+
*/
|
85 |
+
protected $template;
|
86 |
+
|
87 |
+
|
88 |
/**
|
89 |
* @inheritdoc
|
90 |
*/
|
100 |
public function register_tab() {
|
101 |
$tab_settings = [
|
102 |
'priority' => 25,
|
103 |
+
'fields' => $this->get_fields(),
|
104 |
'show_save' => true,
|
105 |
];
|
106 |
|
109 |
new \Tribe__Settings_Tab( static::$slug, esc_html__( 'Payments', 'event-tickets' ), $tab_settings );
|
110 |
}
|
111 |
|
112 |
+
/**
|
113 |
+
* Gets the template instance used to setup the rendering html.
|
114 |
+
*
|
115 |
+
* @since 5.3.0
|
116 |
+
*
|
117 |
+
* @return Tribe__Template
|
118 |
+
*/
|
119 |
+
public function get_template() {
|
120 |
+
if ( empty( $this->template ) ) {
|
121 |
+
$this->template = new Tribe__Template();
|
122 |
+
$this->template->set_template_origin( Tribe__Tickets__Main::instance() );
|
123 |
+
$this->template->set_template_folder( 'src/admin-views/settings' );
|
124 |
+
$this->template->set_template_context_extract( true );
|
125 |
+
}
|
126 |
+
|
127 |
+
return $this->template;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Gets the URL for the Payment Tab.
|
132 |
+
*
|
133 |
+
* @since 5.3.0
|
134 |
+
*
|
135 |
+
* @param array $args Which query args we are adding.
|
136 |
+
*
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
+
public function get_url( array $args = [] ): string {
|
140 |
+
// Force the payment tab.
|
141 |
+
$args['tab'] = static::$slug;
|
142 |
+
|
143 |
+
// Use the settings page get_url to build the URL.
|
144 |
+
return Tribe__Settings::instance()->get_url( $args );
|
145 |
+
}
|
146 |
|
147 |
/**
|
148 |
+
* Returns the settings item for the section menu at the top of the Payments settings tab.
|
149 |
*
|
150 |
+
* @since 5.3.0
|
151 |
+
*
|
152 |
+
* @return array[]
|
153 |
+
*/
|
154 |
+
public function get_section_menu(): array {
|
155 |
+
$template_vars = [
|
156 |
+
'sections' => $this->get_sections(),
|
157 |
+
'selected_section' => tribe_get_request_var( static::$key_current_section_get_var, '' ),
|
158 |
+
];
|
159 |
+
|
160 |
+
return [
|
161 |
+
static::$key_section_menu => [
|
162 |
+
'type' => 'html',
|
163 |
+
'html' => $this->get_template()->template( 'section/menu', $template_vars, false ),
|
164 |
+
],
|
165 |
+
];
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Gets an array of all the sections, based on the active Gateways.
|
170 |
+
*
|
171 |
+
* @since 5.3.0
|
172 |
*
|
173 |
* @return array[]
|
174 |
*/
|
175 |
+
public function get_sections(): array {
|
176 |
+
$sections = [
|
177 |
+
[
|
178 |
+
'slug' => '',
|
179 |
+
'classes' => [],
|
180 |
+
'url' => $this->get_url(),
|
181 |
+
'text' => __( 'Tickets Commerce', 'event-tickets' ),
|
182 |
+
],
|
183 |
+
];
|
184 |
|
185 |
+
$gateways = tribe( Manager::class )->get_gateways();
|
186 |
+
$gateways = array_filter( $gateways, static function ( $gateway ) {
|
187 |
+
return $gateway::should_show();
|
188 |
+
} );
|
189 |
+
|
190 |
+
foreach ( $gateways as $gateway_key => $gateway ) {
|
191 |
+
$sections[] = [
|
192 |
+
'classes' => [],
|
193 |
+
'slug' => $gateway_key,
|
194 |
+
'url' => $gateway::get_settings_url(),
|
195 |
+
'text' => $gateway::get_label(),
|
196 |
+
];
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Filters the sections available on the Payment Tab.
|
201 |
+
*
|
202 |
+
* @since 5.3.0
|
203 |
+
*
|
204 |
+
* @param array[] $sections Current sections.
|
205 |
+
*/
|
206 |
+
return (array) apply_filters( 'tec_tickets_commerce_payments_tab_sections', $sections );
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Filters the redirect URL to include section, if applicable.
|
211 |
+
*
|
212 |
+
* @since 5.3.0
|
213 |
+
*
|
214 |
+
* @param string $url URL of redirection.
|
215 |
+
*
|
216 |
+
* @return string
|
217 |
+
*/
|
218 |
+
public function filter_redirect_url( $url ) {
|
219 |
+
if ( ! is_admin() ) {
|
220 |
+
return $url;
|
221 |
+
}
|
222 |
+
|
223 |
+
$tab = tribe_get_request_var( 'tab' );
|
224 |
+
$page = tribe_get_request_var( 'page' );
|
225 |
+
|
226 |
+
if ( empty( $tab ) || empty( $page ) ) {
|
227 |
+
return $url;
|
228 |
+
}
|
229 |
+
|
230 |
+
if ( empty( $_SERVER['REQUEST_METHOD'] ) || 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
231 |
+
return $url;
|
232 |
+
}
|
233 |
+
|
234 |
+
if ( Tribe__Settings::$parent_slug !== $page ) {
|
235 |
+
return $url;
|
236 |
+
}
|
237 |
+
|
238 |
+
if ( static::$slug !== $tab ) {
|
239 |
+
return $url;
|
240 |
+
}
|
241 |
+
|
242 |
+
$section = tribe_get_request_var( static::$key_current_section );
|
243 |
+
if ( empty( $section ) ) {
|
244 |
+
$section = tribe_get_request_var( static::$key_current_section_get_var );
|
245 |
+
}
|
246 |
+
|
247 |
+
// In the main section we don't need to do anything.
|
248 |
+
if ( empty( $section ) || 'main' === $section ) {
|
249 |
+
return $url;
|
250 |
+
}
|
251 |
+
|
252 |
+
return add_query_arg( static::$key_current_section_get_var, esc_attr( $section ), $url );
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Returns the settings item for the section menu at the top of the Payments settings tab.
|
257 |
+
*
|
258 |
+
* @since 5.3.0
|
259 |
+
*
|
260 |
+
* @return Gateway|null
|
261 |
+
*/
|
262 |
+
public function get_section_gateway() {
|
263 |
+
$selected_section = tribe_get_request_var( static::$key_current_section_get_var );
|
264 |
+
|
265 |
+
return tribe( Manager::class )->get_gateway_by_key( $selected_section );
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Gets the fields for the Tickets Commerce top level fields.
|
270 |
+
*
|
271 |
+
* @since 5.3.0
|
272 |
+
*
|
273 |
+
* @return array[]
|
274 |
+
*/
|
275 |
+
public function get_tickets_commerce_section_fields() {
|
276 |
+
$fields = [];
|
277 |
+
|
278 |
+
// If no gateway section is selected, show main settings.
|
279 |
+
$plus_link = sprintf(
|
280 |
'<a href="https://evnt.is/19zl" target="_blank" rel="noopener noreferrer">%s</a>',
|
281 |
esc_html__( 'Event Tickets Plus', 'event-tickets' )
|
282 |
);
|
283 |
+
|
|
|
|
|
|
|
284 |
$plus_message = sprintf(
|
285 |
+
// Translators: %1$s: The Event Tickets Plus link.
|
286 |
+
esc_html_x( 'Tickets Commerce provides a simple and flexible ecommerce checkout for purchasing tickets. Just choose your payment gateway and configure checkout options and you\'re all set. If you need more advanced features like custom attendee information, QR code check in, and stock sharing between tickets, take a look at %1$s for these features and more.', 'about Tickets Commerce', 'event-tickets' ),
|
287 |
+
$plus_link
|
|
|
|
|
288 |
);
|
289 |
|
290 |
$is_tickets_commerce_enabled = tec_tickets_commerce_is_enabled();
|
291 |
|
292 |
+
$fields['tickets-commerce-header'] = [
|
293 |
+
'type' => 'html',
|
294 |
+
'html' => '<div class="tec-tickets__admin-settings-tickets-commerce-toggle-wrapper">
|
295 |
+
<label class="tec-tickets__admin-settings-tickets-commerce-toggle">
|
296 |
+
<input
|
297 |
+
type="checkbox"
|
298 |
+
name="' . Tickets_Settings::$tickets_commerce_enabled . '"
|
299 |
+
' . checked( $is_tickets_commerce_enabled, true, false ) . '
|
300 |
+
id="tickets-commerce-enable-input"
|
301 |
+
class="tec-tickets__admin-settings-tickets-commerce-toggle-checkbox tribe-dependency tribe-dependency-verified">
|
302 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-switch"></span>
|
303 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-label">' . esc_html__( 'Enable Tickets Commerce', 'event-tickets' ) . '</span>
|
304 |
+
</label>
|
305 |
+
</div>',
|
|
|
|
|
|
|
|
|
|
|
306 |
|
307 |
+
];
|
308 |
+
|
309 |
+
$fields['tickets-commerce-description'] = [
|
310 |
+
'type' => 'html',
|
311 |
+
'html' => '<div class="tec-tickets__admin-settings-tickets-commerce-description">' . $plus_message . '</div>',
|
312 |
+
];
|
313 |
+
|
314 |
+
$fields[ Tickets_Settings::$tickets_commerce_enabled ] = [
|
315 |
+
'type' => 'hidden',
|
316 |
+
'validation_type' => 'boolean',
|
317 |
+
];
|
318 |
+
|
319 |
+
return $fields;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Get selected section top level menu.
|
324 |
+
*
|
325 |
+
* @since 5.3.0
|
326 |
+
*
|
327 |
+
* @param Gateway $section_gateway Gateway class.
|
328 |
+
*
|
329 |
+
* @return array[]
|
330 |
+
*/
|
331 |
+
public function get_gateway_section_fields( $section_gateway ): array {
|
332 |
+
$fields = [];
|
333 |
+
|
334 |
+
// Show the switch to enable/disable gateway at the top.
|
335 |
+
$option_key = $section_gateway::get_enabled_option_key();
|
336 |
+
$enable_label = sprintf(
|
337 |
+
// Translators: %s: Name of payment gateway.
|
338 |
+
esc_html__( 'Enable %s', 'event-tickets' ),
|
339 |
+
$section_gateway::get_label()
|
340 |
+
);
|
341 |
+
|
342 |
+
$attributes = tribe_get_attributes( [
|
343 |
+
'type' => 'checkbox',
|
344 |
+
'name' => $option_key,
|
345 |
+
'id' => 'tickets-commerce-enable-input',
|
346 |
+
'class' => 'tec-tickets__admin-settings-tickets-commerce-toggle-checkbox tribe-dependency tribe-dependency-verified',
|
347 |
+
'disabled' => ! $section_gateway::is_connected(),
|
348 |
+
'checked' => $section_gateway::is_enabled(),
|
349 |
+
] );
|
350 |
+
|
351 |
+
/**
|
352 |
+
* @todo this needs to move into a template
|
353 |
+
*/
|
354 |
+
$fields['tickets-commerce-header'] = [
|
355 |
+
'type' => 'html',
|
356 |
+
'html' => '<div class="tec-tickets__admin-settings-tickets-commerce-toggle-wrapper">
|
357 |
+
<label class="tec-tickets__admin-settings-tickets-commerce-toggle">
|
358 |
+
<input ' . implode( ' ', $attributes ) . ' />
|
359 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-switch"></span>
|
360 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-label">' . $enable_label . '</span>
|
361 |
+
</label>
|
362 |
+
</div>',
|
363 |
+
|
364 |
+
];
|
365 |
+
|
366 |
+
$fields[ $option_key ] = [
|
367 |
+
'type' => 'hidden',
|
368 |
+
'validation_type' => 'boolean',
|
369 |
+
];
|
370 |
+
|
371 |
+
return $fields;
|
372 |
+
}
|
373 |
+
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Gets the top level settings for Tickets Commerce.
|
377 |
+
*
|
378 |
+
* @since 5.3.0
|
379 |
+
*
|
380 |
+
* @return array[]
|
381 |
+
*/
|
382 |
+
public function get_fields(): array {
|
383 |
+
$section_gateway = $this->get_section_gateway();
|
384 |
+
|
385 |
+
$fields = [
|
386 |
+
'tribe-form-content-start' => [
|
387 |
'type' => 'html',
|
388 |
+
'html' => '<div class="tribe-settings-form-wrap">',
|
|
|
|
|
|
|
|
|
389 |
],
|
390 |
];
|
391 |
|
392 |
+
if ( empty( $section_gateway ) ) {
|
393 |
+
$fields = array_merge( $fields, $this->get_tickets_commerce_section_fields() );
|
394 |
+
} else {
|
395 |
+
$fields = array_merge( $fields, $this->get_gateway_section_fields( $section_gateway ) );
|
396 |
+
}
|
397 |
+
|
398 |
/**
|
399 |
* Hook to modify the top level settings for Tickets Commerce.
|
400 |
*
|
402 |
*
|
403 |
* @param array[] $top_level_settings Top level settings.
|
404 |
*/
|
405 |
+
return apply_filters( 'tec_tickets_commerce_settings_top_level', array_merge( $this->get_section_menu(), $fields ) );
|
406 |
}
|
407 |
|
408 |
/**
|
485 |
*
|
486 |
* @since 5.2.1
|
487 |
*
|
488 |
+
* @param string $page_slug URL slug of the page.
|
489 |
+
* @param string $page_name Name for page title.
|
490 |
* @param string $shortcode_name Shortcode name that needs to be inserted in page content.
|
491 |
*
|
492 |
* @return int|bool|\WP_Error
|
535 |
|
536 |
return (bool) $query->post_count;
|
537 |
}
|
538 |
+
}
|
src/Tickets/Commerce/Provider.php
CHANGED
@@ -76,6 +76,7 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
76 |
$this->container->singleton( Compatibility\Events::class );
|
77 |
|
78 |
// Load any external SPs we might need.
|
|
|
79 |
$this->container->register( Gateways\PayPal\Provider::class );
|
80 |
$this->container->register( Gateways\Manual\Provider::class );
|
81 |
|
76 |
$this->container->singleton( Compatibility\Events::class );
|
77 |
|
78 |
// Load any external SPs we might need.
|
79 |
+
$this->container->register( Gateways\Stripe\Provider::class );
|
80 |
$this->container->register( Gateways\PayPal\Provider::class );
|
81 |
$this->container->register( Gateways\Manual\Provider::class );
|
82 |
|
src/Tickets/Commerce/Settings.php
CHANGED
@@ -8,17 +8,20 @@
|
|
8 |
|
9 |
namespace TEC\Tickets\Commerce;
|
10 |
|
|
|
11 |
use TEC\Tickets\Commerce\Gateways\Abstract_Gateway;
|
12 |
use TEC\Tickets\Commerce\Gateways\Manager;
|
13 |
use TEC\Tickets\Commerce\Status\Completed;
|
14 |
use TEC\Tickets\Commerce\Status\Pending;
|
15 |
use TEC\Tickets\Commerce\Traits\Has_Mode;
|
16 |
use TEC\Tickets\Settings as Tickets_Settings;
|
|
|
17 |
use Tribe__Field_Conditional;
|
|
|
18 |
use WP_Admin_Bar;
|
19 |
|
20 |
/**
|
21 |
-
* The Tickets Commerce settings.
|
22 |
*
|
23 |
* This class will contain all of the settings handling and admin settings config implementation from
|
24 |
* Tribe__Tickets__Commerce__PayPal__Main that is gateway-agnostic.
|
@@ -26,7 +29,8 @@ use WP_Admin_Bar;
|
|
26 |
* @since 5.1.6
|
27 |
* @package Tribe\Tickets\Commerce\Tickets_Commerce
|
28 |
*/
|
29 |
-
class Settings
|
|
|
30 |
use Has_Mode;
|
31 |
|
32 |
/**
|
@@ -101,6 +105,15 @@ class Settings extends Abstract_Settings {
|
|
101 |
*/
|
102 |
public static $option_confirmation_email_subject = 'tickets-commerce-confirmation-email-subject';
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
/**
|
105 |
* Settings constructor.
|
106 |
*
|
@@ -111,6 +124,36 @@ class Settings extends Abstract_Settings {
|
|
111 |
$this->set_mode( tec_tickets_commerce_is_sandbox_mode() ? 'sandbox' : 'live' );
|
112 |
}
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
/**
|
115 |
* Display admin bar when using the Test Mode for payments.
|
116 |
*
|
@@ -156,7 +199,11 @@ class Settings extends Abstract_Settings {
|
|
156 |
* @return array The list of settings for Tickets Commerce.
|
157 |
*/
|
158 |
public function get_settings() {
|
159 |
-
|
|
|
|
|
|
|
|
|
160 |
|
161 |
// @todo Replace this with a better and more performant REST API based solution.
|
162 |
$page_args = [
|
@@ -316,7 +363,36 @@ class Settings extends Abstract_Settings {
|
|
316 |
],
|
317 |
];
|
318 |
|
319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
|
321 |
/**
|
322 |
* Allow filtering the list of Tickets Commerce settings.
|
@@ -327,8 +403,23 @@ class Settings extends Abstract_Settings {
|
|
327 |
*/
|
328 |
$settings = apply_filters( 'tribe_tickets_commerce_settings', $settings );
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
-
return
|
332 |
}
|
333 |
|
334 |
/**
|
@@ -383,4 +474,21 @@ class Settings extends Abstract_Settings {
|
|
383 |
return $meta_value;
|
384 |
}
|
385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
}
|
8 |
|
9 |
namespace TEC\Tickets\Commerce;
|
10 |
|
11 |
+
use TEC\Tickets\Commerce\Admin\Featured_Settings;
|
12 |
use TEC\Tickets\Commerce\Gateways\Abstract_Gateway;
|
13 |
use TEC\Tickets\Commerce\Gateways\Manager;
|
14 |
use TEC\Tickets\Commerce\Status\Completed;
|
15 |
use TEC\Tickets\Commerce\Status\Pending;
|
16 |
use TEC\Tickets\Commerce\Traits\Has_Mode;
|
17 |
use TEC\Tickets\Settings as Tickets_Settings;
|
18 |
+
use \Tribe__Template;
|
19 |
use Tribe__Field_Conditional;
|
20 |
+
use Tribe__Tickets__Main;
|
21 |
use WP_Admin_Bar;
|
22 |
|
23 |
/**
|
24 |
+
* The Tickets Commerce Global settings.
|
25 |
*
|
26 |
* This class will contain all of the settings handling and admin settings config implementation from
|
27 |
* Tribe__Tickets__Commerce__PayPal__Main that is gateway-agnostic.
|
29 |
* @since 5.1.6
|
30 |
* @package Tribe\Tickets\Commerce\Tickets_Commerce
|
31 |
*/
|
32 |
+
class Settings {
|
33 |
+
|
34 |
use Has_Mode;
|
35 |
|
36 |
/**
|
105 |
*/
|
106 |
public static $option_confirmation_email_subject = 'tickets-commerce-confirmation-email-subject';
|
107 |
|
108 |
+
/**
|
109 |
+
* Stores the instance of the template engine that we will use for rendering differentelements.
|
110 |
+
*
|
111 |
+
* @since 5.3.0
|
112 |
+
*
|
113 |
+
* @var Tribe__Template
|
114 |
+
*/
|
115 |
+
protected $template;
|
116 |
+
|
117 |
/**
|
118 |
* Settings constructor.
|
119 |
*
|
124 |
$this->set_mode( tec_tickets_commerce_is_sandbox_mode() ? 'sandbox' : 'live' );
|
125 |
}
|
126 |
|
127 |
+
/**
|
128 |
+
* Gets the template instance used to setup the rendering html.
|
129 |
+
*
|
130 |
+
* @since 5.3.0
|
131 |
+
*
|
132 |
+
* @return Tribe__Template
|
133 |
+
*/
|
134 |
+
public function get_template() {
|
135 |
+
if ( empty( $this->template ) ) {
|
136 |
+
$this->template = new Tribe__Template();
|
137 |
+
$this->template->set_template_origin( Tribe__Tickets__Main::instance() );
|
138 |
+
$this->template->set_template_folder( 'src/admin-views/settings/tickets-commerce' );
|
139 |
+
$this->template->set_template_context_extract( true );
|
140 |
+
}
|
141 |
+
|
142 |
+
return $this->template;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Determine whether Tickets Commerce is in test mode.
|
147 |
+
*
|
148 |
+
* @since 5.3.0 moved to Settings class
|
149 |
+
* @since 5.1.6
|
150 |
+
*
|
151 |
+
* @return bool Whether Tickets Commerce is in test mode.
|
152 |
+
*/
|
153 |
+
public static function is_test_mode() {
|
154 |
+
return tribe_is_truthy( tribe_get_option( static::$option_sandbox ) );
|
155 |
+
}
|
156 |
+
|
157 |
/**
|
158 |
* Display admin bar when using the Test Mode for payments.
|
159 |
*
|
199 |
* @return array The list of settings for Tickets Commerce.
|
200 |
*/
|
201 |
public function get_settings() {
|
202 |
+
|
203 |
+
$section_gateway = tribe( Payments_Tab::class )->get_section_gateway();
|
204 |
+
if ( ! empty( $section_gateway ) ) {
|
205 |
+
return $section_gateway->get_settings();
|
206 |
+
}
|
207 |
|
208 |
// @todo Replace this with a better and more performant REST API based solution.
|
209 |
$page_args = [
|
363 |
],
|
364 |
];
|
365 |
|
366 |
+
// Add featured settings to top of other settings.
|
367 |
+
$featured_settings = [
|
368 |
+
'tc_featured_settings' => [
|
369 |
+
'type' => 'html',
|
370 |
+
'html' => tribe( Featured_Settings::class )->get_html(
|
371 |
+
[
|
372 |
+
'title' => __( 'Payment Gateways', 'event-tickets' ),
|
373 |
+
'description' => __(
|
374 |
+
'Set up a payment gateway to get started with Tickets Commerce. Enable multiple ' .
|
375 |
+
'gateways for providing users additional options for users when purchasing tickets.',
|
376 |
+
'event-tickets'
|
377 |
+
),
|
378 |
+
'content_template' => $this->get_featured_gateways_html(),
|
379 |
+
'links' => [
|
380 |
+
[
|
381 |
+
'slug' => 'help-1',
|
382 |
+
'priority' => 10,
|
383 |
+
'link' => 'https://evnt.is/1axt',
|
384 |
+
'html' => __( 'Learn more about configuring payment options with Tickets Commerce', 'event-tickets' ),
|
385 |
+
'target' => '_blank',
|
386 |
+
'classes' => [],
|
387 |
+
],
|
388 |
+
],
|
389 |
+
'classes' => [],
|
390 |
+
]
|
391 |
+
),
|
392 |
+
],
|
393 |
+
];
|
394 |
+
|
395 |
+
$settings = array_merge( $featured_settings, $settings );
|
396 |
|
397 |
/**
|
398 |
* Allow filtering the list of Tickets Commerce settings.
|
403 |
*/
|
404 |
$settings = apply_filters( 'tribe_tickets_commerce_settings', $settings );
|
405 |
|
406 |
+
return array_merge( tribe( Payments_Tab::class )->get_fields(), $this->apply_commerce_enabled_conditional( $settings ) );
|
407 |
+
}
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Returns the content for the main featured settings which displays the list of gateways.
|
411 |
+
*
|
412 |
+
* @since 5.3.0
|
413 |
+
*
|
414 |
+
* @return string
|
415 |
+
*/
|
416 |
+
public function get_featured_gateways_html() {
|
417 |
+
$manager = tribe( Manager::class );
|
418 |
+
$gateways = $manager->get_gateways();
|
419 |
+
|
420 |
+
$template = $this->get_template();
|
421 |
|
422 |
+
return $template->template( 'gateways/container', [ 'gateways' => $gateways, 'manager' => $manager ], false );
|
423 |
}
|
424 |
|
425 |
/**
|
474 |
return $meta_value;
|
475 |
}
|
476 |
|
477 |
+
/**
|
478 |
+
* Is a valid license of Event Tickets Plus available?
|
479 |
+
*
|
480 |
+
* @since 5.3.0
|
481 |
+
*
|
482 |
+
* @param bool $revalidate whether to submit a new validation API request
|
483 |
+
*
|
484 |
+
* @return bool
|
485 |
+
*/
|
486 |
+
public static function is_licensed_plugin( $revalidate = false ) {
|
487 |
+
|
488 |
+
if ( ! class_exists( 'Tribe__Tickets_Plus__PUE' ) ) {
|
489 |
+
return false;
|
490 |
+
}
|
491 |
+
|
492 |
+
return tribe( \Tribe__Tickets_Plus__PUE::class )->is_current_license_valid( $revalidate );
|
493 |
+
}
|
494 |
}
|
src/Tickets/Commerce/Shortcodes/Checkout_Shortcode.php
CHANGED
@@ -41,11 +41,13 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
41 |
* {@inheritDoc}
|
42 |
*/
|
43 |
public function setup_template_vars() {
|
44 |
-
$items
|
45 |
-
$sections
|
46 |
-
$sub_totals
|
47 |
$total_value = Value::create();
|
48 |
|
|
|
|
|
49 |
$args = [
|
50 |
'provider_id' => Module::class,
|
51 |
'provider' => tribe( Module::class ),
|
@@ -56,7 +58,7 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
56 |
'login_url' => tribe( Checkout::class )->get_login_url(),
|
57 |
'registration_url' => tribe( Checkout::class )->get_registration_url(),
|
58 |
'is_tec_active' => defined( 'TRIBE_EVENTS_FILE' ) && class_exists( 'Tribe__Events__Main' ),
|
59 |
-
'gateways' =>
|
60 |
'gateways_active' => $this->get_gateways_active(),
|
61 |
'gateways_connected' => $this->get_gateways_connected(),
|
62 |
];
|
@@ -92,7 +94,7 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
92 |
public function get_gateways_active() {
|
93 |
$gateways = tribe( Manager::class )->get_gateways();
|
94 |
$gateways_active = array_filter( array_map( static function ( $gateway ) {
|
95 |
-
return $gateway::is_active() && $gateway::should_show() ? $gateway : null;
|
96 |
}, $gateways ) );
|
97 |
|
98 |
return count( $gateways_active );
|
@@ -123,6 +125,7 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
123 |
public static function enqueue_assets() {
|
124 |
// Enqueue assets.
|
125 |
tribe_asset_enqueue_group( 'tribe-tickets-commerce-checkout' );
|
|
|
126 |
}
|
127 |
|
128 |
}
|
41 |
* {@inheritDoc}
|
42 |
*/
|
43 |
public function setup_template_vars() {
|
44 |
+
$items = tribe( Cart::class )->get_items_in_cart( true );
|
45 |
+
$sections = array_unique( array_filter( wp_list_pluck( $items, 'event_id' ) ) );
|
46 |
+
$sub_totals = Value::build_list( array_filter( wp_list_pluck( $items, 'sub_total' ) ) );
|
47 |
$total_value = Value::create();
|
48 |
|
49 |
+
$gateways = tribe( Manager::class )->get_gateways();
|
50 |
+
|
51 |
$args = [
|
52 |
'provider_id' => Module::class,
|
53 |
'provider' => tribe( Module::class ),
|
58 |
'login_url' => tribe( Checkout::class )->get_login_url(),
|
59 |
'registration_url' => tribe( Checkout::class )->get_registration_url(),
|
60 |
'is_tec_active' => defined( 'TRIBE_EVENTS_FILE' ) && class_exists( 'Tribe__Events__Main' ),
|
61 |
+
'gateways' => $gateways,
|
62 |
'gateways_active' => $this->get_gateways_active(),
|
63 |
'gateways_connected' => $this->get_gateways_connected(),
|
64 |
];
|
94 |
public function get_gateways_active() {
|
95 |
$gateways = tribe( Manager::class )->get_gateways();
|
96 |
$gateways_active = array_filter( array_map( static function ( $gateway ) {
|
97 |
+
return $gateway::is_active() && $gateway::is_enabled() && $gateway::should_show() ? $gateway : null;
|
98 |
}, $gateways ) );
|
99 |
|
100 |
return count( $gateways_active );
|
125 |
public static function enqueue_assets() {
|
126 |
// Enqueue assets.
|
127 |
tribe_asset_enqueue_group( 'tribe-tickets-commerce-checkout' );
|
128 |
+
tribe_asset_enqueue( 'tribe-tickets-forms-style' );
|
129 |
}
|
130 |
|
131 |
}
|
src/Tickets/Commerce/Status/Action_Required.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
namespace TEC\Tickets\Commerce\Status;
|
4 |
|
5 |
/**
|
6 |
-
* Class
|
7 |
*
|
8 |
* This is a payment that has begun, but is not complete. An example of this is someone who has filled out the checkout
|
9 |
* form and then gone to Gateway for payment. We have the record of sale, but they haven't completed their payment yet.
|
@@ -20,7 +20,7 @@ class Action_Required extends Status_Abstract {
|
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
-
const SLUG = 'action-
|
24 |
|
25 |
/**
|
26 |
* {@inheritdoc}
|
3 |
namespace TEC\Tickets\Commerce\Status;
|
4 |
|
5 |
/**
|
6 |
+
* Class Action_Required.
|
7 |
*
|
8 |
* This is a payment that has begun, but is not complete. An example of this is someone who has filled out the checkout
|
9 |
* form and then gone to Gateway for payment. We have the record of sale, but they haven't completed their payment yet.
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
+
const SLUG = 'action-req'; // max-length = 13 bytes/chars
|
24 |
|
25 |
/**
|
26 |
* {@inheritdoc}
|
src/Tickets/Commerce/Status/Denied.php
CHANGED
@@ -21,13 +21,6 @@ class Denied extends Status_Abstract {
|
|
21 |
*/
|
22 |
const SLUG = 'denied';
|
23 |
|
24 |
-
/**
|
25 |
-
* {@inheritdoc}
|
26 |
-
*/
|
27 |
-
public function get_name() {
|
28 |
-
return __( 'Denied', 'event-tickets' );
|
29 |
-
}
|
30 |
-
|
31 |
/**
|
32 |
* {@inheritdoc}
|
33 |
*/
|
@@ -47,4 +40,18 @@ class Denied extends Status_Abstract {
|
|
47 |
'show_in_admin_all_list' => true,
|
48 |
'show_in_admin_status_list' => true,
|
49 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
21 |
*/
|
22 |
const SLUG = 'denied';
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* {@inheritdoc}
|
26 |
*/
|
40 |
'show_in_admin_all_list' => true,
|
41 |
'show_in_admin_status_list' => true,
|
42 |
];
|
43 |
+
|
44 |
+
/**
|
45 |
+
* {@inheritdoc}
|
46 |
+
*/
|
47 |
+
public function get_name() {
|
48 |
+
return __( 'Denied', 'event-tickets' );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* {@inheritdoc}
|
53 |
+
*/
|
54 |
+
public function is_final() {
|
55 |
+
return true;
|
56 |
+
}
|
57 |
}
|
src/Tickets/Commerce/Status/Pending.php
CHANGED
@@ -62,6 +62,11 @@ class Pending extends Status_Abstract {
|
|
62 |
public function can_apply_to( $order ) {
|
63 |
$status = parent::can_apply_to( $order );
|
64 |
|
|
|
|
|
|
|
|
|
|
|
65 |
// If the parent status or abstract has an error already we dont even run.
|
66 |
if ( is_wp_error( $status ) ) {
|
67 |
return $status;
|
62 |
public function can_apply_to( $order ) {
|
63 |
$status = parent::can_apply_to( $order );
|
64 |
|
65 |
+
// If the parent status is final, don't run.
|
66 |
+
if ( ! $status ) {
|
67 |
+
return $status;
|
68 |
+
}
|
69 |
+
|
70 |
// If the parent status or abstract has an error already we dont even run.
|
71 |
if ( is_wp_error( $status ) ) {
|
72 |
return $status;
|
src/Tickets/Commerce/Status/Refunded.php
CHANGED
@@ -20,13 +20,6 @@ class Refunded extends Status_Abstract {
|
|
20 |
*/
|
21 |
const SLUG = 'refunded';
|
22 |
|
23 |
-
/**
|
24 |
-
* {@inheritdoc}
|
25 |
-
*/
|
26 |
-
public function get_name() {
|
27 |
-
return __( 'Refunded', 'event-tickets' );
|
28 |
-
}
|
29 |
-
|
30 |
/**
|
31 |
* {@inheritdoc}
|
32 |
*/
|
@@ -45,4 +38,18 @@ class Refunded extends Status_Abstract {
|
|
45 |
'show_in_admin_all_list' => true,
|
46 |
'show_in_admin_status_list' => true,
|
47 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
20 |
*/
|
21 |
const SLUG = 'refunded';
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* {@inheritdoc}
|
25 |
*/
|
38 |
'show_in_admin_all_list' => true,
|
39 |
'show_in_admin_status_list' => true,
|
40 |
];
|
41 |
+
|
42 |
+
/**
|
43 |
+
* {@inheritdoc}
|
44 |
+
*/
|
45 |
+
public function get_name() {
|
46 |
+
return __( 'Refunded', 'event-tickets' );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* {@inheritdoc}
|
51 |
+
*/
|
52 |
+
public function is_final() {
|
53 |
+
return true;
|
54 |
+
}
|
55 |
}
|
src/Tickets/Commerce/Status/Reversed.php
CHANGED
@@ -20,13 +20,6 @@ class Reversed extends Status_Abstract {
|
|
20 |
*/
|
21 |
const SLUG = 'reversed';
|
22 |
|
23 |
-
/**
|
24 |
-
* {@inheritdoc}
|
25 |
-
*/
|
26 |
-
public function get_name() {
|
27 |
-
return __( 'Reversed', 'event-tickets' );
|
28 |
-
}
|
29 |
-
|
30 |
/**
|
31 |
* {@inheritdoc}
|
32 |
*/
|
@@ -45,4 +38,18 @@ class Reversed extends Status_Abstract {
|
|
45 |
'show_in_admin_all_list' => true,
|
46 |
'show_in_admin_status_list' => true,
|
47 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
20 |
*/
|
21 |
const SLUG = 'reversed';
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* {@inheritdoc}
|
25 |
*/
|
38 |
'show_in_admin_all_list' => true,
|
39 |
'show_in_admin_status_list' => true,
|
40 |
];
|
41 |
+
|
42 |
+
/**
|
43 |
+
* {@inheritdoc}
|
44 |
+
*/
|
45 |
+
public function get_name() {
|
46 |
+
return __( 'Reversed', 'event-tickets' );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* {@inheritdoc}
|
51 |
+
*/
|
52 |
+
public function is_final() {
|
53 |
+
return true;
|
54 |
+
}
|
55 |
}
|
src/Tickets/Commerce/Status/Status_Abstract.php
CHANGED
@@ -129,9 +129,23 @@ abstract class Status_Abstract implements Status_Interface {
|
|
129 |
* {@inheritdoc}
|
130 |
*/
|
131 |
public function can_apply_to( $order ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
return true;
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
/**
|
136 |
* {@inheritdoc}
|
137 |
*/
|
129 |
* {@inheritdoc}
|
130 |
*/
|
131 |
public function can_apply_to( $order ) {
|
132 |
+
$order = tec_tc_get_order( $order );
|
133 |
+
$current_status = tribe( Status_Handler::class )->get_by_wp_slug( $order->post_status );
|
134 |
+
|
135 |
+
if ( $current_status->is_final() ) {
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
return true;
|
140 |
}
|
141 |
|
142 |
+
/**
|
143 |
+
* @inheritDoc
|
144 |
+
*/
|
145 |
+
public function is_final() {
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
|
149 |
/**
|
150 |
* {@inheritdoc}
|
151 |
*/
|
src/Tickets/Commerce/Status/Status_Handler.php
CHANGED
@@ -30,6 +30,7 @@ class Status_Handler extends \tad_DI52_ServiceProvider {
|
|
30 |
* @var string[]
|
31 |
*/
|
32 |
protected $default_statuses = [
|
|
|
33 |
Created::class,
|
34 |
Completed::class,
|
35 |
Denied::class,
|
30 |
* @var string[]
|
31 |
*/
|
32 |
protected $default_statuses = [
|
33 |
+
Action_Required::class,
|
34 |
Created::class,
|
35 |
Completed::class,
|
36 |
Denied::class,
|
src/Tickets/Commerce/Status/Status_Interface.php
CHANGED
@@ -103,4 +103,13 @@ interface Status_Interface {
|
|
103 |
* @return array
|
104 |
*/
|
105 |
public function get_wp_arguments();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
103 |
* @return array
|
104 |
*/
|
105 |
public function get_wp_arguments();
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Whether an order in this status can be transitioned away from it.
|
109 |
+
*
|
110 |
+
* @since 5.3.0
|
111 |
+
*
|
112 |
+
* @return bool
|
113 |
+
*/
|
114 |
+
public function is_final();
|
115 |
}
|
src/Tickets/Commerce/Status/Voided.php
CHANGED
@@ -22,13 +22,6 @@ class Voided extends Status_Abstract {
|
|
22 |
*/
|
23 |
const SLUG = 'voided';
|
24 |
|
25 |
-
/**
|
26 |
-
* {@inheritdoc}
|
27 |
-
*/
|
28 |
-
public function get_name() {
|
29 |
-
return __( 'Voided', 'event-tickets' );
|
30 |
-
}
|
31 |
-
|
32 |
/**
|
33 |
* {@inheritdoc}
|
34 |
*/
|
@@ -47,5 +40,19 @@ class Voided extends Status_Abstract {
|
|
47 |
'show_in_admin_all_list' => true,
|
48 |
'show_in_admin_status_list' => true,
|
49 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
22 |
*/
|
23 |
const SLUG = 'voided';
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/**
|
26 |
* {@inheritdoc}
|
27 |
*/
|
40 |
'show_in_admin_all_list' => true,
|
41 |
'show_in_admin_status_list' => true,
|
42 |
];
|
43 |
+
|
44 |
+
/**
|
45 |
+
* {@inheritdoc}
|
46 |
+
*/
|
47 |
+
public function get_name() {
|
48 |
+
return __( 'Voided', 'event-tickets' );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* {@inheritdoc}
|
53 |
+
*/
|
54 |
+
public function is_final() {
|
55 |
+
return true;
|
56 |
+
}
|
57 |
}
|
58 |
|
src/Tickets/Commerce/Traits/Has_Mode.php
CHANGED
@@ -59,6 +59,10 @@ trait Has_Mode {
|
|
59 |
* @return string Which mode we are using the Merchant.
|
60 |
*/
|
61 |
public function get_mode() {
|
|
|
|
|
|
|
|
|
62 |
return $this->mode;
|
63 |
}
|
64 |
|
59 |
* @return string Which mode we are using the Merchant.
|
60 |
*/
|
61 |
public function get_mode() {
|
62 |
+
if ( null === $this->mode ) {
|
63 |
+
$this->set_mode( tec_tickets_commerce_is_sandbox_mode() ? 'sandbox' : 'live' );
|
64 |
+
}
|
65 |
+
|
66 |
return $this->mode;
|
67 |
}
|
68 |
|
src/Tickets/Commerce/Utils/Currency.php
CHANGED
@@ -80,7 +80,7 @@ class Currency {
|
|
80 |
* @return string
|
81 |
*/
|
82 |
public static function get_currency_symbol( $code ) {
|
83 |
-
$map
|
84 |
$symbol = '';
|
85 |
|
86 |
if ( isset( $map[ $code ] ) ) {
|
@@ -110,6 +110,86 @@ class Currency {
|
|
110 |
return apply_filters( 'tec_tickets_commerce_currency_symbol', $symbol );
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
/**
|
114 |
* Return the currency decimal separator character to use as defined in the currency map.
|
115 |
*
|
@@ -120,7 +200,7 @@ class Currency {
|
|
120 |
* @return string
|
121 |
*/
|
122 |
public static function get_currency_separator_decimal( $code ) {
|
123 |
-
$map
|
124 |
$separator = '';
|
125 |
|
126 |
if ( isset( $map[ $code ] ) ) {
|
@@ -160,7 +240,7 @@ class Currency {
|
|
160 |
* @return string
|
161 |
*/
|
162 |
public static function get_currency_separator_thousands( $code ) {
|
163 |
-
$map
|
164 |
$separator = '';
|
165 |
|
166 |
if ( isset( $map[ $code ] ) ) {
|
@@ -226,7 +306,7 @@ class Currency {
|
|
226 |
*
|
227 |
* @since 5.2.3
|
228 |
*
|
229 |
-
* @param string
|
230 |
*
|
231 |
* @return string
|
232 |
*/
|
@@ -261,155 +341,205 @@ class Currency {
|
|
261 |
*/
|
262 |
return apply_filters( 'tec_tickets_commerce_default_currency_map', [
|
263 |
'AUD' => [
|
264 |
-
'name'
|
265 |
-
'symbol'
|
266 |
-
'thousands_sep'
|
267 |
-
'decimal_point'
|
|
|
|
|
268 |
],
|
269 |
'BRL' => [
|
270 |
-
'name'
|
271 |
-
'symbol'
|
272 |
-
'thousands_sep'
|
273 |
-
'decimal_point'
|
|
|
|
|
274 |
],
|
275 |
'CAD' => [
|
276 |
-
'name'
|
277 |
-
'symbol'
|
278 |
-
'thousands_sep'
|
279 |
-
'decimal_point'
|
|
|
|
|
280 |
],
|
281 |
'CHF' => [
|
282 |
-
'name'
|
283 |
-
'symbol'
|
284 |
-
'decimal_point'
|
285 |
-
'thousands_sep'
|
|
|
|
|
286 |
],
|
287 |
'CZK' => [
|
288 |
-
'name'
|
289 |
-
'symbol'
|
290 |
-
'position'
|
291 |
-
'decimal_point'
|
292 |
-
'thousands_sep'
|
|
|
|
|
293 |
],
|
294 |
'DKK' => [
|
295 |
-
'name'
|
296 |
-
'symbol'
|
297 |
-
'decimal_point'
|
298 |
-
'thousands_sep'
|
|
|
|
|
299 |
],
|
300 |
'EUR' => [
|
301 |
-
'name'
|
302 |
-
'symbol'
|
303 |
-
'decimal_point'
|
304 |
-
'thousands_sep'
|
|
|
|
|
305 |
],
|
306 |
'GBP' => [
|
307 |
-
'name'
|
308 |
-
'symbol'
|
309 |
-
'decimal_point'
|
310 |
-
'thousands_sep'
|
|
|
|
|
311 |
],
|
312 |
'HKD' => [
|
313 |
-
'name'
|
314 |
-
'symbol'
|
315 |
-
'decimal_point'
|
316 |
-
'thousands_sep'
|
|
|
|
|
317 |
],
|
318 |
'HUF' => [
|
319 |
-
'name'
|
320 |
-
'symbol'
|
321 |
-
'decimal_point'
|
322 |
-
'thousands_sep'
|
|
|
|
|
323 |
],
|
324 |
'ILS' => [
|
325 |
-
'name'
|
326 |
-
'symbol'
|
327 |
-
'decimal_point'
|
328 |
-
'thousands_sep'
|
|
|
|
|
329 |
],
|
330 |
'INR' => [
|
331 |
-
'name'
|
332 |
-
'symbol'
|
333 |
-
'decimal_point'
|
334 |
-
'thousands_sep'
|
|
|
|
|
335 |
],
|
336 |
'JPY' => [
|
337 |
-
'name'
|
338 |
-
'symbol'
|
339 |
-
'decimal_point'
|
340 |
-
'thousands_sep'
|
|
|
|
|
341 |
],
|
342 |
'MYR' => [
|
343 |
-
'name'
|
344 |
-
'symbol'
|
345 |
-
'decimal_point'
|
346 |
-
'thousands_sep'
|
|
|
|
|
347 |
],
|
348 |
'MXN' => [
|
349 |
-
'name'
|
350 |
-
'symbol'
|
351 |
-
'decimal_point'
|
352 |
-
'thousands_sep'
|
|
|
|
|
353 |
],
|
354 |
'NOK' => [
|
355 |
-
'name'
|
356 |
-
'symbol'
|
357 |
-
'decimal_point'
|
358 |
-
'thousands_sep'
|
|
|
|
|
359 |
],
|
360 |
'NZD' => [
|
361 |
-
'name'
|
362 |
-
'symbol'
|
363 |
-
'decimal_point'
|
364 |
-
'thousands_sep'
|
|
|
|
|
365 |
],
|
366 |
'PHP' => [
|
367 |
-
'name'
|
368 |
-
'symbol'
|
369 |
-
'decimal_point'
|
370 |
-
'thousands_sep'
|
|
|
|
|
371 |
],
|
372 |
'PLN' => [
|
373 |
-
'name'
|
374 |
-
'symbol'
|
375 |
-
'decimal_point'
|
376 |
-
'thousands_sep'
|
|
|
|
|
377 |
],
|
378 |
'RUB' => [
|
379 |
-
'name'
|
380 |
-
'symbol'
|
381 |
-
'decimal_point'
|
382 |
-
'thousands_sep'
|
|
|
|
|
383 |
],
|
384 |
'SEK' => [
|
385 |
-
'name'
|
386 |
-
'symbol'
|
387 |
-
'decimal_point'
|
388 |
-
'thousands_sep'
|
|
|
|
|
389 |
],
|
390 |
'SGD' => [
|
391 |
-
'name'
|
392 |
-
'symbol'
|
393 |
-
'decimal_point'
|
394 |
-
'thousands_sep'
|
|
|
|
|
395 |
],
|
396 |
'THB' => [
|
397 |
-
'name'
|
398 |
-
'symbol'
|
399 |
-
'decimal_point'
|
400 |
-
'thousands_sep'
|
|
|
|
|
401 |
],
|
402 |
'TWD' => [
|
403 |
-
'name'
|
404 |
-
'symbol'
|
405 |
-
'decimal_point'
|
406 |
-
'thousands_sep'
|
|
|
|
|
407 |
],
|
408 |
'USD' => [
|
409 |
-
'name'
|
410 |
-
'symbol'
|
411 |
-
'decimal_point'
|
412 |
-
'thousands_sep'
|
|
|
|
|
413 |
],
|
414 |
] );
|
415 |
}
|
80 |
* @return string
|
81 |
*/
|
82 |
public static function get_currency_symbol( $code ) {
|
83 |
+
$map = static::get_default_currency_map();
|
84 |
$symbol = '';
|
85 |
|
86 |
if ( isset( $map[ $code ] ) ) {
|
110 |
return apply_filters( 'tec_tickets_commerce_currency_symbol', $symbol );
|
111 |
}
|
112 |
|
113 |
+
/**
|
114 |
+
* Return the currency name to use as defined in the currency map.
|
115 |
+
*
|
116 |
+
* @since 5.3.0
|
117 |
+
*
|
118 |
+
* @param string $code The currency 3-letter code.
|
119 |
+
*
|
120 |
+
* @return string
|
121 |
+
*/
|
122 |
+
public static function get_currency_name( $code ) {
|
123 |
+
$map = static::get_default_currency_map();
|
124 |
+
$name = '';
|
125 |
+
|
126 |
+
if ( isset( $map[ $code ] ) ) {
|
127 |
+
$name = $map[ $code ]['name'];
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Filter the specific currency name before returning. $code is the 3-letter currency code.
|
132 |
+
*
|
133 |
+
* @since 5.3.0
|
134 |
+
*
|
135 |
+
* @param string $name The currency name.
|
136 |
+
*
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
+
$name = apply_filters( "tec_tickets_commerce_currency_{$code}_name", $name );
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Filter all currency symbols before returning.
|
143 |
+
*
|
144 |
+
* @since 5.3.0
|
145 |
+
*
|
146 |
+
* @param string $name The currency name.
|
147 |
+
*
|
148 |
+
* @return string
|
149 |
+
*/
|
150 |
+
return apply_filters( 'tec_tickets_commerce_currency_name', $name );
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Return the currency precision to use as the number of decimals allowed.
|
155 |
+
*
|
156 |
+
* @since 5.3.0
|
157 |
+
*
|
158 |
+
* @param string $code The currency 3-letter code.
|
159 |
+
*
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
public static function get_currency_precision( $code ) {
|
163 |
+
$map = static::get_default_currency_map();
|
164 |
+
$precision = 2;
|
165 |
+
|
166 |
+
if ( isset( $map[ $code ] ) ) {
|
167 |
+
$precision = $map[ $code ]['decimal_precision'];
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Filter the specific currency precision before returning. $code is the 3-letter currency code.
|
172 |
+
*
|
173 |
+
* @since 5.3.0
|
174 |
+
*
|
175 |
+
* @param int $precision The currency precision.
|
176 |
+
*
|
177 |
+
* @return int
|
178 |
+
*/
|
179 |
+
$precision = apply_filters( "tec_tickets_commerce_currency_{$code}_precision", $precision );
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Filter all currency symbols before returning.
|
183 |
+
*
|
184 |
+
* @since 5.3.0
|
185 |
+
*
|
186 |
+
* @param int $precision The currency precision.
|
187 |
+
*
|
188 |
+
* @return int
|
189 |
+
*/
|
190 |
+
return apply_filters( 'tec_tickets_commerce_currency_precision', $precision );
|
191 |
+
}
|
192 |
+
|
193 |
/**
|
194 |
* Return the currency decimal separator character to use as defined in the currency map.
|
195 |
*
|
200 |
* @return string
|
201 |
*/
|
202 |
public static function get_currency_separator_decimal( $code ) {
|
203 |
+
$map = static::get_default_currency_map();
|
204 |
$separator = '';
|
205 |
|
206 |
if ( isset( $map[ $code ] ) ) {
|
240 |
* @return string
|
241 |
*/
|
242 |
public static function get_currency_separator_thousands( $code ) {
|
243 |
+
$map = static::get_default_currency_map();
|
244 |
$separator = '';
|
245 |
|
246 |
if ( isset( $map[ $code ] ) ) {
|
306 |
*
|
307 |
* @since 5.2.3
|
308 |
*
|
309 |
+
* @param string $currency_position The currency position string.
|
310 |
*
|
311 |
* @return string
|
312 |
*/
|
341 |
*/
|
342 |
return apply_filters( 'tec_tickets_commerce_default_currency_map', [
|
343 |
'AUD' => [
|
344 |
+
'name' => __( 'Australian Dollar (AUD)', 'event-tickets' ),
|
345 |
+
'symbol' => 'A$',
|
346 |
+
'thousands_sep' => ',',
|
347 |
+
'decimal_point' => '.',
|
348 |
+
'decimal_precision' => 2,
|
349 |
+
'stripe_minimum_charge' => 0.50,
|
350 |
],
|
351 |
'BRL' => [
|
352 |
+
'name' => __( 'Brazilian Real (BRL)', 'event-tickets' ),
|
353 |
+
'symbol' => 'R$',
|
354 |
+
'thousands_sep' => '.',
|
355 |
+
'decimal_point' => ',',
|
356 |
+
'decimal_precision' => 2,
|
357 |
+
'stripe_minimum_charge' => 5.00, // minimum charge is 0.50, but boleto requires 5.00
|
358 |
],
|
359 |
'CAD' => [
|
360 |
+
'name' => __( 'Canadian Dollar (CAD)', 'event-tickets' ),
|
361 |
+
'symbol' => '$',
|
362 |
+
'thousands_sep' => ',',
|
363 |
+
'decimal_point' => '.',
|
364 |
+
'decimal_precision' => 2,
|
365 |
+
'stripe_minimum_charge' => 0.50,
|
366 |
],
|
367 |
'CHF' => [
|
368 |
+
'name' => __( 'Swiss Franc (CHF)', 'event-tickets' ),
|
369 |
+
'symbol' => 'CHF',
|
370 |
+
'decimal_point' => ',',
|
371 |
+
'thousands_sep' => '.',
|
372 |
+
'decimal_precision' => 2,
|
373 |
+
'stripe_minimum_charge' => 0.50,
|
374 |
],
|
375 |
'CZK' => [
|
376 |
+
'name' => __( 'Czech Koruna (CZK)', 'event-tickets' ),
|
377 |
+
'symbol' => 'Kč',
|
378 |
+
'position' => 'postfix',
|
379 |
+
'decimal_point' => ',',
|
380 |
+
'thousands_sep' => '.',
|
381 |
+
'decimal_precision' => 2,
|
382 |
+
'stripe_minimum_charge' => 15.00,
|
383 |
],
|
384 |
'DKK' => [
|
385 |
+
'name' => __( 'Danish Krone (DKK)', 'event-tickets' ),
|
386 |
+
'symbol' => 'kr',
|
387 |
+
'decimal_point' => ',',
|
388 |
+
'thousands_sep' => '.',
|
389 |
+
'decimal_precision' => 2,
|
390 |
+
'stripe_minimum_charge' => 2.50,
|
391 |
],
|
392 |
'EUR' => [
|
393 |
+
'name' => __( 'Euro (EUR)', 'event-tickets' ),
|
394 |
+
'symbol' => '€',
|
395 |
+
'decimal_point' => ',',
|
396 |
+
'thousands_sep' => '.',
|
397 |
+
'decimal_precision' => 2,
|
398 |
+
'stripe_minimum_charge' => 0.50,
|
399 |
],
|
400 |
'GBP' => [
|
401 |
+
'name' => __( 'Pound Sterling (GBP)', 'event-tickets' ),
|
402 |
+
'symbol' => '£',
|
403 |
+
'decimal_point' => '.',
|
404 |
+
'thousands_sep' => ',',
|
405 |
+
'decimal_precision' => 2,
|
406 |
+
'stripe_minimum_charge' => 0.30,
|
407 |
],
|
408 |
'HKD' => [
|
409 |
+
'name' => __( 'Hong Kong Dollar (HKD)', 'event-tickets' ),
|
410 |
+
'symbol' => '$',
|
411 |
+
'decimal_point' => '.',
|
412 |
+
'thousands_sep' => ',',
|
413 |
+
'decimal_precision' => 2,
|
414 |
+
'stripe_minimum_charge' => 4.00,
|
415 |
],
|
416 |
'HUF' => [
|
417 |
+
'name' => __( 'Hungarian Forint (HUF)', 'event-tickets' ),
|
418 |
+
'symbol' => 'Ft',
|
419 |
+
'decimal_point' => ',',
|
420 |
+
'thousands_sep' => '.',
|
421 |
+
'decimal_precision' => 2,
|
422 |
+
'stripe_minimum_charge' => 175.00,
|
423 |
],
|
424 |
'ILS' => [
|
425 |
+
'name' => __( 'Israeli New Sheqel (ILS)', 'event-tickets' ),
|
426 |
+
'symbol' => '₪',
|
427 |
+
'decimal_point' => ',',
|
428 |
+
'thousands_sep' => '.',
|
429 |
+
'decimal_precision' => 2,
|
430 |
+
'stripe_minimum_charge' => null,
|
431 |
],
|
432 |
'INR' => [
|
433 |
+
'name' => __( 'Indian Rupee (INR)', 'event-tickets' ),
|
434 |
+
'symbol' => '₹',
|
435 |
+
'decimal_point' => '.',
|
436 |
+
'thousands_sep' => ',',
|
437 |
+
'decimal_precision' => 2,
|
438 |
+
'stripe_minimum_charge' => 0.50,
|
439 |
],
|
440 |
'JPY' => [
|
441 |
+
'name' => __( 'Japanese Yen (JPY)', 'event-tickets' ),
|
442 |
+
'symbol' => '¥',
|
443 |
+
'decimal_point' => '.',
|
444 |
+
'thousands_sep' => ',',
|
445 |
+
'decimal_precision' => 0,
|
446 |
+
'stripe_minimum_charge' => 50,
|
447 |
],
|
448 |
'MYR' => [
|
449 |
+
'name' => __( 'Malaysian Ringgit (MYR)', 'event-tickets' ),
|
450 |
+
'symbol' => 'RM',
|
451 |
+
'decimal_point' => '.',
|
452 |
+
'thousands_sep' => ',',
|
453 |
+
'decimal_precision' => 2,
|
454 |
+
'stripe_minimum_charge' => 2.00,
|
455 |
],
|
456 |
'MXN' => [
|
457 |
+
'name' => __( 'Mexican Peso (MXN)', 'event-tickets' ),
|
458 |
+
'symbol' => '$',
|
459 |
+
'decimal_point' => '.',
|
460 |
+
'thousands_sep' => ',',
|
461 |
+
'decimal_precision' => 2,
|
462 |
+
'stripe_minimum_charge' => 10.00,
|
463 |
],
|
464 |
'NOK' => [
|
465 |
+
'name' => __( 'Norwegian Krone (NOK)', 'event-tickets' ),
|
466 |
+
'symbol' => '',
|
467 |
+
'decimal_point' => ',',
|
468 |
+
'thousands_sep' => '.',
|
469 |
+
'decimal_precision' => 2,
|
470 |
+
'stripe_minimum_charge' => 3.00,
|
471 |
],
|
472 |
'NZD' => [
|
473 |
+
'name' => __( 'New Zealand Dollar (NZD)', 'event-tickets' ),
|
474 |
+
'symbol' => '$',
|
475 |
+
'decimal_point' => '.',
|
476 |
+
'thousands_sep' => ',',
|
477 |
+
'decimal_precision' => 2,
|
478 |
+
'stripe_minimum_charge' => 0.50,
|
479 |
],
|
480 |
'PHP' => [
|
481 |
+
'name' => __( 'Philippine Peso (PHP)', 'event-tickets' ),
|
482 |
+
'symbol' => '₱',
|
483 |
+
'decimal_point' => '.',
|
484 |
+
'thousands_sep' => ',',
|
485 |
+
'decimal_precision' => 2,
|
486 |
+
'stripe_minimum_charge' => null,
|
487 |
],
|
488 |
'PLN' => [
|
489 |
+
'name' => __( 'Polish Zloty (PLN)', 'event-tickets' ),
|
490 |
+
'symbol' => 'zł',
|
491 |
+
'decimal_point' => ',',
|
492 |
+
'thousands_sep' => '.',
|
493 |
+
'decimal_precision' => 2,
|
494 |
+
'stripe_minimum_charge' => 2.00,
|
495 |
],
|
496 |
'RUB' => [
|
497 |
+
'name' => __( 'Russian Ruble (RUB)', 'event-tickets' ),
|
498 |
+
'symbol' => '₽',
|
499 |
+
'decimal_point' => '.',
|
500 |
+
'thousands_sep' => ',',
|
501 |
+
'decimal_precision' => 2,
|
502 |
+
'stripe_minimum_charge' => null,
|
503 |
],
|
504 |
'SEK' => [
|
505 |
+
'name' => __( 'Swedish Krona (SEK)', 'event-tickets' ),
|
506 |
+
'symbol' => 'kr',
|
507 |
+
'decimal_point' => ',',
|
508 |
+
'thousands_sep' => '.',
|
509 |
+
'decimal_precision' => 2,
|
510 |
+
'stripe_minimum_charge' => 3.00,
|
511 |
],
|
512 |
'SGD' => [
|
513 |
+
'name' => __( 'Singapore Dollar (SGD)', 'event-tickets' ),
|
514 |
+
'symbol' => 'S$',
|
515 |
+
'decimal_point' => '.',
|
516 |
+
'thousands_sep' => ',',
|
517 |
+
'decimal_precision' => 2,
|
518 |
+
'stripe_minimum_charge' => 0.50,
|
519 |
],
|
520 |
'THB' => [
|
521 |
+
'name' => __( 'Thai Baht (THB)', 'event-tickets' ),
|
522 |
+
'symbol' => '฿',
|
523 |
+
'decimal_point' => '.',
|
524 |
+
'thousands_sep' => ',',
|
525 |
+
'decimal_precision' => 2,
|
526 |
+
'stripe_minimum_charge' => null,
|
527 |
],
|
528 |
'TWD' => [
|
529 |
+
'name' => __( 'Taiwan New Dollar (TWD)', 'event-tickets' ),
|
530 |
+
'symbol' => 'NT$',
|
531 |
+
'decimal_point' => '.',
|
532 |
+
'thousands_sep' => ',',
|
533 |
+
'decimal_precision' => 2,
|
534 |
+
'stripe_minimum_charge' => null,
|
535 |
],
|
536 |
'USD' => [
|
537 |
+
'name' => __( 'U.S. Dollar (USD)', 'event-tickets' ),
|
538 |
+
'symbol' => '$',
|
539 |
+
'decimal_point' => '.',
|
540 |
+
'thousands_sep' => ',',
|
541 |
+
'decimal_precision' => 2,
|
542 |
+
'stripe_minimum_charge' => 0.50,
|
543 |
],
|
544 |
] );
|
545 |
}
|
src/Tickets/Commerce/Utils/Value.php
CHANGED
@@ -23,6 +23,7 @@ class Value extends Abstract_Currency {
|
|
23 |
$this->currency_symbol_position = Currency::get_currency_symbol_position( $this->get_currency_code() );
|
24 |
$this->currency_separator_decimal = Currency::get_currency_separator_decimal( $this->get_currency_code() );
|
25 |
$this->currency_separator_thousands = Currency::get_currency_separator_thousands( $this->get_currency_code() );
|
|
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -74,5 +75,4 @@ class Value extends Abstract_Currency {
|
|
74 |
);
|
75 |
|
76 |
}
|
77 |
-
|
78 |
}
|
23 |
$this->currency_symbol_position = Currency::get_currency_symbol_position( $this->get_currency_code() );
|
24 |
$this->currency_separator_decimal = Currency::get_currency_separator_decimal( $this->get_currency_code() );
|
25 |
$this->currency_separator_thousands = Currency::get_currency_separator_thousands( $this->get_currency_code() );
|
26 |
+
$this->set_precision( Currency::get_currency_precision( $this->get_currency_code() ) );
|
27 |
}
|
28 |
|
29 |
/**
|
75 |
);
|
76 |
|
77 |
}
|
|
|
78 |
}
|
src/Tribe/Editor/Provider.php
CHANGED
@@ -79,7 +79,7 @@ class Tribe__Tickets__Editor__Provider extends tad_DI52_ServiceProvider {
|
|
79 |
/**
|
80 |
* Register the blocks after plugins are fully loaded.
|
81 |
*
|
82 |
-
* @since
|
83 |
*/
|
84 |
public function register_blocks() {
|
85 |
// Register blocks.
|
79 |
/**
|
80 |
* Register the blocks after plugins are fully loaded.
|
81 |
*
|
82 |
+
* @since 5.3.0
|
83 |
*/
|
84 |
public function register_blocks() {
|
85 |
// Register blocks.
|
src/Tribe/Main.php
CHANGED
@@ -7,7 +7,7 @@ class Tribe__Tickets__Main {
|
|
7 |
/**
|
8 |
* Current version of this plugin
|
9 |
*/
|
10 |
-
const VERSION = '5.
|
11 |
|
12 |
/**
|
13 |
* Used to store the version history.
|
7 |
/**
|
8 |
* Current version of this plugin
|
9 |
*/
|
10 |
+
const VERSION = '5.3.0';
|
11 |
|
12 |
/**
|
13 |
* Used to store the version history.
|
src/Tribe/Plugin_Register.php
CHANGED
@@ -8,7 +8,7 @@ class Tribe__Tickets__Plugin_Register extends Tribe__Abstract_Plugin_Register {
|
|
8 |
protected $main_class = 'Tribe__Tickets__Main';
|
9 |
protected $dependencies = array(
|
10 |
'addon-dependencies' => array(
|
11 |
-
'Tribe__Tickets_Plus__Main' => '5.
|
12 |
'Tribe__Events__Community__Tickets__Main' => '4.7.2-dev',
|
13 |
),
|
14 |
);
|
8 |
protected $main_class = 'Tribe__Tickets__Main';
|
9 |
protected $dependencies = array(
|
10 |
'addon-dependencies' => array(
|
11 |
+
'Tribe__Tickets_Plus__Main' => '5.4.0-dev',
|
12 |
'Tribe__Events__Community__Tickets__Main' => '4.7.2-dev',
|
13 |
),
|
14 |
);
|
src/admin-views/settings/featured/container.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured settings box.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var string $title Featured settings title.
|
9 |
+
* @var string $description Featured settings description/HTML.
|
10 |
+
* @var string $content_template Template used for the content section.
|
11 |
+
* @var array $content_context Context for template used for content.
|
12 |
+
* @var string[] $classes Array of classes.
|
13 |
+
* @var array $links Array of arrays for links.
|
14 |
+
*/
|
15 |
+
|
16 |
+
$classes[] = 'tec-tickets__admin-settings-featured';
|
17 |
+
|
18 |
+
?>
|
19 |
+
<div <?php tribe_classes( $classes ); ?> >
|
20 |
+
<?php $this->template( 'title' ); ?>
|
21 |
+
<?php $this->template( 'description' ); ?>
|
22 |
+
<?php $this->template( 'content' ); ?>
|
23 |
+
<?php $this->template( 'links' ); ?>
|
24 |
+
</div>
|
src/admin-views/settings/featured/content.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured settings box.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var string $content_template Template used for the content section.
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( empty( $content_template ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
?>
|
16 |
+
<div class="tec-tickets__admin-settings-featured-content">
|
17 |
+
<?php echo $content_template; // phpcs:ignore ?>
|
18 |
+
</div>
|
src/admin-views/settings/featured/description.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Title for featured settings box.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var string $description Featured settings description.
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( empty( $description ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
?>
|
16 |
+
<div class="tec-tickets__admin-settings-featured-description">
|
17 |
+
<?php echo $description; // phpcs:ignore ?>
|
18 |
+
</div>
|
src/admin-views/settings/featured/link.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Help link for featured settings box.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var array $link Array of link arguments.
|
9 |
+
*/
|
10 |
+
|
11 |
+
$defaults = [
|
12 |
+
'slug' => 'help-1',
|
13 |
+
'priority' => 10,
|
14 |
+
'link' => 'https://evnt.is/1axt',
|
15 |
+
'html' => '',
|
16 |
+
'target' => '_blank',
|
17 |
+
'classes' => [],
|
18 |
+
];
|
19 |
+
|
20 |
+
$link = wp_parse_args( $link, $defaults );
|
21 |
+
$link['classes'][] = 'tec-tickets__admin-settings-featured-link';
|
22 |
+
|
23 |
+
$admin_views = tribe( Tribe__Tickets__Admin__Views::class );
|
24 |
+
|
25 |
+
?>
|
26 |
+
<div <?php tribe_classes( $link['classes'] ); ?> >
|
27 |
+
<?php $admin_views->template( 'components/icons/lightbulb' ); ?>
|
28 |
+
<a
|
29 |
+
href="<?php echo esc_url( $link['link'] ); ?>"
|
30 |
+
target="<?php echo esc_attr( $link['target'] ); ?>"
|
31 |
+
rel="noopener noreferrer"
|
32 |
+
class="tec-tickets__admin-settings-featured-link-url"
|
33 |
+
><?php esc_html_e( 'Learn more about configuring payment options with Tickets Commerce', 'event-tickets' ); ?></a>
|
34 |
+
</div>
|
src/admin-views/settings/featured/links.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Help links for featured settings box.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var array $links Array of links.
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( empty( $links ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div class="tec-tickets__admin-settings-featured-links">
|
18 |
+
<?php
|
19 |
+
foreach ( $links as $link ) {
|
20 |
+
$this->template( 'link', [ 'link' => $link ] );
|
21 |
+
}
|
22 |
+
?>
|
23 |
+
</div>
|
src/admin-views/settings/featured/title.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Title for featured settings box.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var string $title Featured settings title.
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( empty( $title ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
?>
|
16 |
+
<div class="tec-tickets__admin-settings-featured-title">
|
17 |
+
<?php echo esc_html( $title ); ?>
|
18 |
+
</div>
|
src/admin-views/settings/section/link.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a list of featured gateways.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var string $selected_section Slug of the currently selected section.
|
9 |
+
* @var array $classes Array of classes.
|
10 |
+
* @var string $url Link URL.
|
11 |
+
* @var string $slug Slug of the section.
|
12 |
+
* @var string $text Link text.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( empty( $text ) || empty( $url ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
$classes[] = 'tec-tickets__admin-settings-tickets-commerce-section-menu-link';
|
20 |
+
|
21 |
+
// Determines if this is an active section
|
22 |
+
$classes['tec-tickets__admin-settings-tickets-commerce-section-menu-link--active'] = $selected_section === $slug;
|
23 |
+
|
24 |
+
?>
|
25 |
+
<a <?php tribe_classes( $classes ); ?> href="<?php echo esc_attr( $url ); ?>">
|
26 |
+
<?php echo esc_html( $text ); ?>
|
27 |
+
</a>
|
src/admin-views/settings/section/menu.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a list of featured gateways.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var array[] $sections Array of section settings.
|
9 |
+
*/
|
10 |
+
|
11 |
+
use \TEC\Tickets\Commerce\Payments_Tab;
|
12 |
+
|
13 |
+
if ( empty( $sections ) ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
?>
|
17 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-section-menu">
|
18 |
+
<?php foreach ( $sections as $section ) {
|
19 |
+
$this->template( 'section/link', $section );
|
20 |
+
}
|
21 |
+
?>
|
22 |
+
</div>
|
23 |
+
<?php if ( ! empty( $selected_section ) ) : ?>
|
24 |
+
<input
|
25 |
+
type="hidden"
|
26 |
+
name="<?php echo esc_attr( Payments_Tab::$key_current_section ); ?>"
|
27 |
+
id="<?php echo esc_attr( Payments_Tab::$key_current_section ); ?>"
|
28 |
+
value="<?php echo esc_attr( $selected_section ); ?>"
|
29 |
+
/>
|
30 |
+
<?php endif; ?>
|
src/admin-views/settings/tickets-commerce/gateways/brand.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a featured gateway.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var Gateway_Abstract $gateway Gateway object.
|
9 |
+
*/
|
10 |
+
|
11 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
12 |
+
|
13 |
+
if ( empty( $gateway ) ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( ! ( $gateway instanceof Abstract_Gateway ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( ! $gateway::should_show() ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
?>
|
26 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item-brand">
|
27 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo">
|
28 |
+
<img
|
29 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo-image"
|
30 |
+
src="<?php echo esc_url( $gateway->get_logo_url() ); ?>"
|
31 |
+
alt="<?php echo esc_attr( $gateway::get_label() ); ?>" />
|
32 |
+
</div>
|
33 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-subtitle">
|
34 |
+
<?php echo $gateway->get_subtitle(); ?>
|
35 |
+
</div>
|
36 |
+
</div>
|
src/admin-views/settings/tickets-commerce/gateways/button.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a featured gateway.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var Gateway_Abstract $gateway Gateway object.
|
9 |
+
*/
|
10 |
+
|
11 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
12 |
+
|
13 |
+
if ( empty( $gateway ) ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( ! ( $gateway instanceof Abstract_Gateway ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( ! $gateway::should_show() ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
$classes = [
|
26 |
+
'tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link',
|
27 |
+
'tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active' => $gateway->is_active(),
|
28 |
+
];
|
29 |
+
|
30 |
+
$button_text = sprintf(
|
31 |
+
// Translators: %s: Name of payment gateway.
|
32 |
+
__( 'Connect to %s', 'event-tickets' ),
|
33 |
+
$gateway->get_label()
|
34 |
+
);
|
35 |
+
|
36 |
+
if ( $gateway->is_active() ) {
|
37 |
+
$button_text = sprintf(
|
38 |
+
// Translators: %s: Name of payment gateway.
|
39 |
+
__( 'Edit %s Connection', 'event-tickets' ),
|
40 |
+
$gateway->get_label()
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
?>
|
45 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item-button">
|
46 |
+
<a
|
47 |
+
<?php tribe_classes( $classes ); ?>
|
48 |
+
href="<?php echo esc_url( $gateway->get_settings_url() ); ?>"
|
49 |
+
>
|
50 |
+
<?php echo esc_html( $button_text ); ?>
|
51 |
+
</a>
|
52 |
+
</div>
|
src/admin-views/settings/tickets-commerce/gateways/container.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a list of featured gateways.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var Abstract_Gateway[] $gateways Array of gateway objects.
|
9 |
+
* @var Manager $manager Gateway Manager object.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
13 |
+
use TEC\Tickets\Commerce\Gateways\Manager;
|
14 |
+
|
15 |
+
if ( empty( $gateways ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways">
|
21 |
+
<?php
|
22 |
+
foreach ( $gateways as $gateway ) {
|
23 |
+
$this->template( 'gateways/item', [ 'gateway' => $gateway ] );
|
24 |
+
}
|
25 |
+
?>
|
26 |
+
</div>
|
src/admin-views/settings/tickets-commerce/gateways/item.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a featured gateway.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var Gateway_Abstract $gateway Gateway object.
|
9 |
+
* @var Manager $manager Gateway Manager object.
|
10 |
+
*/
|
11 |
+
|
12 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
13 |
+
use TEC\Tickets\Commerce\Gateways\Manager;
|
14 |
+
|
15 |
+
if ( empty( $gateway ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! ( $gateway instanceof Abstract_Gateway ) ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( ! $gateway::should_show() ) {
|
24 |
+
return;
|
25 |
+
}
|
26 |
+
|
27 |
+
$key = $gateway->get_key();
|
28 |
+
|
29 |
+
?>
|
30 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item">
|
31 |
+
<?php $this->template( 'gateways/brand' ); ?>
|
32 |
+
<?php $this->template( 'gateways/status' ); ?>
|
33 |
+
<?php $this->template( 'gateways/button' ); ?>
|
34 |
+
</div>
|
src/admin-views/settings/tickets-commerce/gateways/status.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a featured gateway.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var Gateway_Abstract $gateway Gateway object.
|
9 |
+
*/
|
10 |
+
|
11 |
+
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway;
|
12 |
+
|
13 |
+
if ( empty( $gateway ) ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( ! ( $gateway instanceof Abstract_Gateway ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( ! $gateway::should_show() ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
$classes = [
|
26 |
+
'tec-tickets__admin-settings-tickets-commerce-gateways-item-status',
|
27 |
+
'tec-tickets__admin-settings-tickets-commerce-gateways-item-status--enabled' => $gateway->is_enabled() && $gateway->is_connected(),
|
28 |
+
];
|
29 |
+
|
30 |
+
?>
|
31 |
+
<div <?php tribe_classes( $classes ); ?>>
|
32 |
+
<?php echo $gateway->get_status_text(); // phpcs:ignore ?>
|
33 |
+
</div>
|
src/admin-views/settings/tickets-commerce/gateways/toggle.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display a featured gateway.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Template $this Template object.
|
8 |
+
* @var boolean $checked Toggle checked or not.
|
9 |
+
*/
|
10 |
+
|
11 |
+
?>
|
12 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle">
|
13 |
+
<label class="tec-tickets__admin-settings-tickets-commerce-toggle">
|
14 |
+
<input
|
15 |
+
type="checkbox"
|
16 |
+
disabled="disabled"
|
17 |
+
name="tickets_commerce_enabled"
|
18 |
+
<?php checked( $checked, true ); ?>
|
19 |
+
id="tickets-commerce-enable-input"
|
20 |
+
class="tec-tickets__admin-settings-tickets-commerce-toggle-checkbox"
|
21 |
+
/>
|
22 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-toggle-switch"></span>
|
23 |
+
</label>
|
24 |
+
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings when connected.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.1.10
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -20,7 +21,7 @@ if ( empty( $is_merchant_connected ) ) {
|
|
20 |
|
21 |
?>
|
22 |
|
23 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
24 |
|
25 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/paypal-status' ); ?>
|
26 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings when connected.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
21 |
|
22 |
?>
|
23 |
|
24 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected">
|
25 |
|
26 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/paypal-status' ); ?>
|
27 |
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/actions.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
-
* @since
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -19,10 +20,10 @@ if ( empty( $is_merchant_connected ) ) {
|
|
19 |
}
|
20 |
?>
|
21 |
|
22 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
23 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/actions/refresh-connection' ); ?>
|
24 |
|
25 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
26 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/actions/refresh-access-token' ); ?>
|
27 |
|
28 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/actions/refresh-user-info' ); ?>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
+
* @since 5.2.0
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
20 |
}
|
21 |
?>
|
22 |
|
23 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions">
|
24 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/actions/refresh-connection' ); ?>
|
25 |
|
26 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions-debug">
|
27 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/actions/refresh-access-token' ); ?>
|
28 |
|
29 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/actions/refresh-user-info' ); ?>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-access-token.php
CHANGED
@@ -2,27 +2,36 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh access token action button.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.2.0
|
|
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
11 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
|
|
14 |
*/
|
15 |
|
|
|
|
|
16 |
$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
|
17 |
|
18 |
if ( empty( $is_merchant_connected ) || ! $debug ) {
|
19 |
return;
|
20 |
}
|
21 |
|
22 |
-
$url = Tribe__Settings::instance()->get_url( [
|
|
|
|
|
|
|
|
|
23 |
?>
|
24 |
|
25 |
<a
|
26 |
href="<?php echo esc_url( $url ); ?>"
|
27 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
28 |
><?php esc_html_e( 'Refresh Access Token', 'event-tickets' ); ?></a>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh access token action button.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.2.0
|
8 |
+
* @since 5.3.0 Added section param to URL.
|
9 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
10 |
*
|
11 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
12 |
* @var string $plugin_url [Global] The plugin URL.
|
13 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
14 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
15 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
16 |
+
* @var string $gateway_key [Global] Key for gateway.
|
17 |
*/
|
18 |
|
19 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
20 |
+
|
21 |
$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
|
22 |
|
23 |
if ( empty( $is_merchant_connected ) || ! $debug ) {
|
24 |
return;
|
25 |
}
|
26 |
|
27 |
+
$url = Tribe__Settings::instance()->get_url( [
|
28 |
+
'tab' => Payments_Tab::$slug,
|
29 |
+
tribe( Payments_Tab::class )::$key_current_section_get_var => $gateway_key,
|
30 |
+
'tc-action' => 'paypal-refresh-access-token',
|
31 |
+
] );
|
32 |
?>
|
33 |
|
34 |
<a
|
35 |
href="<?php echo esc_url( $url ); ?>"
|
36 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link"
|
37 |
><?php esc_html_e( 'Refresh Access Token', 'event-tickets' ); ?></a>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-connection.php
CHANGED
@@ -2,32 +2,41 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh connection action button.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.2.0
|
|
|
|
|
8 |
*
|
9 |
-
* @var Tribe__Tickets__Admin__Views $this
|
10 |
-
* @var string $plugin_url
|
11 |
-
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant
|
12 |
-
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup
|
13 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
|
|
15 |
*/
|
16 |
|
|
|
|
|
17 |
if ( empty( $is_merchant_connected ) ) {
|
18 |
return;
|
19 |
}
|
20 |
|
21 |
-
$resync_connection_url = Tribe__Settings::instance()->get_url( [
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
24 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
25 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
26 |
<a
|
27 |
href="<?php echo esc_url( $resync_connection_url ); ?>"
|
28 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
29 |
>
|
30 |
-
<?php tribe( 'tickets.editor.template' )->template( 'v2/components/icons/reset', [ 'classes' => [ 'tec-tickets__admin-settings-tickets-commerce-
|
31 |
<?php esc_html_e( 'Resync payment connection', 'event-tickets' ); ?>
|
32 |
</a>
|
33 |
</div>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh connection action button.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.2.0
|
8 |
+
* @since 5.3.0 Added section param to URL.
|
9 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
10 |
*
|
11 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
12 |
+
* @var string $plugin_url [Global] The plugin URL.
|
13 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
14 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
15 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
16 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
17 |
+
* @var string $gateway_key [Global] Key for gateway.
|
18 |
*/
|
19 |
|
20 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
21 |
+
|
22 |
if ( empty( $is_merchant_connected ) ) {
|
23 |
return;
|
24 |
}
|
25 |
|
26 |
+
$resync_connection_url = Tribe__Settings::instance()->get_url( [
|
27 |
+
'tab' => Payments_Tab::$slug,
|
28 |
+
tribe( Payments_Tab::class )::$key_current_section_get_var => $gateway_key,
|
29 |
+
'tc-action' => 'paypal-resync-connection',
|
30 |
+
] );
|
31 |
?>
|
32 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
33 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1"></div>
|
34 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
35 |
<a
|
36 |
href="<?php echo esc_url( $resync_connection_url ); ?>"
|
37 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button"
|
38 |
>
|
39 |
+
<?php tribe( 'tickets.editor.template' )->template( 'v2/components/icons/reset', [ 'classes' => [ 'tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon' ] ] ); ?>
|
40 |
<?php esc_html_e( 'Resync payment connection', 'event-tickets' ); ?>
|
41 |
</a>
|
42 |
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-user-info.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh user info action button.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.2.0
|
|
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -12,18 +14,25 @@
|
|
12 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
|
|
15 |
*/
|
16 |
|
|
|
|
|
17 |
$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
|
18 |
|
19 |
if ( empty( $is_merchant_connected ) || ! $debug ) {
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
-
$url = Tribe__Settings::instance()->get_url( [
|
|
|
|
|
|
|
|
|
24 |
?>
|
25 |
|
26 |
<a
|
27 |
href="<?php echo esc_url( $url ); ?>"
|
28 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
29 |
><?php esc_html_e( 'Refresh User Info', 'event-tickets' ); ?></a>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh user info action button.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.2.0
|
8 |
+
* @since 5.3.0 Added section param to URL.
|
9 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
10 |
*
|
11 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
12 |
* @var string $plugin_url [Global] The plugin URL.
|
14 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
15 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
16 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
17 |
+
* @var string $gateway_key [Global] Key for gateway.
|
18 |
*/
|
19 |
|
20 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
21 |
+
|
22 |
$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
|
23 |
|
24 |
if ( empty( $is_merchant_connected ) || ! $debug ) {
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
+
$url = Tribe__Settings::instance()->get_url( [
|
29 |
+
'tab' => Payments_Tab::$slug,
|
30 |
+
tribe( Payments_Tab::class )::$key_current_section_get_var => $gateway_key,
|
31 |
+
'tc-action' => 'paypal-refresh-user-info',
|
32 |
+
] );
|
33 |
?>
|
34 |
|
35 |
<a
|
36 |
href="<?php echo esc_url( $url ); ?>"
|
37 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link"
|
38 |
><?php esc_html_e( 'Refresh User Info', 'event-tickets' ); ?></a>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/actions/refresh-webhook.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh webhook action button.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.2.0
|
|
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -12,18 +14,25 @@
|
|
12 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
|
|
15 |
*/
|
16 |
|
|
|
|
|
17 |
$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
|
18 |
|
19 |
if ( empty( $is_merchant_connected ) || ! $debug ) {
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
-
$url = Tribe__Settings::instance()->get_url( [
|
|
|
|
|
|
|
|
|
24 |
?>
|
25 |
|
26 |
<a
|
27 |
href="<?php echo esc_url( $url ); ?>"
|
28 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
29 |
><?php esc_html_e( 'Refresh Webhook', 'event-tickets' ); ?></a>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce refresh webhook action button.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.2.0
|
8 |
+
* @since 5.3.0 Added section param to URL.
|
9 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
10 |
*
|
11 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
12 |
* @var string $plugin_url [Global] The plugin URL.
|
14 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
15 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
16 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
17 |
+
* @var string $gateway_key [Global] Key for gateway.
|
18 |
*/
|
19 |
|
20 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
21 |
+
|
22 |
$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
|
23 |
|
24 |
if ( empty( $is_merchant_connected ) || ! $debug ) {
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
+
$url = Tribe__Settings::instance()->get_url( [
|
29 |
+
'tab' => Payments_Tab::$slug,
|
30 |
+
tribe( Payments_Tab::class )::$key_current_section_get_var => $gateway_key,
|
31 |
+
'tc-action' => 'paypal-refresh-webhook',
|
32 |
+
] );
|
33 |
?>
|
34 |
|
35 |
<a
|
36 |
href="<?php echo esc_url( $url ); ?>"
|
37 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link"
|
38 |
><?php esc_html_e( 'Refresh Webhook', 'event-tickets' ); ?></a>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
-
* @since
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -12,27 +13,34 @@
|
|
12 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
|
|
15 |
*/
|
16 |
|
|
|
|
|
17 |
if ( empty( $is_merchant_connected ) ) {
|
18 |
return;
|
19 |
}
|
20 |
|
21 |
$name = $merchant->get_merchant_id();
|
22 |
-
$disconnect_url = Tribe__Settings::instance()->get_url( [
|
|
|
|
|
|
|
|
|
23 |
|
24 |
?>
|
25 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
26 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
27 |
<?php esc_html_e( 'Connected as:', 'event-tickets' ); ?>
|
28 |
</div>
|
29 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
30 |
-
<span class="tec-tickets__admin-settings-tickets-commerce-
|
31 |
<?php echo esc_html( $name ); ?>
|
32 |
</span>
|
33 |
<a
|
34 |
href="<?php echo esc_url( $disconnect_url ); ?>"
|
35 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
36 |
>
|
37 |
<?php esc_html_e( 'Disconnect', 'event-tickets' ); ?>
|
38 |
</a>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
+
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
13 |
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
14 |
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
15 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
16 |
+
* @var string $gateway_key [Global] Key for gateway.
|
17 |
*/
|
18 |
|
19 |
+
use TEC\Tickets\Commerce\Payments_Tab;
|
20 |
+
|
21 |
if ( empty( $is_merchant_connected ) ) {
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
$name = $merchant->get_merchant_id();
|
26 |
+
$disconnect_url = Tribe__Settings::instance()->get_url( [
|
27 |
+
'tab' => Payments_Tab::$slug,
|
28 |
+
Payments_Tab::$key_current_section_get_var => $gateway_key,
|
29 |
+
'tc-action' => 'paypal-disconnect'
|
30 |
+
] );
|
31 |
|
32 |
?>
|
33 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
34 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1">
|
35 |
<?php esc_html_e( 'Connected as:', 'event-tickets' ); ?>
|
36 |
</div>
|
37 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
38 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name">
|
39 |
<?php echo esc_html( $name ); ?>
|
40 |
</span>
|
41 |
<a
|
42 |
href="<?php echo esc_url( $disconnect_url ); ?>"
|
43 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link"
|
44 |
>
|
45 |
<?php esc_html_e( 'Disconnect', 'event-tickets' ); ?>
|
46 |
</a>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal status.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.1.10
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -14,18 +15,18 @@
|
|
14 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
15 |
*/
|
16 |
|
17 |
-
if ( empty( $is_merchant_connected ) ) {
|
18 |
return;
|
19 |
}
|
20 |
|
21 |
$errors = $signup->get_errors_from_on_boarded_data();
|
22 |
?>
|
23 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
24 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
25 |
<?php esc_html_e( 'PayPal Status:', 'event-tickets' ); ?>
|
26 |
</div>
|
27 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
28 |
-
<span class="tec-tickets__admin-settings-tickets-commerce-
|
29 |
<?php esc_html_e( 'Connected' ); ?> <span class="dashicons dashicons-saved"></span>
|
30 |
</span>
|
31 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal status.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
15 |
* @var bool $is_merchant_connected [Global] Whether the merchant is connected or not.
|
16 |
*/
|
17 |
|
18 |
+
if ( ! empty( $is_merchant_connected ) ) {
|
19 |
return;
|
20 |
}
|
21 |
|
22 |
$errors = $signup->get_errors_from_on_boarded_data();
|
23 |
?>
|
24 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
25 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1">
|
26 |
<?php esc_html_e( 'PayPal Status:', 'event-tickets' ); ?>
|
27 |
</div>
|
28 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
29 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-gateway-connect-text--connected">
|
30 |
<?php esc_html_e( 'Connected' ); ?> <span class="dashicons dashicons-saved"></span>
|
31 |
</span>
|
32 |
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/webhooks.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.1.10
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -29,25 +30,25 @@ if ( ! empty( $webhook_data['event_types'] ) ) {
|
|
29 |
}
|
30 |
|
31 |
?>
|
32 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
33 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
34 |
<?php esc_html_e( 'Webhooks:', 'event-tickets' ); ?>
|
35 |
</div>
|
36 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
37 |
<?php
|
38 |
foreach ( $webhooks_events->get_registered_events() as $event_name ) :
|
39 |
$webhook_label = $webhooks_events->get_webhook_label( $event_name );
|
40 |
$is_active = in_array( $event_name, $event_types_active, true );
|
41 |
$classes = [
|
42 |
-
'tec-tickets__admin-settings-tickets-commerce-
|
43 |
-
'tec-tickets__admin-settings-tickets-commerce-
|
44 |
]
|
45 |
?>
|
46 |
<div <?php tribe_classes( $classes ); ?>>
|
47 |
-
<span class="tec-tickets__admin-settings-tickets-commerce-
|
48 |
<?php echo esc_html( $webhook_label ); ?>
|
49 |
</span>
|
50 |
-
<span class="tec-tickets__admin-settings-tickets-commerce-
|
51 |
<?php esc_html_e( 'payment connection error', 'event-tickets' ); ?>
|
52 |
</span>
|
53 |
</div>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
30 |
}
|
31 |
|
32 |
?>
|
33 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
34 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1">
|
35 |
<?php esc_html_e( 'Webhooks:', 'event-tickets' ); ?>
|
36 |
</div>
|
37 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
38 |
<?php
|
39 |
foreach ( $webhooks_events->get_registered_events() as $event_name ) :
|
40 |
$webhook_label = $webhooks_events->get_webhook_label( $event_name );
|
41 |
$is_active = in_array( $event_name, $event_types_active, true );
|
42 |
$classes = [
|
43 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook',
|
44 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active' => $is_active,
|
45 |
]
|
46 |
?>
|
47 |
<div <?php tribe_classes( $classes ); ?>>
|
48 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-name">
|
49 |
<?php echo esc_html( $webhook_label ); ?>
|
50 |
</span>
|
51 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error">
|
52 |
<?php esc_html_e( 'payment connection error', 'event-tickets' ); ?>
|
53 |
</span>
|
54 |
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/help-links.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal help links.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
-
* @since
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -15,7 +16,7 @@
|
|
15 |
|
16 |
?>
|
17 |
|
18 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
19 |
|
20 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/help-links/configuring' ); ?>
|
21 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal help links.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
+
* @since 5.2.0
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
16 |
|
17 |
?>
|
18 |
|
19 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-help-links">
|
20 |
|
21 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/help-links/configuring' ); ?>
|
22 |
|
src/admin-views/settings/tickets-commerce/paypal/connect/help-links/configuring.php
CHANGED
@@ -19,12 +19,12 @@ if ( ! empty( $is_merchant_connected ) ) {
|
|
19 |
}
|
20 |
|
21 |
?>
|
22 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
23 |
<?php $this->template( 'components/icons/lightbulb' ); ?>
|
24 |
<a
|
25 |
href="https://evnt.is/1axt"
|
26 |
target="_blank"
|
27 |
rel="noopener noreferrer"
|
28 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
29 |
><?php esc_html_e( 'Learn more about configuring PayPal payments', 'event-tickets' ); ?></a>
|
30 |
</div>
|
19 |
}
|
20 |
|
21 |
?>
|
22 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link">
|
23 |
<?php $this->template( 'components/icons/lightbulb' ); ?>
|
24 |
<a
|
25 |
href="https://evnt.is/1axt"
|
26 |
target="_blank"
|
27 |
rel="noopener noreferrer"
|
28 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url"
|
29 |
><?php esc_html_e( 'Learn more about configuring PayPal payments', 'event-tickets' ); ?></a>
|
30 |
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/help-links/troubleshooting.php
CHANGED
@@ -14,12 +14,12 @@
|
|
14 |
*/
|
15 |
|
16 |
?>
|
17 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
18 |
<?php $this->template( 'components/icons/lightbulb' ); ?>
|
19 |
<a
|
20 |
href="https://evnt.is/1axw"
|
21 |
target="_blank"
|
22 |
rel="noopener noreferrer"
|
23 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
24 |
><?php esc_html_e( 'Get troubleshooting help', 'event-tickets' ); ?></a>
|
25 |
</div>
|
14 |
*/
|
15 |
|
16 |
?>
|
17 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link">
|
18 |
<?php $this->template( 'components/icons/lightbulb' ); ?>
|
19 |
<a
|
20 |
href="https://evnt.is/1axw"
|
21 |
target="_blank"
|
22 |
rel="noopener noreferrer"
|
23 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url"
|
24 |
><?php esc_html_e( 'Get troubleshooting help', 'event-tickets' ); ?></a>
|
25 |
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings when inactive (not connected).
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.1.10
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -20,16 +21,16 @@ if ( ! empty( $is_merchant_connected ) ) {
|
|
20 |
|
21 |
?>
|
22 |
|
23 |
-
<h2 class="tec-tickets__admin-settings-tickets-commerce-
|
24 |
<?php esc_html_e( 'Accept online payments with PayPal!', 'event-tickets' ); ?>
|
25 |
</h2>
|
26 |
|
27 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
28 |
<p>
|
29 |
<?php esc_html_e( 'Start selling tickets to your events today with PayPal. Attendees can purchase tickets directly on your site using debit or credit cards with no additional fees.', 'event-tickets' ); ?>
|
30 |
</p>
|
31 |
|
32 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
33 |
<?php echo $signup->get_link_html(); // phpcs:ignore ?>
|
34 |
</div>
|
35 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings when inactive (not connected).
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
21 |
|
22 |
?>
|
23 |
|
24 |
+
<h2 class="tec-tickets__admin-settings-tickets-commerce-gateway-title">
|
25 |
<?php esc_html_e( 'Accept online payments with PayPal!', 'event-tickets' ); ?>
|
26 |
</h2>
|
27 |
|
28 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-description">
|
29 |
<p>
|
30 |
<?php esc_html_e( 'Start selling tickets to your events today with PayPal. Attendees can purchase tickets directly on your site using debit or credit cards with no additional fees.', 'event-tickets' ); ?>
|
31 |
</p>
|
32 |
|
33 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-signup-links">
|
34 |
<?php echo $signup->get_link_html(); // phpcs:ignore ?>
|
35 |
</div>
|
36 |
|
src/admin-views/settings/tickets-commerce/paypal/connect/logo.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal logo and features.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.1.10
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -16,7 +17,7 @@
|
|
16 |
|
17 |
?>
|
18 |
|
19 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
20 |
|
21 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/logo/image' ); ?>
|
22 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal logo and features.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
17 |
|
18 |
?>
|
19 |
|
20 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-logo">
|
21 |
|
22 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/logo/image' ); ?>
|
23 |
|
src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings, the PayPal logo specifically.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
-
* @since
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -20,5 +21,5 @@ $image_src = tribe_resource_url( 'images/admin/paypal-logo.png', false, null, Tr
|
|
20 |
<img
|
21 |
src="<?php echo esc_url( $image_src ); ?>"
|
22 |
alt="<?php esc_attr_e( 'PayPal Logo Image', 'event-tickets' ); ?>"
|
23 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
24 |
>
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings, the PayPal logo specifically.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
+
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
21 |
<img
|
22 |
src="<?php echo esc_url( $image_src ); ?>"
|
23 |
alt="<?php esc_attr_e( 'PayPal Logo Image', 'event-tickets' ); ?>"
|
24 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-logo-image"
|
25 |
>
|
src/admin-views/settings/tickets-commerce/paypal/main.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.1.10
|
|
|
8 |
*
|
9 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
* @var string $plugin_url [Global] The plugin URL.
|
@@ -15,13 +16,13 @@
|
|
15 |
*/
|
16 |
|
17 |
$classes = [
|
18 |
-
'tec-tickets__admin-settings-tickets-commerce-
|
19 |
-
'tec-tickets__admin-settings-tickets-commerce-
|
20 |
]
|
21 |
?>
|
22 |
|
23 |
<div <?php tribe_classes( $classes ); ?>>
|
24 |
-
<div id="tec-tickets__admin-settings-tickets-commerce-
|
25 |
|
26 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/inactive' ); ?>
|
27 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal Settings.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.1.10
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*
|
10 |
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
11 |
* @var string $plugin_url [Global] The plugin URL.
|
16 |
*/
|
17 |
|
18 |
$classes = [
|
19 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway',
|
20 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway--connected' => $is_merchant_connected,
|
21 |
]
|
22 |
?>
|
23 |
|
24 |
<div <?php tribe_classes( $classes ); ?>>
|
25 |
+
<div id="tec-tickets__admin-settings-tickets-commerce-gateway-connect" class="tec-tickets__admin-settings-tickets-commerce-gateway-connect">
|
26 |
|
27 |
<?php $this->template( 'settings/tickets-commerce/paypal/connect/inactive' ); ?>
|
28 |
|
src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete.php
CHANGED
@@ -20,13 +20,13 @@ $content = $this->template( 'settings/tickets-commerce/paypal/modal/signup-c
|
|
20 |
$args = [
|
21 |
'append_target' => '#paypal-connected-modal-target',
|
22 |
'button_id' => 'paypal-connected-modal-button',
|
23 |
-
'content_wrapper_classes' => 'tribe-dialog__wrapper tribe-tickets__admin-container event-tickets tribe-common tribe-modal__wrapper--
|
24 |
'title' => esc_html__( "You are now connected to PayPal, here's what's next...", 'event-tickets' ),
|
25 |
'title_classes' => [
|
26 |
'tribe-dialog__title',
|
27 |
'tribe-modal__title',
|
28 |
'tribe-common-h5',
|
29 |
-
'tribe-modal__title--
|
30 |
],
|
31 |
];
|
32 |
|
20 |
$args = [
|
21 |
'append_target' => '#paypal-connected-modal-target',
|
22 |
'button_id' => 'paypal-connected-modal-button',
|
23 |
+
'content_wrapper_classes' => 'tribe-dialog__wrapper tribe-tickets__admin-container event-tickets tribe-common tribe-modal__wrapper--gateway-connected',
|
24 |
'title' => esc_html__( "You are now connected to PayPal, here's what's next...", 'event-tickets' ),
|
25 |
'title_classes' => [
|
26 |
'tribe-dialog__title',
|
27 |
'tribe-modal__title',
|
28 |
'tribe-common-h5',
|
29 |
+
'tribe-modal__title--gateway-connected',
|
30 |
],
|
31 |
];
|
32 |
|
src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/content.php
CHANGED
@@ -2,13 +2,14 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal modal content when connected.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.2.1
|
|
|
8 |
*/
|
9 |
|
10 |
?>
|
11 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
12 |
|
13 |
<?php $this->template( 'settings/tickets-commerce/paypal/modal/signup-complete/notice-test-mode' ); ?>
|
14 |
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal modal content when connected.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.2.1
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*/
|
10 |
|
11 |
?>
|
12 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-modal-content tec-tickets__admin-modal tribe-common-b2">
|
13 |
|
14 |
<?php $this->template( 'settings/tickets-commerce/paypal/modal/signup-complete/notice-test-mode' ); ?>
|
15 |
|
src/admin-views/settings/tickets-commerce/paypal/modal/signup-complete/notice-test-mode.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal modal notice when connected.
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
*
|
7 |
* @since 5.2.1
|
|
|
8 |
*/
|
9 |
|
10 |
// Bail if not in sandbox mode.
|
@@ -15,10 +16,10 @@ if ( empty( tec_tickets_commerce_is_sandbox_mode() ) ) {
|
|
15 |
tribe( 'tickets.editor.template' )->template(
|
16 |
'components/notice',
|
17 |
[
|
18 |
-
'id' => 'tec-tickets__admin-settings-tickets-commerce-
|
19 |
'notice_classes' => [
|
20 |
'tribe-tickets__notice--error',
|
21 |
-
'tec-tickets__admin-settings-tickets-commerce-
|
22 |
],
|
23 |
'content' => __( 'You have connected your account for test mode. You will need to connect again once you are in live mode.', 'event-tickets' ),
|
24 |
]
|
2 |
/**
|
3 |
* The Template for displaying the Tickets Commerce PayPal modal notice when connected.
|
4 |
*
|
5 |
+
* @version 5.3.0
|
6 |
*
|
7 |
* @since 5.2.1
|
8 |
+
* @since 5.3.0 Using generic CSS classes for gateway instead of PayPal.
|
9 |
*/
|
10 |
|
11 |
// Bail if not in sandbox mode.
|
16 |
tribe( 'tickets.editor.template' )->template(
|
17 |
'components/notice',
|
18 |
[
|
19 |
+
'id' => 'tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error',
|
20 |
'notice_classes' => [
|
21 |
'tribe-tickets__notice--error',
|
22 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error',
|
23 |
],
|
24 |
'content' => __( 'You have connected your account for test mode. You will need to connect again once you are in live mode.', 'event-tickets' ),
|
25 |
]
|
src/admin-views/settings/tickets-commerce/paypal/signup-link.php
CHANGED
@@ -7,10 +7,10 @@ if ( empty( $selected_country_code ) ) {
|
|
7 |
}
|
8 |
?>
|
9 |
<div
|
10 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
11 |
>
|
12 |
<p
|
13 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
14 |
>
|
15 |
<select
|
16 |
name='tec-tickets-commerce-gateway-paypal-merchant-country'
|
@@ -31,14 +31,14 @@ if ( empty( $selected_country_code ) ) {
|
|
31 |
</select>
|
32 |
</p>
|
33 |
|
34 |
-
<div class="tec-tickets__admin-settings-tickets-commerce-
|
35 |
<a
|
36 |
target="_blank"
|
37 |
data-paypal-onboard-complete="tecTicketsCommerceGatewayPayPalSignupCallback"
|
38 |
href="<?php echo esc_url( $url ) ?>&displayMode=minibrowser"
|
39 |
data-paypal-button="true"
|
40 |
id="connect_to_paypal"
|
41 |
-
class="tec-tickets__admin-settings-tickets-commerce-
|
42 |
>
|
43 |
<?php echo wp_kses( __( 'Connect Automatically with <i>PayPal</i>', 'event-tickets' ), 'post' ); ?>
|
44 |
</a>
|
7 |
}
|
8 |
?>
|
9 |
<div
|
10 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings"
|
11 |
>
|
12 |
<p
|
13 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container"
|
14 |
>
|
15 |
<select
|
16 |
name='tec-tickets-commerce-gateway-paypal-merchant-country'
|
31 |
</select>
|
32 |
</p>
|
33 |
|
34 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connect-button">
|
35 |
<a
|
36 |
target="_blank"
|
37 |
data-paypal-onboard-complete="tecTicketsCommerceGatewayPayPalSignupCallback"
|
38 |
href="<?php echo esc_url( $url ) ?>&displayMode=minibrowser"
|
39 |
data-paypal-button="true"
|
40 |
id="connect_to_paypal"
|
41 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link"
|
42 |
>
|
43 |
<?php echo wp_kses( __( 'Connect Automatically with <i>PayPal</i>', 'event-tickets' ), 'post' ); ?>
|
44 |
</a>
|
src/admin-views/settings/tickets-commerce/stripe/connect/active.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe Settings when connected.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( false === $merchant_status['connected'] ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
|
20 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected">
|
21 |
+
|
22 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/active/connection' ); ?>
|
23 |
+
|
24 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/active/stripe-status' ); ?>
|
25 |
+
|
26 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/active/stripe-currency' ); ?>
|
27 |
+
|
28 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/active/button' ); ?>
|
29 |
+
|
30 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/help-links' ); ?>
|
31 |
+
|
32 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/active/button.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe connection details.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( false === $merchant_status['connected'] ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
21 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1"></div>
|
22 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
23 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateways-item-button">
|
24 |
+
<a
|
25 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link"
|
26 |
+
href="<?php echo esc_url( 'https://dashboard.stripe.com/settings' ); ?>"
|
27 |
+
target="_blank"
|
28 |
+
rel="noopener noreferrer"
|
29 |
+
>
|
30 |
+
<?php esc_html_e( 'Edit Your Stripe Settings', 'event-tickets' ); ?>
|
31 |
+
</a>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/active/connection.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe connection details.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( false === $merchant_status['connected'] ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
$name = $merchant->get_client_id();
|
20 |
+
$disconnect_url = $signup->generate_disconnect_url();
|
21 |
+
|
22 |
+
?>
|
23 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
24 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1">
|
25 |
+
<?php esc_html_e( 'Connected as:', 'event-tickets' ); ?>
|
26 |
+
</div>
|
27 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
28 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name">
|
29 |
+
<?php echo esc_html( $name ); ?>
|
30 |
+
</span>
|
31 |
+
<a
|
32 |
+
href="<?php echo esc_url( $disconnect_url ); ?>"
|
33 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link"
|
34 |
+
>
|
35 |
+
<?php esc_html_e( 'Disconnect', 'event-tickets' ); ?>
|
36 |
+
</a>
|
37 |
+
</div>
|
38 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-currency.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe currency.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
use TEC\Tickets\Commerce\Utils\Currency;
|
16 |
+
|
17 |
+
if ( false === $merchant_status['connected'] ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( empty( $merchant_status['default_currency'] ) ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
$stripe_currency = strtoupper( $merchant_status['default_currency'] );
|
26 |
+
$tc_currency = Currency::get_currency_code();
|
27 |
+
|
28 |
+
if ( $stripe_currency !== $tc_currency ) {
|
29 |
+
$message = sprintf(
|
30 |
+
// Translators: %1$s is the Stripe currency, %2$s is the Tickets Commerce currency symbol.
|
31 |
+
__( 'Your Stripe account is set to %1$s, but your Tickets Commerce site is set to %2$s. Using different currencies for Tickets Commerce and Stripe may not be supported by all payment methods available in %2$s, and may result in exchange rates and conversions from %2$s to %1$s being handled by Stripe.', 'event-tickets' ),
|
32 |
+
'<strong>' . $stripe_currency . '</strong>',
|
33 |
+
'<strong>' . $tc_currency . '</strong>'
|
34 |
+
);
|
35 |
+
} else {
|
36 |
+
$message = sprintf(
|
37 |
+
// Translators: %1$s The opening `<a>` tag with the stripe link, %2$s The closing `</a>` tag.
|
38 |
+
__( 'Please be sure to enable all the payment methods you want to use for this currency on your %1$sstripe dashboard%2$s.', 'event-tickets' ),
|
39 |
+
'<a href="https://dashboard.stripe.com/settings/payment_methods" target="_blank" rel="noopener noreferrer">',
|
40 |
+
'</a>'
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
$message_classes = [
|
45 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-currency-message',
|
46 |
+
];
|
47 |
+
|
48 |
+
?>
|
49 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
50 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1">
|
51 |
+
<?php esc_html_e( 'Stripe currency:', 'event-tickets' ); ?>
|
52 |
+
</div>
|
53 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
54 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-currency"><?php echo esc_html( Currency::get_currency_name( $stripe_currency ) ); ?></div>
|
55 |
+
<div <?php tribe_classes( $message_classes ); ?>>
|
56 |
+
<span class="dashicons dashicons-info-outline"></span>
|
57 |
+
<?php echo wp_kses_post( $message ); ?>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/active/stripe-status.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe status.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( false === $merchant_status['connected'] ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
$errors = $merchant_status['errors'];
|
20 |
+
$capabilities = $merchant_status['capabilities'];
|
21 |
+
|
22 |
+
?>
|
23 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-row">
|
24 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1">
|
25 |
+
<?php esc_html_e( 'Payments status:', 'event-tickets' ); ?>
|
26 |
+
</div>
|
27 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2">
|
28 |
+
<?php if ( ! empty( $capabilities ) && is_array( $capabilities ) ) : ?>
|
29 |
+
<ul>
|
30 |
+
<?php
|
31 |
+
foreach ( $capabilities as $capability => $status ) :
|
32 |
+
$capability_classes = [
|
33 |
+
'dashicons',
|
34 |
+
'dashicons-yes' => 'inactive' !== $status,
|
35 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-capability--yes' => 'inactive' !== $status,
|
36 |
+
'dashicons-no' => 'inactive' === $status,
|
37 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-capability--no' => 'inactive' === $status,
|
38 |
+
];
|
39 |
+
|
40 |
+
$capability_title = 'inactive' === $status ? __( 'Disabled', 'event-tickets' ) : __( 'Enabled', 'event-tickets' );
|
41 |
+
?>
|
42 |
+
<li>
|
43 |
+
<span <?php tribe_classes( $capability_classes ); ?> title="<?php echo esc_attr( $capability_title ); ?>"></span>
|
44 |
+
<?php echo esc_html( str_replace( '_payments', '', $capability ) ); ?>
|
45 |
+
</li>
|
46 |
+
<?php endforeach; ?>
|
47 |
+
</ul>
|
48 |
+
<?php endif; ?>
|
49 |
+
|
50 |
+
<?php if ( ! empty( $errors['requirements'] ) && is_array( $errors['requirements'] ) ) : ?>
|
51 |
+
<h3><?php echo esc_html_e( 'Requirements', 'event-tickets' ); ?></h3>
|
52 |
+
<ul>
|
53 |
+
<?php foreach ( $errors['requirements'] as $error ) : ?>
|
54 |
+
<li>
|
55 |
+
<span class="dashicons dashicons-warning" style="color: red;"></span>
|
56 |
+
<span class="error-title"><?php echo esc_html( $error['requirement'] ); ?></span><br>
|
57 |
+
<span class="error-description"><?php echo esc_html( $error['reason'] ); ?></span>
|
58 |
+
</li>
|
59 |
+
<?php endforeach; ?>
|
60 |
+
</ul>
|
61 |
+
<?php endif; ?>
|
62 |
+
|
63 |
+
<?php if ( ! empty( $errors['future_requirements'] ) && is_array( $errors['future_requirements'] ) ) : ?>
|
64 |
+
<h3><?php echo esc_html_e( 'Future Requirements', 'event-tickets' ); ?></h3>
|
65 |
+
<ul>
|
66 |
+
<?php foreach ( $errors['future_requirements'] as $error ) : ?>
|
67 |
+
<li>
|
68 |
+
<span class="dashicons dashicons-warning" style="color: red;"></span>
|
69 |
+
<span class="error-title"><?php echo esc_html( $error['requirement'] ); ?></span>
|
70 |
+
<span class="error-description"><?php echo esc_html( $error['reason'] ); ?></span>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ul>
|
74 |
+
<?php endif; ?>
|
75 |
+
</div>
|
76 |
+
|
77 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/help-links.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe help links.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-help-links">
|
18 |
+
|
19 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/help-links/configuring' ); ?>
|
20 |
+
|
21 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/help-links/troubleshooting' ); ?>
|
22 |
+
|
23 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/help-links/configuring.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe help links (configuring).
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( false === $merchant_status['connected'] ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link">
|
21 |
+
<?php $this->template( 'components/icons/lightbulb' ); ?>
|
22 |
+
<!-- @todo: We need to update this link. -->
|
23 |
+
<a
|
24 |
+
href="https://evnt.is/1axt"
|
25 |
+
target="_blank"
|
26 |
+
rel="noopener noreferrer"
|
27 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url"
|
28 |
+
><?php esc_html_e( 'Learn more about configuring Stripe payments', 'event-tickets' ); ?></a>
|
29 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/help-links/troubleshooting.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe help links (troubleshooting).
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link">
|
16 |
+
<?php $this->template( 'components/icons/lightbulb' ); ?>
|
17 |
+
<!-- @todo: We need to update this link. -->
|
18 |
+
<a
|
19 |
+
href="https://evnt.is/1axw"
|
20 |
+
target="_blank"
|
21 |
+
rel="noopener noreferrer"
|
22 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url"
|
23 |
+
><?php esc_html_e( 'Get troubleshooting help', 'event-tickets' ); ?></a>
|
24 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/inactive.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe Settings when inactive (not connected).
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( true === $merchant_status['connected'] ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
|
21 |
+
<h2 class="tec-tickets__admin-settings-tickets-commerce-gateway-title">
|
22 |
+
<?php esc_html_e( 'Accept online payments with Stripe!', 'event-tickets' ); ?>
|
23 |
+
</h2>
|
24 |
+
|
25 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-description">
|
26 |
+
<p class="tec-tickets__admin-settings-tickets-commerce-gateway-description-text">
|
27 |
+
<?php echo wp_kses( __( 'Start selling tickets to your events today with Stripe integration for Tickets Commerce. Enable highly-configurable credit and debit card checkout with enhanced features like Afterpay, AliPay, Degiro, Klarna and more.<br>', 'event-tickets' ), [ 'br' => [] ] ); ?>
|
28 |
+
</p>
|
29 |
+
|
30 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-signup-links">
|
31 |
+
<?php $signup->get_link_html(); ?>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/help-links' ); ?>
|
35 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/logo.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe logo and features.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-logo">
|
18 |
+
|
19 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/logo/image' ); ?>
|
20 |
+
|
21 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/logo/features' ); ?>
|
22 |
+
|
23 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/connect/logo/features.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe features.
|
4 |
+
*
|
5 |
+
* @version 5.3.0
|
6 |
+
*
|
7 |
+
* @since 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
?>
|
16 |
+
<ul>
|
17 |
+
<li>
|
18 |
+
<?php esc_html_e( 'Credit, debit card payments and more!', 'event-tickets' ); ?>
|
19 |
+
</li>
|
20 |
+
<li>
|
21 |
+
<?php esc_html_e( 'Easy, streamlined connection', 'event-tickets' ); ?>
|
22 |
+
</li>
|
23 |
+
<li>
|
24 |
+
<?php esc_html_e( 'Accept payments from around the world', 'event-tickets' ); ?>
|
25 |
+
</li>
|
26 |
+
<li>
|
27 |
+
<?php esc_html_e( 'Supports 3D Secure payments', 'event-tickets' ); ?>
|
28 |
+
</li>
|
29 |
+
</ul>
|
src/admin-views/settings/tickets-commerce/stripe/connect/logo/image.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe Settings, the PayPal logo specifically.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @version 5.3.0
|
8 |
+
*
|
9 |
+
* @var string $plugin_url [Global] The plugin URL.
|
10 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
12 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
13 |
+
*/
|
14 |
+
|
15 |
+
$image_src = tribe_resource_url( 'images/admin/stripe-logo.png', false, null, Tribe__Tickets__Main::instance() );
|
16 |
+
|
17 |
+
?>
|
18 |
+
|
19 |
+
<img
|
20 |
+
width="200" <?php // @todo remove this to style properly ?>
|
21 |
+
src="<?php echo esc_url( $image_src ); ?>"
|
22 |
+
alt="<?php esc_attr_e( 'Stripe Logo Image', 'event-tickets' ); ?>"
|
23 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-logo-image tec-tickets__admin-settings-tickets-commerce-gateway-logo-image--stripe"
|
24 |
+
>
|
src/admin-views/settings/tickets-commerce/stripe/main.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe Settings.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @todo FrontEnd needs to revisit all of these templates to make sure we're not missing anything
|
8 |
+
*
|
9 |
+
* @version 5.3.0
|
10 |
+
*
|
11 |
+
* @var string $plugin_url [Global] The plugin URL.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Signup $signup [Global] The Signup class.
|
13 |
+
* @var TEC\Tickets\Commerce\Gateways\Stripe\Merchant $merchant [Global] The Signup class.
|
14 |
+
* @var array $merchant_status [Global] Merchant Status data.
|
15 |
+
*/
|
16 |
+
|
17 |
+
$classes = [
|
18 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway',
|
19 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway--connected' => $merchant_status['connected'],
|
20 |
+
]
|
21 |
+
?>
|
22 |
+
|
23 |
+
<div <?php tribe_classes( $classes ); ?>>
|
24 |
+
<div
|
25 |
+
id="tec-tickets__admin-settings-tickets-commerce-gateway-connect"
|
26 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-connect"
|
27 |
+
>
|
28 |
+
|
29 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/inactive' ); ?>
|
30 |
+
|
31 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/active' ); ?>
|
32 |
+
|
33 |
+
</div>
|
34 |
+
|
35 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/connect/logo' ); ?>
|
36 |
+
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/modal/signup-complete' ); ?>
|
src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe Modal after a successful connection.
|
4 |
+
*
|
5 |
+
* @version 5.3.0
|
6 |
+
*
|
7 |
+
* @since 5.3.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
$request_vars = tribe_get_request_vars();
|
11 |
+
|
12 |
+
// Bail if we're not in the correct context, when Stripe was connected.
|
13 |
+
if ( empty( $request_vars['tc-status'] ) || 'stripe-signup-complete' !== $request_vars['tc-status'] ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
$dialog_view = tribe( 'dialog.view' );
|
18 |
+
$content = $this->template( 'settings/tickets-commerce/stripe/modal/signup-complete/content', [], false );
|
19 |
+
|
20 |
+
$args = [
|
21 |
+
'append_target' => '#stripe-connected-modal-target',
|
22 |
+
'button_id' => 'stripe-connected-modal-button',
|
23 |
+
'content_wrapper_classes' => 'tribe-dialog__wrapper tribe-tickets__admin-container event-tickets tribe-common tribe-modal__wrapper--stripe-connected',
|
24 |
+
'title' => esc_html__( "You are now connected to Stripe! What's next?", 'event-tickets' ),
|
25 |
+
'title_classes' => [
|
26 |
+
'tribe-dialog__title',
|
27 |
+
'tribe-modal__title',
|
28 |
+
'tribe-common-h5',
|
29 |
+
'tribe-modal__title--gateway-connected',
|
30 |
+
],
|
31 |
+
];
|
32 |
+
|
33 |
+
ob_start();
|
34 |
+
$dialog_view->render_modal( $content, $args, 'stripe-connected-modal-id' );
|
35 |
+
$modal_content = ob_get_clean();
|
36 |
+
|
37 |
+
$modal = '<div class="tribe-common event-tickets">';
|
38 |
+
$modal .= '<span id="stripe-connected-modal-target"></span>';
|
39 |
+
$modal .= $modal_content;
|
40 |
+
$modal .= '</div>';
|
41 |
+
|
42 |
+
echo $modal; // phpcs:ignore
|
src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe modal content when connected.
|
4 |
+
*
|
5 |
+
* @version 5.3.0
|
6 |
+
*
|
7 |
+
* @since 5.3.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
?>
|
11 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-stripe-modal-content tec-tickets__admin-modal tribe-common-b2">
|
12 |
+
|
13 |
+
<?php $this->template( 'settings/tickets-commerce/stripe/modal/signup-complete/notice-test-mode' ); ?>
|
14 |
+
|
15 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section">
|
16 |
+
<strong><?php esc_html_e( 'Currency', 'event-tickets' ); ?></strong> —
|
17 |
+
<?php
|
18 |
+
esc_html_e( 'Be sure that your Stripe currency matches the currency you have configured for Tickets Commerce, to avoid any issues or unexpected conversion fees.', 'event-tickets' );
|
19 |
+
?>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section">
|
23 |
+
<strong><?php esc_html_e( 'Payment methods', 'event-tickets' ); ?></strong> —
|
24 |
+
<?php
|
25 |
+
printf(
|
26 |
+
// Translators: %1$s: opening `a` tag to stripe's dashboard. %2$s: closing `a` tag.
|
27 |
+
esc_html__( 'You will have to confirm that the payments methods you have selected to sell tickets are enabled on the %1$sStripe payment methods section%2$s.', 'event-tickets' ),
|
28 |
+
'<a href="https://dashboard.stripe.com/settings/payment_methods" target="_blank" rel="noopener noreferrer" class="tribe-common-anchor-alt">',
|
29 |
+
'</a>'
|
30 |
+
);
|
31 |
+
?>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section">
|
35 |
+
<strong><?php esc_html_e( 'Webhooks', 'event-tickets' ); ?></strong> —
|
36 |
+
<?php
|
37 |
+
printf(
|
38 |
+
// Translators: %1$s: opening `a` tag to the knowledge base article. %2$s: closing `a` tag.
|
39 |
+
esc_html__( 'In order for ticket sales to be marked as complete for some payment methods on your Stripe gateway for your Event Tickets site, you must configure the webhook at Stripe. %1$sLearn how to set up webhooks here%2$s.', 'event-tickets' ),
|
40 |
+
'<a href="https://evnt.is/1b3p" target="_blank" rel="noopener noreferrer" class="tribe-common-anchor-alt">',
|
41 |
+
'</a>'
|
42 |
+
);
|
43 |
+
?>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section">
|
47 |
+
<strong><?php esc_html_e( 'PCI Compliance', 'event-tickets' ); ?></strong> —
|
48 |
+
<?php
|
49 |
+
printf(
|
50 |
+
// Translators: %1$s: opening `a` tag to the knowledge base article. %2$s: closing `a` tag.
|
51 |
+
esc_html__( 'Stripe allows you to accept credit or debit cards directly on your website. Because of this, your site needs to maintain %1$sPCI-DSS compliance%2$s.', 'event-tickets' ),
|
52 |
+
'<a href="https://theeventscalendar.com/knowledgebase/k/pci-compliance/" target="_blank" rel="noopener noreferrer" class="tribe-common-anchor-alt">',
|
53 |
+
'</a>'
|
54 |
+
);
|
55 |
+
?>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
|
59 |
+
<div class="tec-tickets__admin-modal-buttons">
|
60 |
+
|
61 |
+
<button
|
62 |
+
data-js="a11y-close-button"
|
63 |
+
class="tribe-common-c-btn tribe-common-b1 tribe-common-b2--min-medium tribe-modal__close-button"
|
64 |
+
type="button"
|
65 |
+
aria-label="<?php esc_attr_e( 'Close this modal window', 'event-tickets' ); ?>"
|
66 |
+
>
|
67 |
+
<?php esc_html_e( 'Got it, thanks!', 'event-tickets' ); ?>
|
68 |
+
</button>
|
69 |
+
|
70 |
+
</div>
|
71 |
+
|
72 |
+
</div>
|
src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/notice-test-mode.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce Stripe modal notice when connected.
|
4 |
+
*
|
5 |
+
* @version 5.3.0
|
6 |
+
*
|
7 |
+
* @since 5.3.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Bail if not in sandbox mode.
|
11 |
+
if ( empty( tec_tickets_commerce_is_sandbox_mode() ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
tribe( 'tickets.editor.template' )->template(
|
16 |
+
'components/notice',
|
17 |
+
[
|
18 |
+
'id' => 'tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error',
|
19 |
+
'notice_classes' => [
|
20 |
+
'tribe-tickets__notice--error',
|
21 |
+
'tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error',
|
22 |
+
],
|
23 |
+
'content' => __( 'Your connection is active, but Tickets Commerce is set to test mode. While in test mode no live transactions are processed.', 'event-tickets' ),
|
24 |
+
]
|
25 |
+
);
|
src/admin-views/settings/tickets-commerce/stripe/signup-link.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template to display the Stripe signup link.
|
4 |
+
*
|
5 |
+
* @since 5.3.0
|
6 |
+
*
|
7 |
+
* @var Tribe__Tickets__Admin__Views $this Template object.
|
8 |
+
* @var array $gateways Array of gateway objects.
|
9 |
+
*/
|
10 |
+
|
11 |
+
?>
|
12 |
+
<div
|
13 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings"
|
14 |
+
>
|
15 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-gateway-connect-button">
|
16 |
+
<a
|
17 |
+
data-gateway-onboard-complete="tecTicketsCommerceGatewayStripeSignupCallback"
|
18 |
+
href="<?php echo esc_url( $url ); ?>"
|
19 |
+
data-gateway-button="true"
|
20 |
+
id="connect_to_stripe"
|
21 |
+
class="tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link"
|
22 |
+
>
|
23 |
+
<?php echo wp_kses( __( 'Get Connected with <i>Stripe</i>', 'event-tickets' ), [ 'i'=> [], 'em' => [], 'strong' => [] ] ); ?>
|
24 |
+
</a>
|
25 |
+
</div>
|
26 |
+
</div>
|
src/resources/css/tickets-admin-settings.css
CHANGED
@@ -777,6 +777,7 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
777 |
@todo @juanfra: This was already here, inherited. We need to move to common.
|
778 |
*/
|
779 |
|
|
|
780 |
#tribe-field-tickets-commerce-paypal-commerce-configure {
|
781 |
padding-left: 0;
|
782 |
width: 100%;
|
@@ -786,7 +787,7 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
786 |
@todo @juanfra: This was already here, inherited. We need to move to common.
|
787 |
*/
|
788 |
|
789 |
-
#tribe-field-tickets-commerce-paypal-commerce-configure .tribe-field-wrap {
|
790 |
float: none;
|
791 |
max-width: none;
|
792 |
}
|
@@ -862,7 +863,7 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
862 |
max-width: 84%;
|
863 |
}
|
864 |
|
865 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
866 |
background: #fff;
|
867 |
border: 1px solid #ccc;
|
868 |
border-radius: 4px;
|
@@ -870,67 +871,73 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
870 |
display: flex;
|
871 |
flex-direction: row;
|
872 |
justify-content: space-around;
|
|
|
873 |
padding: 45px 32px 20px 32px;
|
874 |
}
|
875 |
|
876 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
877 |
font-size: 20px;
|
878 |
}
|
879 |
|
880 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
|
|
|
|
|
|
881 |
margin-bottom: 20px;
|
882 |
}
|
883 |
|
884 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
885 |
max-width: 470px;
|
886 |
}
|
887 |
|
888 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
889 |
margin-top: var(--tec-spacer-8);
|
890 |
}
|
891 |
|
892 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
893 |
margin-top: var(--tec-spacer-8);
|
894 |
}
|
895 |
|
896 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
897 |
align-items: center;
|
898 |
display: flex;
|
899 |
}
|
900 |
|
901 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
902 |
margin-bottom: 8px;
|
903 |
}
|
904 |
|
905 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
906 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
907 |
margin-left: 8px;
|
908 |
}
|
909 |
|
910 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
911 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
912 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
913 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
914 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
915 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
916 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
917 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
918 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
919 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
920 |
color: #405bfb;
|
921 |
}
|
922 |
|
923 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
924 |
list-style: none;
|
925 |
margin: inherit;
|
926 |
}
|
927 |
|
928 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
929 |
line-height: 1.8;
|
930 |
margin-bottom: 16px;
|
931 |
}
|
932 |
|
933 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
934 |
background-color: #405bfb;
|
935 |
border-radius: 100%;
|
936 |
content: '';
|
@@ -940,7 +947,7 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
940 |
width: 7px;
|
941 |
}
|
942 |
|
943 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
944 |
display: none;
|
945 |
flex-basis: 290px;
|
946 |
font-size: 13px;
|
@@ -948,27 +955,28 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
948 |
font-weight: normal;
|
949 |
letter-spacing: 0.02em;
|
950 |
line-height: 16px;
|
|
|
951 |
}
|
952 |
|
953 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
954 |
height: auto;
|
955 |
margin-bottom: 32px;
|
956 |
max-width: 232px;
|
957 |
width: 100%;
|
958 |
}
|
959 |
|
960 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
961 |
display: flex;
|
962 |
flex: 1;
|
963 |
}
|
964 |
|
965 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
966 |
color: #1eb056;
|
967 |
font-size: 16px;
|
968 |
font-weight: 600;
|
969 |
}
|
970 |
|
971 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
972 |
display: flex;
|
973 |
font-size: 13px;
|
974 |
font-weight: normal;
|
@@ -976,21 +984,21 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
976 |
text-align: left;
|
977 |
}
|
978 |
|
979 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
980 |
flex-basis: 20%;
|
981 |
min-width: 125px;
|
982 |
}
|
983 |
|
984 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
985 |
flex-basis: 80%;
|
986 |
}
|
987 |
|
988 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
989 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
990 |
flex-direction: column;
|
991 |
}
|
992 |
|
993 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
994 |
background: #405bfb;
|
995 |
border-radius: 4px;
|
996 |
color: #fff;
|
@@ -1006,66 +1014,92 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
1006 |
width: 100%;
|
1007 |
}
|
1008 |
|
1009 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1010 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1011 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1012 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1013 |
color: #fff;
|
1014 |
}
|
1015 |
|
1016 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1017 |
background-color: var(--tec-color-button-primary-background);
|
1018 |
pointer-events: none;
|
1019 |
}
|
1020 |
|
1021 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1022 |
font-weight: 700;
|
1023 |
}
|
1024 |
|
1025 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1026 |
border-bottom: 1px solid #405bfb;
|
1027 |
font-size: 13px;
|
1028 |
margin-left: 10px;
|
1029 |
text-transform: lowercase;
|
1030 |
}
|
1031 |
|
1032 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1033 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1034 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1035 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1036 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1037 |
color: #405bfb;
|
1038 |
}
|
1039 |
|
1040 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1041 |
max-width: 340px;
|
1042 |
width: 100%;
|
1043 |
}
|
1044 |
|
1045 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1046 |
margin-bottom: 8px;
|
1047 |
}
|
1048 |
|
1049 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
1050 |
display: none !important;
|
1051 |
visibility: hidden;
|
1052 |
}
|
1053 |
|
1054 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
1055 |
color: var(--tec-color-text-primary-light);
|
1056 |
text-decoration: line-through;
|
1057 |
}
|
1058 |
|
1059 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1060 |
color: var(--color-icon-error);
|
1061 |
margin-left: 8px;
|
1062 |
}
|
1063 |
|
1064 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1065 |
margin-top: 20px;
|
1066 |
}
|
1067 |
|
1068 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1069 |
color: var(--tec-color-text-primary);
|
1070 |
font-family: var(--tec-font-family-sans-serif);
|
1071 |
font-size: var(--tec-font-size-2);
|
@@ -1089,21 +1123,21 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
1089 |
width: auto;
|
1090 |
}
|
1091 |
|
1092 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1093 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1094 |
background-color: var(--tec-color-button-primary-hover);
|
1095 |
color: white;
|
1096 |
}
|
1097 |
|
1098 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1099 |
background-color: var(--tec-color-button-primary-active);
|
1100 |
}
|
1101 |
|
1102 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1103 |
background-color: var(--tec-color-button-primary-background);
|
1104 |
}
|
1105 |
|
1106 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1107 |
margin-right: 8px;
|
1108 |
position: relative;
|
1109 |
stroke: white;
|
@@ -1111,29 +1145,29 @@ a.event-tickets__admin-tc-banner-link:active,
|
|
1111 |
width: 16px;
|
1112 |
}
|
1113 |
|
1114 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1115 |
fill: none;
|
1116 |
}
|
1117 |
|
1118 |
-
.tribe-common.tribe-modal__wrapper--
|
1119 |
display: block;
|
1120 |
}
|
1121 |
|
1122 |
-
.tribe-common.tribe-modal__wrapper--
|
1123 |
width: auto;
|
1124 |
}
|
1125 |
|
1126 |
-
.tribe-common.tribe-modal__wrapper--
|
1127 |
list-style: initial;
|
1128 |
margin: 1em 0;
|
1129 |
padding-left: 16px;
|
1130 |
}
|
1131 |
|
1132 |
-
.tribe-common.tribe-modal__wrapper--
|
1133 |
margin: 1em 0;
|
1134 |
}
|
1135 |
|
1136 |
-
.tribe-common.tribe-modal__wrapper--
|
1137 |
display: flex;
|
1138 |
justify-content: flex-end;
|
1139 |
margin-top: 26px;
|
@@ -1143,10 +1177,181 @@ body.events-cal .tribe-common div.tribe-dialog, body.events-cal .event-tickets d
|
|
1143 |
z-index: 99999;
|
1144 |
}
|
1145 |
|
1146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1147 |
display: none;
|
1148 |
}
|
1149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1150 |
/* @todo: Check this, see if it goes to common or where should we place it. */
|
1151 |
|
1152 |
.tribe-settings-form-wrap h3 {
|
@@ -1169,33 +1374,40 @@ body.events-cal .tribe-common div.tribe-dialog, body.events-cal .event-tickets d
|
|
1169 |
width: auto
|
1170 |
}
|
1171 |
|
1172 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1173 |
-
background-image: url("../images/background-
|
1174 |
background-position: center right;
|
1175 |
-
background-repeat: no-repeat
|
|
|
1176 |
}
|
1177 |
|
1178 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1179 |
height: 42px;
|
1180 |
}
|
1181 |
|
1182 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1183 |
line-height: 42px;
|
1184 |
padding-left: 16px;
|
1185 |
}
|
1186 |
|
1187 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1188 |
height: 42px;
|
1189 |
right: 12px;
|
1190 |
}
|
1191 |
|
1192 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1193 |
display: flex
|
1194 |
}
|
1195 |
|
1196 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
1197 |
padding-right: 74px
|
1198 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1199 |
}
|
1200 |
|
1201 |
@media (min-width: 960px) {
|
777 |
@todo @juanfra: This was already here, inherited. We need to move to common.
|
778 |
*/
|
779 |
|
780 |
+
#tribe-field-tickets-commerce-stripe-commerce-configure,
|
781 |
#tribe-field-tickets-commerce-paypal-commerce-configure {
|
782 |
padding-left: 0;
|
783 |
width: 100%;
|
787 |
@todo @juanfra: This was already here, inherited. We need to move to common.
|
788 |
*/
|
789 |
|
790 |
+
#tribe-field-tickets-commerce-stripe-commerce-configure .tribe-field-wrap, #tribe-field-tickets-commerce-paypal-commerce-configure .tribe-field-wrap {
|
791 |
float: none;
|
792 |
max-width: none;
|
793 |
}
|
863 |
max-width: 84%;
|
864 |
}
|
865 |
|
866 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway {
|
867 |
background: #fff;
|
868 |
border: 1px solid #ccc;
|
869 |
border-radius: 4px;
|
871 |
display: flex;
|
872 |
flex-direction: row;
|
873 |
justify-content: space-around;
|
874 |
+
margin-bottom: var(--tec-spacer-3);
|
875 |
padding: 45px 32px 20px 32px;
|
876 |
}
|
877 |
|
878 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-title {
|
879 |
font-size: 20px;
|
880 |
}
|
881 |
|
882 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-description {
|
883 |
+
align-items: start;
|
884 |
+
display: flex;
|
885 |
+
flex-direction: column;
|
886 |
+
flex-grow: 1;
|
887 |
margin-bottom: 20px;
|
888 |
}
|
889 |
|
890 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-description p {
|
891 |
max-width: 470px;
|
892 |
}
|
893 |
|
894 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-signup-links {
|
895 |
+
flex-grow: 1;
|
896 |
margin-top: var(--tec-spacer-8);
|
897 |
}
|
898 |
|
899 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-links {
|
900 |
margin-top: var(--tec-spacer-8);
|
901 |
}
|
902 |
|
903 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link {
|
904 |
align-items: center;
|
905 |
display: flex;
|
906 |
}
|
907 |
|
908 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link:not(:last-of-type) {
|
909 |
margin-bottom: 8px;
|
910 |
}
|
911 |
|
912 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link,
|
913 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url {
|
914 |
margin-left: 8px;
|
915 |
}
|
916 |
|
917 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link,
|
918 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:hover,
|
919 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:active,
|
920 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:visited,
|
921 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:focus,
|
922 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,
|
923 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:hover,
|
924 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:active,
|
925 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:visited,
|
926 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:focus {
|
927 |
color: #405bfb;
|
928 |
}
|
929 |
|
930 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul {
|
931 |
list-style: none;
|
932 |
margin: inherit;
|
933 |
}
|
934 |
|
935 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo li {
|
936 |
line-height: 1.8;
|
937 |
margin-bottom: 16px;
|
938 |
}
|
939 |
|
940 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul li:before {
|
941 |
background-color: #405bfb;
|
942 |
border-radius: 100%;
|
943 |
content: '';
|
947 |
width: 7px;
|
948 |
}
|
949 |
|
950 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo {
|
951 |
display: none;
|
952 |
flex-basis: 290px;
|
953 |
font-size: 13px;
|
955 |
font-weight: normal;
|
956 |
letter-spacing: 0.02em;
|
957 |
line-height: 16px;
|
958 |
+
margin-bottom: var(--tec-spacer-4);
|
959 |
}
|
960 |
|
961 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo-image {
|
962 |
height: auto;
|
963 |
margin-bottom: 32px;
|
964 |
max-width: 232px;
|
965 |
width: 100%;
|
966 |
}
|
967 |
|
968 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect {
|
969 |
display: flex;
|
970 |
flex: 1;
|
971 |
}
|
972 |
|
973 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect-text--connected {
|
974 |
color: #1eb056;
|
975 |
font-size: 16px;
|
976 |
font-weight: 600;
|
977 |
}
|
978 |
|
979 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-row {
|
980 |
display: flex;
|
981 |
font-size: 13px;
|
982 |
font-weight: normal;
|
984 |
text-align: left;
|
985 |
}
|
986 |
|
987 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1 {
|
988 |
flex-basis: 20%;
|
989 |
min-width: 125px;
|
990 |
}
|
991 |
|
992 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2 {
|
993 |
flex-basis: 80%;
|
994 |
}
|
995 |
|
996 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect,
|
997 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo {
|
998 |
flex-direction: column;
|
999 |
}
|
1000 |
|
1001 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link {
|
1002 |
background: #405bfb;
|
1003 |
border-radius: 4px;
|
1004 |
color: #fff;
|
1014 |
width: 100%;
|
1015 |
}
|
1016 |
|
1017 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:hover,
|
1018 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:active,
|
1019 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:visited,
|
1020 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:focus {
|
1021 |
color: #fff;
|
1022 |
}
|
1023 |
|
1024 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link.disabled {
|
1025 |
background-color: var(--tec-color-button-primary-background);
|
1026 |
pointer-events: none;
|
1027 |
}
|
1028 |
|
1029 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name {
|
1030 |
font-weight: 700;
|
1031 |
}
|
1032 |
|
1033 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link {
|
1034 |
border-bottom: 1px solid #405bfb;
|
1035 |
font-size: 13px;
|
1036 |
margin-left: 10px;
|
1037 |
text-transform: lowercase;
|
1038 |
}
|
1039 |
|
1040 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link,
|
1041 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:hover,
|
1042 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:active,
|
1043 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:visited,
|
1044 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:focus {
|
1045 |
color: #405bfb;
|
1046 |
}
|
1047 |
|
1048 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-currency {
|
1049 |
+
color: var(--tec-color-text-primary);
|
1050 |
+
font-weight: bold;
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message {
|
1054 |
+
color: #a3a3a3;
|
1055 |
+
margin-top: var(--tec-spacer-1);
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message--error {
|
1059 |
+
color: var(--tec-color-icon-error);
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-capability--no {
|
1063 |
+
color: var(--tec-color-icon-error);
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
/* @todo: Add following green color as variable in common? */
|
1067 |
+
|
1068 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-capability--yes {
|
1069 |
+
color: #1eb056;
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings {
|
1073 |
max-width: 340px;
|
1074 |
width: 100%;
|
1075 |
}
|
1076 |
|
1077 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(last-of-type) {
|
1078 |
margin-bottom: 8px;
|
1079 |
}
|
1080 |
|
1081 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error,
|
1082 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error {
|
1083 |
display: none !important;
|
1084 |
visibility: hidden;
|
1085 |
}
|
1086 |
|
1087 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name,
|
1088 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-name {
|
1089 |
color: var(--tec-color-text-primary-light);
|
1090 |
text-decoration: line-through;
|
1091 |
}
|
1092 |
|
1093 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error {
|
1094 |
color: var(--color-icon-error);
|
1095 |
margin-left: 8px;
|
1096 |
}
|
1097 |
|
1098 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions-debug {
|
1099 |
margin-top: 20px;
|
1100 |
}
|
1101 |
|
1102 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button {
|
1103 |
color: var(--tec-color-text-primary);
|
1104 |
font-family: var(--tec-font-family-sans-serif);
|
1105 |
font-size: var(--tec-font-size-2);
|
1123 |
width: auto;
|
1124 |
}
|
1125 |
|
1126 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:focus,
|
1127 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:hover {
|
1128 |
background-color: var(--tec-color-button-primary-hover);
|
1129 |
color: white;
|
1130 |
}
|
1131 |
|
1132 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:active {
|
1133 |
background-color: var(--tec-color-button-primary-active);
|
1134 |
}
|
1135 |
|
1136 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:disabled {
|
1137 |
background-color: var(--tec-color-button-primary-background);
|
1138 |
}
|
1139 |
|
1140 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon {
|
1141 |
margin-right: 8px;
|
1142 |
position: relative;
|
1143 |
stroke: white;
|
1145 |
width: 16px;
|
1146 |
}
|
1147 |
|
1148 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon path {
|
1149 |
fill: none;
|
1150 |
}
|
1151 |
|
1152 |
+
.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice, .event-tickets.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice {
|
1153 |
display: block;
|
1154 |
}
|
1155 |
|
1156 |
+
.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn, .event-tickets.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn {
|
1157 |
width: auto;
|
1158 |
}
|
1159 |
|
1160 |
+
.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list, .event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list {
|
1161 |
list-style: initial;
|
1162 |
margin: 1em 0;
|
1163 |
padding-left: 16px;
|
1164 |
}
|
1165 |
|
1166 |
+
.tribe-common.tribe-modal__wrapper--gateway-connected p, .event-tickets.tribe-modal__wrapper--gateway-connected p {
|
1167 |
margin: 1em 0;
|
1168 |
}
|
1169 |
|
1170 |
+
.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons, .event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons {
|
1171 |
display: flex;
|
1172 |
justify-content: flex-end;
|
1173 |
margin-top: 26px;
|
1177 |
z-index: 99999;
|
1178 |
}
|
1179 |
|
1180 |
+
.tribe-common .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error, .event-tickets .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error {
|
1181 |
+
display: block;
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title, .event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title {
|
1185 |
+
margin-bottom: var(--tec-spacer-3);
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section, .event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section {
|
1189 |
+
margin-bottom: var(--tec-spacer-3);
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
#paypal-connected-modal-button,
|
1193 |
+
#stripe-connected-modal-button {
|
1194 |
display: none;
|
1195 |
}
|
1196 |
|
1197 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu {
|
1198 |
+
padding-top: var(--tec-spacer-6);
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link {
|
1202 |
+
border-bottom-color: #c4c4c4;
|
1203 |
+
border-bottom-style: solid;
|
1204 |
+
border-bottom-width: 1px;
|
1205 |
+
color: #23282d;
|
1206 |
+
display: inline-block;
|
1207 |
+
font-size: var(--tec-font-size-2);
|
1208 |
+
margin-right: var(--tec-spacer-5);
|
1209 |
+
padding-bottom: var(--tec-spacer-1);
|
1210 |
+
text-decoration: none;
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active {
|
1214 |
+
border-bottom-width: var(--tec-spacer-0);
|
1215 |
+
font-weight: bold;
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active,
|
1219 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link:hover {
|
1220 |
+
border-bottom-color: var(--tec-color-accent-primary);
|
1221 |
+
color: #23282d;
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
.tec-tickets__admin-settings-featured {
|
1225 |
+
background-color: var(--tec-color-background);
|
1226 |
+
border: solid 1px var(--tec-color-border-default);
|
1227 |
+
border-radius: 8px;
|
1228 |
+
margin-bottom: var(--tec-spacer-7);
|
1229 |
+
padding: var(--tec-spacer-8);
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
.tec-tickets__admin-settings-featured-title {
|
1233 |
+
background-color: transparent;
|
1234 |
+
font-size: var(--tec-font-size-5);
|
1235 |
+
font-weight: bold;
|
1236 |
+
margin-bottom: var(--tec-spacer-2);
|
1237 |
+
padding: var(--tec-spacer-1) 0;
|
1238 |
+
}
|
1239 |
+
|
1240 |
+
.tec-tickets__admin-settings-featured-description {
|
1241 |
+
margin-bottom: var(--tec-spacer-4);
|
1242 |
+
max-width: 720px;
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
.tec-tickets__admin-settings-featured-link {
|
1246 |
+
align-items: center;
|
1247 |
+
display: flex;
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
.tec-tickets__admin-settings-featured-link-url {
|
1251 |
+
color: var(--tec-color-accent-primary);
|
1252 |
+
padding: 0 var(--tec-spacer-1);
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item {
|
1256 |
+
margin-bottom: var(--tec-spacer-7);
|
1257 |
+
padding-bottom: var(--tec-spacer-0);
|
1258 |
+
text-align: center;
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item > div {
|
1262 |
+
padding: var(--tec-spacer-0) 0;
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle {
|
1266 |
+
margin-right: 35px;
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand {
|
1270 |
+
flex-grow: 1;
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo-image {
|
1274 |
+
max-height: var(--tec-spacer-10);
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-subtitle {
|
1278 |
+
font-size: 13px;
|
1279 |
+
font-style: italic;
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link {
|
1283 |
+
background-color: var(--tec-color-accent-primary);
|
1284 |
+
border-radius: var(--tec-border-radius-default);
|
1285 |
+
color: #fff;
|
1286 |
+
display: inline-block;
|
1287 |
+
font-size: var(--tec-font-size-2);
|
1288 |
+
font-weight: var(--tec-font-weight-bold);
|
1289 |
+
padding: var(--tec-spacer-2) var(--tec-spacer-3);
|
1290 |
+
text-align: center;
|
1291 |
+
text-decoration: none;
|
1292 |
+
width: 180px;
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active,
|
1296 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:hover {
|
1297 |
+
background-color: var(--tec-color-button-primary-hover);
|
1298 |
+
color: #fff;
|
1299 |
+
}
|
1300 |
+
|
1301 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active {
|
1302 |
+
background-color: var(--tec-color-button-primary-active);
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active {
|
1306 |
+
background-color: var(--tec-color-background);
|
1307 |
+
border-color: #3c434a;
|
1308 |
+
border-style: solid;
|
1309 |
+
border-width: 1px;
|
1310 |
+
color: #3c434a;
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active,
|
1314 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:hover {
|
1315 |
+
background-color: var(--tec-color-button-primary-hover);
|
1316 |
+
border-color: var(--tec-color-button-primary-hover);
|
1317 |
+
color: #fff;
|
1318 |
+
}
|
1319 |
+
|
1320 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active {
|
1321 |
+
background-color: var(--tec-color-button-primary-active);
|
1322 |
+
border-color: var(--tec-color-button-primary-active);
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle .tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked + .tec-tickets__admin-settings-tickets-commerce-toggle-switch {
|
1326 |
+
background: #50b078;
|
1327 |
+
}
|
1328 |
+
|
1329 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-group-header {
|
1330 |
+
background: #f9f9f9;
|
1331 |
+
color: #23282d;
|
1332 |
+
font-size: var(--tec-font-size-4);
|
1333 |
+
font-weight: var(--tec-font-weight-bold);
|
1334 |
+
padding: var(--tec-spacer-1) var(--tec-spacer-2);
|
1335 |
+
width: 100%;
|
1336 |
+
}
|
1337 |
+
|
1338 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-group-header:first-of-type {
|
1339 |
+
margin-top: 0;
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-status {
|
1343 |
+
color: var(--tec-color-text-disabled);
|
1344 |
+
font-size: var(--tec-font-size-2);
|
1345 |
+
font-style: italic;
|
1346 |
+
font-weight: var(--tec-font-weight-normal);
|
1347 |
+
margin: 0 var(--tec-spacer-8);
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-status--enabled {
|
1351 |
+
color: #50b078;
|
1352 |
+
font-weight: var(--tec-font-weight-bold);
|
1353 |
+
}
|
1354 |
+
|
1355 |
/* @todo: Check this, see if it goes to common or where should we place it. */
|
1356 |
|
1357 |
.tribe-settings-form-wrap h3 {
|
1374 |
width: auto
|
1375 |
}
|
1376 |
|
1377 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway {
|
1378 |
+
background-image: url("../images/background-gateway-connect.png");
|
1379 |
background-position: center right;
|
1380 |
+
background-repeat: no-repeat;
|
1381 |
+
background-size: 420px 100%
|
1382 |
}
|
1383 |
|
1384 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single {
|
1385 |
height: 42px;
|
1386 |
}
|
1387 |
|
1388 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single .select2-selection__rendered {
|
1389 |
line-height: 42px;
|
1390 |
padding-left: 16px;
|
1391 |
}
|
1392 |
|
1393 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .select2-container--default .select2-selection--single .select2-selection__arrow {
|
1394 |
height: 42px;
|
1395 |
right: 12px;
|
1396 |
}
|
1397 |
|
1398 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo {
|
1399 |
display: flex
|
1400 |
}
|
1401 |
|
1402 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect {
|
1403 |
padding-right: 74px
|
1404 |
}
|
1405 |
+
|
1406 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item {
|
1407 |
+
align-items: center;
|
1408 |
+
display: flex;
|
1409 |
+
text-align: left
|
1410 |
+
}
|
1411 |
}
|
1412 |
|
1413 |
@media (min-width: 960px) {
|
src/resources/css/tickets-admin-settings.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets__admin-banner{background-color:#f9f9f9;border:1px solid #ccc;border-left:5px solid #50b078;border-radius:4px;margin:20px 0;padding:8px 24px 12px}.event-tickets__admin-banner a{text-decoration:none}.event-tickets__admin-banner p.event-tickets__admin-banner-help-text{max-width:690px}.event-tickets__admin-banner-help-links-wrapper{display:flex;max-width:690px}.event-tickets__admin-banner-help-links-wrapper div{min-width:50%}.event-tickets__admin-banner-links h3{font-size:14px}.event-tickets__admin-banner-links-link-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;margin-left:8px;padding:3px 5px;text-transform:uppercase}.event-tickets__admin-tc-banner-header-title{font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-5);line-height:var(--tec-line-height-0);margin:0;padding:0}.event-tickets__admin-tc-banner-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;letter-spacing:1px;line-height:1;margin-bottom:3px;margin-left:8px;padding:3px 8px;text-transform:uppercase}.event-tickets__admin-tc-banner-header{align-items:center;display:flex;justify-content:start;padding-top:var(--tec-spacer-4)}.event-tickets__admin-tc-banner-footer{align-items:center;display:flex;justify-content:start;padding-bottom:var(--tec-spacer-4);padding-top:var(--tec-spacer-3)}.event-tickets__admin-tc-banner-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:#405bfb;color:#fff;margin-right:var(--tec-spacer-5);padding:var(--tec-spacer-1) var(--tec-spacer-5)}.event-tickets__admin-tc-banner-button:active,.event-tickets__admin-tc-banner-button:focus,.event-tickets__admin-tc-banner-button:hover{background-color:var(--tec-color-accent-primary-hover);color:#fff}a.event-tickets__admin-tc-banner-link{color:#405bfb;text-decoration:underline}a.event-tickets__admin-tc-banner-link:active,a.event-tickets__admin-tc-banner-link:focus,a.event-tickets__admin-tc-banner-link:hover{color:var(--tec-color-accent-primary-hover);text-decoration:none}#tribe-field-tickets-commerce-paypal-commerce-configure{padding-left:0;width:100%}#tribe-field-tickets-commerce-paypal-commerce-configure .tribe-field-wrap{float:none;max-width:none}.tec-tickets__admin-settings-tickets-commerce-toggle-wrapper{margin-bottom:20px;margin-top:45px}.tec-tickets__admin-settings-tickets-commerce-toggle{cursor:pointer;display:flex}.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#ccc;border-radius:16px;display:inline-block;height:22px;position:relative;transition:background .4s;vertical-align:middle;width:40px}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:after,.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{content:""}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#eee);border-radius:50%;display:block;height:16px;left:3px;position:absolute;top:3px;transition:left .4s;width:16px}.tec-tickets__admin-settings-tickets-commerce-toggle:hover .tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#fff)}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#278dbc}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{left:20px}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox{position:absolute;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-toggle-label{color:#1d2327;font-size:20px;font-weight:600;line-height:23px;margin-left:15px;position:relative}.tec-tickets__admin-settings-tickets-commerce-description{font-size:13px;font-weight:400;margin-bottom:35px;max-width:84%}.tec-tickets__admin-settings-tickets-commerce-paypal{background:#fff;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-around;padding:45px 32px 20px}.tec-tickets__admin-settings-tickets-commerce-paypal-title{font-size:20px}.tec-tickets__admin-settings-tickets-commerce-paypal-description{margin-bottom:20px}.tec-tickets__admin-settings-tickets-commerce-paypal-description p{max-width:470px}.tec-tickets__admin-settings-tickets-commerce-paypal-help-links,.tec-tickets__admin-settings-tickets-commerce-paypal-signup-links{margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-paypal-help-link{align-items:center;display:flex}.tec-tickets__admin-settings-tickets-commerce-paypal-help-link:not(:last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-paypal-help-link-url,.tec-tickets__admin-settings-tickets-commerce-paypal-refresh-link{margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-paypal-help-link-url,.tec-tickets__admin-settings-tickets-commerce-paypal-help-link-url:active,.tec-tickets__admin-settings-tickets-commerce-paypal-help-link-url:focus,.tec-tickets__admin-settings-tickets-commerce-paypal-help-link-url:hover,.tec-tickets__admin-settings-tickets-commerce-paypal-help-link-url:visited,.tec-tickets__admin-settings-tickets-commerce-paypal-refresh-link,.tec-tickets__admin-settings-tickets-commerce-paypal-refresh-link:active,.tec-tickets__admin-settings-tickets-commerce-paypal-refresh-link:focus,.tec-tickets__admin-settings-tickets-commerce-paypal-refresh-link:hover,.tec-tickets__admin-settings-tickets-commerce-paypal-refresh-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-paypal-logo ul{list-style:none;margin:inherit}.tec-tickets__admin-settings-tickets-commerce-paypal-logo li{line-height:1.8;margin-bottom:16px}.tec-tickets__admin-settings-tickets-commerce-paypal-logo ul li:before{background-color:#405bfb;border-radius:100%;content:"";display:inline-block;height:7px;margin-right:7px;width:7px}.tec-tickets__admin-settings-tickets-commerce-paypal-logo{display:none;flex-basis:290px;font-size:13px;font-style:italic;font-weight:400;letter-spacing:.02em;line-height:16px}.tec-tickets__admin-settings-tickets-commerce-paypal-logo-image{height:auto;margin-bottom:32px;max-width:232px;width:100%}.tec-tickets__admin-settings-tickets-commerce-paypal-connect{display:flex;flex:1}.tec-tickets__admin-settings-tickets-commerce-paypal-connect-text--connected{color:#1eb056;font-size:16px;font-weight:600}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-row{display:flex;font-size:13px;font-weight:400;margin:20px 0;text-align:left}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-col1{flex-basis:20%;min-width:125px}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-col2{flex-basis:80%}.tec-tickets__admin-settings-tickets-commerce-paypal-connect,.tec-tickets__admin-settings-tickets-commerce-paypal-logo{flex-direction:column}.tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link{background:#405bfb;border-radius:4px;color:#fff;display:inline-block;font-size:16px;font-weight:600;line-height:18px;margin-top:25px;min-width:340px;padding:15px 0;text-align:center;text-decoration:none;width:100%}.tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link:active,.tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link:focus,.tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link:hover,.tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link:visited{color:#fff}.tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link.disabled{background-color:var(--tec-color-button-primary-background);pointer-events:none}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-name{font-weight:700}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link{border-bottom:1px solid #405bfb;font-size:13px;margin-left:10px;text-transform:lowercase}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link,.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link:active,.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link:focus,.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link:hover,.tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-paypal-signup-settings{max-width:340px;width:100%}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook:not(last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error{display:none!important;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name{color:var(--tec-color-text-primary-light);text-decoration:line-through}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error{color:var(--color-icon-error);margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-actions-debug{margin-top:20px}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:var(--tec-color-button-primary);padding:11px 20px;width:auto}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button:focus,.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button:disabled{background-color:var(--tec-color-button-primary-background)}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button-icon{margin-right:8px;position:relative;stroke:#fff;top:3px;width:16px}.tec-tickets__admin-settings-tickets-commerce-paypal-connected-resync-button-icon path{fill:none}.event-tickets.tribe-modal__wrapper--paypal-connected .tribe-tickets__notice,.tribe-common.tribe-modal__wrapper--paypal-connected .tribe-tickets__notice{display:block}.event-tickets.tribe-modal__wrapper--paypal-connected .tribe-common-c-btn,.tribe-common.tribe-modal__wrapper--paypal-connected .tribe-common-c-btn{width:auto}.event-tickets.tribe-modal__wrapper--paypal-connected .tec-tickets__admin-modal-list,.tribe-common.tribe-modal__wrapper--paypal-connected .tec-tickets__admin-modal-list{list-style:initial;margin:1em 0;padding-left:16px}.event-tickets.tribe-modal__wrapper--paypal-connected p,.tribe-common.tribe-modal__wrapper--paypal-connected p{margin:1em 0}.event-tickets.tribe-modal__wrapper--paypal-connected .tec-tickets__admin-modal-buttons,.tribe-common.tribe-modal__wrapper--paypal-connected .tec-tickets__admin-modal-buttons{display:flex;justify-content:flex-end;margin-top:26px}body.events-cal .event-tickets div.tribe-dialog,body.events-cal .tribe-common div.tribe-dialog{z-index:99999}#paypal-connected-modal-button{display:none}.tribe-settings-form-wrap h3{width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.tec-tickets__admin-settings-tickets-commerce-paypal{background-image:url(../images/background-paypal-connect.png);background-position:100%;background-repeat:no-repeat}.tec-tickets__admin-settings-tickets-commerce-paypal-merchant-country-container .tribe-dropdown .select2-selection--single{height:42px}.tec-tickets__admin-settings-tickets-commerce-paypal-merchant-country-container .tribe-dropdown .select2-selection--single .select2-selection__rendered{line-height:42px;padding-left:16px}.tec-tickets__admin-settings-tickets-commerce-paypal-merchant-country-container .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;right:12px}.tec-tickets__admin-settings-tickets-commerce-paypal-logo{display:flex}.tec-tickets__admin-settings-tickets-commerce-paypal-connect{padding-right:74px}}@media (min-width:960px){.event-tickets__admin-banner{background-image:url(../images/background-tickets-notice.png);background-position:100% 0;background-repeat:no-repeat;background-size:contain}.event-tickets__admin-tc-banner{background-image:url(../images/background-tc-banner.png)}.event-tickets__admin-tc-banner-content{max-width:calc(100% - 450px)}}
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets__admin-banner{background-color:#f9f9f9;border:1px solid #ccc;border-left:5px solid #50b078;border-radius:4px;margin:20px 0;padding:8px 24px 12px}.event-tickets__admin-banner a{text-decoration:none}.event-tickets__admin-banner p.event-tickets__admin-banner-help-text{max-width:690px}.event-tickets__admin-banner-help-links-wrapper{display:flex;max-width:690px}.event-tickets__admin-banner-help-links-wrapper div{min-width:50%}.event-tickets__admin-banner-links h3{font-size:14px}.event-tickets__admin-banner-links-link-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;margin-left:8px;padding:3px 5px;text-transform:uppercase}.event-tickets__admin-tc-banner-header-title{font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-5);line-height:var(--tec-line-height-0);margin:0;padding:0}.event-tickets__admin-tc-banner-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;letter-spacing:1px;line-height:1;margin-bottom:3px;margin-left:8px;padding:3px 8px;text-transform:uppercase}.event-tickets__admin-tc-banner-header{align-items:center;display:flex;justify-content:start;padding-top:var(--tec-spacer-4)}.event-tickets__admin-tc-banner-footer{align-items:center;display:flex;justify-content:start;padding-bottom:var(--tec-spacer-4);padding-top:var(--tec-spacer-3)}.event-tickets__admin-tc-banner-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:#405bfb;color:#fff;margin-right:var(--tec-spacer-5);padding:var(--tec-spacer-1) var(--tec-spacer-5)}.event-tickets__admin-tc-banner-button:active,.event-tickets__admin-tc-banner-button:focus,.event-tickets__admin-tc-banner-button:hover{background-color:var(--tec-color-accent-primary-hover);color:#fff}a.event-tickets__admin-tc-banner-link{color:#405bfb;text-decoration:underline}a.event-tickets__admin-tc-banner-link:active,a.event-tickets__admin-tc-banner-link:focus,a.event-tickets__admin-tc-banner-link:hover{color:var(--tec-color-accent-primary-hover);text-decoration:none}#tribe-field-tickets-commerce-paypal-commerce-configure,#tribe-field-tickets-commerce-stripe-commerce-configure{padding-left:0;width:100%}#tribe-field-tickets-commerce-paypal-commerce-configure .tribe-field-wrap,#tribe-field-tickets-commerce-stripe-commerce-configure .tribe-field-wrap{float:none;max-width:none}.tec-tickets__admin-settings-tickets-commerce-toggle-wrapper{margin-bottom:20px;margin-top:45px}.tec-tickets__admin-settings-tickets-commerce-toggle{cursor:pointer;display:flex}.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#ccc;border-radius:16px;display:inline-block;height:22px;position:relative;transition:background .4s;vertical-align:middle;width:40px}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:after,.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{content:""}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#eee);border-radius:50%;display:block;height:16px;left:3px;position:absolute;top:3px;transition:left .4s;width:16px}.tec-tickets__admin-settings-tickets-commerce-toggle:hover .tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#fff)}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#278dbc}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{left:20px}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox{position:absolute;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-toggle-label{color:#1d2327;font-size:20px;font-weight:600;line-height:23px;margin-left:15px;position:relative}.tec-tickets__admin-settings-tickets-commerce-description{font-size:13px;font-weight:400;margin-bottom:35px;max-width:84%}.tec-tickets__admin-settings-tickets-commerce-gateway{background:#fff;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-around;margin-bottom:var(--tec-spacer-3);padding:45px 32px 20px}.tec-tickets__admin-settings-tickets-commerce-gateway-title{font-size:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-description{align-items:start;display:flex;flex-direction:column;flex-grow:1;margin-bottom:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-description p{max-width:470px}.tec-tickets__admin-settings-tickets-commerce-gateway-signup-links{flex-grow:1;margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateway-help-links{margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link{align-items:center;display:flex}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link:not(:last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link{margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:active,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:visited,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:active,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul{list-style:none;margin:inherit}.tec-tickets__admin-settings-tickets-commerce-gateway-logo li{line-height:1.8;margin-bottom:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul li:before{background-color:#405bfb;border-radius:100%;content:"";display:inline-block;height:7px;margin-right:7px;width:7px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo{display:none;flex-basis:290px;font-size:13px;font-style:italic;font-weight:400;letter-spacing:.02em;line-height:16px;margin-bottom:var(--tec-spacer-4)}.tec-tickets__admin-settings-tickets-commerce-gateway-logo-image{height:auto;margin-bottom:32px;max-width:232px;width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-connect{display:flex;flex:1}.tec-tickets__admin-settings-tickets-commerce-gateway-connect-text--connected{color:#1eb056;font-size:16px;font-weight:600}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-row{display:flex;font-size:13px;font-weight:400;margin:20px 0;text-align:left}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1{flex-basis:20%;min-width:125px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2{flex-basis:80%}.tec-tickets__admin-settings-tickets-commerce-gateway-connect,.tec-tickets__admin-settings-tickets-commerce-gateway-logo{flex-direction:column}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link{background:#405bfb;border-radius:4px;color:#fff;display:inline-block;font-size:16px;font-weight:600;line-height:18px;margin-top:25px;min-width:340px;padding:15px 0;text-align:center;text-decoration:none;width:100%}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:active,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:focus,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:hover,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:visited{color:#fff}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link.disabled{background-color:var(--tec-color-button-primary-background);pointer-events:none}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name{font-weight:700}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link{border-bottom:1px solid #405bfb;font-size:13px;margin-left:10px;text-transform:lowercase}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:active,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-gateway-currency{color:var(--tec-color-text-primary);font-weight:700}.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message{color:#a3a3a3;margin-top:var(--tec-spacer-1)}.tec-tickets__admin-settings-tickets-commerce-gateway-capability--no,.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message--error{color:var(--tec-color-icon-error)}.tec-tickets__admin-settings-tickets-commerce-gateway-capability--yes{color:#1eb056}.tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings{max-width:340px;width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error{display:none!important;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-name,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name{color:var(--tec-color-text-primary-light);text-decoration:line-through}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error{color:var(--color-icon-error);margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions-debug{margin-top:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:var(--tec-color-button-primary);padding:11px 20px;width:auto}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:disabled{background-color:var(--tec-color-button-primary-background)}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon{margin-right:8px;position:relative;stroke:#fff;top:3px;width:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon path{fill:none}.event-tickets.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice,.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice{display:block}.event-tickets.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn,.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn{width:auto}.event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list,.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list{list-style:initial;margin:1em 0;padding-left:16px}.event-tickets.tribe-modal__wrapper--gateway-connected p,.tribe-common.tribe-modal__wrapper--gateway-connected p{margin:1em 0}.event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons,.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons{display:flex;justify-content:flex-end;margin-top:26px}body.events-cal .event-tickets div.tribe-dialog,body.events-cal .tribe-common div.tribe-dialog{z-index:99999}.event-tickets .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error,.tribe-common .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error{display:block}.event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section,.event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title,.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section,.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title{margin-bottom:var(--tec-spacer-3)}#paypal-connected-modal-button,#stripe-connected-modal-button{display:none}.tec-tickets__admin-settings-tickets-commerce-section-menu{padding-top:var(--tec-spacer-6)}.tec-tickets__admin-settings-tickets-commerce-section-menu-link{border-bottom-color:#c4c4c4;border-bottom-style:solid;border-bottom-width:1px;color:#23282d;display:inline-block;font-size:var(--tec-font-size-2);margin-right:var(--tec-spacer-5);padding-bottom:var(--tec-spacer-1);text-decoration:none}.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active{border-bottom-width:var(--tec-spacer-0);font-weight:700}.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active,.tec-tickets__admin-settings-tickets-commerce-section-menu-link:hover{border-bottom-color:var(--tec-color-accent-primary);color:#23282d}.tec-tickets__admin-settings-featured{background-color:var(--tec-color-background);border:solid 1px var(--tec-color-border-default);border-radius:8px;margin-bottom:var(--tec-spacer-7);padding:var(--tec-spacer-8)}.tec-tickets__admin-settings-featured-title{background-color:transparent;font-size:var(--tec-font-size-5);font-weight:700;margin-bottom:var(--tec-spacer-2);padding:var(--tec-spacer-1) 0}.tec-tickets__admin-settings-featured-description{margin-bottom:var(--tec-spacer-4);max-width:720px}.tec-tickets__admin-settings-featured-link{align-items:center;display:flex}.tec-tickets__admin-settings-featured-link-url{color:var(--tec-color-accent-primary);padding:0 var(--tec-spacer-1)}.tec-tickets__admin-settings-tickets-commerce-gateways-item{margin-bottom:var(--tec-spacer-7);padding-bottom:var(--tec-spacer-0);text-align:center}.tec-tickets__admin-settings-tickets-commerce-gateways-item>div{padding:var(--tec-spacer-0) 0}.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle{margin-right:35px}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand{flex-grow:1}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo-image{max-height:var(--tec-spacer-10)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-subtitle{font-size:13px;font-style:italic}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link{background-color:var(--tec-color-accent-primary);border-radius:var(--tec-border-radius-default);color:#fff;display:inline-block;font-size:var(--tec-font-size-2);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-2) var(--tec-spacer-3);text-align:center;text-decoration:none;width:180px}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active,.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active{background-color:var(--tec-color-background);border:1px solid #3c434a;color:#3c434a}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active,.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:hover{background-color:var(--tec-color-button-primary-hover);border-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active{background-color:var(--tec-color-button-primary-active);border-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle .tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#50b078}.tec-tickets__admin-settings-tickets-commerce-gateway-group-header{background:#f9f9f9;color:#23282d;font-size:var(--tec-font-size-4);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-1) var(--tec-spacer-2);width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-group-header:first-of-type{margin-top:0}.tec-tickets__admin-settings-tickets-commerce-gateways-item-status{color:var(--tec-color-text-disabled);font-size:var(--tec-font-size-2);font-style:italic;font-weight:var(--tec-font-weight-normal);margin:0 var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-status--enabled{color:#50b078;font-weight:var(--tec-font-weight-bold)}.tribe-settings-form-wrap h3{width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.tec-tickets__admin-settings-tickets-commerce-gateway{background-image:url(../images/background-gateway-connect.png);background-position:100%;background-repeat:no-repeat;background-size:420px 100%}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single{height:42px}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single .select2-selection__rendered{line-height:42px;padding-left:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;right:12px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo{display:flex}.tec-tickets__admin-settings-tickets-commerce-gateway-connect{padding-right:74px}.tec-tickets__admin-settings-tickets-commerce-gateways-item{align-items:center;display:flex;text-align:left}}@media (min-width:960px){.event-tickets__admin-banner{background-image:url(../images/background-tickets-notice.png);background-position:100% 0;background-repeat:no-repeat;background-size:contain}.event-tickets__admin-tc-banner{background-image:url(../images/background-tc-banner.png)}.event-tickets__admin-tc-banner-content{max-width:calc(100% - 450px)}}
|
src/resources/css/tickets-commerce.css
CHANGED
@@ -704,6 +704,10 @@
|
|
704 |
padding: var(--tec-spacer-4) 0;
|
705 |
}
|
706 |
|
|
|
|
|
|
|
|
|
707 |
.tribe-common .tribe-tickets__commerce-checkout-cart-item-details, .event-tickets .tribe-tickets__commerce-checkout-cart-item-details {
|
708 |
flex: 1;
|
709 |
padding-right: var(--tec-spacer-3);
|
@@ -880,6 +884,67 @@
|
|
880 |
display: block;
|
881 |
}
|
882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
/* -------------------------------------------------------------------------
|
884 |
* Theme Overrides - Twenty Twenty
|
885 |
* ------------------------------------------------------------------------- */
|
@@ -899,6 +964,10 @@
|
|
899 |
padding: initial;
|
900 |
}
|
901 |
|
|
|
|
|
|
|
|
|
902 |
/**
|
903 |
* Event Tickets - Tickets Commerce - Success/Order
|
904 |
*
|
704 |
padding: var(--tec-spacer-4) 0;
|
705 |
}
|
706 |
|
707 |
+
.tribe-common .tribe-tickets__commerce-checkout-cart-item.entry, .event-tickets .tribe-tickets__commerce-checkout-cart-item.entry {
|
708 |
+
padding: var(--tec-spacer-4) 0;
|
709 |
+
}
|
710 |
+
|
711 |
.tribe-common .tribe-tickets__commerce-checkout-cart-item-details, .event-tickets .tribe-tickets__commerce-checkout-cart-item-details {
|
712 |
flex: 1;
|
713 |
padding-right: var(--tec-spacer-3);
|
884 |
display: block;
|
885 |
}
|
886 |
|
887 |
+
.tribe-common .tribe-tickets__commerce-checkout-section-header, .event-tickets .tribe-tickets__commerce-checkout-section-header {
|
888 |
+
font-size: var(--tec-font-size-4);
|
889 |
+
font-weight: var(--tec-font-weight-bold);
|
890 |
+
margin-bottom: var(--tec-spacer-3);
|
891 |
+
}
|
892 |
+
|
893 |
+
.tribe-common .tribe-tickets__commerce-checkout-gateway, .event-tickets .tribe-tickets__commerce-checkout-gateway {
|
894 |
+
display: none;
|
895 |
+
}
|
896 |
+
|
897 |
+
.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle, .event-tickets .tribe-tickets__commerce-checkout-gateway-toggle {
|
898 |
+
margin-bottom: var(--tec-spacer-7);
|
899 |
+
margin-top: var(--tec-spacer-3);
|
900 |
+
}
|
901 |
+
|
902 |
+
.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle-button, .event-tickets .tribe-tickets__commerce-checkout-gateway-toggle-button {
|
903 |
+
color: var(--tec-color-text-primary-light);
|
904 |
+
font-family: var(--tec-font-family-sans-serif);
|
905 |
+
font-size: var(--tec-font-size-3);
|
906 |
+
}
|
907 |
+
|
908 |
+
.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle-button:after, .event-tickets .tribe-tickets__commerce-checkout-gateway-toggle-button:after {
|
909 |
+
border: 7px solid var(--tec-color-background-transparent);
|
910 |
+
border-bottom-width: 0;
|
911 |
+
border-top-color: var(--tec-color-text-primary-light);
|
912 |
+
border-top-width: 10px;
|
913 |
+
content: "";
|
914 |
+
display: inline-block;
|
915 |
+
margin-left: 5px;
|
916 |
+
}
|
917 |
+
|
918 |
+
.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button, .event-tickets .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button {
|
919 |
+
color: #23282d;
|
920 |
+
}
|
921 |
+
|
922 |
+
.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button:after, .event-tickets .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button:after {
|
923 |
+
border: 7px solid var(--tec-color-background-transparent);
|
924 |
+
border-bottom-color: #23282d;
|
925 |
+
border-bottom-width: 10px;
|
926 |
+
border-top-width: 0;
|
927 |
+
}
|
928 |
+
|
929 |
+
.tribe-common .tribe-tickets__commerce-checkout-purchaser-info-wrapper, .event-tickets .tribe-tickets__commerce-checkout-purchaser-info-wrapper {
|
930 |
+
margin-bottom: var(--tec-spacer-9);
|
931 |
+
}
|
932 |
+
|
933 |
+
.tribe-common .tribe-tickets__commerce-checkout-purchaser-info-wrapper .tribe-tickets__form-field-description, .event-tickets .tribe-tickets__commerce-checkout-purchaser-info-wrapper .tribe-tickets__form-field-description {
|
934 |
+
color: var(--tec-color-icon-primary-alt);
|
935 |
+
margin: var(--tec-spacer-1) 0;
|
936 |
+
}
|
937 |
+
|
938 |
+
.tribe-common .tribe-tickets__commerce-checkout-purchaser-info-title, .event-tickets .tribe-tickets__commerce-checkout-purchaser-info-title {
|
939 |
+
margin-bottom: var(--tec-spacer-3);
|
940 |
+
}
|
941 |
+
|
942 |
+
.tribe-common .tribe-tickets__commerce-checkout-form-submit-button, .event-tickets .tribe-tickets__commerce-checkout-form-submit-button {
|
943 |
+
height: 55px;
|
944 |
+
margin-top: 24px;
|
945 |
+
width: 100%;
|
946 |
+
}
|
947 |
+
|
948 |
/* -------------------------------------------------------------------------
|
949 |
* Theme Overrides - Twenty Twenty
|
950 |
* ------------------------------------------------------------------------- */
|
964 |
padding: initial;
|
965 |
}
|
966 |
|
967 |
+
.tribe-theme-twentytwenty .entry-content .tribe-common .tribe-tickets__commerce-checkout-section-header, .tribe-theme-twentytwenty .entry-content .event-tickets .tribe-tickets__commerce-checkout-section-header {
|
968 |
+
margin-bottom: var(--tec-spacer-3);
|
969 |
+
}
|
970 |
+
|
971 |
/**
|
972 |
* Event Tickets - Tickets Commerce - Success/Order
|
973 |
*
|
src/resources/css/tickets-commerce.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__commerce-checkout,.tribe-common .tribe-tickets__commerce-checkout{max-width:600px;position:relative;width:100%}.event-tickets .tribe-tickets__commerce-checkout-header,.tribe-common .tribe-tickets__commerce-checkout-header{align-items:baseline;display:flex;flex-wrap:wrap}.event-tickets .tribe-tickets__commerce-checkout-header-title,.tribe-common .tribe-tickets__commerce-checkout-header-title{flex:1}.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event,.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event:focus,.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event:hover,.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event:visited,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees:focus,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees:hover,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees:visited,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event:focus,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event:hover,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event:visited,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees:focus,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees:hover,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees:visited{color:var(--tec-color-accent-primary)}.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event{margin-left:var(--tec-spacer-1)}.event-tickets .tribe-tickets__commerce-checkout-cart,.tribe-common .tribe-tickets__commerce-checkout-cart{margin:var(--tec-spacer-9) 0;position:relative}.event-tickets .tribe-tickets__commerce-checkout-cart-header,.tribe-common .tribe-tickets__commerce-checkout-cart-header{padding-bottom:var(--tec-spacer-4)}.event-tickets .tribe-tickets__commerce-checkout-cart-header-title,.tribe-common .tribe-tickets__commerce-checkout-cart-header-title{font-size:var(--tec-font-size-5)}.event-tickets .tribe-tickets__commerce-checkout-cart-item,.tribe-common .tribe-tickets__commerce-checkout-cart-item{border-top:1px solid var(--tec-color-border-secondary);display:flex;flex-wrap:wrap;padding:var(--tec-spacer-4) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details{flex:1;padding-right:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description{color:var(--tec-color-text-primary-light);padding-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description-attendee,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description-attendee{margin-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-name,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-name{font-weight:700}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-fields,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-fields{font-style:italic}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less,.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more{background-color:transparent;color:var(--tec-color-text-primary-light);position:relative;white-space:nowrap}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less:after,.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more:after{border:var(--tec-spacer-0) solid var(--tec-color-background-transparent);content:"";display:inline-block;margin-bottom:1px}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-toggle,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-toggle{display:flex}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more:after{border-bottom:0 none;border-top:var(--tec-spacer-0) solid var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less{display:none}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less:after{border-bottom:var(--tec-spacer-0) solid var(--tec-color-text-secondary);border-top:0 none}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--more,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--more{display:none!important;visibility:hidden}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--less{display:block}.event-tickets .tribe-tickets__commerce-checkout-cart-item-price,.event-tickets .tribe-tickets__commerce-checkout-cart-item-quantity,.event-tickets .tribe-tickets__commerce-checkout-cart-item-subtotal,.tribe-common .tribe-tickets__commerce-checkout-cart-item-price,.tribe-common .tribe-tickets__commerce-checkout-cart-item-quantity,.tribe-common .tribe-tickets__commerce-checkout-cart-item-subtotal{align-self:center;text-align:center}.event-tickets .tribe-tickets__commerce-checkout-cart-item-price,.event-tickets .tribe-tickets__commerce-checkout-cart-item-subtotal,.tribe-common .tribe-tickets__commerce-checkout-cart-item-price,.tribe-common .tribe-tickets__commerce-checkout-cart-item-subtotal{flex:0 0 85px;max-width:85px}.event-tickets .tribe-tickets__commerce-checkout-cart-item-quantity,.tribe-common .tribe-tickets__commerce-checkout-cart-item-quantity{flex:0 0 60px;font-weight:700}.event-tickets .tribe-tickets__commerce-checkout-cart-item-subtotal,.tribe-common .tribe-tickets__commerce-checkout-cart-item-subtotal{text-align:right}.event-tickets .tribe-tickets__commerce-checkout-cart-footer,.tribe-common .tribe-tickets__commerce-checkout-cart-footer{align-items:baseline;border-top:1px solid var(--tec-color-border-secondary);display:flex;flex-flow:row nowrap;justify-content:flex-end;padding:var(--tec-spacer-4) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-quantity,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-quantity,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total{color:var(--tec-color-text-primary-light);text-align:center}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total{margin-left:var(--tec-spacer-1)}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total-number,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total-wrap,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total-number,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total-wrap{color:var(--tec-color-text-primary);font-weight:var(--tec-font-weight-bold)}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total-wrap,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total-wrap{margin-left:var(--tec-spacer-0)}.event-tickets .tribe-tickets__commerce-checkout-cart-empty,.tribe-common .tribe-tickets__commerce-checkout-cart-empty{margin:var(--tec-spacer-9) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description{margin-top:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link,.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link:focus,.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link:hover,.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link:visited,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link:focus,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link:hover,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link:visited{color:var(--tec-color-accent-primary)}.event-tickets .tribe-tickets__commerce-checkout-must-login,.tribe-common .tribe-tickets__commerce-checkout-must-login{margin-top:var(--tec-spacer-8);text-align:center}.event-tickets a.tribe-tickets__commerce-checkout-must-login-link,.tribe-common a.tribe-tickets__commerce-checkout-must-login-link{font-size:var(--tec-font-size-3);padding-left:var(--tec-spacer-6);padding-right:var(--tec-spacer-6);width:auto}.event-tickets .tribe-tickets__commerce-checkout-must-login-registration,.tribe-common .tribe-tickets__commerce-checkout-must-login-registration{margin-top:var(--tec-spacer-1)}.event-tickets .tribe-tickets__commerce-checkout-must-login-registration-link,.tribe-common .tribe-tickets__commerce-checkout-must-login-registration-link{color:var(--tec-color-accent-primary);font-size:var(--tec-font-size-2);font-weight:400}.event-tickets.tribe-common .tribe-tickets__commerce-checkout-footer-notice-error--no-gateway,.tribe-common.tribe-common .tribe-tickets__commerce-checkout-footer-notice-error--no-gateway{display:block}.tribe-theme-twentytwenty .entry-content .event-tickets h1,.tribe-theme-twentytwenty .entry-content .event-tickets h2,.tribe-theme-twentytwenty .entry-content .event-tickets h3,.tribe-theme-twentytwenty .entry-content .event-tickets h4,.tribe-theme-twentytwenty .entry-content .tribe-common h1,.tribe-theme-twentytwenty .entry-content .tribe-common h2,.tribe-theme-twentytwenty .entry-content .tribe-common h3,.tribe-theme-twentytwenty .entry-content .tribe-common h4{margin:initial}.tribe-theme-twentytwenty .entry-content .event-tickets.tribe-tickets__commerce-checkout,.tribe-theme-twentytwenty .entry-content .tribe-common.tribe-tickets__commerce-checkout{padding:initial}.event-tickets .tribe-tickets__commerce-order{max-width:600px;position:relative;width:100%}.event-tickets .tribe-tickets__commerce-order-description,.event-tickets .tribe-tickets__commerce-order-details,.event-tickets .tribe-tickets__commerce-order-footer{margin-top:var(--tec-spacer-7)}.event-tickets .tribe-tickets__commerce-order-details-row{display:flex;margin:var(--tec-spacer-2) 0;text-align:left}.event-tickets .tribe-tickets__commerce-order-details-col1{flex-basis:25%;min-width:160px}.event-tickets .tribe-tickets__commerce-order-details-col2{flex-basis:75%;font-weight:700}.event-tickets .tribe-tickets__commerce-order-footer-link:not(:first-of-type){margin-left:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-order-footer-link,.event-tickets .tribe-tickets__commerce-order-footer-link:focus,.event-tickets .tribe-tickets__commerce-order-footer-link:hover,.event-tickets .tribe-tickets__commerce-order-footer-link:visited{color:var(--tec-color-accent-primary)}.tribe-theme-twentytwenty .entry-content .event-tickets h1,.tribe-theme-twentytwenty .entry-content .event-tickets h2,.tribe-theme-twentytwenty .entry-content .event-tickets h3,.tribe-theme-twentytwenty .entry-content .event-tickets h4{margin:initial}.tribe-theme-twentytwenty .entry-content .event-tickets.tribe-tickets__commerce-order{padding:initial}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.tribe-tickets.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-tickets.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more,.tribe-tickets.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-tickets.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more{display:none!important;visibility:hidden}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total{margin-left:var(--tec-spacer-5)}}
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__commerce-checkout,.tribe-common .tribe-tickets__commerce-checkout{max-width:600px;position:relative;width:100%}.event-tickets .tribe-tickets__commerce-checkout-header,.tribe-common .tribe-tickets__commerce-checkout-header{align-items:baseline;display:flex;flex-wrap:wrap}.event-tickets .tribe-tickets__commerce-checkout-header-title,.tribe-common .tribe-tickets__commerce-checkout-header-title{flex:1}.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event,.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event:focus,.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event:hover,.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event:visited,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees:focus,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees:hover,.event-tickets .tribe-tickets__commerce-checkout-header-link-modify-attendees:visited,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event:focus,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event:hover,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event:visited,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees:focus,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees:hover,.tribe-common .tribe-tickets__commerce-checkout-header-link-modify-attendees:visited{color:var(--tec-color-accent-primary)}.event-tickets .tribe-tickets__commerce-checkout-header-link-back-to-event,.tribe-common .tribe-tickets__commerce-checkout-header-link-back-to-event{margin-left:var(--tec-spacer-1)}.event-tickets .tribe-tickets__commerce-checkout-cart,.tribe-common .tribe-tickets__commerce-checkout-cart{margin:var(--tec-spacer-9) 0;position:relative}.event-tickets .tribe-tickets__commerce-checkout-cart-header,.tribe-common .tribe-tickets__commerce-checkout-cart-header{padding-bottom:var(--tec-spacer-4)}.event-tickets .tribe-tickets__commerce-checkout-cart-header-title,.tribe-common .tribe-tickets__commerce-checkout-cart-header-title{font-size:var(--tec-font-size-5)}.event-tickets .tribe-tickets__commerce-checkout-cart-item,.tribe-common .tribe-tickets__commerce-checkout-cart-item{border-top:1px solid var(--tec-color-border-secondary);display:flex;flex-wrap:wrap;padding:var(--tec-spacer-4) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-item.entry,.tribe-common .tribe-tickets__commerce-checkout-cart-item.entry{padding:var(--tec-spacer-4) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details{flex:1;padding-right:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description{color:var(--tec-color-text-primary-light);padding-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description-attendee,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description-attendee{margin-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-name,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-name{font-weight:700}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-fields,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-description-attendee-fields{font-style:italic}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less,.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more{background-color:transparent;color:var(--tec-color-text-primary-light);position:relative;white-space:nowrap}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less:after,.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more:after{border:var(--tec-spacer-0) solid var(--tec-color-background-transparent);content:"";display:inline-block;margin-bottom:1px}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-toggle,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-toggle{display:flex}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more:after{border-bottom:0 none;border-top:var(--tec-spacer-0) solid var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less{display:none}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less:after,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less:after{border-bottom:var(--tec-spacer-0) solid var(--tec-color-text-secondary);border-top:0 none}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--more,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--more{display:none!important;visibility:hidden}.event-tickets .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-common .tribe-tickets__commerce-checkout-cart-item-details--open .tribe-tickets__commerce-checkout-cart-item-details-button--less{display:block}.event-tickets .tribe-tickets__commerce-checkout-cart-item-price,.event-tickets .tribe-tickets__commerce-checkout-cart-item-quantity,.event-tickets .tribe-tickets__commerce-checkout-cart-item-subtotal,.tribe-common .tribe-tickets__commerce-checkout-cart-item-price,.tribe-common .tribe-tickets__commerce-checkout-cart-item-quantity,.tribe-common .tribe-tickets__commerce-checkout-cart-item-subtotal{align-self:center;text-align:center}.event-tickets .tribe-tickets__commerce-checkout-cart-item-price,.event-tickets .tribe-tickets__commerce-checkout-cart-item-subtotal,.tribe-common .tribe-tickets__commerce-checkout-cart-item-price,.tribe-common .tribe-tickets__commerce-checkout-cart-item-subtotal{flex:0 0 85px;max-width:85px}.event-tickets .tribe-tickets__commerce-checkout-cart-item-quantity,.tribe-common .tribe-tickets__commerce-checkout-cart-item-quantity{flex:0 0 60px;font-weight:700}.event-tickets .tribe-tickets__commerce-checkout-cart-item-subtotal,.tribe-common .tribe-tickets__commerce-checkout-cart-item-subtotal{text-align:right}.event-tickets .tribe-tickets__commerce-checkout-cart-footer,.tribe-common .tribe-tickets__commerce-checkout-cart-footer{align-items:baseline;border-top:1px solid var(--tec-color-border-secondary);display:flex;flex-flow:row nowrap;justify-content:flex-end;padding:var(--tec-spacer-4) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-quantity,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-quantity,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total{color:var(--tec-color-text-primary-light);text-align:center}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total{margin-left:var(--tec-spacer-1)}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total-number,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total-wrap,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total-number,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total-wrap{color:var(--tec-color-text-primary);font-weight:var(--tec-font-weight-bold)}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total-wrap,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-quantity-number,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total-wrap{margin-left:var(--tec-spacer-0)}.event-tickets .tribe-tickets__commerce-checkout-cart-empty,.tribe-common .tribe-tickets__commerce-checkout-cart-empty{margin:var(--tec-spacer-9) 0}.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description{margin-top:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link,.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link:focus,.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link:hover,.event-tickets .tribe-tickets__commerce-checkout-cart-empty-description-link:visited,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link:focus,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link:hover,.tribe-common .tribe-tickets__commerce-checkout-cart-empty-description-link:visited{color:var(--tec-color-accent-primary)}.event-tickets .tribe-tickets__commerce-checkout-must-login,.tribe-common .tribe-tickets__commerce-checkout-must-login{margin-top:var(--tec-spacer-8);text-align:center}.event-tickets a.tribe-tickets__commerce-checkout-must-login-link,.tribe-common a.tribe-tickets__commerce-checkout-must-login-link{font-size:var(--tec-font-size-3);padding-left:var(--tec-spacer-6);padding-right:var(--tec-spacer-6);width:auto}.event-tickets .tribe-tickets__commerce-checkout-must-login-registration,.tribe-common .tribe-tickets__commerce-checkout-must-login-registration{margin-top:var(--tec-spacer-1)}.event-tickets .tribe-tickets__commerce-checkout-must-login-registration-link,.tribe-common .tribe-tickets__commerce-checkout-must-login-registration-link{color:var(--tec-color-accent-primary);font-size:var(--tec-font-size-2);font-weight:400}.event-tickets.tribe-common .tribe-tickets__commerce-checkout-footer-notice-error--no-gateway,.tribe-common.tribe-common .tribe-tickets__commerce-checkout-footer-notice-error--no-gateway{display:block}.event-tickets .tribe-tickets__commerce-checkout-section-header,.tribe-common .tribe-tickets__commerce-checkout-section-header{font-size:var(--tec-font-size-4);font-weight:var(--tec-font-weight-bold);margin-bottom:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-gateway,.tribe-common .tribe-tickets__commerce-checkout-gateway{display:none}.event-tickets .tribe-tickets__commerce-checkout-gateway-toggle,.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle{margin-bottom:var(--tec-spacer-7);margin-top:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-gateway-toggle-button,.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle-button{color:var(--tec-color-text-primary-light);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-3)}.event-tickets .tribe-tickets__commerce-checkout-gateway-toggle-button:after,.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle-button:after{border:7px solid var(--tec-color-background-transparent);border-bottom-width:0;border-top-color:var(--tec-color-text-primary-light);border-top-width:10px;content:"";display:inline-block;margin-left:5px}.event-tickets .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button,.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button{color:#23282d}.event-tickets .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button:after,.tribe-common .tribe-tickets__commerce-checkout-gateway-toggle--open .tribe-tickets__commerce-checkout-gateway-toggle-button:after{border:7px solid var(--tec-color-background-transparent);border-bottom-color:#23282d;border-bottom-width:10px;border-top-width:0}.event-tickets .tribe-tickets__commerce-checkout-purchaser-info-wrapper,.tribe-common .tribe-tickets__commerce-checkout-purchaser-info-wrapper{margin-bottom:var(--tec-spacer-9)}.event-tickets .tribe-tickets__commerce-checkout-purchaser-info-wrapper .tribe-tickets__form-field-description,.tribe-common .tribe-tickets__commerce-checkout-purchaser-info-wrapper .tribe-tickets__form-field-description{color:var(--tec-color-icon-primary-alt);margin:var(--tec-spacer-1) 0}.event-tickets .tribe-tickets__commerce-checkout-purchaser-info-title,.tribe-common .tribe-tickets__commerce-checkout-purchaser-info-title{margin-bottom:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-form-submit-button,.tribe-common .tribe-tickets__commerce-checkout-form-submit-button{height:55px;margin-top:24px;width:100%}.tribe-theme-twentytwenty .entry-content .event-tickets h1,.tribe-theme-twentytwenty .entry-content .event-tickets h2,.tribe-theme-twentytwenty .entry-content .event-tickets h3,.tribe-theme-twentytwenty .entry-content .event-tickets h4,.tribe-theme-twentytwenty .entry-content .tribe-common h1,.tribe-theme-twentytwenty .entry-content .tribe-common h2,.tribe-theme-twentytwenty .entry-content .tribe-common h3,.tribe-theme-twentytwenty .entry-content .tribe-common h4{margin:initial}.tribe-theme-twentytwenty .entry-content .event-tickets.tribe-tickets__commerce-checkout,.tribe-theme-twentytwenty .entry-content .tribe-common.tribe-tickets__commerce-checkout{padding:initial}.tribe-theme-twentytwenty .entry-content .event-tickets .tribe-tickets__commerce-checkout-section-header,.tribe-theme-twentytwenty .entry-content .tribe-common .tribe-tickets__commerce-checkout-section-header{margin-bottom:var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-order{max-width:600px;position:relative;width:100%}.event-tickets .tribe-tickets__commerce-order-description,.event-tickets .tribe-tickets__commerce-order-details,.event-tickets .tribe-tickets__commerce-order-footer{margin-top:var(--tec-spacer-7)}.event-tickets .tribe-tickets__commerce-order-details-row{display:flex;margin:var(--tec-spacer-2) 0;text-align:left}.event-tickets .tribe-tickets__commerce-order-details-col1{flex-basis:25%;min-width:160px}.event-tickets .tribe-tickets__commerce-order-details-col2{flex-basis:75%;font-weight:700}.event-tickets .tribe-tickets__commerce-order-footer-link:not(:first-of-type){margin-left:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-order-footer-link,.event-tickets .tribe-tickets__commerce-order-footer-link:focus,.event-tickets .tribe-tickets__commerce-order-footer-link:hover,.event-tickets .tribe-tickets__commerce-order-footer-link:visited{color:var(--tec-color-accent-primary)}.tribe-theme-twentytwenty .entry-content .event-tickets h1,.tribe-theme-twentytwenty .entry-content .event-tickets h2,.tribe-theme-twentytwenty .entry-content .event-tickets h3,.tribe-theme-twentytwenty .entry-content .event-tickets h4{margin:initial}.tribe-theme-twentytwenty .entry-content .event-tickets.tribe-tickets__commerce-order{padding:initial}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.tribe-tickets.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-tickets.event-tickets .tribe-tickets__commerce-checkout-cart-item-details-button--more,.tribe-tickets.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--less,.tribe-tickets.tribe-common .tribe-tickets__commerce-checkout-cart-item-details-button--more{display:none!important;visibility:hidden}.event-tickets .tribe-tickets__commerce-checkout-cart-footer-total,.tribe-common .tribe-tickets__commerce-checkout-cart-footer-total{margin-left:var(--tec-spacer-5)}}
|
src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This CSS file was auto-generated via PostCSS
|
3 |
+
*
|
4 |
+
* Contributors should avoid editing this file, but instead edit the associated
|
5 |
+
* src/resources/postcss/ file. For more information, check out our engineering
|
6 |
+
* docs on how we handle CSS in our engineering docs.
|
7 |
+
*
|
8 |
+
* @see: https://the-events-calendar.github.io/products-engineering/docs/code-standards/css/
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Event Tickets - Admin Styles for Stripe Gateway Webhooks.
|
13 |
+
*
|
14 |
+
* @since TBD
|
15 |
+
*/
|
16 |
+
#tribe-field-tickets-commerce-stripe-webhooks-value input {
|
17 |
+
border-top-right-radius: 0;
|
18 |
+
border-bottom-right-radius: 0;
|
19 |
+
}
|
20 |
+
#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy {
|
21 |
+
border-top-left-radius: 0;
|
22 |
+
border-bottom-left-radius: 0;
|
23 |
+
margin-left: -2px;
|
24 |
+
line-height: 24px;
|
25 |
+
padding-left: 6px;
|
26 |
+
padding-right: 6px;
|
27 |
+
}
|
28 |
+
#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy span {
|
29 |
+
line-height: 24px;
|
30 |
+
}
|
src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#tribe-field-tickets-commerce-stripe-webhooks-value input{border-top-right-radius:0;border-bottom-right-radius:0}#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-2px;line-height:24px;padding-left:6px;padding-right:6px}#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy span{line-height:24px}
|
src/resources/css/tickets-commerce/gateway/paypal.css
CHANGED
@@ -731,6 +731,10 @@
|
|
731 |
width: 100%;
|
732 |
}
|
733 |
|
|
|
|
|
|
|
|
|
734 |
@media (min-width: 768px) {
|
735 |
|
736 |
.tribe-common-c-loader.tribe-tickets-loader__tickets-block,
|
731 |
width: 100%;
|
732 |
}
|
733 |
|
734 |
+
.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field--card-name {
|
735 |
+
width: 100%;
|
736 |
+
}
|
737 |
+
|
738 |
@media (min-width: 768px) {
|
739 |
|
740 |
.tribe-common-c-loader.tribe-tickets-loader__tickets-block,
|
src/resources/css/tickets-commerce/gateway/paypal.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__commerce-checkout-paypal-buttons{position:relative;z-index:1}.event-tickets .paypal-buttons-context-iframe{background-color:#fafafa!important}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-separator{align-items:center;display:flex;justify-content:center;margin:24px 0}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-separator-line{border:1px solid var(--tec-color-border-secondary);flex-grow:1}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-separator-text{color:var(--tec-color-text-primary-light);font-style:italic;padding:12px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form{display:flex;flex-wrap:wrap}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-wrapper{margin-bottom:10px;width:65%}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-wrapper:nth-child(odd){padding-right:12px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-wrapper:nth-child(2n){width:35%}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-label{color:var(--tec-color-text-primary-light);cursor:pointer;margin-bottom:4px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:14px;height:42px;padding:12px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field::placeholder{color:#999;font-family:var(--tec-font-family-sans-serif)}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field:active,.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field:focus{border-color:var(--tec-color-border-default)}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-submit-button{height:55px;margin-top:24px;width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}}
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__commerce-checkout-paypal-buttons{position:relative;z-index:1}.event-tickets .paypal-buttons-context-iframe{background-color:#fafafa!important}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-separator{align-items:center;display:flex;justify-content:center;margin:24px 0}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-separator-line{border:1px solid var(--tec-color-border-secondary);flex-grow:1}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-separator-text{color:var(--tec-color-text-primary-light);font-style:italic;padding:12px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form{display:flex;flex-wrap:wrap}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-wrapper{margin-bottom:10px;width:65%}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-wrapper:nth-child(odd){padding-right:12px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-wrapper:nth-child(2n){width:35%}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field-label{color:var(--tec-color-text-primary-light);cursor:pointer;margin-bottom:4px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:14px;height:42px;padding:12px}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field::placeholder{color:#999;font-family:var(--tec-font-family-sans-serif)}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field:active,.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field:focus{border-color:var(--tec-color-border-default)}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-submit-button{height:55px;margin-top:24px;width:100%}.event-tickets .tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field--card-name{width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}}
|
src/resources/css/tickets-commerce/gateway/stripe.css
ADDED
@@ -0,0 +1,717 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This CSS file was auto-generated via PostCSS
|
3 |
+
*
|
4 |
+
* Contributors should avoid editing this file, but instead edit the associated
|
5 |
+
* src/resources/postcss/ file. For more information, check out our engineering
|
6 |
+
* docs on how we handle CSS in our engineering docs.
|
7 |
+
*
|
8 |
+
* @see: https://the-events-calendar.github.io/products-engineering/docs/code-standards/css/
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Event Tickets - Tickets Commerce Stripe Stylesheet.
|
13 |
+
*
|
14 |
+
* @since TBD
|
15 |
+
*/
|
16 |
+
|
17 |
+
/*
|
18 |
+
* Common CSS
|
19 |
+
*
|
20 |
+
* DO NOT EDIT THIS CSS FILE DIRECTLY.
|
21 |
+
* -------------------------------------------------------------
|
22 |
+
* This file is just a clearing-house, see the pcss directory
|
23 |
+
*
|
24 |
+
and edit the source files found there.
|
25 |
+
*/
|
26 |
+
|
27 |
+
/* Event Tickets Utilities */
|
28 |
+
|
29 |
+
/* -----------------------------------------------------------------------------
|
30 |
+
*
|
31 |
+
* Utilities
|
32 |
+
*
|
33 |
+
* This file is just a clearing-house.
|
34 |
+
* Make partials (start with an underscore) for any actual css code.
|
35 |
+
*
|
36 |
+
* ----------------------------------------------------------------------------- */
|
37 |
+
|
38 |
+
/* Variables - needed everywhere. */
|
39 |
+
|
40 |
+
/* -----------------------------------------------------------------------------
|
41 |
+
* SVG - Arrow Right
|
42 |
+
* ----------------------------------------------------------------------------- */
|
43 |
+
|
44 |
+
/* -----------------------------------------------------------------------------
|
45 |
+
* SVG - Arrow (light, left)
|
46 |
+
* ----------------------------------------------------------------------------- */
|
47 |
+
|
48 |
+
/* -----------------------------------------------------------------------------
|
49 |
+
* SVG - Caret Down
|
50 |
+
* ----------------------------------------------------------------------------- */
|
51 |
+
|
52 |
+
/* -----------------------------------------------------------------------------
|
53 |
+
* SVG - Caret Left
|
54 |
+
* ----------------------------------------------------------------------------- */
|
55 |
+
|
56 |
+
/* -----------------------------------------------------------------------------
|
57 |
+
* SVG - Caret Right
|
58 |
+
* ----------------------------------------------------------------------------- */
|
59 |
+
|
60 |
+
/* -----------------------------------------------------------------------------
|
61 |
+
* SVG - Caret Up
|
62 |
+
* ----------------------------------------------------------------------------- */
|
63 |
+
|
64 |
+
/* -----------------------------------------------------------------------------
|
65 |
+
* SVG - Check
|
66 |
+
* ----------------------------------------------------------------------------- */
|
67 |
+
|
68 |
+
/* -----------------------------------------------------------------------------
|
69 |
+
* SVG - Close
|
70 |
+
* ----------------------------------------------------------------------------- */
|
71 |
+
|
72 |
+
/* -----------------------------------------------------------------------------
|
73 |
+
* SVG - Day
|
74 |
+
* ----------------------------------------------------------------------------- */
|
75 |
+
|
76 |
+
/* -----------------------------------------------------------------------------
|
77 |
+
* SVG - Dropdown
|
78 |
+
* ----------------------------------------------------------------------------- */
|
79 |
+
|
80 |
+
/* -----------------------------------------------------------------------------
|
81 |
+
* SVG - Error
|
82 |
+
* ----------------------------------------------------------------------------- */
|
83 |
+
|
84 |
+
/* -----------------------------------------------------------------------------
|
85 |
+
* SVG - Featured
|
86 |
+
* ----------------------------------------------------------------------------- */
|
87 |
+
|
88 |
+
/* -----------------------------------------------------------------------------
|
89 |
+
* SVG - Filters
|
90 |
+
* ----------------------------------------------------------------------------- */
|
91 |
+
|
92 |
+
/* -----------------------------------------------------------------------------
|
93 |
+
* SVG - Link
|
94 |
+
* ----------------------------------------------------------------------------- */
|
95 |
+
|
96 |
+
/* -----------------------------------------------------------------------------
|
97 |
+
* SVG - Guest
|
98 |
+
* ----------------------------------------------------------------------------- */
|
99 |
+
|
100 |
+
/* -----------------------------------------------------------------------------
|
101 |
+
* SVG - List
|
102 |
+
* ----------------------------------------------------------------------------- */
|
103 |
+
|
104 |
+
/* -----------------------------------------------------------------------------
|
105 |
+
* SVG - Location
|
106 |
+
* ----------------------------------------------------------------------------- */
|
107 |
+
|
108 |
+
/* -----------------------------------------------------------------------------
|
109 |
+
* SVG - Mail
|
110 |
+
* ----------------------------------------------------------------------------- */
|
111 |
+
|
112 |
+
/* -----------------------------------------------------------------------------
|
113 |
+
* SVG - Map
|
114 |
+
* ----------------------------------------------------------------------------- */
|
115 |
+
|
116 |
+
/* -----------------------------------------------------------------------------
|
117 |
+
* SVG - Map pin
|
118 |
+
* ----------------------------------------------------------------------------- */
|
119 |
+
|
120 |
+
/* -----------------------------------------------------------------------------
|
121 |
+
* SVG - Messages
|
122 |
+
* ----------------------------------------------------------------------------- */
|
123 |
+
|
124 |
+
/* stylelint-disable-line block-no-empty */
|
125 |
+
|
126 |
+
/* -----------------------------------------------------------------------------
|
127 |
+
* SVG - Month
|
128 |
+
* ----------------------------------------------------------------------------- */
|
129 |
+
|
130 |
+
/* -----------------------------------------------------------------------------
|
131 |
+
* SVG - No Map
|
132 |
+
* ----------------------------------------------------------------------------- */
|
133 |
+
|
134 |
+
/* stylelint-disable-line block-no-empty */
|
135 |
+
|
136 |
+
/* -----------------------------------------------------------------------------
|
137 |
+
* SVG - Paper Plane
|
138 |
+
* ----------------------------------------------------------------------------- */
|
139 |
+
|
140 |
+
/* -----------------------------------------------------------------------------
|
141 |
+
* SVG - Phone
|
142 |
+
* ----------------------------------------------------------------------------- */
|
143 |
+
|
144 |
+
/* -----------------------------------------------------------------------------
|
145 |
+
* SVG - Photo
|
146 |
+
* ----------------------------------------------------------------------------- */
|
147 |
+
|
148 |
+
/* -----------------------------------------------------------------------------
|
149 |
+
* SVG - Plus
|
150 |
+
* ----------------------------------------------------------------------------- */
|
151 |
+
|
152 |
+
/* -----------------------------------------------------------------------------
|
153 |
+
* SVG - Recurring
|
154 |
+
* ----------------------------------------------------------------------------- */
|
155 |
+
|
156 |
+
/* -----------------------------------------------------------------------------
|
157 |
+
* SVG - Remove
|
158 |
+
* ----------------------------------------------------------------------------- */
|
159 |
+
|
160 |
+
/* -----------------------------------------------------------------------------
|
161 |
+
* SVG - Reset
|
162 |
+
* ----------------------------------------------------------------------------- */
|
163 |
+
|
164 |
+
/* -----------------------------------------------------------------------------
|
165 |
+
* SVG - Search
|
166 |
+
* ----------------------------------------------------------------------------- */
|
167 |
+
|
168 |
+
/* -----------------------------------------------------------------------------
|
169 |
+
* SVG - Search Filter
|
170 |
+
* ----------------------------------------------------------------------------- */
|
171 |
+
|
172 |
+
/* -----------------------------------------------------------------------------
|
173 |
+
* SVG - Week
|
174 |
+
* ----------------------------------------------------------------------------- */
|
175 |
+
|
176 |
+
/* -----------------------------------------------------------------------------
|
177 |
+
* SVG - Cal Export
|
178 |
+
* ----------------------------------------------------------------------------- */
|
179 |
+
|
180 |
+
/* stylelint-disable-line block-no-empty */
|
181 |
+
|
182 |
+
/* Mixins */
|
183 |
+
|
184 |
+
/* -----------------------------------------------------------------------------
|
185 |
+
* Body
|
186 |
+
* ----------------------------------------------------------------------------- */
|
187 |
+
|
188 |
+
/* -----------------------------------------------------------------------------
|
189 |
+
* Desktop Body 1
|
190 |
+
* ----------------------------------------------------------------------------- */
|
191 |
+
|
192 |
+
/* -----------------------------------------------------------------------------
|
193 |
+
* Desktop Body 2
|
194 |
+
* ----------------------------------------------------------------------------- */
|
195 |
+
|
196 |
+
/* -----------------------------------------------------------------------------
|
197 |
+
* Desktop Body 3
|
198 |
+
* ----------------------------------------------------------------------------- */
|
199 |
+
|
200 |
+
/* -----------------------------------------------------------------------------
|
201 |
+
* Mobile Body 1
|
202 |
+
* ----------------------------------------------------------------------------- */
|
203 |
+
|
204 |
+
/* -----------------------------------------------------------------------------
|
205 |
+
* Mobile Body 2
|
206 |
+
* ----------------------------------------------------------------------------- */
|
207 |
+
|
208 |
+
/* -----------------------------------------------------------------------------
|
209 |
+
* Mobile Body 3
|
210 |
+
* ----------------------------------------------------------------------------- */
|
211 |
+
|
212 |
+
/* -----------------------------------------------------------------------------
|
213 |
+
* Heading
|
214 |
+
* ----------------------------------------------------------------------------- */
|
215 |
+
|
216 |
+
/* -----------------------------------------------------------------------------
|
217 |
+
* Heading 1
|
218 |
+
* ----------------------------------------------------------------------------- */
|
219 |
+
|
220 |
+
/* -----------------------------------------------------------------------------
|
221 |
+
* Heading 2
|
222 |
+
* ----------------------------------------------------------------------------- */
|
223 |
+
|
224 |
+
/* -----------------------------------------------------------------------------
|
225 |
+
* Heading 3
|
226 |
+
* ----------------------------------------------------------------------------- */
|
227 |
+
|
228 |
+
/* -----------------------------------------------------------------------------
|
229 |
+
* Heading 4
|
230 |
+
* ----------------------------------------------------------------------------- */
|
231 |
+
|
232 |
+
/* -----------------------------------------------------------------------------
|
233 |
+
* Heading 5
|
234 |
+
* ----------------------------------------------------------------------------- */
|
235 |
+
|
236 |
+
/* -----------------------------------------------------------------------------
|
237 |
+
* Heading 6
|
238 |
+
* ----------------------------------------------------------------------------- */
|
239 |
+
|
240 |
+
/* -----------------------------------------------------------------------------
|
241 |
+
* Heading 7
|
242 |
+
* ----------------------------------------------------------------------------- */
|
243 |
+
|
244 |
+
/* -----------------------------------------------------------------------------
|
245 |
+
* Heading 8
|
246 |
+
* ----------------------------------------------------------------------------- */
|
247 |
+
|
248 |
+
/* -----------------------------------------------------------------------------
|
249 |
+
* Anchor - Default
|
250 |
+
* ----------------------------------------------------------------------------- */
|
251 |
+
|
252 |
+
/* -----------------------------------------------------------------------------
|
253 |
+
* Anchor - Alt
|
254 |
+
* ----------------------------------------------------------------------------- */
|
255 |
+
|
256 |
+
/* -----------------------------------------------------------------------------
|
257 |
+
* Anchor - Thin
|
258 |
+
* ----------------------------------------------------------------------------- */
|
259 |
+
|
260 |
+
/* -----------------------------------------------------------------------------
|
261 |
+
* Anchor - Thin
|
262 |
+
* ----------------------------------------------------------------------------- */
|
263 |
+
|
264 |
+
/* -----------------------------------------------------------------------------
|
265 |
+
* Anchor - Event Title
|
266 |
+
*
|
267 |
+
* This mixin intentionally only affects the text and border _colors_
|
268 |
+
* to make sure they all follow the Customizer overrides.
|
269 |
+
* ----------------------------------------------------------------------------- */
|
270 |
+
|
271 |
+
/* -----------------------------------------------------------------------------
|
272 |
+
* Button - Global
|
273 |
+
* ----------------------------------------------------------------------------- */
|
274 |
+
|
275 |
+
/* -----------------------------------------------------------------------------
|
276 |
+
* Button - Solid
|
277 |
+
* ----------------------------------------------------------------------------- */
|
278 |
+
|
279 |
+
/* -----------------------------------------------------------------------------
|
280 |
+
* Button - Link
|
281 |
+
* ----------------------------------------------------------------------------- */
|
282 |
+
|
283 |
+
/* -----------------------------------------------------------------------------
|
284 |
+
* Button - Border
|
285 |
+
* ----------------------------------------------------------------------------- */
|
286 |
+
|
287 |
+
/* -----------------------------------------------------------------------------
|
288 |
+
* Button - Border Small
|
289 |
+
* ----------------------------------------------------------------------------- */
|
290 |
+
|
291 |
+
/* -----------------------------------------------------------------------------
|
292 |
+
* Button - Icon Border
|
293 |
+
* ----------------------------------------------------------------------------- */
|
294 |
+
|
295 |
+
/* -----------------------------------------------------------------------------
|
296 |
+
* Sliders & Toggles
|
297 |
+
* ----------------------------------------------------------------------------- */
|
298 |
+
|
299 |
+
/* -----------------------------------------------------------------------------
|
300 |
+
* Sliders
|
301 |
+
* ----------------------------------------------------------------------------- */
|
302 |
+
|
303 |
+
/* -----------------------------------------------------------------------------
|
304 |
+
* Hidden: Hide from both screenreaders and browsers
|
305 |
+
* @author: h5bp.com/u
|
306 |
+
* ----------------------------------------------------------------------------- */
|
307 |
+
|
308 |
+
/* -----------------------------------------------------------------------------
|
309 |
+
* Visually Hide: Hide only visually, but have it available for screenreaders
|
310 |
+
* @author: h5bp.com/v
|
311 |
+
* ----------------------------------------------------------------------------- */
|
312 |
+
|
313 |
+
/* -----------------------------------------------------------------------------
|
314 |
+
* Visually Show: Show element after has been hidden with %visually-hide
|
315 |
+
* ----------------------------------------------------------------------------- */
|
316 |
+
|
317 |
+
/* Event Tickets Components */
|
318 |
+
|
319 |
+
/* Accordion Styles */
|
320 |
+
|
321 |
+
.accordion-header {
|
322 |
+
background: none;
|
323 |
+
border: 0;
|
324 |
+
box-sizing: border-box;
|
325 |
+
color: inherit;
|
326 |
+
cursor: pointer;
|
327 |
+
font-size: 12px;
|
328 |
+
font-weight: bold;
|
329 |
+
padding: 10px 20px;
|
330 |
+
position: relative;
|
331 |
+
text-align: left;
|
332 |
+
width: 100%;
|
333 |
+
}
|
334 |
+
|
335 |
+
.accordion-header:before {
|
336 |
+
background-color: #000;
|
337 |
+
border-radius: 100%;
|
338 |
+
box-sizing: border-box;
|
339 |
+
color: #fff;
|
340 |
+
content: '\f132';
|
341 |
+
font-family: 'dashicons';
|
342 |
+
font-size: 10px;
|
343 |
+
font-weight: 400;
|
344 |
+
height: 14px;
|
345 |
+
left: 0;
|
346 |
+
line-height: 17px;
|
347 |
+
padding: 0;
|
348 |
+
padding-right: 1px;
|
349 |
+
position: absolute;
|
350 |
+
text-align: center;
|
351 |
+
top: 12px;
|
352 |
+
width: 15px;
|
353 |
+
}
|
354 |
+
|
355 |
+
.accordion-header:after {
|
356 |
+
border-bottom: 1px solid #ddd;
|
357 |
+
content: '';
|
358 |
+
position: absolute;
|
359 |
+
right: 0;
|
360 |
+
top: 50%;
|
361 |
+
transform: translateY(-50%);
|
362 |
+
width: 80%;
|
363 |
+
}
|
364 |
+
|
365 |
+
.accordion-header.is-active:before {
|
366 |
+
content: '\f460';
|
367 |
+
line-height: 15px;
|
368 |
+
}
|
369 |
+
|
370 |
+
.accordion-header:focus {
|
371 |
+
outline: 1px solid #5b9dd9;
|
372 |
+
}
|
373 |
+
|
374 |
+
.accordion-header:hover {
|
375 |
+
background: none;
|
376 |
+
}
|
377 |
+
|
378 |
+
.tribe-tickets-editor-history:after {
|
379 |
+
width: calc(100% - 80px);
|
380 |
+
}
|
381 |
+
|
382 |
+
.tribe_attendee_meta:after {
|
383 |
+
width: calc(100% - 170px);
|
384 |
+
}
|
385 |
+
|
386 |
+
.tribe_advanced_meta:after {
|
387 |
+
width: calc(100% - 105px);
|
388 |
+
}
|
389 |
+
|
390 |
+
.accordion-label:focus {
|
391 |
+
outline: none;
|
392 |
+
}
|
393 |
+
|
394 |
+
.accordion-content {
|
395 |
+
display: none;
|
396 |
+
}
|
397 |
+
|
398 |
+
.ticket_panel .accordion-content {
|
399 |
+
margin: 1em 0 2em;
|
400 |
+
}
|
401 |
+
|
402 |
+
.accordion-content.is-active {
|
403 |
+
display: block;
|
404 |
+
}
|
405 |
+
|
406 |
+
.tribe-common-c-loader.tribe-tickets-loader__tickets-block,
|
407 |
+
.tribe-common-c-loader.tribe-tickets-loader__modal {
|
408 |
+
align-items: center;
|
409 |
+
background: var(--tec-color-background-transparent);
|
410 |
+
display: flex;
|
411 |
+
height: 100%;
|
412 |
+
justify-content: center;
|
413 |
+
left: 0;
|
414 |
+
padding: 0;
|
415 |
+
position: absolute;
|
416 |
+
top: 0;
|
417 |
+
width: 100%;
|
418 |
+
z-index: var(--tec-z-index-spinner-container);
|
419 |
+
}
|
420 |
+
|
421 |
+
.tribe-common-c-loader.tribe-tickets-loader__modal {
|
422 |
+
height: 100vh;
|
423 |
+
position: fixed;
|
424 |
+
width: 100vw;
|
425 |
+
}
|
426 |
+
|
427 |
+
.event-tickets .tribe-common-c-loader {
|
428 |
+
align-items: center;
|
429 |
+
background: var(--tec-color-background-transparent);
|
430 |
+
display: flex;
|
431 |
+
height: 100%;
|
432 |
+
justify-content: center;
|
433 |
+
left: 0;
|
434 |
+
padding: 0;
|
435 |
+
position: absolute;
|
436 |
+
top: 0;
|
437 |
+
width: 100%;
|
438 |
+
z-index: var(--tec-z-index-spinner-container);
|
439 |
+
}
|
440 |
+
|
441 |
+
.tribe-common .tribe-tickets__notice, .event-tickets .tribe-tickets__notice {
|
442 |
+
background-color: var(--tec-color-background-secondary);
|
443 |
+
border-radius: var(--tec-border-radius-default);
|
444 |
+
margin: var(--tec-spacer-4) 0;
|
445 |
+
padding: var(--tec-spacer-3);
|
446 |
+
}
|
447 |
+
|
448 |
+
.tribe-common .tribe-tickets__notice > *:last-child, .event-tickets .tribe-tickets__notice > *:last-child {
|
449 |
+
margin-bottom: 0;
|
450 |
+
padding-bottom: 0;
|
451 |
+
}
|
452 |
+
|
453 |
+
.tribe-common .tribe-tickets-notice__title, .event-tickets .tribe-tickets-notice__title {
|
454 |
+
margin: 0;
|
455 |
+
position: relative;
|
456 |
+
}
|
457 |
+
|
458 |
+
.tribe-common .tribe-tickets-notice__title:empty, .event-tickets .tribe-tickets-notice__title:empty {
|
459 |
+
display: none;
|
460 |
+
}
|
461 |
+
|
462 |
+
/*
|
463 |
+
Error Notices
|
464 |
+
*/
|
465 |
+
|
466 |
+
.tribe-common .tribe-tickets__notice--error, .event-tickets .tribe-tickets__notice--error {
|
467 |
+
background-color: var(--tec-color-background-error);
|
468 |
+
display: none;
|
469 |
+
padding-left: 50px;
|
470 |
+
position: relative;
|
471 |
+
}
|
472 |
+
|
473 |
+
.tribe-common .tribe-tickets__notice--error:before, .event-tickets .tribe-tickets__notice--error:before {
|
474 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");
|
475 |
+
background-size: contain;
|
476 |
+
content: '';
|
477 |
+
height: var(--tec-spacer-3);
|
478 |
+
left: var(--tec-spacer-4);
|
479 |
+
position: absolute;
|
480 |
+
top: var(--tec-spacer-4);
|
481 |
+
width: var(--tec-spacer-3);
|
482 |
+
}
|
483 |
+
|
484 |
+
/*
|
485 |
+
"Barred" Notices (visible side borders)
|
486 |
+
*/
|
487 |
+
|
488 |
+
.tribe-common .tribe-tickets__notice--barred, .event-tickets .tribe-tickets__notice--barred {
|
489 |
+
background-color: var(--tec-color-background);
|
490 |
+
border: var(--tec-spacer-0) solid var(--tec-color-border-secondary);
|
491 |
+
border-bottom: 0;
|
492 |
+
border-radius: 0;
|
493 |
+
border-top: 0;
|
494 |
+
padding: 0 var(--tec-spacer-2);
|
495 |
+
}
|
496 |
+
|
497 |
+
.tribe-common .tribe-tickets__notice--barred-left, .event-tickets .tribe-tickets__notice--barred-left {
|
498 |
+
border-right: 0;
|
499 |
+
padding: 0 0 0 var(--tec-spacer-2);
|
500 |
+
}
|
501 |
+
|
502 |
+
.tribe-common .tribe-tickets__notice--barred-right, .event-tickets .tribe-tickets__notice--barred-right {
|
503 |
+
border-left: 0;
|
504 |
+
padding: 0 var(--tec-spacer-2) 0 0;
|
505 |
+
}
|
506 |
+
|
507 |
+
/* -------------------------------------------------------------------------
|
508 |
+
* SVG Icons
|
509 |
+
* ------------------------------------------------------------------------- */
|
510 |
+
|
511 |
+
.event-tickets .tribe-tickets-svgicon {
|
512 |
+
background-repeat: no-repeat;
|
513 |
+
background-size: contain;
|
514 |
+
}
|
515 |
+
|
516 |
+
/* -----------------------------------------------------------------------------
|
517 |
+
*
|
518 |
+
* Tooltip
|
519 |
+
*
|
520 |
+
* ----------------------------------------------------------------------------- */
|
521 |
+
|
522 |
+
/* Defining our tooltipster theme. */
|
523 |
+
|
524 |
+
.tooltipster-base.tribe-tickets-tooltip-theme {
|
525 |
+
background-color: var(--tec-color-background);
|
526 |
+
border: 1px solid var(--tec-color-border-default);
|
527 |
+
border-radius: var(--tec-border-radius-default);
|
528 |
+
box-shadow: var(--tec-box-shadow-tooltip);
|
529 |
+
height: auto !important;
|
530 |
+
max-width: 254px;
|
531 |
+
padding: var(--tec-spacer-5);
|
532 |
+
}
|
533 |
+
|
534 |
+
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box {
|
535 |
+
background-color: transparent;
|
536 |
+
border: 0;
|
537 |
+
border-radius: 0;
|
538 |
+
box-shadow: none;
|
539 |
+
margin: 0;
|
540 |
+
}
|
541 |
+
|
542 |
+
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content {
|
543 |
+
color: var(--tec-color-text-primary);
|
544 |
+
overflow: inherit;
|
545 |
+
padding: 0;
|
546 |
+
word-break: break-word;
|
547 |
+
}
|
548 |
+
|
549 |
+
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow {
|
550 |
+
display: none;
|
551 |
+
}
|
552 |
+
|
553 |
+
/* -----------------------------------------------------------------------------
|
554 |
+
*
|
555 |
+
* Button: Small
|
556 |
+
*
|
557 |
+
* Example:
|
558 |
+
* <button class="tribe-common-c-btn tribe-common-c-btn--small">...</button>
|
559 |
+
* <a href="#" class="tribe-common-c-btn tribe-common-c-btn--small">...</a>
|
560 |
+
*
|
561 |
+
* ----------------------------------------------------------------------------- */
|
562 |
+
|
563 |
+
.tribe-common button.tribe-common-c-btn--small, .tribe-common input[type="button"].tribe-common-c-btn--small, .tribe-common input[type="submit"].tribe-common-c-btn--small, .tribe-common a.tribe-common-c-btn--small {
|
564 |
+
background-color: var(--tec-color-accent-primary);
|
565 |
+
padding: 11px 14px;
|
566 |
+
width: auto;
|
567 |
+
}
|
568 |
+
|
569 |
+
/* -----------------------------------------------------------------------------
|
570 |
+
*
|
571 |
+
* Button: Link
|
572 |
+
*
|
573 |
+
* Example:
|
574 |
+
* <button class="tribe-common-c-btn-link">...</button>
|
575 |
+
* <a href="#" class="tribe-common-c-btn-link">...</a>
|
576 |
+
*
|
577 |
+
* ----------------------------------------------------------------------------- */
|
578 |
+
|
579 |
+
.tribe-common button.tribe-common-c-btn-link, .tribe-common input[type="button"].tribe-common-c-btn-link, .tribe-common input[type="submit"].tribe-common-c-btn-link, .tribe-common a.tribe-common-c-btn-link {
|
580 |
+
color: var(--tec-color-text-primary);
|
581 |
+
font-family: var(--tec-font-family-sans-serif);
|
582 |
+
font-size: var(--tec-font-size-2);
|
583 |
+
line-height: var(--tec-line-height-3);
|
584 |
+
font-weight: var(--tec-font-weight-regular);
|
585 |
+
border: 0;
|
586 |
+
cursor: pointer;
|
587 |
+
display: inline-block;
|
588 |
+
height: auto;
|
589 |
+
padding: 0;
|
590 |
+
text-decoration: none;
|
591 |
+
width: auto;
|
592 |
+
background-color: transparent;
|
593 |
+
text-align: center;
|
594 |
+
text-decoration: underline;
|
595 |
+
transition: var(--tec-transition-color);
|
596 |
+
}
|
597 |
+
|
598 |
+
.tribe-common button.tribe-common-c-btn-link:hover,
|
599 |
+
.tribe-common button.tribe-common-c-btn-link:focus,
|
600 |
+
.tribe-common input[type="button"].tribe-common-c-btn-link:hover,
|
601 |
+
.tribe-common input[type="button"].tribe-common-c-btn-link:focus,
|
602 |
+
.tribe-common input[type="submit"].tribe-common-c-btn-link:hover,
|
603 |
+
.tribe-common input[type="submit"].tribe-common-c-btn-link:focus,
|
604 |
+
.tribe-common a.tribe-common-c-btn-link:hover,
|
605 |
+
.tribe-common a.tribe-common-c-btn-link:focus {
|
606 |
+
background-color: transparent;
|
607 |
+
}
|
608 |
+
|
609 |
+
.tribe-common button.tribe-common-c-btn-link, .tribe-common input[type="button"].tribe-common-c-btn-link, .tribe-common input[type="submit"].tribe-common-c-btn-link, .tribe-common a.tribe-common-c-btn-link {
|
610 |
+
|
611 |
+
background-color: transparent;
|
612 |
+
color: var(--tec-color-accent-primary);
|
613 |
+
padding: 11px 20px;
|
614 |
+
width: 100%;
|
615 |
+
}
|
616 |
+
|
617 |
+
.tribe-common button.tribe-common-c-btn-link:focus,
|
618 |
+
.tribe-common button.tribe-common-c-btn-link:hover,
|
619 |
+
.tribe-common input[type="button"].tribe-common-c-btn-link:focus,
|
620 |
+
.tribe-common input[type="button"].tribe-common-c-btn-link:hover,
|
621 |
+
.tribe-common input[type="submit"].tribe-common-c-btn-link:focus,
|
622 |
+
.tribe-common input[type="submit"].tribe-common-c-btn-link:hover,
|
623 |
+
.tribe-common a.tribe-common-c-btn-link:focus,
|
624 |
+
.tribe-common a.tribe-common-c-btn-link:hover {
|
625 |
+
color: var(--tec-color-accent-primary-hover);
|
626 |
+
}
|
627 |
+
|
628 |
+
.tribe-common button.tribe-common-c-btn-link:active, .tribe-common input[type="button"].tribe-common-c-btn-link:active, .tribe-common input[type="submit"].tribe-common-c-btn-link:active, .tribe-common a.tribe-common-c-btn-link:active {
|
629 |
+
color: var(--tec-color-accent-primary-active);
|
630 |
+
}
|
631 |
+
|
632 |
+
.tribe-common button.tribe-common-c-btn-link:disabled, .tribe-common input[type="button"].tribe-common-c-btn-link:disabled, .tribe-common input[type="submit"].tribe-common-c-btn-link:disabled, .tribe-common a.tribe-common-c-btn-link:disabled {
|
633 |
+
color: var(--tec-color-accent-primary-background);
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Event Tickets - Tickets Commerce Stripe Stylesheet
|
638 |
+
*
|
639 |
+
* @since TBD
|
640 |
+
*/
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Event Tickets - Tickets Commerce Stripe Stylesheet
|
644 |
+
*
|
645 |
+
* @since TBD
|
646 |
+
*/
|
647 |
+
|
648 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-payment-element {
|
649 |
+
margin-bottom: var(--tec-spacer-4);
|
650 |
+
}
|
651 |
+
|
652 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element {
|
653 |
+
margin-bottom: var(--tec-spacer-4);
|
654 |
+
}
|
655 |
+
|
656 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-row {
|
657 |
+
display: flex;
|
658 |
+
justify-content: stretch;
|
659 |
+
}
|
660 |
+
|
661 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element--compact {
|
662 |
+
border: 1px solid var(--tec-color-border-default);
|
663 |
+
border-radius: var(--tec-border-radius-default);
|
664 |
+
padding: var(--tec-spacer-2);
|
665 |
+
}
|
666 |
+
|
667 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element--compact .tribe-tickets__commerce-checkout-stripe-card-element-row {
|
668 |
+
display: none;
|
669 |
+
}
|
670 |
+
|
671 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-number,
|
672 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-expiry,
|
673 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-cvc,
|
674 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-zip {
|
675 |
+
border: 1px solid var(--tec-color-border-default);
|
676 |
+
border-radius: var(--tec-border-radius-default);
|
677 |
+
flex-basis: 67%;
|
678 |
+
flex-grow: 1;
|
679 |
+
margin-bottom: var(--tec-spacer-2);
|
680 |
+
margin-right: var(--tec-spacer-2);
|
681 |
+
padding: var(--tec-spacer-2) var(--tec-spacer-3);
|
682 |
+
}
|
683 |
+
|
684 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-expiry,
|
685 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-zip {
|
686 |
+
flex-basis: 33%;
|
687 |
+
margin-right: 0;
|
688 |
+
}
|
689 |
+
|
690 |
+
.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-zip-input {
|
691 |
+
background-color: var(--tec-color-background-events);
|
692 |
+
border: none;
|
693 |
+
color: #23282d;
|
694 |
+
display: block;
|
695 |
+
font-family: sans-serif;
|
696 |
+
font-size: var(--tec-font-size-2);
|
697 |
+
margin: 0;
|
698 |
+
padding: 0;
|
699 |
+
width: 100%;
|
700 |
+
}
|
701 |
+
|
702 |
+
@media (min-width: 768px) {
|
703 |
+
|
704 |
+
.tribe-common-c-loader.tribe-tickets-loader__tickets-block,
|
705 |
+
.tribe-common-c-loader.tribe-tickets-loader__modal {
|
706 |
+
padding: 0
|
707 |
+
}
|
708 |
+
|
709 |
+
.event-tickets .tribe-common-c-loader {
|
710 |
+
padding: 0
|
711 |
+
}
|
712 |
+
|
713 |
+
.tribe-common button.tribe-common-c-btn-link, .tribe-common input[type="button"].tribe-common-c-btn-link, .tribe-common input[type="submit"].tribe-common-c-btn-link, .tribe-common a.tribe-common-c-btn-link {
|
714 |
+
background-color: transparent;
|
715 |
+
width: auto
|
716 |
+
}
|
717 |
+
}
|
src/resources/css/tickets-commerce/gateway/stripe.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element,.event-tickets .tribe-tickets__commerce-checkout-stripe-payment-element{margin-bottom:var(--tec-spacer-4)}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-row{display:flex;justify-content:stretch}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element--compact{border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);padding:var(--tec-spacer-2)}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element--compact .tribe-tickets__commerce-checkout-stripe-card-element-row{display:none}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-cvc,.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-expiry,.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-number,.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-zip{border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);flex-basis:67%;flex-grow:1;margin-bottom:var(--tec-spacer-2);margin-right:var(--tec-spacer-2);padding:var(--tec-spacer-2) var(--tec-spacer-3)}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-expiry,.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-zip{flex-basis:33%;margin-right:0}.event-tickets .tribe-tickets__commerce-checkout-stripe-card-element-zip-input{background-color:var(--tec-color-background-events);border:none;color:#23282d;display:block;font-family:sans-serif;font-size:var(--tec-font-size-2);margin:0;padding:0;width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}}
|
src/resources/images/admin/stripe-logo.png
ADDED
Binary file
|
src/resources/images/{background-paypal-connect.png → background-gateway-connect.png}
RENAMED
File without changes
|
src/resources/js/admin/gateway/stripe/webhooks.js
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global ClipboardJS, URLSearchParams */
|
2 |
+
/**
|
3 |
+
* Makes sure we have all the required levels on the Tribe Object
|
4 |
+
*
|
5 |
+
* @since TBD
|
6 |
+
*
|
7 |
+
* @type {Object}
|
8 |
+
*/
|
9 |
+
tribe.tickets = tribe.tickets || {};
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Path to this script in the global tribe Object.
|
13 |
+
*
|
14 |
+
* @since TBD
|
15 |
+
*
|
16 |
+
* @type {Object}
|
17 |
+
*/
|
18 |
+
tribe.tickets.commerce = tribe.tickets.commerce || {};
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Path to this script in the global tribe Object.
|
22 |
+
*
|
23 |
+
* @since 5.2.0
|
24 |
+
*
|
25 |
+
* @type {Object}
|
26 |
+
*/
|
27 |
+
tribe.tickets.commerce.gateway = tribe.tickets.commerce.gateway || {};
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Path to this script in the global tribe Object.
|
31 |
+
*
|
32 |
+
* @since TBD
|
33 |
+
*
|
34 |
+
* @type {Object}
|
35 |
+
*/
|
36 |
+
tribe.tickets.commerce.gateway.stripe = tribe.tickets.commerce.gateway.stripe || {};
|
37 |
+
|
38 |
+
/**
|
39 |
+
* This script Object for public usage of the methods.
|
40 |
+
*
|
41 |
+
* @since TBD
|
42 |
+
*
|
43 |
+
* @type {Object}
|
44 |
+
*/
|
45 |
+
tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
46 |
+
|
47 |
+
( ( $, obj, ajaxurl ) => {
|
48 |
+
"use strict";
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Stores the all selectors used on this module.
|
52 |
+
*
|
53 |
+
* @since TBD
|
54 |
+
*
|
55 |
+
* @type {Object}
|
56 |
+
*/
|
57 |
+
obj.selectors = {
|
58 |
+
button: '.tribe-field-tickets-commerce-stripe-webhooks-copy',
|
59 |
+
signingKey: '[name="tickets-commerce-stripe-webhooks-signing-key"]',
|
60 |
+
statusLabel: '.tribe-field-tickets-commerce-stripe-webhooks-signing-key-status',
|
61 |
+
tooltip: '.tooltip' ,
|
62 |
+
genericDashicon: '.dashicons',
|
63 |
+
};
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Stores the ClipboardJS instance for later reference.
|
67 |
+
*
|
68 |
+
* @since TBD
|
69 |
+
*
|
70 |
+
* @type {Object}
|
71 |
+
*/
|
72 |
+
obj.clipboardButton = null;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Configures the Copy URL UI.
|
76 |
+
*
|
77 |
+
* @since TBD
|
78 |
+
*/
|
79 |
+
obj.setupCopyUrl = () => {
|
80 |
+
obj.clipboardButton = new ClipboardJS( obj.selectors.button );
|
81 |
+
$( obj.selectors.button ).on( 'click', event => event.preventDefault() );
|
82 |
+
};
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Configures the signing key input events.
|
86 |
+
*
|
87 |
+
* @since TBD
|
88 |
+
*/
|
89 |
+
obj.setupSigningValidation = () => {
|
90 |
+
$( obj.selectors.signingKey ).on( 'change', obj.onSigningFieldChange );
|
91 |
+
};
|
92 |
+
|
93 |
+
/**
|
94 |
+
* When the signing field changes.
|
95 |
+
*
|
96 |
+
* @since TBD
|
97 |
+
*
|
98 |
+
* @param event {Event}
|
99 |
+
*
|
100 |
+
* @return {Promise<*>}
|
101 |
+
*/
|
102 |
+
obj.onSigningFieldChange = async ( event ) => {
|
103 |
+
const $field = $( event.target );
|
104 |
+
const $tooltip = $field.siblings( obj.selectors.tooltip );
|
105 |
+
const $statusIcon = $tooltip.find( obj.selectors.genericDashicon );
|
106 |
+
const $statusLabel = $tooltip.find( obj.selectors.statusLabel );
|
107 |
+
|
108 |
+
const params = new URLSearchParams();
|
109 |
+
params.set( 'signing_key', $field.val() );
|
110 |
+
params.set( 'action', $field.data( 'ajaxAction' ) );
|
111 |
+
params.set( 'tc_nonce', $field.data( 'ajaxNonce' ) );
|
112 |
+
|
113 |
+
$field.prop( 'disabled', true );
|
114 |
+
|
115 |
+
const args = {
|
116 |
+
timeout: 30000,
|
117 |
+
body: params,
|
118 |
+
hooks: {
|
119 |
+
beforeRequest: [
|
120 |
+
request => {
|
121 |
+
$statusLabel.text( $field.data( 'loadingText' ) );
|
122 |
+
$statusIcon.removeClass( [ 'dashicons-no', 'dashicons-yes' ] ).addClass( 'dashicons-update' );
|
123 |
+
},
|
124 |
+
],
|
125 |
+
},
|
126 |
+
};
|
127 |
+
|
128 |
+
const response = await tribe.ky.post( ajaxurl, args ).json();
|
129 |
+
|
130 |
+
$field.prop( 'disabled', false );
|
131 |
+
if ( response.data.is_valid_webhook ) {
|
132 |
+
$statusIcon.removeClass( [ 'dashicons-update' ] ).addClass( 'dashicons-yes' );
|
133 |
+
$statusLabel.text( response.data.status );
|
134 |
+
} else {
|
135 |
+
$statusIcon.removeClass( [ 'dashicons-update' ] ).addClass( 'dashicons-no' );
|
136 |
+
$statusLabel.text( response.data.status );
|
137 |
+
}
|
138 |
+
|
139 |
+
return response;
|
140 |
+
};
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Runs when jQuery determines that the document is ready.
|
144 |
+
*/
|
145 |
+
obj.ready = () => {
|
146 |
+
obj.setupCopyUrl();
|
147 |
+
obj.setupSigningValidation();
|
148 |
+
};
|
149 |
+
|
150 |
+
$( document ).ready( obj.ready );
|
151 |
+
} )( jQuery, tribe.tickets.commerce.gateway.stripe.webhooks, window.ajaxurl );
|
src/resources/js/admin/tickets-commerce-settings.js
CHANGED
@@ -76,9 +76,12 @@ tribe.tickets.admin.commerceSettings = {};
|
|
76 |
} );
|
77 |
}
|
78 |
|
79 |
-
obj.
|
80 |
|
81 |
-
if (
|
|
|
|
|
|
|
82 |
return;
|
83 |
}
|
84 |
|
@@ -87,6 +90,10 @@ tribe.tickets.admin.commerceSettings = {};
|
|
87 |
dialog.a11yInstance.show();
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
90 |
dialog.a11yInstance.node.querySelectorAll( '[data-js="a11y-close-button"]' )
|
91 |
.forEach( function( closeButton ) {
|
92 |
$( closeButton ).on( 'click', function() {
|
@@ -253,7 +260,7 @@ tribe.tickets.admin.commerceSettings = {};
|
|
253 |
obj.disconnectButton.on( 'click', obj.handleDisconnectClick );
|
254 |
}
|
255 |
|
256 |
-
obj.
|
257 |
};
|
258 |
|
259 |
// Configure on document ready.
|
76 |
} );
|
77 |
}
|
78 |
|
79 |
+
obj.maybeShowModalAfterConnection = function() {
|
80 |
|
81 |
+
if (
|
82 |
+
! window.location.search.match( /tc-status=paypal-signup-complete/i )
|
83 |
+
&& ! window.location.search.match( /tc-status=stripe-signup-complete/i )
|
84 |
+
) {
|
85 |
return;
|
86 |
}
|
87 |
|
90 |
dialog.a11yInstance.show();
|
91 |
}
|
92 |
|
93 |
+
if ( 'stripe-connected-modal-id' === dialog.id ) {
|
94 |
+
dialog.a11yInstance.show();
|
95 |
+
}
|
96 |
+
|
97 |
dialog.a11yInstance.node.querySelectorAll( '[data-js="a11y-close-button"]' )
|
98 |
.forEach( function( closeButton ) {
|
99 |
$( closeButton ).on( 'click', function() {
|
260 |
obj.disconnectButton.on( 'click', obj.handleDisconnectClick );
|
261 |
}
|
262 |
|
263 |
+
obj.maybeShowModalAfterConnection();
|
264 |
};
|
265 |
|
266 |
// Configure on document ready.
|
src/resources/js/commerce/gateway/paypal/checkout.js
CHANGED
@@ -1,31 +1,4 @@
|
|
1 |
/* global tribe, jQuery, paypal, ajaxurl */
|
2 |
-
/**
|
3 |
-
* Makes sure we have all the required levels on the Tribe Object
|
4 |
-
*
|
5 |
-
* @since 5.1.9
|
6 |
-
*
|
7 |
-
* @type {Object}
|
8 |
-
*/
|
9 |
-
tribe.tickets = tribe.tickets || {};
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Path to this script in the global tribe Object.
|
13 |
-
*
|
14 |
-
* @since 5.1.9
|
15 |
-
*
|
16 |
-
* @type {Object}
|
17 |
-
*/
|
18 |
-
tribe.tickets.commerce = tribe.tickets.commerce || {};
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Path to this script in the global tribe Object.
|
22 |
-
*
|
23 |
-
* @since 5.1.9
|
24 |
-
*
|
25 |
-
* @type {Object}
|
26 |
-
*/
|
27 |
-
tribe.tickets.commerce.gateway = tribe.tickets.commerce.gateway || {};
|
28 |
-
|
29 |
/**
|
30 |
* Path to this script in the global tribe Object.
|
31 |
*
|
@@ -56,6 +29,14 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
56 |
*/
|
57 |
( function ( $, obj ) {
|
58 |
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
const $document = $( document );
|
60 |
|
61 |
/**
|
@@ -85,6 +66,15 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
85 |
*/
|
86 |
obj.timeouts = [];
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/**
|
89 |
* PayPal Checkout Selectors.
|
90 |
*
|
@@ -93,6 +83,7 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
93 |
* @type {Object}
|
94 |
*/
|
95 |
obj.selectors = {
|
|
|
96 |
checkoutScript: '.tec-tc-gateway-paypal-checkout-script',
|
97 |
activePayment: '.tec-tc-gateway-paypal-payment-active',
|
98 |
buttons: '#tec-tc-gateway-paypal-checkout-buttons',
|
@@ -133,6 +124,13 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
133 |
* @return {void}
|
134 |
*/
|
135 |
obj.handleGenericError = function ( error, $container ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
tribe.tickets.debug.log( 'handleGenericError', arguments );
|
137 |
$container.removeClass( obj.selectors.activePayment.className() );
|
138 |
|
@@ -167,12 +165,17 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
167 |
*/
|
168 |
obj.handleCreateOrder = function ( data, actions, $container ) {
|
169 |
tribe.tickets.debug.log( 'handleCreateOrder', arguments );
|
|
|
170 |
return fetch(
|
171 |
obj.orderEndpointUrl,
|
172 |
{
|
173 |
method: 'POST',
|
|
|
|
|
|
|
174 |
headers: {
|
175 |
'X-WP-Nonce': $container.find( tribe.tickets.commerce.selectors.nonce ).val(),
|
|
|
176 |
}
|
177 |
}
|
178 |
)
|
@@ -219,7 +222,8 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
219 |
*/
|
220 |
obj.handleCreateOrderFail = function ( $container, data ) {
|
221 |
tribe.tickets.debug.log( 'handleCreateOrderFail', arguments );
|
222 |
-
obj.showNotice( $container, data.
|
|
|
223 |
};
|
224 |
|
225 |
/**
|
@@ -557,6 +561,13 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
557 |
obj.bindScriptLoader = function () {
|
558 |
|
559 |
const $script = $( obj.selectors.checkoutScript );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
|
561 |
if ( ! $script.length ) {
|
562 |
$document.trigger( tribe.tickets.commerce.customEvents.hideLoader );
|
@@ -705,6 +716,11 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
705 |
tribe.tickets.debug.log( 'handleHostedCaptureError', error );
|
706 |
tribe.tickets.loader.hide( $container );
|
707 |
|
|
|
|
|
|
|
|
|
|
|
708 |
let errorTitle = '';
|
709 |
let errorContent = '';
|
710 |
|
@@ -810,6 +826,8 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
810 |
} else {
|
811 |
obj.showNotice( $container, '', data.message );
|
812 |
}
|
|
|
|
|
813 |
}
|
814 |
|
815 |
tribe.tickets.loader.hide( $container );
|
@@ -843,4 +861,4 @@ tribe.tickets.commerce.gateway.paypal.checkout = {};
|
|
843 |
|
844 |
$( obj.ready );
|
845 |
|
846 |
-
} )( jQuery, tribe.tickets.commerce.gateway.paypal
|
1 |
/* global tribe, jQuery, paypal, ajaxurl */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Path to this script in the global tribe Object.
|
4 |
*
|
29 |
*/
|
30 |
( function ( $, obj ) {
|
31 |
'use strict';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The document element
|
35 |
+
*
|
36 |
+
* @since TBD
|
37 |
+
*
|
38 |
+
* @type {jQuery|HTMLElement}
|
39 |
+
*/
|
40 |
const $document = $( document );
|
41 |
|
42 |
/**
|
66 |
*/
|
67 |
obj.timeouts = [];
|
68 |
|
69 |
+
/**
|
70 |
+
* Flag to check if the current error is generic or not.
|
71 |
+
*
|
72 |
+
* @since TBD
|
73 |
+
*
|
74 |
+
* @type {boolean}
|
75 |
+
*/
|
76 |
+
obj.isGenericError = true;
|
77 |
+
|
78 |
/**
|
79 |
* PayPal Checkout Selectors.
|
80 |
*
|
83 |
* @type {Object}
|
84 |
*/
|
85 |
obj.selectors = {
|
86 |
+
paypalGatewayContainer: '.tribe-tickets__commerce-checkout-paypal',
|
87 |
checkoutScript: '.tec-tc-gateway-paypal-checkout-script',
|
88 |
activePayment: '.tec-tc-gateway-paypal-payment-active',
|
89 |
buttons: '#tec-tc-gateway-paypal-checkout-buttons',
|
124 |
* @return {void}
|
125 |
*/
|
126 |
obj.handleGenericError = function ( error, $container ) {
|
127 |
+
|
128 |
+
// Bail out if there were other errors.
|
129 |
+
if ( ! obj.isGenericError ) {
|
130 |
+
// reset the flag.
|
131 |
+
obj.isGenericError = true;
|
132 |
+
return;
|
133 |
+
}
|
134 |
tribe.tickets.debug.log( 'handleGenericError', arguments );
|
135 |
$container.removeClass( obj.selectors.activePayment.className() );
|
136 |
|
165 |
*/
|
166 |
obj.handleCreateOrder = function ( data, actions, $container ) {
|
167 |
tribe.tickets.debug.log( 'handleCreateOrder', arguments );
|
168 |
+
|
169 |
return fetch(
|
170 |
obj.orderEndpointUrl,
|
171 |
{
|
172 |
method: 'POST',
|
173 |
+
body: JSON.stringify( {
|
174 |
+
purchaser: tribe.tickets.commerce.getPurchaserData( $container )
|
175 |
+
} ),
|
176 |
headers: {
|
177 |
'X-WP-Nonce': $container.find( tribe.tickets.commerce.selectors.nonce ).val(),
|
178 |
+
'Content-Type': 'application/json',
|
179 |
}
|
180 |
}
|
181 |
)
|
222 |
*/
|
223 |
obj.handleCreateOrderFail = function ( $container, data ) {
|
224 |
tribe.tickets.debug.log( 'handleCreateOrderFail', arguments );
|
225 |
+
obj.showNotice( $container, data.message, '' );
|
226 |
+
obj.isGenericError = false;
|
227 |
};
|
228 |
|
229 |
/**
|
561 |
obj.bindScriptLoader = function () {
|
562 |
|
563 |
const $script = $( obj.selectors.checkoutScript );
|
564 |
+
const $paypalGateway = $( obj.selectors.paypalGatewayContainer );
|
565 |
+
|
566 |
+
// Check to see if PayPal gateway is present.
|
567 |
+
if ( $paypalGateway.length === 0 ) {
|
568 |
+
$document.trigger( tribe.tickets.commerce.customEvents.hideLoader );
|
569 |
+
return;
|
570 |
+
}
|
571 |
|
572 |
if ( ! $script.length ) {
|
573 |
$document.trigger( tribe.tickets.commerce.customEvents.hideLoader );
|
716 |
tribe.tickets.debug.log( 'handleHostedCaptureError', error );
|
717 |
tribe.tickets.loader.hide( $container );
|
718 |
|
719 |
+
if ( ! obj.isGenericError ) {
|
720 |
+
obj.isGenericError = true;
|
721 |
+
return;
|
722 |
+
}
|
723 |
+
|
724 |
let errorTitle = '';
|
725 |
let errorContent = '';
|
726 |
|
826 |
} else {
|
827 |
obj.showNotice( $container, '', data.message );
|
828 |
}
|
829 |
+
} else {
|
830 |
+
obj.showNotice( $container, '', data.message );
|
831 |
}
|
832 |
|
833 |
tribe.tickets.loader.hide( $container );
|
861 |
|
862 |
$( obj.ready );
|
863 |
|
864 |
+
} )( jQuery, tribe.tickets.commerce.gateway.paypal );
|
src/resources/js/commerce/gateway/stripe/checkout.js
ADDED
@@ -0,0 +1,621 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global tribe, jQuery, Stripe, tecTicketsCommerceGatewayStripeCheckout */
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Path to this script in the global tribe Object.
|
5 |
+
*
|
6 |
+
* @since TBD
|
7 |
+
*
|
8 |
+
* @type {Object}
|
9 |
+
*/
|
10 |
+
tribe.tickets.commerce.gateway.stripe = tribe.tickets.commerce.gateway.stripe || {};
|
11 |
+
|
12 |
+
/**
|
13 |
+
* This script Object for public usage of the methods.
|
14 |
+
*
|
15 |
+
* @since TBD
|
16 |
+
*
|
17 |
+
* @type {Object}
|
18 |
+
*/
|
19 |
+
tribe.tickets.commerce.gateway.stripe.checkout = {};
|
20 |
+
|
21 |
+
( ( $, obj, Stripe, ky ) => {
|
22 |
+
'use strict';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Pull the variables from the PHP backend.
|
26 |
+
*
|
27 |
+
* @since TBD
|
28 |
+
*
|
29 |
+
* @type {Object}
|
30 |
+
*/
|
31 |
+
obj.checkout = tecTicketsCommerceGatewayStripeCheckout;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Checkout Selectors.
|
35 |
+
*
|
36 |
+
* @since TBD
|
37 |
+
*
|
38 |
+
* @type {Object}
|
39 |
+
*/
|
40 |
+
obj.selectors = {
|
41 |
+
cardNumber: '#tec-tc-gateway-stripe-card-number',
|
42 |
+
cardExpiry: '#tec-tc-gateway-stripe-card-expiry',
|
43 |
+
cardCvc: '#tec-tc-gateway-stripe-card-cvc',
|
44 |
+
cardZipWrapper: '#tec-tc-gateway-stripe-card-zip',
|
45 |
+
cardElement: '#tec-tc-gateway-stripe-card-element',
|
46 |
+
cardErrors: '#tec-tc-gateway-stripe-errors',
|
47 |
+
paymentElement: '#tec-tc-gateway-stripe-payment-element',
|
48 |
+
paymentMessage: '#tec-tc-gateway-stripe-payment-message',
|
49 |
+
submitButton: '#tec-tc-gateway-stripe-checkout-button',
|
50 |
+
hiddenElement: '.tribe-common-a11y-hidden'
|
51 |
+
};
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Stripe JS library.
|
55 |
+
*
|
56 |
+
* @since TBD
|
57 |
+
*
|
58 |
+
* @type {Object|null}
|
59 |
+
*/
|
60 |
+
obj.stripeLib = Stripe( obj.checkout.publishableKey );
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Stripe Elements API instance.
|
64 |
+
*
|
65 |
+
* @since TBD
|
66 |
+
*
|
67 |
+
* @type {Object|null}
|
68 |
+
*/
|
69 |
+
obj.stripeElements = null;
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Loader container.
|
73 |
+
*
|
74 |
+
* @since TBD
|
75 |
+
*
|
76 |
+
* @type {Object|null}
|
77 |
+
*/
|
78 |
+
obj.checkoutContainer = null;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Handle displaying errors to the end user in the cardErrors field
|
82 |
+
*
|
83 |
+
* @param array errors an array of arrays. Each base array is keyed with the error code and cotains a list of error
|
84 |
+
* messages.
|
85 |
+
*/
|
86 |
+
obj.handleErrorDisplay = ( errors ) => {
|
87 |
+
errors.map( e => obj.showNotice( {}, '', e[ 1 ] ) );
|
88 |
+
};
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get the request arguments to setup the calls.
|
92 |
+
*
|
93 |
+
* @since TBD
|
94 |
+
*
|
95 |
+
* @param data
|
96 |
+
* @param headers
|
97 |
+
*
|
98 |
+
* @return {{headers: {"X-WP-Nonce"}, throwHttpErrors: boolean, json, hooks: {beforeError: (function(*): *)[]}}}
|
99 |
+
*/
|
100 |
+
obj.getRequestArgs = ( data, headers ) => {
|
101 |
+
if ( 'undefined' === typeof headers ) {
|
102 |
+
headers = {
|
103 |
+
'X-WP-Nonce': obj.checkout.nonce
|
104 |
+
};
|
105 |
+
}
|
106 |
+
|
107 |
+
const args = {
|
108 |
+
headers: headers,
|
109 |
+
hooks: {
|
110 |
+
beforeRetry: [
|
111 |
+
obj.onBeforeRetry
|
112 |
+
],
|
113 |
+
beforeError: [
|
114 |
+
obj.onBeforeError
|
115 |
+
]
|
116 |
+
},
|
117 |
+
timeout: 30000,
|
118 |
+
throwHttpErrors: false
|
119 |
+
};
|
120 |
+
|
121 |
+
if ( data ) {
|
122 |
+
args.json = data;
|
123 |
+
}
|
124 |
+
|
125 |
+
return args;
|
126 |
+
};
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Preventing errors to be thrown when using Ky
|
130 |
+
*
|
131 |
+
* @since TBD
|
132 |
+
*
|
133 |
+
* @param {Object} error
|
134 |
+
*
|
135 |
+
* @return {*}
|
136 |
+
*/
|
137 |
+
obj.onBeforeRetry = async ( error ) => {
|
138 |
+
console.log( error );
|
139 |
+
|
140 |
+
return ky.stop;
|
141 |
+
};
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Preventing errors to be thrown when using Ky
|
145 |
+
*
|
146 |
+
* @since TBD
|
147 |
+
*
|
148 |
+
* @param {Object} error
|
149 |
+
*
|
150 |
+
* @return {*}
|
151 |
+
*/
|
152 |
+
obj.onBeforeError = async ( error ) => {
|
153 |
+
console.log( error );
|
154 |
+
|
155 |
+
return ky.stop;
|
156 |
+
};
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Builds the wallets object to use when creating a Payment Element
|
160 |
+
*
|
161 |
+
* @returns {{apple_pay: string, google_pay: string}}
|
162 |
+
*/
|
163 |
+
obj.getWallets = () => {
|
164 |
+
const settings = {
|
165 |
+
apple_pay: 'never',
|
166 |
+
google_pay: 'never',
|
167 |
+
};
|
168 |
+
|
169 |
+
if ( ! obj.checkout.wallet_settings ) {
|
170 |
+
return settings;
|
171 |
+
}
|
172 |
+
|
173 |
+
const wallet = obj.checkout.wallet_settings;
|
174 |
+
|
175 |
+
if ( wallet.apple_pay === true ) {
|
176 |
+
settings.apple_pay = 'auto';
|
177 |
+
}
|
178 |
+
|
179 |
+
if ( wallet.google_pay === true ) {
|
180 |
+
settings.google_pay = 'auto';
|
181 |
+
}
|
182 |
+
|
183 |
+
return settings;
|
184 |
+
};
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Handles the changing of the card field.
|
188 |
+
*
|
189 |
+
* @since TBD
|
190 |
+
*
|
191 |
+
* @param {Object} error Which error we are dealing with.
|
192 |
+
*/
|
193 |
+
obj.onCardChange = ( {error} ) => {
|
194 |
+
tribe.tickets.debug.log( 'stripe', 'cardChange', error );
|
195 |
+
let displayError = $( obj.selectors.cardErrors );
|
196 |
+
if ( error ) {
|
197 |
+
displayError.text( error.message );
|
198 |
+
} else {
|
199 |
+
displayError.text( '' );
|
200 |
+
}
|
201 |
+
};
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Toggle the submit button enabled/disabled
|
205 |
+
*
|
206 |
+
* @param enable
|
207 |
+
*/
|
208 |
+
obj.submitButton = ( enable ) => {
|
209 |
+
$( obj.selectors.submitButton ).prop( 'disabled', ! enable );
|
210 |
+
};
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Receive the Payment from Stripe.
|
214 |
+
*
|
215 |
+
* @since TBD
|
216 |
+
*
|
217 |
+
* @param {Object} result Result from the payment request.
|
218 |
+
*
|
219 |
+
* @return {boolean}
|
220 |
+
*/
|
221 |
+
obj.handleReceivePayment = async ( result ) => {
|
222 |
+
tribe.tickets.debug.log( 'stripe', 'handleReceivePayment', result );
|
223 |
+
if ( result.error ) {
|
224 |
+
return obj.handlePaymentError( result );
|
225 |
+
}
|
226 |
+
|
227 |
+
if ( 'succeeded' === result.paymentIntent.status ) {
|
228 |
+
return ( obj.handlePaymentSuccess( result ) );
|
229 |
+
}
|
230 |
+
};
|
231 |
+
|
232 |
+
/**
|
233 |
+
* When a successful request is completed to our Approval endpoint.
|
234 |
+
*
|
235 |
+
* @since TBD
|
236 |
+
*
|
237 |
+
* @param {Object} data Data returning from our endpoint.
|
238 |
+
*
|
239 |
+
* @return {boolean}
|
240 |
+
*/
|
241 |
+
obj.handlePaymentError = ( data ) => {
|
242 |
+
$( obj.selectors.cardErrors ).val( data.error.message );
|
243 |
+
tribe.tickets.debug.log( 'stripe', 'handlePaymentError', data );
|
244 |
+
|
245 |
+
tribe.tickets.loader.hide( obj.checkoutContainer );
|
246 |
+
|
247 |
+
return obj.handleErrorDisplay(
|
248 |
+
[
|
249 |
+
[ data.error.code, data.error.message ]
|
250 |
+
]
|
251 |
+
);
|
252 |
+
};
|
253 |
+
|
254 |
+
/**
|
255 |
+
* When a successful request is completed to our Approval endpoint.
|
256 |
+
*
|
257 |
+
* @since TBD
|
258 |
+
*
|
259 |
+
* @param {Object} data Data returning from our endpoint.
|
260 |
+
*
|
261 |
+
* @return {boolean}
|
262 |
+
*/
|
263 |
+
obj.handlePaymentSuccess = async ( data ) => {
|
264 |
+
tribe.tickets.debug.log( 'stripe', 'handlePaymentSuccess', data );
|
265 |
+
|
266 |
+
const response = await obj.handleUpdateOrder( data.paymentIntent );
|
267 |
+
|
268 |
+
// Redirect the user to the success page.
|
269 |
+
window.location.replace( response.redirect_url );
|
270 |
+
return true;
|
271 |
+
};
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Handle payments in cases other than an automatic confirmation
|
275 |
+
*
|
276 |
+
* @param data
|
277 |
+
*
|
278 |
+
* @returns {Promise<boolean>}
|
279 |
+
*/
|
280 |
+
obj.handlePaymentDelayed = async ( data ) => {
|
281 |
+
tribe.tickets.debug.log( 'stripe', 'handlePaymentDelayed', data );
|
282 |
+
|
283 |
+
const response = await obj.handleUpdateOrder( data.paymentIntent );
|
284 |
+
|
285 |
+
// Redirect the user to the success page.
|
286 |
+
window.location.replace( response.redirect_url );
|
287 |
+
|
288 |
+
return true;
|
289 |
+
};
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Updates the Order based on a paymentIntent from Stripe.
|
293 |
+
*
|
294 |
+
* @since TBD
|
295 |
+
*
|
296 |
+
* @param {Object} paymentIntent Payment intent Object from Stripe.
|
297 |
+
*
|
298 |
+
* @return {Promise<*>}
|
299 |
+
*/
|
300 |
+
obj.handleUpdateOrder = async ( paymentIntent ) => {
|
301 |
+
const args = obj.getRequestArgs( {
|
302 |
+
client_secret: paymentIntent.client_secret
|
303 |
+
} );
|
304 |
+
let response;
|
305 |
+
|
306 |
+
try {
|
307 |
+
response = await ky.post( `${obj.checkout.orderEndpoint}/${paymentIntent.id}`, args ).json();
|
308 |
+
} catch( error ) {
|
309 |
+
response = error;
|
310 |
+
}
|
311 |
+
|
312 |
+
tribe.tickets.debug.log( 'stripe', 'updateOrder', response );
|
313 |
+
|
314 |
+
return response;
|
315 |
+
};
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Submit the payment to Stripe for Payment Element.
|
319 |
+
*
|
320 |
+
* @since TBD
|
321 |
+
*
|
322 |
+
* @param {String} order The order object returned from the server.
|
323 |
+
*
|
324 |
+
* @return {Promise<*>}
|
325 |
+
*/
|
326 |
+
obj.submitMultiPayment = async ( order ) => {
|
327 |
+
|
328 |
+
return obj.stripeLib.confirmPayment( {
|
329 |
+
elements: obj.stripeElements,
|
330 |
+
redirect: 'if_required',
|
331 |
+
confirmParams: {
|
332 |
+
return_url: order.redirect_url
|
333 |
+
}
|
334 |
+
} ).then( obj.handleConfirmPayment );
|
335 |
+
};
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Handle the confirmation of the Payment on PaymentElement.
|
339 |
+
*
|
340 |
+
* @since TBD
|
341 |
+
*
|
342 |
+
* @param result
|
343 |
+
*/
|
344 |
+
obj.handleConfirmPayment = ( result ) => {
|
345 |
+
obj.submitButton( true );
|
346 |
+
if ( result.error ) {
|
347 |
+
return obj.handlePaymentError( result );
|
348 |
+
} else {
|
349 |
+
|
350 |
+
if ( result.paymentIntent.status === 'succeeded' ) {
|
351 |
+
return obj.handlePaymentSuccess( result );
|
352 |
+
}
|
353 |
+
|
354 |
+
return obj.handlePaymentDelayed( result );
|
355 |
+
}
|
356 |
+
};
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Submit the Card Element payment to Stripe.
|
360 |
+
*
|
361 |
+
* @since TBD
|
362 |
+
*
|
363 |
+
* @returns {Promise<*>}
|
364 |
+
*/
|
365 |
+
obj.submitCardPayment = async () => {
|
366 |
+
|
367 |
+
return obj.stripeLib.confirmCardPayment( obj.checkout.paymentIntentData.key, {
|
368 |
+
payment_method: {
|
369 |
+
card: obj.cardElement,
|
370 |
+
}
|
371 |
+
} ).then( obj.handleConfirmCardPayment );
|
372 |
+
};
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Handle the confirmation of the Payment on CardElement.
|
376 |
+
*
|
377 |
+
* @since TBD
|
378 |
+
*
|
379 |
+
* @param result
|
380 |
+
*/
|
381 |
+
obj.handleConfirmCardPayment = ( result ) => {
|
382 |
+
obj.submitButton( true );
|
383 |
+
if ( result.error ) {
|
384 |
+
obj.handlePaymentError( result );
|
385 |
+
} else {
|
386 |
+
if ( result.paymentIntent.status === 'succeeded' ) {
|
387 |
+
return obj.handlePaymentSuccess( result );
|
388 |
+
}
|
389 |
+
|
390 |
+
return obj.handlePaymentDelayed( result );
|
391 |
+
}
|
392 |
+
};
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Create an order and start the payment process.
|
396 |
+
*
|
397 |
+
* @since TBD
|
398 |
+
*
|
399 |
+
* @return {Promise<*>}
|
400 |
+
*/
|
401 |
+
obj.handleCreateOrder = async () => {
|
402 |
+
const args = obj.getRequestArgs( {
|
403 |
+
purchaser: obj.getPurchaserData(),
|
404 |
+
payment_intent: obj.checkout.paymentIntentData
|
405 |
+
} );
|
406 |
+
let response;
|
407 |
+
|
408 |
+
try {
|
409 |
+
// Fetch Publishable API Key and Initialize Stripe Elements on Ready
|
410 |
+
response = await ky.post( obj.checkout.orderEndpoint, args ).json();
|
411 |
+
} catch( error ) {
|
412 |
+
response = error;
|
413 |
+
}
|
414 |
+
|
415 |
+
tribe.tickets.debug.log( 'stripe', 'createOrder', response );
|
416 |
+
|
417 |
+
return response;
|
418 |
+
};
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Starts the process to submit a payment.
|
422 |
+
*
|
423 |
+
* @since TBD
|
424 |
+
*
|
425 |
+
* @param {Event} event The Click event from the payment.
|
426 |
+
*/
|
427 |
+
obj.handlePayment = async ( event ) => {
|
428 |
+
event.preventDefault();
|
429 |
+
|
430 |
+
obj.checkoutContainer = $( event.target ).closest( tribe.tickets.commerce.selectors.checkoutContainer );
|
431 |
+
|
432 |
+
obj.hideNotice( obj.checkoutContainer );
|
433 |
+
|
434 |
+
tribe.tickets.loader.show( obj.checkoutContainer );
|
435 |
+
|
436 |
+
let order = await obj.handleCreateOrder();
|
437 |
+
obj.submitButton( false );
|
438 |
+
|
439 |
+
if ( order.success ) {
|
440 |
+
if ( obj.checkout.paymentElement ) {
|
441 |
+
obj.submitMultiPayment( order );
|
442 |
+
} else {
|
443 |
+
obj.submitCardPayment();
|
444 |
+
}
|
445 |
+
} else {
|
446 |
+
tribe.tickets.loader.hide( obj.checkoutContainer );
|
447 |
+
obj.showNotice( {}, order.message, '' );
|
448 |
+
}
|
449 |
+
|
450 |
+
obj.submitButton( true );
|
451 |
+
};
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Configure the CardElement with separate fields.
|
455 |
+
*
|
456 |
+
* @link https://stripe.com/docs/js/elements_object/create_element?type=cardNumber#elements_create-options
|
457 |
+
*
|
458 |
+
* @since TBD
|
459 |
+
*/
|
460 |
+
obj.setupSeparateCardElement = () => {
|
461 |
+
// Instantiate the CardElement with individual fields.
|
462 |
+
obj.cardElement = obj.stripeElements.create( 'cardNumber', {
|
463 |
+
showIcon: true,
|
464 |
+
iconStyle: 'default',
|
465 |
+
style: obj.checkout.cardElementStyle,
|
466 |
+
} );
|
467 |
+
obj.cardElement.mount( obj.selectors.cardNumber );
|
468 |
+
obj.cardElement.on( 'change', obj.onCardChange );
|
469 |
+
|
470 |
+
obj.cardExpiry = obj.stripeElements.create( 'cardExpiry', {
|
471 |
+
style: obj.checkout.cardElementStyle,
|
472 |
+
} );
|
473 |
+
obj.cardExpiry.mount( obj.selectors.cardExpiry );
|
474 |
+
obj.cardExpiry.on( 'change', obj.onCardChange );
|
475 |
+
|
476 |
+
obj.cardCvc = obj.stripeElements.create( 'cardCvc', {
|
477 |
+
style: obj.checkout.cardElementStyle,
|
478 |
+
} );
|
479 |
+
obj.cardCvc.mount( obj.selectors.cardCvc );
|
480 |
+
obj.cardCvc.on( 'change', obj.onCardChange );
|
481 |
+
};
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Configure the CardElement with compact fields.
|
485 |
+
*
|
486 |
+
* @link https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options
|
487 |
+
*
|
488 |
+
* @since TBD
|
489 |
+
*/
|
490 |
+
obj.setupCompactCardElement = () => {
|
491 |
+
// Instantiate the CardElement with a single field combo.
|
492 |
+
obj.cardElement = obj.stripeElements.create( 'card', {
|
493 |
+
style: obj.checkout.cardElementStyle,
|
494 |
+
} );
|
495 |
+
obj.cardElement.mount( obj.selectors.cardElement );
|
496 |
+
obj.cardElement.on( 'change', obj.onCardChange );
|
497 |
+
};
|
498 |
+
|
499 |
+
/**
|
500 |
+
* Configure the PaymentElement with separate fields.
|
501 |
+
*
|
502 |
+
* @link https://stripe.com/docs/js/element/payment_element
|
503 |
+
*
|
504 |
+
* @since TBD
|
505 |
+
*/
|
506 |
+
obj.setupPaymentElement = () => {
|
507 |
+
const wallets = obj.getWallets();
|
508 |
+
// Instantiate the PaymentElement
|
509 |
+
obj.paymentElement = obj.stripeElements.create( 'payment', {
|
510 |
+
fields: {
|
511 |
+
name: 'auto',
|
512 |
+
email: 'auto',
|
513 |
+
phone: 'auto',
|
514 |
+
address: 'auto'
|
515 |
+
},
|
516 |
+
wallets
|
517 |
+
} );
|
518 |
+
obj.paymentElement.mount( obj.selectors.paymentElement );
|
519 |
+
};
|
520 |
+
|
521 |
+
/**
|
522 |
+
* Setup and initialize Stripe API.
|
523 |
+
*
|
524 |
+
* @since TBD
|
525 |
+
*
|
526 |
+
* @return {Promise<void>}
|
527 |
+
*/
|
528 |
+
obj.setupStripe = async () => {
|
529 |
+
|
530 |
+
if ( 0 === obj.checkout.paymentIntentData.length ) {
|
531 |
+
return;
|
532 |
+
}
|
533 |
+
|
534 |
+
if ( obj.checkout.paymentIntentData.errors ) {
|
535 |
+
obj.submitButton( false );
|
536 |
+
$( obj.selectors.submitButton ).addClass( obj.selectors.hiddenElement.className() );
|
537 |
+
return obj.handleErrorDisplay( obj.checkout.paymentIntentData.errors );
|
538 |
+
}
|
539 |
+
|
540 |
+
obj.stripeElements = obj.stripeLib.elements( {
|
541 |
+
clientSecret: obj.checkout.paymentIntentData.key,
|
542 |
+
appearance: obj.checkout.elementsAppearance,
|
543 |
+
} );
|
544 |
+
|
545 |
+
if ( obj.checkout.paymentElement ) {
|
546 |
+
obj.setupPaymentElement();
|
547 |
+
return;
|
548 |
+
}
|
549 |
+
|
550 |
+
if ( 'separate' === obj.checkout.cardElementType ) {
|
551 |
+
obj.setupSeparateCardElement();
|
552 |
+
} else if ( 'compact' === obj.checkout.cardElementType ) {
|
553 |
+
obj.setupCompactCardElement();
|
554 |
+
}
|
555 |
+
};
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Get purchaser form data.
|
559 |
+
*
|
560 |
+
* @since TBD
|
561 |
+
*
|
562 |
+
* @return {Object}
|
563 |
+
*/
|
564 |
+
obj.getPurchaserData = () => tribe.tickets.commerce.getPurchaserData( $( tribe.tickets.commerce.selectors.purchaserFormContainer ) );
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Shows the notice for the checkout container for Stripe.
|
568 |
+
*
|
569 |
+
* @since TBD
|
570 |
+
*
|
571 |
+
* @param {jQuery} $container Parent container of notice element.
|
572 |
+
* @param {string} title Notice Title.
|
573 |
+
* @param {string} content Notice message content.
|
574 |
+
*/
|
575 |
+
obj.showNotice = ( $container, title, content ) => {
|
576 |
+
if ( ! $container || ! $container.length ) {
|
577 |
+
$container = $( tribe.tickets.commerce.selectors.checkoutContainer );
|
578 |
+
}
|
579 |
+
const notice = tribe.tickets.commerce.notice;
|
580 |
+
const $item = $container.find( notice.selectors.item );
|
581 |
+
notice.populate( $item, title, content );
|
582 |
+
notice.show( $item );
|
583 |
+
};
|
584 |
+
|
585 |
+
/**
|
586 |
+
* Hides the notice for the checkout container for Stripe.
|
587 |
+
*
|
588 |
+
* @since TBD
|
589 |
+
*
|
590 |
+
* @param {jQuery} $container Parent container of notice element.
|
591 |
+
*/
|
592 |
+
obj.hideNotice = ( $container ) => {
|
593 |
+
if ( ! $container.length ) {
|
594 |
+
$container = $( tribe.tickets.commerce.selectors.checkoutContainer );
|
595 |
+
}
|
596 |
+
|
597 |
+
const notice = tribe.tickets.commerce.notice;
|
598 |
+
const $item = $container.find( notice.selectors.item );
|
599 |
+
notice.hide( $item );
|
600 |
+
};
|
601 |
+
/**
|
602 |
+
* Bind script loader to trigger script dependent methods.
|
603 |
+
*
|
604 |
+
* @since TBD
|
605 |
+
*/
|
606 |
+
obj.bindEvents = () => {
|
607 |
+
$( obj.selectors.submitButton ).on( 'click', obj.handlePayment );
|
608 |
+
};
|
609 |
+
|
610 |
+
/**
|
611 |
+
* When the page is ready.
|
612 |
+
*
|
613 |
+
* @since TBD
|
614 |
+
*/
|
615 |
+
obj.ready = () => {
|
616 |
+
obj.setupStripe();
|
617 |
+
obj.bindEvents();
|
618 |
+
};
|
619 |
+
|
620 |
+
$( obj.ready );
|
621 |
+
} )( jQuery, tribe.tickets.commerce.gateway.stripe, Stripe, tribe.ky );
|
src/resources/js/commerce/gateway/toggler.js
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Makes sure we have all the required levels on the Tribe Object
|
3 |
+
*
|
4 |
+
* @since TBD
|
5 |
+
*
|
6 |
+
* @type {Object}
|
7 |
+
*/
|
8 |
+
tribe.tickets = tribe.tickets || {};
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Path to this script in the global tribe Object.
|
12 |
+
*
|
13 |
+
* @since TBD
|
14 |
+
*
|
15 |
+
* @type {Object}
|
16 |
+
*/
|
17 |
+
tribe.tickets.commerce = tribe.tickets.commerce || {};
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Path to this script in the global tribe Object.
|
21 |
+
*
|
22 |
+
* @since TBD
|
23 |
+
*
|
24 |
+
* @type {Object}
|
25 |
+
*/
|
26 |
+
tribe.tickets.commerce.gateway = tribe.tickets.commerce.gateway || {};
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Path to this script in the global tribe Object.
|
30 |
+
*
|
31 |
+
* @since TBD
|
32 |
+
*
|
33 |
+
* @type {Object}
|
34 |
+
*/
|
35 |
+
tribe.tickets.commerce.gateway.toggler = tribe.tickets.commerce.gateway.toggler || {};
|
36 |
+
|
37 |
+
/**
|
38 |
+
* This script Object for public usage of the methods.
|
39 |
+
*
|
40 |
+
* @since TBD
|
41 |
+
*
|
42 |
+
* @type {Object}
|
43 |
+
*/
|
44 |
+
(( $, obj ) => {
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Pull the variables from the PHP backend.
|
48 |
+
*
|
49 |
+
* @since TBD
|
50 |
+
*
|
51 |
+
* @type {Object}
|
52 |
+
*/
|
53 |
+
obj.text = tecTicketsCommerceCheckoutToggleText;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Array of gateway elements.
|
57 |
+
*
|
58 |
+
* @since TBD
|
59 |
+
*
|
60 |
+
* @type {Object}
|
61 |
+
*/
|
62 |
+
obj.gateways = [];
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Object to store the toggle elements.
|
66 |
+
*
|
67 |
+
* @since TBD
|
68 |
+
*
|
69 |
+
* @type {Object}
|
70 |
+
*/
|
71 |
+
obj.toggles = {};
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Toggler selectors.
|
75 |
+
*
|
76 |
+
* @since TBD
|
77 |
+
*
|
78 |
+
* @type {Object}
|
79 |
+
*/
|
80 |
+
obj.selectors = {
|
81 |
+
gatewayDiv: '.tribe-tickets__commerce-checkout-gateway',
|
82 |
+
toggleButton: '.tribe-tickets__commerce-checkout-gateway-toggle-button',
|
83 |
+
toggle: '.tribe-tickets__commerce-checkout-gateway-toggle',
|
84 |
+
toggleOpen: '.tribe-tickets__commerce-checkout-gateway-toggle--open',
|
85 |
+
toggleHidden: '.tribe-common-a11y-hidden',
|
86 |
+
};
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Toggler init method.
|
90 |
+
*
|
91 |
+
* @since TBD
|
92 |
+
*
|
93 |
+
* @return
|
94 |
+
*/
|
95 |
+
obj.init = () => {
|
96 |
+
obj.gateways = $( obj.selectors.gatewayDiv );
|
97 |
+
|
98 |
+
// If one or less gateways, go ahead and show and not add toggles.
|
99 |
+
if( obj.gateways.length < 2 ){
|
100 |
+
obj.gateways.show();
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
obj.addToggles();
|
104 |
+
obj.showDefault();
|
105 |
+
};
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Shows gateway.
|
109 |
+
*
|
110 |
+
* @since TBD
|
111 |
+
*
|
112 |
+
* @param {Element} gateway Gateway element to show.
|
113 |
+
*/
|
114 |
+
obj.showGateway = gateway => {
|
115 |
+
$( gateway )
|
116 |
+
.show()
|
117 |
+
.attr( 'aria-expanded', 'true' )
|
118 |
+
.removeClass( obj.selectors.toggleHidden.className() );
|
119 |
+
};
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Hides gateway.
|
123 |
+
*
|
124 |
+
* @since TBD
|
125 |
+
*
|
126 |
+
* @param {Element} gateway Gateway element to hide.
|
127 |
+
*/
|
128 |
+
obj.hideGateway = gateway => {
|
129 |
+
$( gateway )
|
130 |
+
.hide()
|
131 |
+
.attr( 'aria-expanded', 'false' )
|
132 |
+
.addClass( obj.selectors.toggleHidden.className() );
|
133 |
+
};
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Show the default/first gateway.
|
137 |
+
*
|
138 |
+
* @since TBD
|
139 |
+
*/
|
140 |
+
obj.showDefault = () => {
|
141 |
+
obj.showGateway( obj.gateways[0] );
|
142 |
+
obj.gateways.each( ( x, gateway ) => {
|
143 |
+
if( 0 === x ){
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
obj.hideGateway( gateway );
|
147 |
+
});
|
148 |
+
obj.toggles.default.addClass( obj.selectors.toggleOpen.className() ).hide().attr( 'aria-hidden', 'true' );
|
149 |
+
obj.toggles.additional.removeClass( obj.selectors.toggleOpen.className() ).attr( 'aria-selected', 'false' );
|
150 |
+
};
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Show the additional (non-default) gateway(s).
|
154 |
+
*
|
155 |
+
* @since TBD
|
156 |
+
*/
|
157 |
+
obj.showAdditional = () => {
|
158 |
+
// If additional options already open, let's close it and show default.
|
159 |
+
if ( obj.toggles.additional.hasClass( obj.selectors.toggleOpen.className() ) ) {
|
160 |
+
obj.showDefault();
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
obj.hideGateway( obj.gateways[0] );
|
164 |
+
obj.gateways.each( ( x, gateway ) => {
|
165 |
+
if( 0 === x ){
|
166 |
+
return;
|
167 |
+
}
|
168 |
+
obj.showGateway( gateway );
|
169 |
+
});
|
170 |
+
obj.toggles.additional.addClass( obj.selectors.toggleOpen.className() ).attr( 'aria-selected', 'true' );
|
171 |
+
obj.toggles.default.removeClass( obj.selectors.toggleOpen.className() ).show().attr( 'aria-hidden', 'false' );
|
172 |
+
};
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Add toggle elements to DOM.
|
176 |
+
*
|
177 |
+
* @since TBD
|
178 |
+
*/
|
179 |
+
obj.addToggles = () => {
|
180 |
+
obj.toggles.default = $( obj.getDefaultToggleHTML() );
|
181 |
+
obj.toggles.additional = $( obj.getAdditionalToggleHTML() );
|
182 |
+
obj.toggles.default.insertBefore( obj.gateways[0] );
|
183 |
+
obj.toggles.additional.insertBefore( obj.gateways[1] );
|
184 |
+
obj.toggleEvents();
|
185 |
+
};
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Get HTML for default gateway toggle.
|
189 |
+
*
|
190 |
+
* @since TBD
|
191 |
+
*
|
192 |
+
* @return string HTML for toggle.
|
193 |
+
*/
|
194 |
+
obj.getDefaultToggleHTML = () => {
|
195 |
+
return `<div class="${obj.selectors.toggle.className()}">` +
|
196 |
+
`<button class="${obj.selectors.toggleButton.className()}">` +
|
197 |
+
`${obj.text.default}` +
|
198 |
+
`</button></div>`;
|
199 |
+
};
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Get HTML for additional gateways toggle.
|
203 |
+
*
|
204 |
+
* @since TBD
|
205 |
+
*
|
206 |
+
* @return string HTML for toggle.
|
207 |
+
*/
|
208 |
+
obj.getAdditionalToggleHTML = () => {
|
209 |
+
return `<div class="${obj.selectors.toggle.className()}">` +
|
210 |
+
`<button class="${obj.selectors.toggleButton.className()}">` +
|
211 |
+
`${obj.text.additional}` +
|
212 |
+
`</button></div>`;
|
213 |
+
};
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Create toggle event handlers.
|
217 |
+
*
|
218 |
+
* @since TBD
|
219 |
+
*/
|
220 |
+
obj.toggleEvents = () => {
|
221 |
+
obj.toggles.default.find( 'button' ).on( 'click', obj.showDefault );
|
222 |
+
obj.toggles.additional.find( 'button' ).on( 'click', obj.showAdditional );
|
223 |
+
}
|
224 |
+
|
225 |
+
// Initiate the toggles.
|
226 |
+
obj.init();
|
227 |
+
})( jQuery, tribe.tickets.commerce.gateway.toggler );
|
src/resources/js/v2/tickets-commerce.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
/**
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
@@ -54,6 +55,9 @@ tribe.tickets.commerce = {};
|
|
54 |
checkoutItemDescriptionButtonLess: '.tribe-tickets__commerce-checkout-cart-item-details-button--less', // eslint-disable-line max-len
|
55 |
hiddenElement: '.tribe-common-a11y-hidden',
|
56 |
nonce: '#tec-tc-checkout-nonce',
|
|
|
|
|
|
|
57 |
};
|
58 |
|
59 |
/**
|
@@ -180,6 +184,28 @@ tribe.tickets.commerce = {};
|
|
180 |
$document.trigger( 'afterSetup.tecTicketsCommerce', [ $container ] );
|
181 |
};
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
/**
|
184 |
* Handles the initialization of the tickets commerce events when Document is ready.
|
185 |
*
|
1 |
+
/* eslint-disable es5/no-arrow-functions */
|
2 |
/**
|
3 |
* Makes sure we have all the required levels on the Tribe Object
|
4 |
*
|
55 |
checkoutItemDescriptionButtonLess: '.tribe-tickets__commerce-checkout-cart-item-details-button--less', // eslint-disable-line max-len
|
56 |
hiddenElement: '.tribe-common-a11y-hidden',
|
57 |
nonce: '#tec-tc-checkout-nonce',
|
58 |
+
purchaserFormContainer: '.tribe-tickets__commerce-checkout-purchaser-info-wrapper',
|
59 |
+
purchaserName: '.tribe-tickets__commerce-checkout-purchaser-info-form-field-name',
|
60 |
+
purchaserEmail: '.tribe-tickets__commerce-checkout-purchaser-info-form-field-email',
|
61 |
};
|
62 |
|
63 |
/**
|
184 |
$document.trigger( 'afterSetup.tecTicketsCommerce', [ $container ] );
|
185 |
};
|
186 |
|
187 |
+
/**
|
188 |
+
* Get purchaser data if available.
|
189 |
+
*
|
190 |
+
* @since TBD
|
191 |
+
*
|
192 |
+
* @param {jQuery} $container Container for the purchaser info fields.
|
193 |
+
*
|
194 |
+
* @return {Object}
|
195 |
+
*/
|
196 |
+
obj.getPurchaserData = ( $container ) => {
|
197 |
+
const purchaser = {};
|
198 |
+
|
199 |
+
if ( ! $container.length ) {
|
200 |
+
return purchaser;
|
201 |
+
}
|
202 |
+
|
203 |
+
purchaser.name = $container.find( obj.selectors.purchaserName ).val();
|
204 |
+
purchaser.email = $container.find( obj.selectors.purchaserEmail ).val();
|
205 |
+
|
206 |
+
return purchaser;
|
207 |
+
};
|
208 |
+
|
209 |
/**
|
210 |
* Handles the initialization of the tickets commerce events when Document is ready.
|
211 |
*
|
src/resources/postcss/tickets-admin/settings/_tickets-commerce.pcss
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
@todo @juanfra: This was already here, inherited. We need to move to common.
|
9 |
*/
|
10 |
|
|
|
11 |
#tribe-field-tickets-commerce-paypal-commerce-configure {
|
12 |
padding-left: 0;
|
13 |
width: 100%;
|
@@ -93,7 +94,7 @@
|
|
93 |
max-width: 84%;
|
94 |
}
|
95 |
|
96 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
97 |
background: #fff;
|
98 |
border: 1px solid #ccc;
|
99 |
border-radius: 4px;
|
@@ -101,20 +102,26 @@
|
|
101 |
display: flex;
|
102 |
flex-direction: row;
|
103 |
justify-content: space-around;
|
|
|
104 |
padding: 45px 32px 20px 32px;
|
105 |
|
106 |
@media (--viewport-medium) {
|
107 |
-
background-image: url("../images/background-
|
108 |
background-position: center right;
|
109 |
background-repeat: no-repeat;
|
|
|
110 |
}
|
111 |
}
|
112 |
|
113 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
114 |
font-size: 20px;
|
115 |
}
|
116 |
|
117 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
|
|
|
|
|
|
118 |
margin-bottom: 20px;
|
119 |
|
120 |
p {
|
@@ -122,15 +129,16 @@
|
|
122 |
}
|
123 |
}
|
124 |
|
125 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
126 |
margin-top: var(--tec-spacer-8);
|
127 |
}
|
128 |
|
129 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
130 |
margin-top: var(--tec-spacer-8);
|
131 |
}
|
132 |
|
133 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
134 |
align-items: center;
|
135 |
display: flex;
|
136 |
|
@@ -139,8 +147,8 @@
|
|
139 |
}
|
140 |
}
|
141 |
|
142 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
143 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
144 |
margin-left: 8px;
|
145 |
|
146 |
&,
|
@@ -152,7 +160,7 @@
|
|
152 |
}
|
153 |
}
|
154 |
|
155 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
156 |
@media (--viewport-medium) {
|
157 |
|
158 |
.tribe-dropdown .select2-selection--single {
|
@@ -171,17 +179,17 @@
|
|
171 |
}
|
172 |
}
|
173 |
|
174 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
175 |
list-style: none;
|
176 |
margin: inherit;
|
177 |
}
|
178 |
|
179 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
180 |
line-height: 1.8;
|
181 |
margin-bottom: 16px;
|
182 |
}
|
183 |
|
184 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
185 |
background-color: #405bfb;
|
186 |
border-radius: 100%;
|
187 |
content: '';
|
@@ -191,7 +199,7 @@
|
|
191 |
width: 7px;
|
192 |
}
|
193 |
|
194 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
195 |
display: none;
|
196 |
flex-basis: 290px;
|
197 |
font-size: 13px;
|
@@ -199,20 +207,21 @@
|
|
199 |
font-weight: normal;
|
200 |
letter-spacing: 0.02em;
|
201 |
line-height: 16px;
|
|
|
202 |
|
203 |
@media (--viewport-medium) {
|
204 |
display: flex;
|
205 |
}
|
206 |
}
|
207 |
|
208 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
209 |
height: auto;
|
210 |
margin-bottom: 32px;
|
211 |
max-width: 232px;
|
212 |
width: 100%;
|
213 |
}
|
214 |
|
215 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
216 |
display: flex;
|
217 |
flex: 1;
|
218 |
|
@@ -221,13 +230,13 @@
|
|
221 |
}
|
222 |
}
|
223 |
|
224 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
225 |
color: #1eb056;
|
226 |
font-size: 16px;
|
227 |
font-weight: 600;
|
228 |
}
|
229 |
|
230 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
231 |
display: flex;
|
232 |
font-size: 13px;
|
233 |
font-weight: normal;
|
@@ -235,21 +244,21 @@
|
|
235 |
text-align: left;
|
236 |
}
|
237 |
|
238 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
239 |
flex-basis: 20%;
|
240 |
min-width: 125px;
|
241 |
}
|
242 |
|
243 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
244 |
flex-basis: 80%;
|
245 |
}
|
246 |
|
247 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
248 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
249 |
flex-direction: column;
|
250 |
}
|
251 |
|
252 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
253 |
background: #405bfb;
|
254 |
border-radius: 4px;
|
255 |
color: #fff;
|
@@ -277,11 +286,11 @@
|
|
277 |
}
|
278 |
}
|
279 |
|
280 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
281 |
font-weight: 700;
|
282 |
}
|
283 |
|
284 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
285 |
border-bottom: 1px solid #405bfb;
|
286 |
font-size: 13px;
|
287 |
margin-left: 10px;
|
@@ -296,40 +305,65 @@
|
|
296 |
}
|
297 |
}
|
298 |
|
299 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
max-width: 340px;
|
301 |
width: 100%;
|
302 |
}
|
303 |
|
304 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
305 |
&:not(last-of-type) {
|
306 |
margin-bottom: 8px;
|
307 |
}
|
308 |
}
|
309 |
|
310 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
311 |
-
.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error
|
|
|
312 |
@mixin hidden;
|
313 |
}
|
314 |
}
|
315 |
|
316 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
317 |
-
.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name
|
|
|
318 |
color: var(--tec-color-text-primary-light);
|
319 |
text-decoration: line-through;
|
320 |
}
|
321 |
}
|
322 |
|
323 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
324 |
color: var(--color-icon-error);
|
325 |
margin-left: 8px;
|
326 |
}
|
327 |
|
328 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
329 |
margin-top: 20px;
|
330 |
}
|
331 |
|
332 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
333 |
@mixin button-solid;
|
334 |
|
335 |
background-color: var(--tec-color-button-primary);
|
@@ -351,7 +385,7 @@
|
|
351 |
}
|
352 |
}
|
353 |
|
354 |
-
.tec-tickets__admin-settings-tickets-commerce-
|
355 |
margin-right: 8px;
|
356 |
position: relative;
|
357 |
stroke: white;
|
@@ -365,7 +399,7 @@
|
|
365 |
|
366 |
.tribe-common,
|
367 |
.event-tickets {
|
368 |
-
&.tribe-modal__wrapper--
|
369 |
.tribe-tickets__notice {
|
370 |
display: block;
|
371 |
}
|
@@ -396,8 +430,185 @@
|
|
396 |
z-index: 99999;
|
397 |
}
|
398 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
}
|
400 |
|
401 |
-
#paypal-connected-modal-button
|
|
|
402 |
display: none;
|
403 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
@todo @juanfra: This was already here, inherited. We need to move to common.
|
9 |
*/
|
10 |
|
11 |
+
#tribe-field-tickets-commerce-stripe-commerce-configure,
|
12 |
#tribe-field-tickets-commerce-paypal-commerce-configure {
|
13 |
padding-left: 0;
|
14 |
width: 100%;
|
94 |
max-width: 84%;
|
95 |
}
|
96 |
|
97 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway {
|
98 |
background: #fff;
|
99 |
border: 1px solid #ccc;
|
100 |
border-radius: 4px;
|
102 |
display: flex;
|
103 |
flex-direction: row;
|
104 |
justify-content: space-around;
|
105 |
+
margin-bottom: var(--tec-spacer-3);
|
106 |
padding: 45px 32px 20px 32px;
|
107 |
|
108 |
@media (--viewport-medium) {
|
109 |
+
background-image: url("../images/background-gateway-connect.png");
|
110 |
background-position: center right;
|
111 |
background-repeat: no-repeat;
|
112 |
+
background-size: 420px 100%;
|
113 |
}
|
114 |
}
|
115 |
|
116 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-title {
|
117 |
font-size: 20px;
|
118 |
}
|
119 |
|
120 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-description {
|
121 |
+
align-items: start;
|
122 |
+
display: flex;
|
123 |
+
flex-direction: column;
|
124 |
+
flex-grow: 1;
|
125 |
margin-bottom: 20px;
|
126 |
|
127 |
p {
|
129 |
}
|
130 |
}
|
131 |
|
132 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-signup-links {
|
133 |
+
flex-grow: 1;
|
134 |
margin-top: var(--tec-spacer-8);
|
135 |
}
|
136 |
|
137 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-links {
|
138 |
margin-top: var(--tec-spacer-8);
|
139 |
}
|
140 |
|
141 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link {
|
142 |
align-items: center;
|
143 |
display: flex;
|
144 |
|
147 |
}
|
148 |
}
|
149 |
|
150 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link,
|
151 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url {
|
152 |
margin-left: 8px;
|
153 |
|
154 |
&,
|
160 |
}
|
161 |
}
|
162 |
|
163 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container {
|
164 |
@media (--viewport-medium) {
|
165 |
|
166 |
.tribe-dropdown .select2-selection--single {
|
179 |
}
|
180 |
}
|
181 |
|
182 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul {
|
183 |
list-style: none;
|
184 |
margin: inherit;
|
185 |
}
|
186 |
|
187 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo li {
|
188 |
line-height: 1.8;
|
189 |
margin-bottom: 16px;
|
190 |
}
|
191 |
|
192 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul li:before {
|
193 |
background-color: #405bfb;
|
194 |
border-radius: 100%;
|
195 |
content: '';
|
199 |
width: 7px;
|
200 |
}
|
201 |
|
202 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo {
|
203 |
display: none;
|
204 |
flex-basis: 290px;
|
205 |
font-size: 13px;
|
207 |
font-weight: normal;
|
208 |
letter-spacing: 0.02em;
|
209 |
line-height: 16px;
|
210 |
+
margin-bottom: var(--tec-spacer-4);
|
211 |
|
212 |
@media (--viewport-medium) {
|
213 |
display: flex;
|
214 |
}
|
215 |
}
|
216 |
|
217 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo-image {
|
218 |
height: auto;
|
219 |
margin-bottom: 32px;
|
220 |
max-width: 232px;
|
221 |
width: 100%;
|
222 |
}
|
223 |
|
224 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect {
|
225 |
display: flex;
|
226 |
flex: 1;
|
227 |
|
230 |
}
|
231 |
}
|
232 |
|
233 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect-text--connected {
|
234 |
color: #1eb056;
|
235 |
font-size: 16px;
|
236 |
font-weight: 600;
|
237 |
}
|
238 |
|
239 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-row {
|
240 |
display: flex;
|
241 |
font-size: 13px;
|
242 |
font-weight: normal;
|
244 |
text-align: left;
|
245 |
}
|
246 |
|
247 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1 {
|
248 |
flex-basis: 20%;
|
249 |
min-width: 125px;
|
250 |
}
|
251 |
|
252 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2 {
|
253 |
flex-basis: 80%;
|
254 |
}
|
255 |
|
256 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connect,
|
257 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-logo {
|
258 |
flex-direction: column;
|
259 |
}
|
260 |
|
261 |
+
a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link {
|
262 |
background: #405bfb;
|
263 |
border-radius: 4px;
|
264 |
color: #fff;
|
286 |
}
|
287 |
}
|
288 |
|
289 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name {
|
290 |
font-weight: 700;
|
291 |
}
|
292 |
|
293 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link {
|
294 |
border-bottom: 1px solid #405bfb;
|
295 |
font-size: 13px;
|
296 |
margin-left: 10px;
|
305 |
}
|
306 |
}
|
307 |
|
308 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-currency {
|
309 |
+
color: var(--tec-color-text-primary);
|
310 |
+
font-weight: bold;
|
311 |
+
}
|
312 |
+
|
313 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message {
|
314 |
+
color: #a3a3a3;
|
315 |
+
margin-top: var(--tec-spacer-1);
|
316 |
+
}
|
317 |
+
|
318 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message--error {
|
319 |
+
color: var(--tec-color-icon-error);
|
320 |
+
}
|
321 |
+
|
322 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-capability--no {
|
323 |
+
color: var(--tec-color-icon-error);
|
324 |
+
}
|
325 |
+
|
326 |
+
/* @todo: Add following green color as variable in common? */
|
327 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-capability--yes {
|
328 |
+
color: #1eb056;
|
329 |
+
}
|
330 |
+
|
331 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings {
|
332 |
max-width: 340px;
|
333 |
width: 100%;
|
334 |
}
|
335 |
|
336 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook {
|
337 |
&:not(last-of-type) {
|
338 |
margin-bottom: 8px;
|
339 |
}
|
340 |
}
|
341 |
|
342 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active {
|
343 |
+
.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error,
|
344 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error {
|
345 |
@mixin hidden;
|
346 |
}
|
347 |
}
|
348 |
|
349 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) {
|
350 |
+
.tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name,
|
351 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-name {
|
352 |
color: var(--tec-color-text-primary-light);
|
353 |
text-decoration: line-through;
|
354 |
}
|
355 |
}
|
356 |
|
357 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error {
|
358 |
color: var(--color-icon-error);
|
359 |
margin-left: 8px;
|
360 |
}
|
361 |
|
362 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions-debug {
|
363 |
margin-top: 20px;
|
364 |
}
|
365 |
|
366 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button {
|
367 |
@mixin button-solid;
|
368 |
|
369 |
background-color: var(--tec-color-button-primary);
|
385 |
}
|
386 |
}
|
387 |
|
388 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon {
|
389 |
margin-right: 8px;
|
390 |
position: relative;
|
391 |
stroke: white;
|
399 |
|
400 |
.tribe-common,
|
401 |
.event-tickets {
|
402 |
+
&.tribe-modal__wrapper--gateway-connected {
|
403 |
.tribe-tickets__notice {
|
404 |
display: block;
|
405 |
}
|
430 |
z-index: 99999;
|
431 |
}
|
432 |
}
|
433 |
+
|
434 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error {
|
435 |
+
display: block;
|
436 |
+
}
|
437 |
+
|
438 |
+
.tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title {
|
439 |
+
margin-bottom: var(--tec-spacer-3);
|
440 |
+
}
|
441 |
+
|
442 |
+
.tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section {
|
443 |
+
margin-bottom: var(--tec-spacer-3);
|
444 |
+
}
|
445 |
}
|
446 |
|
447 |
+
#paypal-connected-modal-button,
|
448 |
+
#stripe-connected-modal-button {
|
449 |
display: none;
|
450 |
}
|
451 |
+
|
452 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu {
|
453 |
+
padding-top: var(--tec-spacer-6);
|
454 |
+
}
|
455 |
+
|
456 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link {
|
457 |
+
border-bottom-color: #c4c4c4;
|
458 |
+
border-bottom-style: solid;
|
459 |
+
border-bottom-width: 1px;
|
460 |
+
color: #23282d;
|
461 |
+
display: inline-block;
|
462 |
+
font-size: var(--tec-font-size-2);
|
463 |
+
margin-right: var(--tec-spacer-5);
|
464 |
+
padding-bottom: var(--tec-spacer-1);
|
465 |
+
text-decoration: none;
|
466 |
+
}
|
467 |
+
|
468 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active {
|
469 |
+
border-bottom-width: var(--tec-spacer-0);
|
470 |
+
font-weight: bold;
|
471 |
+
}
|
472 |
+
|
473 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active,
|
474 |
+
.tec-tickets__admin-settings-tickets-commerce-section-menu-link:hover {
|
475 |
+
border-bottom-color: var(--tec-color-accent-primary);
|
476 |
+
color: #23282d;
|
477 |
+
}
|
478 |
+
|
479 |
+
.tec-tickets__admin-settings-featured {
|
480 |
+
background-color: var(--tec-color-background);
|
481 |
+
border: solid 1px var(--tec-color-border-default);
|
482 |
+
border-radius: 8px;
|
483 |
+
margin-bottom: var(--tec-spacer-7);
|
484 |
+
padding: var(--tec-spacer-8);
|
485 |
+
}
|
486 |
+
|
487 |
+
.tec-tickets__admin-settings-featured-title {
|
488 |
+
background-color: transparent;
|
489 |
+
font-size: var(--tec-font-size-5);
|
490 |
+
font-weight: bold;
|
491 |
+
margin-bottom: var(--tec-spacer-2);
|
492 |
+
padding: var(--tec-spacer-1) 0;
|
493 |
+
}
|
494 |
+
|
495 |
+
.tec-tickets__admin-settings-featured-description {
|
496 |
+
margin-bottom: var(--tec-spacer-4);
|
497 |
+
max-width: 720px;
|
498 |
+
}
|
499 |
+
|
500 |
+
.tec-tickets__admin-settings-featured-link {
|
501 |
+
align-items: center;
|
502 |
+
display: flex;
|
503 |
+
}
|
504 |
+
|
505 |
+
.tec-tickets__admin-settings-featured-link-url {
|
506 |
+
color: var(--tec-color-accent-primary);
|
507 |
+
padding: 0 var(--tec-spacer-1);
|
508 |
+
}
|
509 |
+
|
510 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item {
|
511 |
+
margin-bottom: var(--tec-spacer-7);
|
512 |
+
padding-bottom: var(--tec-spacer-0);
|
513 |
+
text-align: center;
|
514 |
+
|
515 |
+
& > div {
|
516 |
+
padding: var(--tec-spacer-0) 0;
|
517 |
+
}
|
518 |
+
|
519 |
+
@media (--viewport-medium) {
|
520 |
+
align-items: center;
|
521 |
+
display: flex;
|
522 |
+
text-align: left;
|
523 |
+
}
|
524 |
+
}
|
525 |
+
|
526 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle {
|
527 |
+
margin-right: 35px;
|
528 |
+
}
|
529 |
+
|
530 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand {
|
531 |
+
flex-grow: 1;
|
532 |
+
}
|
533 |
+
|
534 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo-image {
|
535 |
+
max-height: var(--tec-spacer-10);
|
536 |
+
}
|
537 |
+
|
538 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-subtitle {
|
539 |
+
font-size: 13px;
|
540 |
+
font-style: italic;
|
541 |
+
}
|
542 |
+
|
543 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link {
|
544 |
+
background-color: var(--tec-color-accent-primary);
|
545 |
+
border-radius: var(--tec-border-radius-default);
|
546 |
+
color: #fff;
|
547 |
+
display: inline-block;
|
548 |
+
font-size: var(--tec-font-size-2);
|
549 |
+
font-weight: var(--tec-font-weight-bold);
|
550 |
+
padding: var(--tec-spacer-2) var(--tec-spacer-3);
|
551 |
+
text-align: center;
|
552 |
+
text-decoration: none;
|
553 |
+
width: 180px;
|
554 |
+
|
555 |
+
&:active,
|
556 |
+
&:hover {
|
557 |
+
background-color: var(--tec-color-button-primary-hover);
|
558 |
+
color: #fff;
|
559 |
+
}
|
560 |
+
|
561 |
+
&:active {
|
562 |
+
background-color: var(--tec-color-button-primary-active);
|
563 |
+
}
|
564 |
+
}
|
565 |
+
|
566 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active {
|
567 |
+
background-color: var(--tec-color-background);
|
568 |
+
border-color: #3c434a;
|
569 |
+
border-style: solid;
|
570 |
+
border-width: 1px;
|
571 |
+
color: #3c434a;
|
572 |
+
|
573 |
+
&:active,
|
574 |
+
&:hover {
|
575 |
+
background-color: var(--tec-color-button-primary-hover);
|
576 |
+
border-color: var(--tec-color-button-primary-hover);
|
577 |
+
color: #fff;
|
578 |
+
}
|
579 |
+
|
580 |
+
&:active {
|
581 |
+
background-color: var(--tec-color-button-primary-active);
|
582 |
+
border-color: var(--tec-color-button-primary-active);
|
583 |
+
}
|
584 |
+
}
|
585 |
+
|
586 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle .tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked + .tec-tickets__admin-settings-tickets-commerce-toggle-switch {
|
587 |
+
background: #50b078;
|
588 |
+
}
|
589 |
+
|
590 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-group-header {
|
591 |
+
background: #f9f9f9;
|
592 |
+
color: #23282d;
|
593 |
+
font-size: var(--tec-font-size-4);
|
594 |
+
font-weight: var(--tec-font-weight-bold);
|
595 |
+
padding: var(--tec-spacer-1) var(--tec-spacer-2);
|
596 |
+
width: 100%;
|
597 |
+
}
|
598 |
+
|
599 |
+
.tec-tickets__admin-settings-tickets-commerce-gateway-group-header:first-of-type {
|
600 |
+
margin-top: 0;
|
601 |
+
}
|
602 |
+
|
603 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-status {
|
604 |
+
color: var(--tec-color-text-disabled);
|
605 |
+
font-size: var(--tec-font-size-2);
|
606 |
+
font-style: italic;
|
607 |
+
font-weight: var(--tec-font-weight-normal);
|
608 |
+
margin: 0 var(--tec-spacer-8);
|
609 |
+
}
|
610 |
+
|
611 |
+
.tec-tickets__admin-settings-tickets-commerce-gateways-item-status--enabled {
|
612 |
+
color: #50b078;
|
613 |
+
font-weight: var(--tec-font-weight-bold);
|
614 |
+
}
|
src/resources/postcss/tickets-commerce/_checkout.pcss
CHANGED
@@ -56,6 +56,10 @@
|
|
56 |
display: flex;
|
57 |
flex-wrap: wrap;
|
58 |
padding: var(--tec-spacer-4) 0;
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
.tribe-tickets__commerce-checkout-cart-item-details {
|
@@ -234,6 +238,69 @@
|
|
234 |
}
|
235 |
}
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
/* -------------------------------------------------------------------------
|
238 |
* Theme Overrides - Twenty Twenty
|
239 |
* ------------------------------------------------------------------------- */
|
@@ -250,5 +317,9 @@
|
|
250 |
&.tribe-tickets__commerce-checkout {
|
251 |
padding: initial;
|
252 |
}
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
}
|
56 |
display: flex;
|
57 |
flex-wrap: wrap;
|
58 |
padding: var(--tec-spacer-4) 0;
|
59 |
+
|
60 |
+
&.entry {
|
61 |
+
padding: var(--tec-spacer-4) 0;
|
62 |
+
}
|
63 |
}
|
64 |
|
65 |
.tribe-tickets__commerce-checkout-cart-item-details {
|
238 |
}
|
239 |
}
|
240 |
|
241 |
+
.tribe-tickets__commerce-checkout-section-header {
|
242 |
+
font-size: var(--tec-font-size-4);
|
243 |
+
font-weight: var(--tec-font-weight-bold);
|
244 |
+
margin-bottom: var(--tec-spacer-3);
|
245 |
+
}
|
246 |
+
|
247 |
+
.tribe-tickets__commerce-checkout-gateway {
|
248 |
+
display: none;
|
249 |
+
}
|
250 |
+
|
251 |
+
.tribe-tickets__commerce-checkout-gateway-toggle {
|
252 |
+
margin-bottom: var(--tec-spacer-7);
|
253 |
+
margin-top: var(--tec-spacer-3);
|
254 |
+
}
|
255 |
+
|
256 |
+
.tribe-tickets__commerce-checkout-gateway-toggle-button {
|
257 |
+
color: var(--tec-color-text-primary-light);
|
258 |
+
font-family: var(--tec-font-family-sans-serif);
|
259 |
+
font-size: var(--tec-font-size-3);
|
260 |
+
|
261 |
+
&:after {
|
262 |
+
border: 7px solid var(--tec-color-background-transparent);
|
263 |
+
border-bottom-width: 0;
|
264 |
+
border-top-color: var(--tec-color-text-primary-light);
|
265 |
+
border-top-width: 10px;
|
266 |
+
content: "";
|
267 |
+
display: inline-block;
|
268 |
+
margin-left: 5px;
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
.tribe-tickets__commerce-checkout-gateway-toggle--open {
|
273 |
+
.tribe-tickets__commerce-checkout-gateway-toggle-button {
|
274 |
+
color: #23282d;
|
275 |
+
|
276 |
+
&:after {
|
277 |
+
border: 7px solid var(--tec-color-background-transparent);
|
278 |
+
border-bottom-color: #23282d;
|
279 |
+
border-bottom-width: 10px;
|
280 |
+
border-top-width: 0;
|
281 |
+
}
|
282 |
+
}
|
283 |
+
}
|
284 |
+
|
285 |
+
.tribe-tickets__commerce-checkout-purchaser-info-wrapper {
|
286 |
+
margin-bottom: var(--tec-spacer-9);
|
287 |
+
|
288 |
+
.tribe-tickets__form-field-description {
|
289 |
+
color: var(--tec-color-icon-primary-alt);
|
290 |
+
margin: var(--tec-spacer-1) 0;
|
291 |
+
}
|
292 |
+
}
|
293 |
+
|
294 |
+
.tribe-tickets__commerce-checkout-purchaser-info-title {
|
295 |
+
margin-bottom: var(--tec-spacer-3);
|
296 |
+
}
|
297 |
+
|
298 |
+
.tribe-tickets__commerce-checkout-form-submit-button {
|
299 |
+
height: 55px;
|
300 |
+
margin-top: 24px;
|
301 |
+
width: 100%;
|
302 |
+
}
|
303 |
+
|
304 |
/* -------------------------------------------------------------------------
|
305 |
* Theme Overrides - Twenty Twenty
|
306 |
* ------------------------------------------------------------------------- */
|
317 |
&.tribe-tickets__commerce-checkout {
|
318 |
padding: initial;
|
319 |
}
|
320 |
+
|
321 |
+
.tribe-tickets__commerce-checkout-section-header {
|
322 |
+
margin-bottom: var(--tec-spacer-3);
|
323 |
+
}
|
324 |
}
|
325 |
}
|
src/resources/postcss/tickets-commerce/admin/gateway/stripe/webhooks.pcss
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Event Tickets - Admin Styles for Stripe Gateway Webhooks.
|
3 |
+
*
|
4 |
+
* @since TBD
|
5 |
+
*/
|
6 |
+
#tribe-field-tickets-commerce-stripe-webhooks-value {
|
7 |
+
input {
|
8 |
+
border-top-right-radius: 0;
|
9 |
+
border-bottom-right-radius: 0;
|
10 |
+
}
|
11 |
+
|
12 |
+
.tribe-field-tickets-commerce-stripe-webhooks-copy {
|
13 |
+
border-top-left-radius: 0;
|
14 |
+
border-bottom-left-radius: 0;
|
15 |
+
margin-left: -2px;
|
16 |
+
line-height: 24px;
|
17 |
+
padding-left: 6px;
|
18 |
+
padding-right: 6px;
|
19 |
+
|
20 |
+
span {
|
21 |
+
line-height: 24px;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
}
|
src/resources/postcss/tickets-commerce/gateway/paypal/_advanced-payments.pcss
CHANGED
@@ -74,4 +74,8 @@
|
|
74 |
margin-top: 24px;
|
75 |
width: 100%;
|
76 |
}
|
|
|
|
|
|
|
|
|
77 |
}
|
74 |
margin-top: 24px;
|
75 |
width: 100%;
|
76 |
}
|
77 |
+
|
78 |
+
.tribe-tickets__commerce-checkout-paypal-advanced-payments-form-field--card-name {
|
79 |
+
width: 100%;
|
80 |
+
}
|
81 |
}
|
src/resources/postcss/tickets-commerce/gateway/stripe.pcss
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Event Tickets - Tickets Commerce Stripe Stylesheet.
|
3 |
+
*
|
4 |
+
* @since TBD
|
5 |
+
*/
|
6 |
+
|
7 |
+
@import '../../tickets-common.pcss';
|
8 |
+
@import 'stripe/_all.pcss';
|
src/resources/postcss/tickets-commerce/gateway/stripe/_all.pcss
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Event Tickets - Tickets Commerce Stripe Stylesheet
|
3 |
+
*
|
4 |
+
* @since TBD
|
5 |
+
*/
|
6 |
+
|
7 |
+
@import "_stripe.pcss";
|
src/resources/postcss/tickets-commerce/gateway/stripe/_stripe.pcss
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Event Tickets - Tickets Commerce Stripe Stylesheet
|
3 |
+
*
|
4 |
+
* @since TBD
|
5 |
+
*/
|
6 |
+
|
7 |
+
.event-tickets {
|
8 |
+
|
9 |
+
.tribe-tickets__commerce-checkout-stripe-payment-element {
|
10 |
+
margin-bottom: var(--tec-spacer-4);
|
11 |
+
}
|
12 |
+
|
13 |
+
.tribe-tickets__commerce-checkout-stripe-card-element {
|
14 |
+
margin-bottom: var(--tec-spacer-4);
|
15 |
+
}
|
16 |
+
|
17 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-row {
|
18 |
+
display: flex;
|
19 |
+
justify-content: stretch;
|
20 |
+
}
|
21 |
+
|
22 |
+
.tribe-tickets__commerce-checkout-stripe-card-element--compact {
|
23 |
+
border: 1px solid var(--tec-color-border-default);
|
24 |
+
border-radius: var(--tec-border-radius-default);
|
25 |
+
padding: var(--tec-spacer-2);
|
26 |
+
|
27 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-row {
|
28 |
+
display: none;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-number,
|
33 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-expiry,
|
34 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-cvc,
|
35 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-zip {
|
36 |
+
border: 1px solid var(--tec-color-border-default);
|
37 |
+
border-radius: var(--tec-border-radius-default);
|
38 |
+
flex-basis: 67%;
|
39 |
+
flex-grow: 1;
|
40 |
+
margin-bottom: var(--tec-spacer-2);
|
41 |
+
margin-right: var(--tec-spacer-2);
|
42 |
+
padding: var(--tec-spacer-2) var(--tec-spacer-3);
|
43 |
+
}
|
44 |
+
|
45 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-expiry,
|
46 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-zip {
|
47 |
+
flex-basis: 33%;
|
48 |
+
margin-right: 0;
|
49 |
+
}
|
50 |
+
|
51 |
+
.tribe-tickets__commerce-checkout-stripe-card-element-zip-input {
|
52 |
+
background-color: var(--tec-color-background-events);
|
53 |
+
border: none;
|
54 |
+
color: #23282d;
|
55 |
+
display: block;
|
56 |
+
font-family: sans-serif;
|
57 |
+
font-size: var(--tec-font-size-2);
|
58 |
+
margin: 0;
|
59 |
+
padding: 0;
|
60 |
+
width: 100%;
|
61 |
+
}
|
62 |
+
}
|
src/views/tickets/email.php
CHANGED
@@ -414,7 +414,9 @@
|
|
414 |
<tr>
|
415 |
<td valign="top" align="center" width="100%" style="padding: 0 !important; margin:0 !important;">
|
416 |
<h2 style="color:#0a0a0e; margin:0 0 10px 0 !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-style:normal; font-weight:700; font-size:28px; letter-spacing:normal; text-align:left;line-height: 100%;">
|
417 |
-
<a style="color:#0a0a0e !important" href="<?php echo esc_url( $event_link ); ?>"
|
|
|
|
|
418 |
</h2>
|
419 |
<?php if ( ! empty( $event_date ) ) : ?>
|
420 |
<h4 style="color:#0a0a0e; margin:0 !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-style:normal; font-weight:700; font-size:15px; letter-spacing:normal; text-align:left;line-height: 100%;">
|
414 |
<tr>
|
415 |
<td valign="top" align="center" width="100%" style="padding: 0 !important; margin:0 !important;">
|
416 |
<h2 style="color:#0a0a0e; margin:0 0 10px 0 !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-style:normal; font-weight:700; font-size:28px; letter-spacing:normal; text-align:left;line-height: 100%;">
|
417 |
+
<a style="color:#0a0a0e !important" href="<?php echo esc_url( $event_link ); ?>">
|
418 |
+
<?php echo $event->post_title; ?>
|
419 |
+
</a>
|
420 |
</h2>
|
421 |
<?php if ( ! empty( $event_date ) ) : ?>
|
422 |
<h4 style="color:#0a0a0e; margin:0 !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-style:normal; font-weight:700; font-size:15px; letter-spacing:normal; text-align:left;line-height: 100%;">
|
src/views/v2/commerce/checkout.php
CHANGED
@@ -9,9 +9,10 @@
|
|
9 |
*
|
10 |
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
*
|
12 |
-
* @since
|
|
|
13 |
*
|
14 |
-
* @version 5.
|
15 |
*
|
16 |
* @var \Tribe__Template $this [Global] Template object.
|
17 |
* @var Module $provider [Global] The tickets provider instance.
|
@@ -43,19 +44,21 @@ $attributes = [
|
|
43 |
<?php tribe( 'tickets.editor.template' )->template( 'v2/components/loader/loader' ); ?>
|
44 |
<?php
|
45 |
tribe( 'tickets.editor.template' )->template(
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
'tribe-tickets__notice--error',
|
50 |
'tribe-tickets__commerce-checkout-notice',
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
);
|
57 |
?>
|
58 |
<?php $this->template( 'checkout/cart/empty' ); ?>
|
|
|
|
|
59 |
<?php $this->template( 'checkout/footer' ); ?>
|
60 |
<?php $this->template( 'checkout/must-login' ); ?>
|
61 |
</section>
|
9 |
*
|
10 |
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
*
|
12 |
+
* @since 5.1.9
|
13 |
+
* @since 5.3.0 Added purchaser info templates.
|
14 |
*
|
15 |
+
* @version 5.3.0
|
16 |
*
|
17 |
* @var \Tribe__Template $this [Global] Template object.
|
18 |
* @var Module $provider [Global] The tickets provider instance.
|
44 |
<?php tribe( 'tickets.editor.template' )->template( 'v2/components/loader/loader' ); ?>
|
45 |
<?php
|
46 |
tribe( 'tickets.editor.template' )->template(
|
47 |
+
'components/notice',
|
48 |
+
[
|
49 |
+
'notice_classes' => [
|
50 |
'tribe-tickets__notice--error',
|
51 |
'tribe-tickets__commerce-checkout-notice',
|
52 |
+
],
|
53 |
+
'content_classes' => [ 'tribe-tickets__commerce-checkout-notice-content' ],
|
54 |
+
'title' => __( 'Checkout Error!', 'event-tickets' ),
|
55 |
+
'content' => __( 'Something went wrong!', 'event-tickets' ),
|
56 |
+
]
|
57 |
);
|
58 |
?>
|
59 |
<?php $this->template( 'checkout/cart/empty' ); ?>
|
60 |
+
<?php $this->template( 'checkout/purchaser-info' ); ?>
|
61 |
+
<?php $this->template( 'checkout/gateways' ); ?>
|
62 |
<?php $this->template( 'checkout/footer' ); ?>
|
63 |
<?php $this->template( 'checkout/must-login' ); ?>
|
64 |
</section>
|
src/views/v2/commerce/checkout/cart.php
CHANGED
@@ -13,20 +13,21 @@
|
|
13 |
*
|
14 |
* @version 5.1.9
|
15 |
*
|
16 |
-
* @var \Tribe__Template $this
|
17 |
-
* @var Module $provider
|
18 |
-
* @var string $provider_id
|
19 |
-
* @var array[] $items
|
20 |
-
* @var bool $must_login
|
21 |
-
* @var string $login_url
|
22 |
-
* @var string $registration_url
|
23 |
-
* @var bool $is_tec_active
|
24 |
-
* @var int $section
|
25 |
-
* @var array[] $gateways
|
26 |
-
* @var int $gateways_active
|
27 |
*/
|
28 |
|
29 |
$post = get_post( $section );
|
|
|
30 |
?>
|
31 |
|
32 |
<div class="tribe-tickets__commerce-checkout-cart">
|
13 |
*
|
14 |
* @version 5.1.9
|
15 |
*
|
16 |
+
* @var \Tribe__Template $this [Global] Template object.
|
17 |
+
* @var Module $provider [Global] The tickets provider instance.
|
18 |
+
* @var string $provider_id [Global] The tickets provider class name.
|
19 |
+
* @var array[] $items [Global] List of Items on the cart to be checked out.
|
20 |
+
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
21 |
+
* @var string $login_url [Global] The site's login URL.
|
22 |
+
* @var string $registration_url [Global] The site's registration URL.
|
23 |
+
* @var bool $is_tec_active [Global] Whether `The Events Calendar` is active or not.
|
24 |
+
* @var int $section Which Section that we are going to render for this table.
|
25 |
+
* @var array[] $gateways [Global] An array with the gateways.
|
26 |
+
* @var int $gateways_active [Global] The number of active gateways.
|
27 |
*/
|
28 |
|
29 |
$post = get_post( $section );
|
30 |
+
|
31 |
?>
|
32 |
|
33 |
<div class="tribe-tickets__commerce-checkout-cart">
|
src/views/v2/commerce/checkout/footer/gateway-error.php
CHANGED
@@ -10,8 +10,9 @@
|
|
10 |
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
*
|
12 |
* @since 5.1.10
|
|
|
13 |
*
|
14 |
-
* @version 5.
|
15 |
*
|
16 |
* @var \Tribe__Template $this [Global] Template object.
|
17 |
* @var Module $provider [Global] The tickets provider instance.
|
10 |
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
*
|
12 |
* @since 5.1.10
|
13 |
+
* @since 5.3.0 Improve check for active gateways now that we can enable or disable gateways.
|
14 |
*
|
15 |
+
* @version 5.3.0
|
16 |
*
|
17 |
* @var \Tribe__Template $this [Global] Template object.
|
18 |
* @var Module $provider [Global] The tickets provider instance.
|
src/views/v2/commerce/checkout/gateways.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Checkout Page Gateways.
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/checkout/gateways.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
*
|
16 |
+
* @var \Tribe__Template $this [Global] Template object.
|
17 |
+
* @var Module $provider [Global] The tickets provider instance.
|
18 |
+
* @var string $provider_id [Global] The tickets provider class name.
|
19 |
+
* @var array[] $items [Global] List of Items on the cart to be checked out.
|
20 |
+
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
21 |
+
* @var string $login_url [Global] The site's login URL.
|
22 |
+
* @var string $registration_url [Global] The site's registration URL.
|
23 |
+
* @var bool $is_tec_active [Global] Whether `The Events Calendar` is active or not.
|
24 |
+
* @var Abstract_Gateway[] $gateways [Global] An array with the gateways.
|
25 |
+
* @var int $gateways_active [Global] The number of active gateways.
|
26 |
+
* @var int $gateways_connected [Global] The number of connected gateways.
|
27 |
+
*/
|
28 |
+
|
29 |
+
// Bail if user needs to login, the cart is empty or if there are no active gateways.
|
30 |
+
if ( $must_login || empty( $items ) || ! tribe_is_truthy( $gateways_active ) ) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
?>
|
35 |
+
<div class="tribe-tickets__commerce-checkout-gateways">
|
36 |
+
<h4 class="tribe-common-h5 tribe-tickets__commerce-checkout-section-header">
|
37 |
+
<?php esc_html_e( 'Payment', 'event-tickets' ); ?>
|
38 |
+
</h4>
|
39 |
+
<?php
|
40 |
+
foreach ( $gateways as $gateway ) {
|
41 |
+
if ( ! $gateway::is_enabled() || ! $gateway::is_active() ) {
|
42 |
+
continue;
|
43 |
+
}
|
44 |
+
$gateway->render_checkout_template( $this );
|
45 |
+
}
|
46 |
+
?>
|
47 |
+
</div>
|
src/views/v2/commerce/checkout/purchaser-info.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Checkout Purchaser Info.
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/checkout/purchaser-info.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
*
|
16 |
+
* @var \Tribe__Template $this [Global] Template object.
|
17 |
+
* @var array[] $items [Global] List of Items on the cart to be checked out.
|
18 |
+
* @var bool $must_login Global] Whether login is required to buy tickets or not.
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( is_user_logged_in() || $must_login || empty( $items ) ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
?>
|
25 |
+
|
26 |
+
<div class="tribe-tickets__form tribe-tickets__commerce-checkout-purchaser-info-wrapper tribe-common-b2">
|
27 |
+
<h4 class="tribe-common-h5 tribe-tickets__commerce-checkout-purchaser-info-title"><?php esc_html_e( 'Purchaser info', 'event-tickets' ); ?></h4>
|
28 |
+
<?php $this->template( 'checkout/purchaser-info/name' ); ?>
|
29 |
+
<?php $this->template( 'checkout/purchaser-info/email' ); ?>
|
30 |
+
</div>
|
src/views/v2/commerce/checkout/purchaser-info/email.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Checkout Page Purchaser Info Email Field
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/checkout/purchaser-info/email.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
*
|
16 |
+
* @var \Tribe__Template $this [Global] Template object.
|
17 |
+
*/
|
18 |
+
|
19 |
+
$label_classes = [
|
20 |
+
'tribe-tickets__form-field-label',
|
21 |
+
'tribe-tickets__commerce-checkout-purchaser-info-email-field-label',
|
22 |
+
];
|
23 |
+
|
24 |
+
$field_classes = [
|
25 |
+
'tribe-common-b2',
|
26 |
+
'tribe-tickets__commerce-checkout-purchaser-info-form-field',
|
27 |
+
'tribe-tickets__commerce-checkout-purchaser-info-form-field-email',
|
28 |
+
'tribe-common-form-control-text__input',
|
29 |
+
'tribe-tickets__form-field-input',
|
30 |
+
];
|
31 |
+
?>
|
32 |
+
<div class="tribe-tickets__commerce-checkout-purchaser-info-field tribe-tickets__form-field tribe-tickets__form-field--email">
|
33 |
+
<label for="tec-tc-purchaser-email" <?php tribe_classes( $label_classes ); ?>>
|
34 |
+
<?php esc_html_e( 'Email address:', 'event-tickets' ); ?>
|
35 |
+
</label>
|
36 |
+
|
37 |
+
<div class="tribe-tickets__form-field-input-wrapper">
|
38 |
+
<input
|
39 |
+
type="email"
|
40 |
+
id="tec-tc-purchaser-email"
|
41 |
+
name="purchaser-email"
|
42 |
+
autocomplete="off"
|
43 |
+
<?php tribe_classes( $field_classes ); ?>
|
44 |
+
required
|
45 |
+
/>
|
46 |
+
<div class="tribe-common-b3 tribe-tickets__form-field-description">
|
47 |
+
<?php esc_html_e( 'Your tickets will be sent to this address', 'event-tickets' ); ?>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
</div>
|
src/views/v2/commerce/checkout/purchaser-info/name.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Checkout Page Purchaser Info Name Field
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/checkout/purchaser-info/name.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
*
|
16 |
+
* @var \Tribe__Template $this [Global] Template object.
|
17 |
+
*/
|
18 |
+
|
19 |
+
$label_classes = [
|
20 |
+
'tribe-tickets__form-field-label',
|
21 |
+
'tribe-tickets__commerce-checkout-purchaser-info-name-field-label',
|
22 |
+
];
|
23 |
+
|
24 |
+
$field_classes = [
|
25 |
+
'tribe-tickets__commerce-checkout-purchaser-info-form-field',
|
26 |
+
'tribe-tickets__commerce-checkout-purchaser-info-form-field-name',
|
27 |
+
'tribe-common-form-control-text__input',
|
28 |
+
'tribe-tickets__form-field-input',
|
29 |
+
];
|
30 |
+
?>
|
31 |
+
<div class="tribe-tickets__commerce-checkout-purchaser-info-field tribe-tickets__form-field tribe-tickets__form-field--text">
|
32 |
+
<label for="tec-tc-purchaser-name" <?php tribe_classes( $label_classes ); ?>>
|
33 |
+
<?php esc_html_e( 'Person purchasing tickets:', 'event-tickets' ); ?>
|
34 |
+
</label>
|
35 |
+
<div class="tribe-tickets__form-field-input-wrapper">
|
36 |
+
<input
|
37 |
+
type="text"
|
38 |
+
id="tec-tc-purchaser-name"
|
39 |
+
name="purchaser-name"
|
40 |
+
autocomplete="off"
|
41 |
+
<?php tribe_classes( $field_classes ); ?>
|
42 |
+
required
|
43 |
+
/>
|
44 |
+
</div>
|
45 |
+
</div>
|
src/views/v2/commerce/gateway/paypal/container.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: PayPal Checkout container
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/gateway/paypal/container.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
*
|
16 |
+
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
17 |
+
* @var bool $supports_custom_payments [Global] Determines if this site supports custom payments.
|
18 |
+
* @var bool $active_custom_payments [Global] Determines if this site supports custom payments.
|
19 |
+
* @var string $url [Global] Script URL.
|
20 |
+
* @var string $client_token [Global] One time use client Token.
|
21 |
+
* @var string $client_token_expires_in [Global] How much time to when the Token in this script will take to expire.
|
22 |
+
* @var string $attribution_id [Global] What is our PayPal Attribution ID.
|
23 |
+
*/
|
24 |
+
|
25 |
+
if ( $must_login ) {
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
|
29 |
+
?>
|
30 |
+
<div class="tribe-tickets__commerce-checkout-gateway tribe-tickets__commerce-checkout-paypal">
|
31 |
+
<?php $this->template( 'gateway/paypal/buttons' ); ?>
|
32 |
+
<?php $this->template( 'gateway/paypal/advanced-payments' ); ?>
|
33 |
+
<?php $this->template( 'gateway/paypal/checkout-script' ); ?>
|
34 |
+
</div>
|
src/views/v2/commerce/gateway/stripe/card-element.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Card Element Checkout for Stripe
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/gateway/stripe/card-element.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
16 |
+
* @var bool $payment_element [Global] Whether to load the Stripe Payment Element.
|
17 |
+
* @var string $card_element_type [Global] Card element type. Either 'compact' or 'separate'.
|
18 |
+
*/
|
19 |
+
|
20 |
+
if ( $must_login || $payment_element ) {
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
|
24 |
+
$classes = [
|
25 |
+
'tribe-tickets__commerce-checkout-stripe-card-element',
|
26 |
+
'tribe-tickets__commerce-checkout-stripe-card-element--' . esc_attr( $card_element_type ),
|
27 |
+
];
|
28 |
+
|
29 |
+
?>
|
30 |
+
<div id="tec-tc-gateway-stripe-card-element" <?php tribe_classes( $classes ); ?>>
|
31 |
+
<div class="tribe-tickets__commerce-checkout-stripe-card-element-row">
|
32 |
+
<span id="tec-tc-gateway-stripe-card-number" class="tribe-tickets__commerce-checkout-stripe-card-element-number"></span>
|
33 |
+
<span id="tec-tc-gateway-stripe-card-expiry" class="tribe-tickets__commerce-checkout-stripe-card-element-expiry"></span>
|
34 |
+
</div>
|
35 |
+
<div class="tribe-tickets__commerce-checkout-stripe-card-element-row">
|
36 |
+
<span id="tec-tc-gateway-stripe-card-cvc" class="tribe-tickets__commerce-checkout-stripe-card-element-cvc"></span>
|
37 |
+
<span id="tec-tc-gateway-stripe-card-zip" class="tribe-tickets__commerce-checkout-stripe-card-element-zip">
|
38 |
+
<input
|
39 |
+
class="tribe-tickets__commerce-checkout-stripe-card-element-zip-input"
|
40 |
+
placeholder="<?php esc_attr_e( 'Zip Code', 'event-tickets' ); ?>"
|
41 |
+
/>
|
42 |
+
</span>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<div
|
47 |
+
id="tec-tc-gateway-stripe-errors"
|
48 |
+
class="tribe-common-b2"
|
49 |
+
role="alert"></div>
|
50 |
+
|
51 |
+
<button
|
52 |
+
id="tec-tc-gateway-stripe-checkout-button"
|
53 |
+
class="tribe-common-c-btn tribe-tickets__commerce-checkout-form-submit-button"
|
54 |
+
>
|
55 |
+
<?php
|
56 |
+
printf(
|
57 |
+
// Translators: %1$s: Plural `Tickets` label.
|
58 |
+
esc_html__( 'Purchase %1$s', 'event-tickets' ),
|
59 |
+
tribe_get_ticket_label_plural( 'tickets_commerce_checkout_title' ) // phpcs:ignore
|
60 |
+
);
|
61 |
+
?>
|
62 |
+
</button>
|
src/views/v2/commerce/gateway/stripe/container.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Stripe Checkout Form
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/gateway/stripe/container.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @todo FrontEnd needs to revisit all of these templates to make sure we're not missing anything
|
13 |
+
*
|
14 |
+
* @since 5.3.0
|
15 |
+
*
|
16 |
+
* @version 5.3.0
|
17 |
+
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
18 |
+
* @var bool $payment_element [Global] Whether to load the Stripe Payment Element.
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( ! empty( $must_login ) ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
?>
|
25 |
+
<div class="tribe-tickets__commerce-checkout-gateway tribe-tickets__commerce-checkout-stripe">
|
26 |
+
<form id="payment-form">
|
27 |
+
|
28 |
+
<?php $this->template( 'gateway/stripe/payment-element' ); ?>
|
29 |
+
|
30 |
+
<?php $this->template( 'gateway/stripe/card-element' ); ?>
|
31 |
+
|
32 |
+
</form>
|
33 |
+
</div>
|
src/views/v2/commerce/gateway/stripe/payment-element.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Commerce: Payment Element Checkout for Stripe
|
4 |
+
*
|
5 |
+
* Override this template in your own theme by creating a file at:
|
6 |
+
* [your-theme]/tribe/tickets/v2/commerce/gateway/stripe/payment-element.php
|
7 |
+
*
|
8 |
+
* See more documentation about our views templating system.
|
9 |
+
*
|
10 |
+
* @link https://evnt.is/1amp Help article for RSVP & Ticket template files.
|
11 |
+
*
|
12 |
+
* @since 5.3.0
|
13 |
+
*
|
14 |
+
* @version 5.3.0
|
15 |
+
* @var bool $must_login [Global] Whether login is required to buy tickets or not.
|
16 |
+
* @var bool $payment_element [Global] Whether to load the Stripe Payment Element.
|
17 |
+
*/
|
18 |
+
|
19 |
+
if ( $must_login || ! $payment_element ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
?>
|
23 |
+
<div id="tec-tc-gateway-stripe-payment-element" class="tribe-tickets__commerce-checkout-stripe-payment-element"></div>
|
24 |
+
<button id="tec-tc-gateway-stripe-checkout-button" class="tribe-common-c-btn tribe-tickets__commerce-checkout-form-submit-button">
|
25 |
+
<div class="spinner hidden" id="spinner"></div>
|
26 |
+
<span id="button-text">
|
27 |
+
<?php
|
28 |
+
printf(
|
29 |
+
// Translators: %1$s: Plural `Tickets` label.
|
30 |
+
esc_html__( 'Purchase %1$s', 'event-tickets' ),
|
31 |
+
tribe_get_ticket_label_plural( 'tickets_commerce_checkout_title' ) // phpcs:ignore
|
32 |
+
);
|
33 |
+
?>
|
34 |
+
</span>
|
35 |
+
</button>
|
36 |
+
<div id="tec-tc-gateway-stripe-payment-message" class="hidden"></div>
|
37 |
+
<div
|
38 |
+
id="tec-tc-gateway-stripe-errors"
|
39 |
+
class="tribe-common-b2"
|
40 |
+
role="alert"></div>
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit3debd0547f39ea13f347720ddc69ae0a::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -9,7 +9,7 @@ return array(
|
|
9 |
'TEC\\Tickets\\Assets' => $baseDir . '/src/Tickets/Assets.php',
|
10 |
'TEC\\Tickets\\Commerce' => $baseDir . '/src/Tickets/Commerce.php',
|
11 |
'TEC\\Tickets\\Commerce\\Abstract_Order' => $baseDir . '/src/Tickets/Commerce/Abstract_Order.php',
|
12 |
-
'TEC\\Tickets\\Commerce\\
|
13 |
'TEC\\Tickets\\Commerce\\Admin\\Notices' => $baseDir . '/src/Tickets/Commerce/Admin/Notices.php',
|
14 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Attendees' => $baseDir . '/src/Tickets/Commerce/Admin_Tables/Attendees.php',
|
15 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Orders' => $baseDir . '/src/Tickets/Commerce/Admin_Tables/Orders.php',
|
@@ -34,8 +34,21 @@ return array(
|
|
34 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Sales' => $baseDir . '/src/Tickets/Commerce/Flag_Actions/Increase_Sales.php',
|
35 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Stock' => $baseDir . '/src/Tickets/Commerce/Flag_Actions/Increase_Stock.php',
|
36 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Send_Email' => $baseDir . '/src/Tickets/Commerce/Flag_Actions/Send_Email.php',
|
37 |
-
'TEC\\Tickets\\Commerce\\Gateways\\Abstract_Gateway' => $baseDir . '/src/Tickets/Commerce/Gateways/Abstract_Gateway.php',
|
38 |
-
'TEC\\Tickets\\Commerce\\Gateways\\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
'TEC\\Tickets\\Commerce\\Gateways\\Manager' => $baseDir . '/src/Tickets/Commerce/Gateways/Manager.php',
|
40 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Assets' => $baseDir . '/src/Tickets/Commerce/Gateways/Manual/Assets.php',
|
41 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Gateway' => $baseDir . '/src/Tickets/Commerce/Gateways/Manual/Gateway.php',
|
@@ -63,6 +76,30 @@ return array(
|
|
63 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Events' => $baseDir . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php',
|
64 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Handler' => $baseDir . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php',
|
65 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\WhoDat' => $baseDir . '/src/Tickets/Commerce/Gateways/PayPal/WhoDat.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
'TEC\\Tickets\\Commerce\\Hooks' => $baseDir . '/src/Tickets/Commerce/Hooks.php',
|
67 |
'TEC\\Tickets\\Commerce\\Legacy_Compat' => $baseDir . '/src/Tickets/Commerce/Legacy_Compat.php',
|
68 |
'TEC\\Tickets\\Commerce\\Models\\Attendee_Model' => $baseDir . '/src/Tickets/Commerce/Models/Attendee_Model.php',
|
9 |
'TEC\\Tickets\\Assets' => $baseDir . '/src/Tickets/Assets.php',
|
10 |
'TEC\\Tickets\\Commerce' => $baseDir . '/src/Tickets/Commerce.php',
|
11 |
'TEC\\Tickets\\Commerce\\Abstract_Order' => $baseDir . '/src/Tickets/Commerce/Abstract_Order.php',
|
12 |
+
'TEC\\Tickets\\Commerce\\Admin\\Featured_Settings' => $baseDir . '/src/Tickets/Commerce/Admin/Featured_Settings.php',
|
13 |
'TEC\\Tickets\\Commerce\\Admin\\Notices' => $baseDir . '/src/Tickets/Commerce/Admin/Notices.php',
|
14 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Attendees' => $baseDir . '/src/Tickets/Commerce/Admin_Tables/Attendees.php',
|
15 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Orders' => $baseDir . '/src/Tickets/Commerce/Admin_Tables/Orders.php',
|
34 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Sales' => $baseDir . '/src/Tickets/Commerce/Flag_Actions/Increase_Sales.php',
|
35 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Stock' => $baseDir . '/src/Tickets/Commerce/Flag_Actions/Increase_Stock.php',
|
36 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Send_Email' => $baseDir . '/src/Tickets/Commerce/Flag_Actions/Send_Email.php',
|
37 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Gateway' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php',
|
38 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Merchant' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Merchant.php',
|
39 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_REST_Endpoint' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_REST_Endpoint.php',
|
40 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Requests' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Requests.php',
|
41 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Settings' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Settings.php',
|
42 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Signup' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Signup.php',
|
43 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Webhooks' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Webhooks.php',
|
44 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_WhoDat' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_WhoDat.php',
|
45 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Gateway_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Gateway_Interface.php',
|
46 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Merchant_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Merchant_Interface.php',
|
47 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\REST_Endpoint_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/REST_Endpoint_Interface.php',
|
48 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Requests_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Requests_Interface.php',
|
49 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Signup_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Signup_Interface.php',
|
50 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Webhook_Event_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/Webhook_Event_Interface.php',
|
51 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\WhoDat_Interface' => $baseDir . '/src/Tickets/Commerce/Gateways/Contracts/WhoDat_Interface.php',
|
52 |
'TEC\\Tickets\\Commerce\\Gateways\\Manager' => $baseDir . '/src/Tickets/Commerce/Gateways/Manager.php',
|
53 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Assets' => $baseDir . '/src/Tickets/Commerce/Gateways/Manual/Assets.php',
|
54 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Gateway' => $baseDir . '/src/Tickets/Commerce/Gateways/Manual/Gateway.php',
|
76 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Events' => $baseDir . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php',
|
77 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Handler' => $baseDir . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php',
|
78 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\WhoDat' => $baseDir . '/src/Tickets/Commerce/Gateways/PayPal/WhoDat.php',
|
79 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Application_Fee' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Application_Fee.php',
|
80 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Assets' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Assets.php',
|
81 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Gateway' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Gateway.php',
|
82 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Hooks' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Hooks.php',
|
83 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Merchant' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Merchant.php',
|
84 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Payment_Intent' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Payment_Intent.php',
|
85 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Payment_Intent_Handler' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php',
|
86 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Provider' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Provider.php',
|
87 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/REST.php',
|
88 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST\\Order_Endpoint' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php',
|
89 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST\\Return_Endpoint' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/REST/Return_Endpoint.php',
|
90 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST\\Webhook_Endpoint' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/REST/Webhook_Endpoint.php',
|
91 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Requests' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Requests.php',
|
92 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Settings' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Settings.php',
|
93 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Signup' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Signup.php',
|
94 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Status' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Status.php',
|
95 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Stripe_Elements' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Stripe_Elements.php',
|
96 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks.php',
|
97 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Account_Webhook' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Account_Webhook.php',
|
98 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Charge_Webhook' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Charge_Webhook.php',
|
99 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Events' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php',
|
100 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Handler' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php',
|
101 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Payment_Intent_Webhook' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php',
|
102 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\WhoDat' => $baseDir . '/src/Tickets/Commerce/Gateways/Stripe/WhoDat.php',
|
103 |
'TEC\\Tickets\\Commerce\\Hooks' => $baseDir . '/src/Tickets/Commerce/Hooks.php',
|
104 |
'TEC\\Tickets\\Commerce\\Legacy_Compat' => $baseDir . '/src/Tickets/Commerce/Legacy_Compat.php',
|
105 |
'TEC\\Tickets\\Commerce\\Models\\Attendee_Model' => $baseDir . '/src/Tickets/Commerce/Models/Attendee_Model.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit78d3c674fcbbeafb9fc2b9f6dcdd124c
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit3debd0547f39ea13f347720ddc69ae0a
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit3debd0547f39ea13f347720ddc69ae0a', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit3debd0547f39ea13f347720ddc69ae0a', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit3debd0547f39ea13f347720ddc69ae0a::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -29,7 +29,7 @@ class ComposerStaticInit78d3c674fcbbeafb9fc2b9f6dcdd124c
|
|
29 |
'TEC\\Tickets\\Assets' => __DIR__ . '/../..' . '/src/Tickets/Assets.php',
|
30 |
'TEC\\Tickets\\Commerce' => __DIR__ . '/../..' . '/src/Tickets/Commerce.php',
|
31 |
'TEC\\Tickets\\Commerce\\Abstract_Order' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Abstract_Order.php',
|
32 |
-
'TEC\\Tickets\\Commerce\\
|
33 |
'TEC\\Tickets\\Commerce\\Admin\\Notices' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin/Notices.php',
|
34 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Attendees' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin_Tables/Attendees.php',
|
35 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Orders' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin_Tables/Orders.php',
|
@@ -54,8 +54,21 @@ class ComposerStaticInit78d3c674fcbbeafb9fc2b9f6dcdd124c
|
|
54 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Sales' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Flag_Actions/Increase_Sales.php',
|
55 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Stock' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Flag_Actions/Increase_Stock.php',
|
56 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Send_Email' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Flag_Actions/Send_Email.php',
|
57 |
-
'TEC\\Tickets\\Commerce\\Gateways\\Abstract_Gateway' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Abstract_Gateway.php',
|
58 |
-
'TEC\\Tickets\\Commerce\\Gateways\\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
'TEC\\Tickets\\Commerce\\Gateways\\Manager' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Manager.php',
|
60 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Assets' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Manual/Assets.php',
|
61 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Gateway' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Manual/Gateway.php',
|
@@ -83,6 +96,30 @@ class ComposerStaticInit78d3c674fcbbeafb9fc2b9f6dcdd124c
|
|
83 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Events' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php',
|
84 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Handler' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php',
|
85 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\WhoDat' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/PayPal/WhoDat.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
'TEC\\Tickets\\Commerce\\Hooks' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Hooks.php',
|
87 |
'TEC\\Tickets\\Commerce\\Legacy_Compat' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Legacy_Compat.php',
|
88 |
'TEC\\Tickets\\Commerce\\Models\\Attendee_Model' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Models/Attendee_Model.php',
|
@@ -162,9 +199,9 @@ class ComposerStaticInit78d3c674fcbbeafb9fc2b9f6dcdd124c
|
|
162 |
public static function getInitializer(ClassLoader $loader)
|
163 |
{
|
164 |
return \Closure::bind(function () use ($loader) {
|
165 |
-
$loader->prefixLengthsPsr4 =
|
166 |
-
$loader->prefixDirsPsr4 =
|
167 |
-
$loader->classMap =
|
168 |
|
169 |
}, null, ClassLoader::class);
|
170 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit3debd0547f39ea13f347720ddc69ae0a
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
29 |
'TEC\\Tickets\\Assets' => __DIR__ . '/../..' . '/src/Tickets/Assets.php',
|
30 |
'TEC\\Tickets\\Commerce' => __DIR__ . '/../..' . '/src/Tickets/Commerce.php',
|
31 |
'TEC\\Tickets\\Commerce\\Abstract_Order' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Abstract_Order.php',
|
32 |
+
'TEC\\Tickets\\Commerce\\Admin\\Featured_Settings' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin/Featured_Settings.php',
|
33 |
'TEC\\Tickets\\Commerce\\Admin\\Notices' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin/Notices.php',
|
34 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Attendees' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin_Tables/Attendees.php',
|
35 |
'TEC\\Tickets\\Commerce\\Admin_Tables\\Orders' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Admin_Tables/Orders.php',
|
54 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Sales' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Flag_Actions/Increase_Sales.php',
|
55 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Increase_Stock' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Flag_Actions/Increase_Stock.php',
|
56 |
'TEC\\Tickets\\Commerce\\Flag_Actions\\Send_Email' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Flag_Actions/Send_Email.php',
|
57 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Gateway' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Gateway.php',
|
58 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Merchant' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Merchant.php',
|
59 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_REST_Endpoint' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_REST_Endpoint.php',
|
60 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Requests' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Requests.php',
|
61 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Settings' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Settings.php',
|
62 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Signup' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Signup.php',
|
63 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_Webhooks' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_Webhooks.php',
|
64 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Abstract_WhoDat' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Abstract_WhoDat.php',
|
65 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Gateway_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Gateway_Interface.php',
|
66 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Merchant_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Merchant_Interface.php',
|
67 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\REST_Endpoint_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/REST_Endpoint_Interface.php',
|
68 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Requests_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Requests_Interface.php',
|
69 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Signup_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Signup_Interface.php',
|
70 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\Webhook_Event_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/Webhook_Event_Interface.php',
|
71 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Contracts\\WhoDat_Interface' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Contracts/WhoDat_Interface.php',
|
72 |
'TEC\\Tickets\\Commerce\\Gateways\\Manager' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Manager.php',
|
73 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Assets' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Manual/Assets.php',
|
74 |
'TEC\\Tickets\\Commerce\\Gateways\\Manual\\Gateway' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Manual/Gateway.php',
|
96 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Events' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php',
|
97 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\Webhooks\\Handler' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php',
|
98 |
'TEC\\Tickets\\Commerce\\Gateways\\PayPal\\WhoDat' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/PayPal/WhoDat.php',
|
99 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Application_Fee' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Application_Fee.php',
|
100 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Assets' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Assets.php',
|
101 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Gateway' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Gateway.php',
|
102 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Hooks' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Hooks.php',
|
103 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Merchant' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Merchant.php',
|
104 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Payment_Intent' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Payment_Intent.php',
|
105 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Payment_Intent_Handler' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Payment_Intent_Handler.php',
|
106 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Provider.php',
|
107 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/REST.php',
|
108 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST\\Order_Endpoint' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/REST/Order_Endpoint.php',
|
109 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST\\Return_Endpoint' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/REST/Return_Endpoint.php',
|
110 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\REST\\Webhook_Endpoint' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/REST/Webhook_Endpoint.php',
|
111 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Requests' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Requests.php',
|
112 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Settings' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Settings.php',
|
113 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Signup' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Signup.php',
|
114 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Status' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Status.php',
|
115 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Stripe_Elements' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Stripe_Elements.php',
|
116 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks.php',
|
117 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Account_Webhook' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Account_Webhook.php',
|
118 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Charge_Webhook' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Charge_Webhook.php',
|
119 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Events' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Events.php',
|
120 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Handler' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Handler.php',
|
121 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\Webhooks\\Payment_Intent_Webhook' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/Webhooks/Payment_Intent_Webhook.php',
|
122 |
+
'TEC\\Tickets\\Commerce\\Gateways\\Stripe\\WhoDat' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Gateways/Stripe/WhoDat.php',
|
123 |
'TEC\\Tickets\\Commerce\\Hooks' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Hooks.php',
|
124 |
'TEC\\Tickets\\Commerce\\Legacy_Compat' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Legacy_Compat.php',
|
125 |
'TEC\\Tickets\\Commerce\\Models\\Attendee_Model' => __DIR__ . '/../..' . '/src/Tickets/Commerce/Models/Attendee_Model.php',
|
199 |
public static function getInitializer(ClassLoader $loader)
|
200 |
{
|
201 |
return \Closure::bind(function () use ($loader) {
|
202 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit3debd0547f39ea13f347720ddc69ae0a::$prefixLengthsPsr4;
|
203 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit3debd0547f39ea13f347720ddc69ae0a::$prefixDirsPsr4;
|
204 |
+
$loader->classMap = ComposerStaticInit3debd0547f39ea13f347720ddc69ae0a::$classMap;
|
205 |
|
206 |
}, null, ClassLoader::class);
|
207 |
}
|