Monthly Archives: 十月 2016

paypal express支付名字重复的BUG

当使用paypal express后,发现shipping地址的名字lastname重复了,查下原因,是:

// PayPal doesn't provide detailed shipping name fields, so the name will be overwritten
 
然后我修改成(感觉很不保险)app/code/core/Mage/Paypal/Model/Api/Nvp.php

// PayPal doesn't provide detailed shipping name fields, so the name will be overwritten
            $shippingAddress->addData(array(
                'firstname'  => $data['SHIPTONAME'],
                'lastname'  => '',
            ));

当用户添加购物车就会在e_ sales_flat_quote_address 产生一条记录,提交地址和物流信息都会更新对应,当paypal返回时候app/code/core/Mage/Paypal/Model/Api/Nvp.php会出来返回的后续动作