Skip to content

Commit

Permalink
Payflow admin order note showing PayPal Pro payment rather PayPal Pay…
Browse files Browse the repository at this point in the history
…flow Pro payment completed, ref #994
  • Loading branch information
kcppdevelopers committed Feb 7, 2018
1 parent 31dda10 commit da68261
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions classes/wc-gateway-paypal-pro-payflow-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,9 @@ function do_payment($order, $card_number, $card_exp, $card_csc) {
if (isset($PayPalResult['PPREF']) && !empty($PayPalResult['PPREF'])) {

add_post_meta($order_id, 'PPREF', $PayPalResult['PPREF']);
$order->add_order_note(sprintf(__('PayPal Pro payment completed (PNREF: %s) (PPREF: %s)', 'paypal-for-woocommerce'), $PayPalResult['PNREF'], $PayPalResult['PPREF']));
$order->add_order_note(sprintf(__('PayPal Pro Payflow payment completed (PNREF: %s) (PPREF: %s)', 'paypal-for-woocommerce'), $PayPalResult['PNREF'], $PayPalResult['PPREF']));
} else {
$order->add_order_note(sprintf(__('PayPal Pro payment completed (PNREF: %s)', 'paypal-for-woocommerce'), $PayPalResult['PNREF']));
$order->add_order_note(sprintf(__('PayPal Pro Payflow payment completed (PNREF: %s)', 'paypal-for-woocommerce'), $PayPalResult['PNREF']));
}
/* Checkout Note */
if (isset($_POST) && !empty($_POST['order_comments'])) {
Expand Down Expand Up @@ -839,7 +839,7 @@ function do_payment($order, $card_number, $card_exp, $card_csc) {
'redirect' => $this->get_return_url($order)
);
} else {
$order->update_status('failed', __('PayPal Pro payment failed. Payment was rejected due to an error: ', 'paypal-for-woocommerce') . '(' . $PayPalResult['RESULT'] . ') ' . '"' . $PayPalResult['RESPMSG'] . '"');
$order->update_status('failed', __('PayPal Pro Payflow payment failed. Payment was rejected due to an error: ', 'paypal-for-woocommerce') . '(' . $PayPalResult['RESULT'] . ') ' . '"' . $PayPalResult['RESPMSG'] . '"');

// Generate error message based on Error Display Type setting
if ($this->error_display_type == 'detailed') {
Expand All @@ -862,7 +862,7 @@ function do_payment($order, $card_number, $card_exp, $card_csc) {
$message .= __('Customer Name: ') . $firstname . ' ' . $lastname . "\n";
$message .= __('Customer Email: ') . $billing_email . "\n";
$message = apply_filters('ae_pppf_error_email_message', $message);
$subject = apply_filters('ae_pppf_error_email_subject', "PayPal Pro Error Notification");
$subject = apply_filters('ae_pppf_error_email_subject', "PayPal Pro Payflow Error Notification");
wp_mail($admin_email, $subject, $message);
}

Expand Down Expand Up @@ -1477,7 +1477,7 @@ public function process_subscription_payment($order, $amount, $payment_token = n
return true;
}
} else {
$order->update_status('failed', __('PayPal Pro payment failed. Payment was rejected due to an error: ', 'paypal-for-woocommerce') . '(' . $PayPalResult['RESULT'] . ') ' . '"' . $PayPalResult['RESPMSG'] . '"');
$order->update_status('failed', __('PayPal Pro Payflow payment failed. Payment was rejected due to an error: ', 'paypal-for-woocommerce') . '(' . $PayPalResult['RESULT'] . ') ' . '"' . $PayPalResult['RESPMSG'] . '"');
if ($this->error_email_notify) {
$admin_email = get_option("admin_email");
$message = __("PayFlow API call failed.", "paypal-for-woocommerce") . "\n\n";
Expand All @@ -1489,7 +1489,7 @@ public function process_subscription_payment($order, $amount, $payment_token = n
$message .= __('Customer Name: ') . $firstname . ' ' . $lastname . "\n";
$message .= __('Customer Email: ') . $billing_email . "\n";
$message = apply_filters('ae_pppf_error_email_message', $message);
$subject = apply_filters('ae_pppf_error_email_subject', "PayPal Pro Error Notification");
$subject = apply_filters('ae_pppf_error_email_subject', "PayPal Pro Payflow Error Notification");
wp_mail($admin_email, $subject, $message);
}
return;
Expand Down

0 comments on commit da68261

Please sign in to comment.