Skip to content
Permalink
Browse files

Merge pull request #1221 from angelleye/PFW-276

PayFlow Address Verification Adjustment, PFW-276
  • Loading branch information...
angelleye committed Oct 24, 2018
2 parents 9511e63 + 28f96f9 commit f8cf2aa26d47b29b64dc3a35bd92e4cf364ff010
Showing with 20 additions and 6 deletions.
  1. +10 −0 assets/css/admin.css
  2. +10 −6 classes/wc-gateway-paypal-pro-payflow-angelleye.php
@@ -320,6 +320,16 @@ label[for=woocommerce_paypal_express_paypal_marketing_solutions_enabled] {
margin: 3px 0px !important;
padding: 0px;
}
.angelleye_avs_result li {
list-style-type: square;
padding: 0px 3px !important;
margin: 10px 0px 4px 13px;
}
.angelleye_avs_result_inner li {
list-style-type: square;
margin-left: 31px;
margin-bottom: 4px;
}
@media only all and (max-width: 1200px) {
.angelleye-notice-dismiss {
display: block;
@@ -705,20 +705,24 @@ function do_payment($order, $card_number, $card_exp, $card_csc) {
*/
$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);

0 comments on commit f8cf2aa

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