I know it's a bit late, but the area within paypalwpp.php that you'll want to modify is the function ec_step2, which is called after the customer has entered his/her information on PayPal and come back to your site to verify/confirm the order. You could start by making a small change to force the payment module's debug logs when the delivery and billing addresses don't match:
Code:
/**
* Debug Logging support
*/
function zcLog($stage, $message) {
global $order;
static $tokenHash;
if ($tokenHash == '') $tokenHash = '_' . zen_create_random_value(4);
$force_debug = (isset($order) && isset($order->billing) && isset($order->delivery) && sizeof (array_diff_assoc ($order->billing, $order->delivery)) > 0);
if (MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log and Email' || MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log File' || $force_debug) {
$token = (isset($_SESSION['paypal_ec_token'])) ? $_SESSION['paypal_ec_token'] : preg_replace('/[^0-9.A-Z\-]/', '', $_GET['token']);
$token = ($token == '') ? date('m-d-Y-H-i') : $token; // or time()
$token .= $tokenHash;
$file = $this->_logDir . '/' . $this->code . '_Paypal_Action_' . $token . '.log';
if (defined('PAYPAL_DEV_MODE') && PAYPAL_DEV_MODE == 'true') $file = $this->_logDir . '/' . $this->code . '_Paypal_Debug_' . $token . '.log';
$fp = @fopen($file, 'a');
@fwrite($fp, date('M-d-Y H:i:s') . ' (' . time() . ')' . "\n" . $stage . "\n" . $message . "\n=================================\n\n");
@fclose($fp);
}
$this->_doDebug($stage, $message, false);
}
/**
Bookmarks