Having some issues with opencart 1.5.5.1 and paypal standard. I'm using Paypal.com.au (In Australia) When I started there was no telephone and no state being passed from opencart to paypal. The rest of the fields (address, email, name) were all pre-populated. So I went in to the paypayl standard code and added this to the controller:
$this->data['night_phone_b'] = html_entity_decode($order_info['telephone'], ENT_QUOTES, 'UTF-8');
and this to the tpl file:
<input type="hidden" name="night_phone_b" value="<?php echo $night_phone_b; ?>" />
That worked for the phone, however, no matter what I try for the state, I can't get it to work. I looked at doing something like this:
$this->data['state'] = html_entity_decode($order_info['payment_zone_code'], ENT_QUOTES, 'UTF-8');
and the same as above but replacing ['payment_zone_code']
with ['payment_zone_id']
and ['zone_id']
and in the tpl file:
<input type="hidden" name="state" value="<?php echo $state; ?>" />
Anyway, I am stumped on getting the state passed over to paypal.
EDIT Checked here at paypal's Australian site: https://www.paypal.com/au/cgi-bin/webscr?cmd=_pdn_xclick_prepopulate_outside They don't offer any help on the issue either, all examples are for US states: "State (Must be 2 character official abbreviation)" with no help on 3 character abbreviations. Still waiting for a reply from them also