Please screen capture or take down the information below for later use.
Please send proof of payment to the member.

 

[insert_php]

$args = array( ‘meta_key’ => ‘status’, ‘meta_value’ => ‘d’, ‘orderby’ => ‘rtime’, ‘order’ => ‘ASC’, ‘number’ => 1 );

// The Query
$user_query = new WP_User_Query( $args );

$current_user = wp_get_current_user();

// User Loop
if ( ! empty( $user_query->results ) ) {
foreach ( $user_query->results as $user ) {

echo ‘

Please make the payment to: ‘ . $user->first_name . ‘ ‘ . $user->last_name . ‘

‘;

echo (‘Bank Name: ‘ .$user->bank_name . ‘
‘);

echo (‘Account Number: ‘ .$user->account_number . ‘
‘ );

echo (‘Branch Code: ‘ .$user->branch_code . ‘
‘);

}

}

$damount = $current_user->damount;
$ramount = $user->ramount;
$userid = $current_user->ID ;

// donaters memo slots for requester ids

$ud1 = $current_user->uid1;
$ud2 = $current_user->uid2;
$ud3 = $current_user->uid3;
$ud4 = $current_user->uid4;
$ud5 = $current_user->uid5;

// requesters memo slots for storing donaters ids
$ud1p = $user->uid1p;
$ud2p = $user->uid2p;
$ud3p = $user->uid3p;
$ud4p = $user->uid4p;
$ud5p = $user->uid5p;

// check which requesters slot is empty

if ($ud1p == 0){

$uid1pcheck = (‘uid1p’);

}

elseif ($ud2p == 0){

$uid1pcheck = (‘uid2p’);

}

elseif ($ud3p == 0){

$uid1pcheck = (‘uid3p’);

}

elseif ($ud4p == 0){

$uid1pcheck = (‘uid4p’);

}

elseif ($ud5p == 0){

$uid1pcheck = (‘uid5p’);

}

// check which donaters slot is empty

if ($ud1 == 0 ) {

$uidcheck = (‘uid1’);

}

elseif ($ud2 == 0 ) {

$uidcheck = (‘uid2’);

}

elseif ($ud3 == 0 ) {

$uidcheck = (‘uid3’);

}

elseif ($ud4 == 0 ) {

$uidcheck = (‘uid4’);

}

elseif ($ud5 == 0 ) {

$uidcheck = (‘uid5’);

}

if ($ramount == NULL) {

$nstat = ‘n’ ;
$meta_n = ‘status’ ;

update_user_meta( $userid, $meta_n, $nstat );

echo (‘

No users found on the list, try again later.

‘);

echo (‘


‘);

}

elseif ($damount == $ramount) {
$meta_keys = (‘status’);
$dstat = (‘dp’);
$meta_key = $uidcheck;
$uid = $user->ID;
$lamount = 0 ;
$meta_am = (‘damount’);

echo (‘Amount you must donate to this user R ‘ .$current_user->damount . ‘
‘ );

update_user_meta( $userid, $meta_keys, $dstat );
update_user_meta( $userid, $meta_key, $uid );
update_user_meta( $userid, $meta_am, $lamount );

$rid = ($user->ID);
$meta_keyr = (‘status’);
$rstat = (‘bp’);
$meta_keyrs = $uid1pcheck;
$duid = $userid;
update_user_meta( $rid, $meta_keyr, $rstat );
update_user_meta( $rid, $meta_keyrs, $duid );

echo (‘


‘);

}

elseif ($damount > $ramount) {

$remain = ($damount – $ramount);

$uid = ($user->ID);
$meta_key = $uidcheck;
$meta = (‘damount’);
update_user_meta( $userid, $meta_key, $uid );
update_user_meta( $userid, $meta, $remain );

$rid = ($user->ID);
$meta_keyr = (‘status’);
$rstat = (‘bp’);
$meta_keyrs = $uid1pcheck;
$duid = ($userid);
update_user_meta( $rid, $meta_keyr, $rstat );
update_user_meta( $rid, $meta_keyrs, $duid );

echo (‘Amount you must donate to this user R’ .$ramount . ‘
‘ );

echo (‘


‘);

}

elseif ($dmaount < $ramount) { $remain = ($ramount - $damount); $lamount = 0 ; $meta_keys = ('status'); $dstat = ('dp'); $meta_key = $uidcheck; $uid = $user->ID;
$meta_am = (‘damount’);

update_user_meta( $userid, $meta_keys, $dstat );
update_user_meta( $userid, $meta_key, $uid );

$rid = ($user->ID);
$meta_keyrs = $uid1pcheck;
$duid = ($userid);
$meta = (‘ramount’);
update_user_meta( $rid, $meta_keyrs, $duid );
update_user_meta( $rid, $meta, $remain );

echo (‘Amount you must donate to this user R’ .$current_user->damount . ‘
‘ );

update_user_meta( $userid, $meta_am, $lamount );

echo (‘ Thank you
after your payment is received you will be able to request.


‘);

}

else {
echo ‘No users found.’;
}

[/insert_php]