The following is based on using v1.3.8a version of /includes/modules/payment/paypal.php.
I've not checked PayPal's site for any documentation explaining the need which you describe. Thus, the following is based solely on your list of requirements:
Locate this section, around line 216:$optionsCust = array( 'first_name' => replace_accents($order->customer['firstname']), 'last_name' => replace_accents($order->customer['lastname']), 'address1' => replace_accents($order->customer['street_address']), 'city' => replace_accents($order->customer['city']), 'state' => zen_get_zone_code($order->customer['country']['id'], $order->customer['zone_id'], $order->customer['zone_id']), 'zip' => $order->customer['postcode'], 'country' => $order->customer['country']['iso_code_2'], 'email' => $order->customer['email_address'], ); if ($order->customer['suburb'] != '') $optionsCust['address2'] = $order->customer['suburb'];add this immediately after the above code:```
if ($order->customer['country']['iso_code_2'] == 'JP') {
$optionsCust['zip'] = substr($order->customer['postcode'], 0, 3);
$optionsCust['zip2'] = substr($order->customer['postcode'], 3);
}
This will take the zip/postal code that the customer used during account creation, and split it up into two separate pieces (zip = first 3 digits, zip2 = remaining digits) to send to PayPal.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.