public function fire($job, $data)
 {
     // we only get the user ID, get the user from it
     $user = User::find($data['userID']);
     BraintreeHelper::firstTime($user);
     $user->ready = 'connected';
     $user->save();
     Log::info('Sending "ready" email for user: '******'emails.connected.notification')
     //     ->to($user->email)
     //     ->subject('Your metrics are ready!')
     //     ->send();
     $job->delete();
 }
예제 #2
0
$lname = $_POST['lname'];
$emailPattern = '/^\\S{2,}@\\S{2,}\\.[a-zA-Z]{2,10}(\\.[a-zA-Z]{2,10})?$/';
$amountPattern = '/^\\d{1,5}(\\.\\d{2})?$/';
$namePattern = '/[a-zA-Z]{1,50}/';
if (preg_match($emailPattern, $email) == false || preg_match($amountPattern, $amount) == false || preg_match($namePattern, $fname) == false || preg_match($namePattern, $lname) == false) {
    ob_end_clean();
    header('Location: /donate');
    exit;
}
$result;
//test info = require_once('include/test/resultInfo.php');
$info = ['amount' => $amount, 'email' => $email, 'fname' => $fname, 'lname' => $lname];
if ($_POST['monthly'] == 'yes') {
    $result = BraintreeHelper::getInstance()->subscribe($nonce, $info);
} else {
    $result = BraintreeHelper::getInstance()->donate($nonce, $info);
}
?>
	<h1><?php 
echo $result['header'];
?>
</h1>
	<?php 
if (!$result['success']) {
    echo '<h2>' . $result['message'] . '</h2>';
}
?>
 

	<div class="wrap">
<?php 
예제 #3
0
          <div class="error-msg"></div>
        </div>

	<div id='monthly-wrap'>
   	   <p>Would you like this payment to recur on a monthly basis?</p>
	   <div class="radio-wrap">
	     <div class="radio-field float-left"><input type="radio" name="monthly" value="yes"> <label class=radio-label"> Yes </label></div>
  	     <div class="radio-field float-right"><input type="radio" name="monthly" value="no" checked> <label class=radio-label"> No </label></div>
	   </div>
	   <p id='monthly-info'>
 	      By clicking the donate button below, you agree to Tiferes Rachamim charging your card the specified amount on a
	      monthly basis. You may call Laibie at (347) 403-1660 to cancel the recurring charges at any time. On the confirmation screen you will see
	      the recurring charge information; please contact Laibie immediately if the information is incorrect.
	   </p>
	</div>
<?php 
echo "<input class='client-token' type='hidden' value='" . BraintreeHelper::getInstance()->generateClientToken() . "'>";
?>
	<input name='client-tz' class='client-tz' type='hidden'>

      </div>

      <div class="profile__footer">
        <div class="disclaimer">Please click the Donate button only once</div>

        <div class="clear"></div>
        <input class="btn" type="submit" id="submit" value="Donate">
      </div>
  </form>
</div>