Beispiel #1
0
        // Something else that's not the customer's fault.
        $errors['stripe'] = "Something else that's not the customer's fault.";
    }
    // A user form submission error occurred, handled below.
    if ($errors['stripe'] != '') {
        ##  print $errors['stripe'] ."\n";
        error_log($errors['stripe'], 0);
        ## print $errors['stripe'];
        error_log(print_r($e, true), 0);
        #print "error";
    }
}
if ($declined_this_time) {
    refreshMilestone($aID, $eID);
}
$totalFundingCount = getFundingDetailsCount($aID, $eID);
$authorizedCount = getFundingDisbursedCount($aID, $eID, 'authorized');
$capturedCount = getFundingDisbursedCount($aID, $eID, 'captured');
$declinedCount = getFundingDisbursedCount($aID, $eID, 'declined');
#print "[$totalFundingCount] [$authorizedCount] [$capturedCount] [$declinedCount]";
if ($authorizedCount) {
    if ($authorizedCount < $totalFundingCount) {
        print "authfailed";
    }
    if ($authorizedCount == $totalFundingCount) {
        if ($authorized_this_time) {
            print "success_authorized_now";
        } else {
            print "success_authorized";
        }
    }
Beispiel #2
0
    $funding_details_id = $row[3];
    $fund_disbursed_datetime = $row[4];
    if (!$gotDateDiff && $disburse_status == 'authorized') {
        $gotDateDiff = 1;
        $dateDiff = 0;
        $dateDiff = round((strtotime("now") - strtotime($fund_disbursed_datetime)) / 86400);
    }
    list($funder_id, $funding_details_status) = getFunderDetails($funding_details_id);
    list($funder_name, $email) = getFullName($funder_id);
    $pledge_status = "Deleted";
    if ($funding_details_status) {
        $pledge_status = "Active";
    }
    $table_element_content .= "\n  <tr>\n    <td>{$funder_name}</td>\n    <td align=center>USD {$fund_amount}</td>\n    <td align=center>{$fund_disbursed_datetime}</td>\n    <td align=center>{$disburse_status}</td>\n    <td align=center>{$pledge_status}</td>\n  </tr>   \n   ";
}
$funding_count = getFundingDetailsCount($aID, $eID);
$stripeConnectToken = getStripeConnectToken($aID);
$stripeUserobj = json_decode($stripeConnectToken);
$stripeUserID = $stripeUserobj->{'stripe_user_id'};
$dateDiff = $dateDiff * 1;
$funding_count = $funding_count * 1;
$table_header = "<table width='400px' border=1 cellpadding=10 BORDERCOLOR=\"009900\">";
if ($dateDiff) {
    $table_header .= "<tr><td>Last Authorized</td><td>{$dateDiff} days ago </td></tr>";
}
if ($application_fee) {
    $table_header .= "<tr><td>Application Fee</td><td>&nbsp;&nbsp;{$application_fee} % </td></tr>";
}
$table_header .= "\n<tr><td>Project ID </td><td>&nbsp;&nbsp;{$aID} </td></tr>\n<tr><td>Campaign ID </td><td>&nbsp;&nbsp;{$eID} </td></tr>\n<tr><td>Stripe Account ID </td><td>&nbsp;&nbsp;{$stripeUserID} </td></tr>\n<tr><td>Pledge Count </td><td>&nbsp;&nbsp;{$funding_count}</td></tr>\n</table>\n";
print $table_header;
print "<br><br>";