PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?php
add_filter('ws_plugin__s2member_sc_paypal_button', 'add_lang_to_button');
function add_lang_to_button($button) {
$button = str_replace('</form>', '<input type="hidden" name="lc" value="US" /> <input type="hidden" name="country" value="US" /> </form>', $button);
return $button;
}
?>
$paypal["METHOD"] = "SetExpressCheckout";
$paypal["LOCALECODE"] = "US"; /* Or whatever you need. */
$paypal["METHOD"] = "SetExpressCheckout";
....Changing the Locale
You can change the locale of PayPal pages to match the language on your website.
To change the language displayed on the PayPal pages, set the LOCALECODE parameter to one of the following allowable values in the SetExpressCheckout call:
...
ES - Spain
GB - United Kingdom
...
US - United States
The following example sets LOCALCODE to ES (Spain).
Request Parameters
[requiredSecurityParameters]
&METHOD=SetExpressCheckout
&RETURNURL=https://...
&CANCELURL=https://...
&PAYMENTREQUEST_0_AMT=10.00
&PAYMENTREQUEST_0_CURRENCYCODE=EUR
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&LOCALECODE=ES
Response Parameters
[successResponseFields]
&TOKEN=EC-17C76533PL706494P
The following figure shows the PayPal Login page when the LOCALECODE is set to ES.....
####here´s the button snippet####
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="myemail@domain.com" />
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://www.mydomain.com/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://www.mydomain.com/" />
<input type="hidden" name="return" value="http://www.mydomain.com/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures All Of The Checkout Fields -->
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="www.mydomain.com" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="item_name" value="mydescription" />
<input type="hidden" name="item_number" value="1" />
<!-- Identifies/Updates An Existing Member After Checkout -->
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<input type="hidden" name="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<!--<input type="hidden" name="amount" value="39.00" />-->
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="a1" value="59.70" />
<input type="hidden" name="p1" value="1" />
<input type="hidden" name="t1" value="M" />
<input type="hidden" name="a3" value="39.00" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="M" />
<!-- Displays The PayPal® Image Button -->
<input type="image" src="http://www.mydomain.com/myownimage.png" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>
###snippet-end####
<input type="hidden" name="LOCALECODE" value="GB" />
Users browsing this forum: Google [Bot] and 1 guest