Changeset - 9a4c92352d9a
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 7 years ago 2015-01-03 18:14:17
bkuhn@ebb.org
Use only on0/os0/on1/os1 options with PayPal.

According to these URLs:
https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/options-help-outside
https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

only two Options are supported via PayPal. I was fooled initially
because other fields *did* come through and *did* show up on the web
interface, but they are *not* accessible via the SOAP interface.

Therefore, I've switched to using the hack described here:
https://ppmts.custhelp.com/app/answers/detail/a_id/298/kw/soap%20gettransactiondetails%20option

to get 4 fields of data for Supporter transactions.
2 files changed with 36 insertions and 44 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -40,12 +40,12 @@ $(document).ready(function() {
 
        $control.find('.toggle-content').slideDown("slow");
 
    });
 
    $(".t-shirt-size-selector").hide();
 
    $('input[name=os1]:radio').change(function() {
 
    $('input[name=on0]:radio').change(function() {
 
        var input=$(this);
 
        var tShirtSelector = input.parent().children('.t-shirt-size-selector')
 
        var noShippingSelector = input.parent().children('input#no_shipping');
 
        var value = input.val();
 
        if (value == "Yes") {
 
        if (value == "wantGiftYes") {
 
            tShirtSelector.show();
 
            noShippingSelector.val("2");
 
        } else {
www/conservancy/static/supporter/index.html
Show inline comments
...
 
@@ -155,35 +155,31 @@ internal policies</a> are published and available for scrutiny.</p>
 
  Supporters.  <a href="/donate">Donate smaller amounts here</a>.</span><br/>
 

	
 
                      <label for="wantGift"><strong>Do you want to receive a t-shirt? </strong></label>
 
                      <input type="hidden" name="on1" value="wantGift" />
 
                      <input type="radio" name="os1" value="Yes" />Yes
 
                      <input type="radio" checked="checked" name="os1" value="No" />No
 
                      <input type="radio" name="on0" value="wantGiftYes" />Yes
 
                      <input type="radio" checked="checked" name="on0" value="wantGiftNo" />No
 
                      <br />
 
                      <span class="t-shirt-size-selector">
 
                      <label for="wantGift"><strong>T-shirt size: </strong></label>
 
                      <input type="hidden" name="on3" value="size"/>
 
                      <select name="os3" id="os3">
 
                        <option name="os3" id="os3" value="MenS">Men's S</option>
 
                        <option name="os3" id="os3" value="MenM">Men's M</option>
 
                        <option name="os3" id="os3" value="MenL">Men's L</option>
 
                        <option name="os3" id="os3" value="MenXL">Men's XL</option>
 
                        <option name="os3" id="os3" value="Men2XL">Men's 2XL</option>
 
                        <option name="os3" id="os3" value="LadiesS">Ladies' S</option>
 
                        <option name="os3" id="os3" value="LadiesM">Ladies' M</option>
 
                        <option name="os3" id="os3" value="LadiesL">Ladies' L</option>
 
                         <option name="os3" id="os3" value="LadiesXL">Ladies' XL</option>
 
                      <label for="tShirtSize"><strong>T-shirt size: </strong></label>
 
                      <select name="os0" id="os0">
 
                        <option name="os0" id="os0" value="MenS">Men's S</option>
 
                        <option name="os0" id="os0" value="MenM">Men's M</option>
 
                        <option name="os0" id="os0" value="MenL">Men's L</option>
 
                        <option name="os0" id="os0" value="MenXL">Men's XL</option>
 
                        <option name="os0" id="os0" value="Men2XL">Men's 2XL</option>
 
                        <option name="os0" id="os0" value="LadiesS">Ladies' S</option>
 
                        <option name="os0" id="os0" value="LadiesM">Ladies' M</option>
 
                        <option name="os0" id="os0" value="LadiesL">Ladies' L</option>
 
                         <option name="os0" id="os0" value="LadiesXL">Ladies' XL</option>
 
                      </select><br/></span>
 
                      <label for="publicAck"><strong>
 
                          Should we <a href="/sponsors#supporters">list you publicly</a> as a Conservancy Supporter? </strong></label>
 
                      <input type="hidden" name="on2" value="publicAck" />
 
                      <input type="radio" checked="checked" name="os2" value="Yes" />Yes
 
                      <input type="radio" name="os2" value="No" />No<br/>
 
                      <input type="radio" checked="checked" name="on1" value="publicAckYes" />Yes
 
                      <input type="radio" name="on1" value="publicAckNo" />No<br/>
 
            
 
                      <label for="joinList"><strong>Join Conservancy's
 
                      Low-Traffic Announcement Email List? </strong></label>
 
                      <input type="hidden" name="on4" value="joinList" />
 
                      <input type="radio" checked="checked" name="os4" value="Yes" />Yes
 
                      <input type="radio" name="os4" value="No" />No<br>
 
                      <input type="radio" checked="checked" name="os1" value="joinListYes" />Yes
 
                      <input type="radio" name="os1" value="joinListNo" />No<br>
 
                      <br /></div>
 
                      <div id="annual" class="supporter-form-submit">
 
                      <input type="image"
...
 
@@ -221,34 +217,30 @@ internal policies</a> are published and available for scrutiny.</p>
 
  <span id="error" class="form-error-show">$10/month is a minimum for Conservancy
 
  Supporters.  <a href="/donate">Donate smaller amounts here</a>.</span><br/>
 
                      <label for="wantGift"><strong>Do you want to receive a t-shirt? </strong></label>
 
                      <input type="hidden" name="on1" value="wantGift" />
 
                      <input type="radio" name="os1" value="Yes" />Yes
 
                      <input type="radio" checked="checked" name="os1" value="No" />No
 
                      <input type="radio" name="on0" value="wantGiftYes" />Yes
 
                      <input type="radio" checked="checked" name="on0" value="wantGiftNo" />No
 
                      <br />
 
                      <span class="t-shirt-size-selector">
 
                      <label for="wantGift"><strong>T-shirt size: </strong></label>
 
                      <input type="hidden" name="on3" value="size"/>
 
                      <select name="os3" id="os3">
 
                        <option name="os3" id="os3" value="MenS">Men's S</option>
 
                        <option name="os3" id="os3" value="MenM">Men's M</option>
 
                        <option name="os3" id="os3" value="MenL">Men's L</option>
 
                        <option name="os3" id="os3" value="MenXL">Men's XL</option>
 
                        <option name="os3" id="os3" value="Men2XL">Men's 2XL</option>
 
                        <option name="os3" id="os3" value="LadiesS">Ladies' S</option>
 
                        <option name="os3" id="os3" value="LadiesM">Ladies' M</option>
 
                        <option name="os3" id="os3" value="LadiesL">Ladies' L</option>
 
                         <option name="os3" id="os3" value="LadiesXL">Ladies' XL</option>
 
                      <label for="tShirtSize"><strong>T-shirt size: </strong></label>
 
                      <select name="os0" id="os0">
 
                        <option name="os0" id="os0" value="MenS">Men's S</option>
 
                        <option name="os0" id="os0" value="MenM">Men's M</option>
 
                        <option name="os0" id="os0" value="MenL">Men's L</option>
 
                        <option name="os0" id="os0" value="MenXL">Men's XL</option>
 
                        <option name="os0" id="os0" value="Men2XL">Men's 2XL</option>
 
                        <option name="os0" id="os0" value="LadiesS">Ladies' S</option>
 
                        <option name="os0" id="os0" value="LadiesM">Ladies' M</option>
 
                        <option name="os0" id="os0" value="LadiesL">Ladies' L</option>
 
                         <option name="os0" id="os0" value="LadiesXL">Ladies' XL</option>
 
                      </select><br/></span>
 
                      <label for="publicAck"><strong>
 
                          Should we  <a href="/sponsors#supporters">list you publicly</a> as a Conservancy Supporter? </strong></label>
 
                      <input type="hidden" name="on2" value="publicAck" />
 
                      <input type="radio" checked="checked" name="os2" value="Yes" />Yes
 
                      <input type="radio" name="os2" value="No" />No<br/>
 
                      <input type="radio" checked="checked" name="on1" value="publicAckYes" />Yes
 
                      <input type="radio" name="on1" value="publicAckNo" />No<br/>
 
                      <label for="joinList"><strong>Join Conservancy's
 
                      Low-Traffic Announcement Email List? </strong></label>
 
                      <input type="hidden" name="on4" value="joinList" />
 
                      <input type="radio" checked="checked" name="os4" value="Yes" />Yes
 
                      <input type="radio" name="os4" value="No" />No<br>
 
                      <input type="radio" checked="checked" name="os1" value="joinListYes" />Yes
 
                      <input type="radio" name="os1" value="joinListNo" />No<br>
 
                      <br /></div>
 
                      <div id="monthly" class="supporter-form-submit">
 
                      <input type="image"
0 comments (0 inline, 0 general)