1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 How to Collect Adresses with Account Ugrades

Discussion in 'XenForo Questions and Support' started by Mr Lucky, Aug 28, 2016.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    My Paypal account statements shows the address if somebody uses my donation button, but if they purchase an account upgrade on xenforo, the address does not seem to be captured, so does not show on the paypal statement.

    Does anyone now of a setting (presumably in paypal as I don't see one in xenforo but i could be wrong) ?

    I did ring Paypal to ask, and the lady I spoke to said she could change something on the account to do this, however nothing happened.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Check in these columns:


    If it's in there then it should be possible to extract it with some string operations in a query.
  3. Mr Lucky

    Mr Lucky Well-Known Member

    Thanks, but that isn't what I mean, sorry I am not explaining well today. It's the physical (street) address in Paypal statements I want.

    The default upgrade paypal buttons in xenforo go direct to the users paypal account, where they pay either a one-off or recurring. So no address is actually eneterd in xenforo.

    However with a normal Paypal button that you can embed, or with a normal shopping cart checkout (e.g. Woocommerce), the person's address appears on your Paypal statement.

    But wth the xenforo button this does not happen.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I think you want this:


    (search for "no_shipping")

    You will find this form field in this template:

    Admin CP -> Appearance -> Templates -> account_upgrades

    Change the value to 2 (highlighted in red):

    					<form action="{$payPalUrl}" method="post" class="upgradeForm">
    						<div class="cost">{$upgrade.costPhrase}</div>
    						<xen:if is="{$upgrade.length_unit} AND {$upgrade.recurring}">
    							<input type="hidden" name="cmd" value="_xclick-subscriptions" />
    							<input type="hidden" name="a3" value="{$upgrade.cost_amount}" />
    							<input type="hidden" name="p3" value="{$upgrade.length_amount}" />
    							<input type="hidden" name="t3" value="{$upgrade.lengthUnitPP}" />
    							<input type="hidden" name="src" value="1" />
    							<input type="hidden" name="sra" value="1" />
    							<input type="submit" value="{xen:phrase subscribe}" class="button" />
    						<xen:else />
    							<input type="hidden" name="cmd" value="_xclick" />
    							<input type="hidden" name="amount" value="{$upgrade.cost_amount}" />
    							<input type="submit" value="{xen:phrase purchase}" class="button" />
    						<input type="hidden" name="business" value="{$xenOptions.payPalPrimaryAccount}" />
    						<input type="hidden" name="currency_code" value="{$upgrade.currency}" />
    						<input type="hidden" name="item_name" value="{xen:phrase account_upgrade}: {$upgrade.title} ({$visitor.username})" />
    						<input type="hidden" name="quantity" value="1" />
    						<input type="hidden" name="no_note" value="1" />
    						<input type="hidden" name="no_shipping" value="1" />
    						<input type="hidden" name="custom" value="{$visitor.user_id},{$upgrade.user_upgrade_id},token,{$visitor.csrf_token_page}" />
    						<input type="hidden" name="charset" value="utf-8" />
    						<input type="hidden" name="email" value="{$visitor.email}" />
    						<input type="hidden" name="return" value="{xen:link 'full:account/upgrade-purchase'}" />
    						<input type="hidden" name="cancel_return" value="{xen:link 'full:index'}" />
    						<input type="hidden" name="notify_url" value="{$xenOptions.boardUrl}/payment_callback.php" />
    That may have the desired result for future purchases (not tested).

    For old purchases you may have to go through Paypal.
    Mr Lucky likes this.

Share This Page