PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.11.0
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.11.0
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / includes / core / gateways / class-wpfnl-gateway-cheque.php

class-wpfnl-gateway-cheque.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.11.0, at includes/core/gateways/class-wpfnl-gateway-cheque.php

73 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace WPFunnels\Gateway;
3
4 /**
5 * @author [Getwpfunnels Team]
6 * @email [[email protected]]
7 * @create date 2022-06-09 16:28:09
8 * @modify date 2022-06-09 16:28:09
9 * @desc [Supporting Cheque payment with WPFunnels one-click offer]
10 */
11
12 class Wpfnl_Gateway_Cheque {
13
14 /**
15 * @var string
16 * @since 1.6.7
17 */
18 public $key = 'cheque';
19
20 /**
21 * @var bool
22 * @since 1.6.7
23 */
24 public $refund_support;
25
26 /**
27 * @var bool
28 * @since 1.6.7
29 */
30 private $token = false;
31
32
33 function __construct()
34 {
35 $this->token = true;
36 }
37
38
39 /**
40 * Try and get the payment token saved by the gateway
41 *
42 * @param WC_Order $order
43 *
44 * @return true
45 * @since 1.6.7
46 */
47 public function has_token( $order ) {
48
49 return $this->token;
50
51 }
52
53
54 /**
55 * Process payment for one-click offer product
56 *
57 * @param mixed $order
58 *
59 * @return array
60 * @since 1.6.7
61 */
62 public function process_payment( $order ) {
63
64 if($this->key === $order->get_payment_method() && $this->has_token($order)){
65 return array(
66 'is_success' => true,
67 'message' => 'Success'
68 );
69 }
70
71 }
72
73 }