PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.16
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.16
1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 1.9.13 All 162 releases
woocommerce-pos / includes / Payments / Gateway_Adapter_Interface.php

Gateway_Adapter_Interface.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.16, at includes/Payments/Gateway_Adapter_Interface.php

82 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * POS payment gateway adapter interface.
4 *
5 * @package WCPOS\WooCommercePOS\Payments
6 */
7
8 namespace WCPOS\WooCommercePOS\Payments;
9
10 \defined( 'ABSPATH' ) || die;
11
12 use WC_Order;
13 use WP_REST_Request;
14
15 /**
16 * Declares the POS-facing payment gateway adapter contract.
17 */
18 interface Gateway_Adapter_Interface {
19 /**
20 * Provider family identifier.
21 *
22 * @param WP_REST_Request|null $request Request object.
23 */
24 public function get_pos_provider( ?WP_REST_Request $request = null ): string;
25
26 /**
27 * POS handling type.
28 *
29 * @param WP_REST_Request|null $request Request object.
30 */
31 public function get_pos_type( ?WP_REST_Request $request = null ): string;
32
33 /**
34 * Provider-specific public metadata.
35 *
36 * @param WP_REST_Request|null $request Request object.
37 */
38 public function get_pos_provider_data( ?WP_REST_Request $request = null ): array;
39
40 /**
41 * Whether the gateway supports the POS checkout flow.
42 *
43 * @param WP_REST_Request|null $request Request object.
44 */
45 public function supports_pos_checkout( ?WP_REST_Request $request = null ): bool;
46
47 /**
48 * Whether POS may initiate automatic refunds for this gateway.
49 *
50 * @param WP_REST_Request|null $request Request object.
51 */
52 public function supports_pos_automatic_refunds( ?WP_REST_Request $request = null ): bool;
53
54 /**
55 * Whether POS may initiate provider refunds for this gateway.
56 *
57 * @param WP_REST_Request|null $request Request object.
58 */
59 public function supports_pos_provider_refunds( ?WP_REST_Request $request = null ): bool;
60
61 /**
62 * Bootstrap response for the POS app.
63 *
64 * @param array $context Bootstrap context.
65 * @param WP_REST_Request|null $request Request object.
66 */
67 public function get_pos_bootstrap_response( array $context, ?WP_REST_Request $request = null ): array;
68
69 /**
70 * Process a POS checkout action.
71 *
72 * @param array $state Checkout state.
73 * @param string $action Checkout action.
74 * @param array $payment_data Payment data.
75 * @param WC_Order $order Order object.
76 * @param WP_REST_Request|null $request Request object.
77 *
78 * @return array|\WP_Error
79 */
80 public function process_pos_checkout_action( array $state, string $action, array $payment_data, WC_Order $order, ?WP_REST_Request $request = null );
81 }
82