Skip to content
Permalink
Browse files

Merge pull request #1230 from angelleye/PFW-293

PayFlow - Address Verification Order Notes Adjustment, PFW-293
  • Loading branch information...
angelleye committed Nov 3, 2018
2 parents fcfd4b1 + 89ca43e commit 0a078800f988d5fd547c4852c538ed773bd517e4
Showing with 19 additions and 4 deletions.
  1. +18 −4 classes/wc-gateway-paypal-pro-payflow-angelleye.php
  2. +1 −0 readme.txt
@@ -1425,11 +1425,25 @@ public function process_subscription_payment($order, $amount, $payment_token = n
*/
$avs_address_response_code = isset($PayPalResult['AVSADDR']) ? $PayPalResult['AVSADDR'] : '';
$avs_zip_response_code = isset($PayPalResult['AVSZIP']) ? $PayPalResult['AVSZIP'] : '';
$proc_avs_response_code = isset($PayPalResult['PROCAVS']) ? $PayPalResult['PROCAVS'] : '';
$avs_response_order_note = __('Address Verification Result', 'paypal-for-woocommerce');
$avs_response_order_note .= "\n";
$avs_response_order_note .= sprintf(__('Address Match: %s', 'paypal-for-woocommerce'), $avs_address_response_code);
$avs_response_order_note .= "\n";
$avs_response_order_note .= sprintf(__('Postal Match: %s', 'paypal-for-woocommerce'), $avs_zip_response_code);
$avs_response_order_note .= '<ul class="angelleye_avs_result">';
$avs_response_order_note .= '<li>' . sprintf(__('AVS: %s', 'paypal-for-woocommerce'), $proc_avs_response_code) . '</li>';
$avs_response_order_note .= '<ul class="angelleye_avs_result_inner">';
$avs_response_order_note .= '<li>' . sprintf(__('Address Match: %s', 'paypal-for-woocommerce'), $avs_address_response_code) . '</li>';
$avs_response_order_note .= '<li>' . sprintf(__('Postal Match: %s', 'paypal-for-woocommerce'), $avs_zip_response_code) . '</li>';
$avs_response_order_note .= "<ul>";
$avs_response_order_note .= '</ul>';
$old_wc = version_compare(WC_VERSION, '3.0', '<');
if ($old_wc) {
update_post_meta($order_id, '_AVSADDR', $avs_address_response_code);
update_post_meta($order_id, '_AVSZIP', $avs_zip_response_code);
update_post_meta($order_id, '_PROCAVS', $avs_zip_response_code);
} else {
update_post_meta($order->get_id(), '_AVSADDR', $avs_address_response_code);
update_post_meta($order->get_id(), '_AVSZIP', $avs_zip_response_code);
update_post_meta($order->get_id(), '_PROCAVS', $avs_zip_response_code);
}
$order->add_order_note($avs_response_order_note);
/**
* Add order notes for CVV2 result
@@ -136,6 +136,7 @@ Automatic updates should work great for you. As always, though, we recommend ba
* Feature - PayFlow - Adds product-level option for Authorization or Sale. ([PFW-273](https://github.com/angelleye/paypal-woocommerce/pull/1223))([PFW-290](https://github.com/angelleye/paypal-woocommerce/pull/1231))
* Feature - PayFlow - Adds additional data for Address Verification to Woo order notes. ([PFW-276](https://github.com/angelleye/paypal-woocommerce/pull/1221))
* Tweak - REST CC - Adjustments to error display on failed payments. ([PFW-284](https://github.com/angelleye/paypal-woocommerce/pull/1225))
* Tweak - PayFlow - Formatting adjustment for auth/capture AVS notes. ([PFW-293](https://github.com/angelleye/paypal-woocommerce/pull/1230))
* Tweak - CSS tweaks to resolve mobile checkout form field issues. ([PWF-268](https://github.com/angelleye/paypal-woocommerce/pull/1227))
* Tweak - Adjusts tool-tip related to Authorization and Capture functionality. ([PFW-291](https://github.com/angelleye/paypal-woocommerce/pull/1232))
* Fix - Express Checkout - Resolves a conflict with some themes where PayPal Smart Buttons would get cut off. ([PFW-266](https://github.com/angelleye/paypal-woocommerce/pull/1228))

0 comments on commit 0a07880

Please sign in to comment.
You can’t perform that action at this time.