public function insertExtra($user_id = NULL) { $data = call_user_func(array(new UserTransformer(), 'userExtraTransformer')); $data = array_filter($data, 'strlen'); $data['user_id'] = $user_id; $user_extra = Userextra::create($data); return $user_extra; }
public function completionDoPayment($assignment_id, $user_id) { $transaction = Assignment_Transaction::where('assignment_id', $assignment_id)->where('payment_type', 'completion_amount')->first(); $user = User::where('id', $user_id)->first(); $user_extra = Userextra::where('user_id', $user_id)->first(); $assignment = Assignment::where('id', $assignment_id)->first(); unset($user_id); $email = $user->email; $mobile = $user->mobile_number; $first_name = 'Tushar'; $last_name = "Agarwal"; $amount = $transaction->amount; $product_info = $assignment_id; unset($assignment, $user, $user_extra, $transaction); return \Illuminate\Support\Facades\View::make('payumoney', ["email" => $email, "mobile" => $mobile, "first_name" => $first_name, "last_name" => $last_name, "product_info" => $product_info, "amount" => $amount, "surl" => "http://54.200.205.117/api/v1/completionPayment_success/", "furl" => "http://54.200.205.117/api/v1/completionPayment_failure/"]); }