Jump to content

Modify Paypal USA module (1.3.9) to not send shipping information to Paypal


Recommended Posts

Hi

 

Can the Paypal USA  module v1.3.9 script be modified to not send shipping (most importantly country) information to Paypal? There have been several suggestions I have seen online with editing the module but they do not seem to apply to 1.3.9 (either the arrays or variables suggested don't exist e.g $fields['ADDROVERRIDE']).

 

I had found this section of script in paypalusa.php that appeared to be where the modification could be made but haven't been successful.

$billing_address = new Address((int)$this->context->cart->id_address_invoice);
			$billing_address->country = new Country((int)$billing_address->id_country);
			$billing_address->state = new State((int)$billing_address->id_state);

			$this->context->smarty->assign(array(
				'paypal_usa_action' => 'https://www'.(Configuration::get('PAYPAL_USA_SANDBOX') ? '.sandbox' : '').'.paypal.com/cgi-bin/webscr',
				'paypal_usa_customer' => $this->context->customer,
				'paypal_usa_business_account' => Configuration::get('PAYPAL_USA_ACCOUNT'),
				'paypal_usa_billing_address' => $billing_address,
				'paypal_usa_total_tax' => (float)$this->context->cart->getOrderTotal(true) - (float)$this->context->cart->getOrderTotal(false),
				'paypal_usa_cancel_url' => $this->context->link->getPageLink('order.php',''),
				'paypal_usa_notify_url' => $this->getModuleLink('paypalusa', 'validation', array('pps' => 1), Configuration::get('PS_SSL_ENABLED')),
				'paypal_usa_return_url' => /*26/12/2013 fix for Backward compatibilies on confirmation page*/
					version_compare(_PS_VERSION_, '1.5', '<') ?
					(Configuration::get('PS_SSL_ENABLED') ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)).
					__PS_BASE_URI__.'order-confirmation.php?id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->id.'&key='.$this->context->customer->secure_key :
					$this->context->link->getPageLink('order-confirmation.php', null, null, array('id_cart' => (int)$this->context->cart->id, 'key' => $this->context->customer->secure_key, 'id_module' => $this->id)),

				));

All suggestions are appreciated.

Edited by darth_D (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...