Top

vasilissk on "[Plugin: eShop] Paypal rederecting information problem."

May 7, 2010 by  

Hello again.

Here is the script that I wrote in PHP for paypal.php file.

It fixes both phone and state issue with the new code.

The state script converts the state number to abbreviation.

This is my script:
ADD a new line after line <300> in paypal.php

$table=$wpdb->prefix.’eshop_states’;

$li=$_POST['state'];
$stateList = $wpdb->get_var(“SELECT code FROM $table WHERE id=’$li’ limit 1″);
$p->add_field(‘state’,$stateList);

$li=$_POST['ship_state'];
$stateList = $wpdb->get_var(“SELECT code FROM $table WHERE id=’$li’ limit 1″);
$p->add_field(‘ship_state’,$stateList);

$p->add_field(‘night_phone_a’, $_POST['phone']);
function add_field($name, $value) {
$_POST['$name'] = $value;
}

also it works with paypal command:
$p->add_field(‘address_override’,’1′) for extra protection.

So far so good.

Be Sociable, Share!
Share

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
Bottom