Skip to content

Commit

Permalink
Merge pull request #1132 from angelleye/PFW-127
Browse files Browse the repository at this point in the history
PayPal BN Code Updates, PFW-127
  • Loading branch information
Andrew Angell committed Jun 19, 2018
2 parents b94a6d7 + 0c60de3 commit a06603a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions angelleye-includes/angelleye-utility.php
Expand Up @@ -136,6 +136,11 @@ public function load_dependencies() {

add_action('woocommerce_process_shop_order_meta', array($this, 'save'), 50, 2);
add_action('woocommerce_admin_order_data_after_shipping_address', array($this, 'angelleye_paypal_for_woocommerce_billing_agreement_details'), 10, 1);
add_filter('woocommerce_paypal_express_checkout_request_body', array($this, 'angelleye_paypal_express_checkout_request_body'), 999, 1);
add_filter('wc_braintree_transaction_data', array($this, 'angelleye_braintree_transaction_data'), 999, 1);
add_filter('woocommerce-gateway-paypal-pro_request', array($this, 'angelleye_gateway_paypal_pro_request'), 999, 1);
add_filter('woocommerce_gateway_paypal_pro_payflow_post_data', array($this, 'angelleye_gateway_paypal_pro_payflow_post_data'), 999, 1);

}

public function angelleye_woocommerce_order_actions($order_actions = array()) {
Expand Down Expand Up @@ -2044,4 +2049,32 @@ public static function angelleye_ec_get_wpml_locale() {
}
return $locale;
}

public function angelleye_paypal_express_checkout_request_body($param) {
if( !empty($param['BUTTONSOURCE'] ) ) {
$param['BUTTONSOURCE'] = 'AngellEYE_SP_WooCommerce';
}
return $param;
}

public function angelleye_braintree_transaction_data($param){
if( !empty($param['channel'] ) ) {
$param['channel'] = 'AngellEYEPayPalforWoo_BT';
}
return $param;
}

public function angelleye_gateway_paypal_pro_request($param) {
if( !empty($param['BUTTONSOURCE'] ) ) {
$param['BUTTONSOURCE'] = 'AngellEYE_SP_WooCommerce';
}
return $param;
}

public function angelleye_gateway_paypal_pro_payflow_post_data($param) {
if( !empty($param['BUTTONSOURCE'] ) ) {
$param['BUTTONSOURCE'] = 'AngellEYE_SP_WooCommerce';
}
return $param;
}
}

0 comments on commit a06603a

Please sign in to comment.