Plugin Directory

Changeset 994076


Ignore:
Timestamp:
09/21/2014 01:54:25 AM (12 years ago)
Author:
signalfade
Message:

check for name & address. then check for employer & occupation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stripe-political-donations/trunk/ajax-payment.php

    r946416 r994076  
    7575        // FUTURE FEATURE
    7676        // Run check for total here ($2500/election)
    77         if($isPolitical=='true' && 2500 <= $potential_total+($_POST['amount']/100) && $meta['eligible']=='agreed') {
     77        if($isPolitical=='true' && (!isset($meta['name']) || empty($meta['name']) || !isset($meta['address1']) || empty($meta['address1']) || !isset($meta['zip']) || empty($meta['zip']))) {
     78            $response['error'] = 'Sorry, but you must provide your name and address.';
     79        } else if($isPolitical=='true' && ((!isset($meta['employer']) || empty($meta['employer'])) || (!isset($meta['occupation']) || empty($meta['occupation'])))) {
     80            $response['error'] = 'Sorry, but you must provide your employer and occupation.';
     81        } else if($isPolitical=='true' && 2500 <= $potential_total+($_POST['amount']/100) && $meta['eligible']=='agreed') {
    7882            // They've already given too much!
    7983            $response['error'] = 'We believe you\'ve already reached your personal donation limit of $2500 for this election. Call '.PHONE_NUMBER.' if you feel this is incorrect, or if you\'d like to discuss other ways to help out our campaign!';
Note: See TracChangeset for help on using the changeset viewer.