· 6 years ago · Sep 20, 2019, 12:46 PM
11) File name : cartflows-pro\classes\class-cartflows-pro-frontend.php
2 Line Number : 377
3 Details : Ignore Gateways checkout processed for upsell
4 old code : if ( 'ppec_paypal' === $order_gateway ) {
5 New code : if ( 'ppec_paypal' === $order_gateway || 'paypal_express' === $order_gateway) {
6
7
8=> No Need to do this.
9
10
112) File name : cartflows-pro\classes\class-cartflows-pro-gateways.php
12 Line number : 50
13 Details : Add new action for Angelleye Express checkout token
14
15 add_action( 'wp_ajax_nopriv_cartflows_front_create_paypal_express_angelleye_checkout_token', array( $this, 'generate_angelleye_express_checkout_token' ), 10 );
16 ad_action( 'wp_ajax_cartflows_front_create_paypal_express_angelleye_checkout_token', array( $this, 'generate_angelleye_express_checkout_token' ), 10 );
17
18=> Action: `cartflows_add_offer_payment_gateway_actions`
19
20
213) File name : cartflows-pro\classes\class-cartflows-pro-gateways.php
22 Line number : 62
23 Details : Add new action/filter for Handles angelleye paypal_express API call.
24
25 /**
26 * Angelleye Paypal Express API calls response and process billing agreement creation
27 */
28 add_action( 'woocommerce_api_cartflows_paypal_express', array( $this, 'maybe_handle_paypal_express_api_call' ) );
29
30 /**
31 * Angelleye Disable Skip Final Review
32 */
33 add_filter( 'angelleye_ec_force_to_display_checkout_page', array($this, 'angelleye_express_checkout_cartflow'));
34 add_filter( 'angelleye_paypal_payflow_allow_default_order_status', '__return_false');
35
36=> Action: `cartflows_add_offer_payment_gateway_actions`
37
38
394) File name : cartflows-pro\classes\class-cartflows-pro-gateways.php
40 Line number : 144
41 Details : Add new function for Generates angelleye express checkout token.
42
43 /**
44 * Generates angelleye express checkout token
45 */
46 function generate_angelleye_express_checkout_token() {
47 $this->load_gateway( 'paypal_express' )->generate_express_checkout_token();
48 }
49
50=> Add through cartflows_add_offer_payment_gateway_actions action.
51
52
535) File name : cartflows-pro\classes\class-cartflows-pro-gateways.php
54 Line number : 175
55 Details : modify existing array in get_supported_gateways function for Gateways Supported.
56
57 'paypal_express' => array(
58 'file' => 'paypal-express-angelleye.php',
59 'class' => 'Cartflows_Pro_Gateway_Paypal_Express_Angelleye',
60 ),
61 'paypal_pro' => array(
62 'file' => 'paypal-pro-angelleye.php',
63 'class' => 'Cartflows_Pro_Gateway_PayPal_Pro_AngellEYE',
64 ),
65 'paypal_pro_payflow' => array(
66 'file' => 'paypal-pro-payflow-angelleye.php',
67 'class' => 'Cartflows_Pro_Gateway_PayPal_Pro_PayFlow_AngellEYE',
68 ),
69 'braintree' => array(
70 'file' => 'braintree-angelleye.php',
71 'class' => 'Cartflows_Pro_Gateway_Braintree_AngellEYE',
72 )
73
74=> Filter: cartflows_offer_supported_payment_gateways, add `path` key and value
75
76ex.
77'paypal_pro_payflow' => array(
78 'file' => 'paypal-pro-payflow-angelleye.php',
79 'class' => 'Cartflows_Pro_Gateway_PayPal_Pro_PayFlow_AngellEYE',
80 'path' => '{plugin_dir_path}paypal-pro-payflow-angelleye.php'
81 )
82
836) File name : cartflows-pro\classes\class-cartflows-pro-gateways.php
84 Line number : 217
85 Details : Add new function for Handles angelleye paypal_express API call.
86
87 /**
88 * Handles angelleye paypal_express API call
89 */
90 function maybe_handle_paypal_express_api_call() {
91 $this->load_gateway( 'paypal_express' )->create_billing_agreement();
92 $this->load_gateway( 'paypal_express' )->process_api_calls();
93 }
94
95=> Add through cartflows_add_offer_payment_gateway_actions action.
96
977) File name : cartflows-pro\classes\class-cartflows-pro-gateways.php
98 Line number : 217
99 Details : Add new function for Handles angelleye Display checkout page or not.
100
101 function angelleye_express_checkout_cartflow($bool) {
102 $post_data = WC()->session->get('post_data');
103 if(!empty($post_data)) {
104 if( !empty($post_data['_wcf_flow_id'] ) ) {
105 $order_bump = get_post_meta( $post_data['_wcf_checkout_id'], 'wcf-pre-checkout-offer', true );
106 if ( 'yes' == $order_bump ) {
107 return true;
108 } else {
109 return false;
110 }
111
112 }
113 }
114 return $bool;
115 }
116
117
1188) Add new php file : cartflows-pro\modules\gateways\class-cartflows-pro-gateway-braintree-angelleye.php
1199) Add new php file : cartflows-pro\modules\gateways\class-cartflows-pro-gateway-paypal-express-angelleye.php
12010) Add new php file : cartflows-pro\modules\gateways\class-cartflows-pro-gateway-paypal-pro-angelleye.php
12111) Add new php file : cartflows-pro\modules\gateways\class-cartflows-pro-gateway-paypal-pro-payflow-angelleye.php
122
12312) File name : cartflows-pro\modules\offer\classes\class-cartflows-pro-base-offer-markup.php
124 Line Number : 92
125 Details : Offer script, skip offer when reference transaction disable, same as PayPal and express.
126 old code : if ( ( 'paypal' === $payment_method || 'ppec_paypal' === $payment_method ) && ! wcf_pro()->utils->is_reference_transaction() && ! wcf_pro()->utils->is_zero_value_offered_product() ) {
127 New code : if ( ( 'paypal' === $payment_method || 'ppec_paypal' === $payment_method || 'paypal_express' === $payment_method) && ! wcf_pro()->utils->is_reference_transaction() && ! wcf_pro()->utils->is_zero_value_offered_product() ) {
128=> filter: cartflows_skip_offer_default_gateway : If you do not want default function to be called. You can use your logic to charge a payment for upsell/downsell.
129
13013) File name : cartflows-pro\modules\offer\classes\class-cartflows-pro-base-offer-shortcodes.php
131 Line Number : 105
132 Details : add angelleye paypal_express compatibility for Offer shortcode markup same as PayPal and express.
133 old code : if ( ( 'paypal' === $payment_method || 'ppec_paypal' === $payment_method ) && ! wcf_pro()->utils->is_reference_transaction() ) {
134 New code : if ( ( 'paypal' === $payment_method || 'ppec_paypal' === $payment_method || 'paypal_express' === $payment_method) && ! wcf_pro()->utils->is_reference_transaction() ) {
135
136=> No need to do this.
137
13814) File name : cartflows-pro\modules\offer\classes\class-cartflows-pro-base-offer-shortcodes.php
139 Line Number : 219
140 Details : Offer shortcode markup, add angelleye paypal_express compatibility for Offer shortcode markup same as PayPal and express.
141 old code : if ( ( 'paypal' === $payment_method || 'ppec_paypal' === $payment_method ) && ! wcf_pro()->utils->is_reference_transaction() ) {
142 New code : if ( ( 'paypal' === $payment_method || 'ppec_paypal' === $payment_method || 'paypal_express' === $payment_method ) && ! wcf_pro()->utils->is_reference_transaction() ) {
143
144=> No need to do this.