Jump to content

Not Passing Grand Total to Paypal


Guest

Recommended Posts

Hi. Everything in my store seems to be working except that even though the Grand Total is calculated correctly on the checkout page, when you transfer to the Paypal site to take payment the amount shown there is only the total of the items (ie. the sub total on the checkout page excluding shipping etc.)

Is this something I've done wrong? Many Thanks all.

Link to comment
Share on other sites

Hi. I've set up a test account on the store which is the one i was testing purchases using. Shall i email you the account name? or do you mean an admin account? sorry to sound dumb. very new to cubecart :w00t:

Link to comment
Share on other sites

That line doesn't exist. The code around that area in transfer.inc.php is:

global $module, $basket, $ccUserData, $cart_order_id, $config, $GLOBALS;

	$amount = sprintf("%.2f",$basket['subTotal']+$basket['tax']);

	$hiddenVars = "<input type='hidden' name='cmd' value='_xclick' />

    <input type='hidden' name='business' value='".$module['email']."' />

    <input type='hidden' name='item_name' value='Cart Order No: ".$cart_order_id."' />

    <input type='hidden' name='item_number' value='".$cart_order_id."' />

    <input type='hidden' name='amount' value='".$amount."' />

    <input type='hidden' name='shipping' value='".$basket['shipCost']."' />

    <input type='hidden' name='invoice' value='".$cart_order_id."' />

    <input type='hidden' name='first_name' value='".$ccUserData[0]['firstName']."' />

    <input type='hidden' name='last_name' value='".$ccUserData[0]['lastName']."' />

    <input type='hidden' name='currency_code' value='".$config['defaultCurrency']."' />

    <input type='hidden' name='address1' value='".$ccUserData[0]['add_1']."' />

    <input type='hidden' name='address2' value='".$ccUserData[0]['add_2']."' />

    <input type='hidden' name='city' value='".$ccUserData[0]['town']."' />

    <input type='hidden' name='state' value='".$ccUserData[0]['county']."' />

    <input type='hidden' name='zip' value='".$ccUserData[0]['postcode']."' />

    <input type='hidden' name='day_phone_a' value='".$ccUserData[0]['phone']."' />

    <input type='hidden' name='add' value='1' />

    <input type='hidden' name='rm' value='2' />

    <input type='hidden' name='no_note' value='1' />

    <input type='hidden' name='upload' value='1' />";




I notice that at the top of that code the 




$amount = sprintf("%.2f",$basket['subTotal']+$basket['tax']);

line seems to add the subtotal and tax but not the shipping?

Link to comment
Share on other sites

Thanks for all you help I have it working now.

in /modules/gateway/PayPal/transfer.inc.php I changed this line:

$amount = sprintf("%.2f",$basket['subTotal']+$basket['tax']);




to be:




$amount = sprintf("%.2f",$basket['subTotal']+$basket['tax']+$basket['shipCost']);

Thanks again

Link to comment
Share on other sites

Guest arnaldom

I have a PayPal Pro account and when I am on step 5 (checking out). When is time to input the Credit Card Information there are just empty boxes to be filled in but with no field names. A customer can guess where the credit card # and expiration date goes and order successfully but this stills doesn't look right.

Thanks in advance if someone can help,

A. :lol:

Link to comment
Share on other sites

Thanks PaulW for the fix.

I just checked out the paypal developer forum and it seems that there is quite alot more to using the shipping charges field (including paypal settings) , so your solution is perfect for most of us.

Doing it this way, I suggest adding another field into the string:

<input type='hidden' name='no_shipping' value='1' />

This prevents people editing the shipping charges & delivery address (apparently)....however, for anyone who needs to know more about it, I suggest they go to the paypal developers forum.

Rob

Link to comment
Share on other sites

Guest digilution

I am having the same problem ;)

I changed my code to show the following:

$amount = sprintf("%.2f",$basket['subTotal']+$basket['tax']+$basket['shipCost']);

Still the same and I am getting a lot of customers very frustrated.

Going through Paypal is not adding the shipping cost!!! works OK with Nochex ;)

I am desperate, can anyone help

SORTED!!!

Go to PayPal and change these settings:

Miscellaneous - Allow transaction-based delivery settings to override profile settings (Optional).

Click here to allow transaction-based postage values to override the profile postage settings listed above (if profile settings are enabled).

:)

Link to comment
Share on other sites

  • 1 month later...

Go to PayPal and change these settings:

Miscellaneous - Allow transaction-based delivery settings to override profile settings (Optional).

Click here to allow transaction-based postage values to override the profile postage settings listed above (if profile settings are enabled).

:D

Can one 'go to Paypal and change the settings' with a Standard account? or are you referring to Paypal pro?

Leila

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...