PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.21
Booktics – Appointment Booking Calendar for Service Businesses v1.0.21
1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 All 27 releases
booktics / core / payment / contracts / payment-method-interface.php

payment-method-interface.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.21, at core/payment/contracts/payment-method-interface.php

62 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Booktics\Payment\Contracts;
4
5 use Booktics\Models\Order_Model;
6
7 /**
8 * Interface for a payment method.
9 *
10 * A payment method is an object that encapsulates all of the data and
11 * behavior associated with a particular payment method. It must
12 * implement the methods defined by this interface.
13 *
14 * @package Booktics\Core\Payment\Contracts
15 */
16 interface Payment_Method_Interface {
17
18 /**
19 * Get the unique identifier for this payment method
20 *
21 * @return string
22 */
23 public function get_id(): string;
24
25 /**
26 * Get the display name of the payment method
27 *
28 * @return string
29 */
30 public function get_name(): string;
31
32 /**
33 * Process the payment
34 *
35 * @return \WP_Error|array Result of payment processing
36 */
37 public function process_payment( $order );
38
39 /**
40 * Validate payment data before processing
41 *
42 * @return \WP_Error|bool
43 */
44 public function validate_payment_data();
45
46 /**
47 * Get payment status
48 *
49 * @param $order
50 *
51 * @return string
52 */
53 public function get_payment_status( $order ): string;
54
55 /**
56 * Process a refund through Stripe.
57 *
58 * @param Order_Model $order The order to process refund for
59 */
60 public function process_refund( $order );
61 }
62