Adding Chapter info to PayPal receipt
Posted:
December 30th, 2011, 2:30 pm
by dskallman
Hi,
I have a quick question about adding information from s2Member form to appear on PayPal history and receipt. I want to use this form:
http://mnjaycees.org/create-profile/ and the dropdown half way down where they say Chapter, I want that info sent to PayPal as well. Is it possible, if so how?
Thanks!
Dana
Re: Adding Chapter info to PayPal receipt
Posted:
December 31st, 2011, 8:32 am
by Jason Caldwell
Hi Dana, hope you're having a great New Year's eve!
Sent to PayPal...
Can you explain just a bit further for me please?
Where exactly do you need the information to appear @PayPal?
Re: Adding Chapter info to PayPal receipt
Posted:
December 31st, 2011, 11:27 am
by dskallman
Of course, thank you Jason.
I want the drop-down Chapter selected to be sent on receipt from PayPal and logged on PayPal record for accounting verification needs. So when I log into PayPal after someone paid, I'll be able to see what chapter they are paying for. Does that make sense?
I hope you are enjoying the holidays & Happy New Year!!!
Re: Adding Chapter info to PayPal receipt
Posted:
January 2nd, 2012, 9:31 pm
by Jason Caldwell
Hi Dana. Thanks for the follow-up.You too! I'm looking forward to a great 2012.I would suggest using the Product Description field for this. You can update the value of the description dynamically, during the checkout process; updating it with the Chapter field value in your Pro Form.
Create this directory and file:/wp-content/mu-plugins/s2-hacks.php( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )Replace "
my_chapter_field_id", with the Unique ID you've given your Chapter field w/ s2Member.
- Code: Select all
<?php
add_filter("ws_plugin__s2member_pro_paypal_checkout_post_attr", "s2_pro_custom_paypal_description_attr");
function s2_pro_custom_paypal_description_attr($attr = array(), $vars = array())
{
$custom_fields = $vars["post_vars"]["custom_fields"];
$attr["desc"] = $attr["desc"]." (Chapter: ".(string)$custom_fields["my_chapter_field_id"].")";
return $attr;
}
?>