Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $new = new Webhook;
- $new->hash = $txData['data']['hash'];
- $new->wallet = $wallet;
- $new->vezes = $semanas;
- $new->valor = BlocktrailSDK::toBtc($txData['data']['estimated_value']);
- $new->pagamento = $pagar;
- $new->save();
- $user = Wallets::where('wallet', $wallet)->get();
- foreach($user as $usuario){
- $id = $usuario->id_user;
- $invest = Investimento::where('wallet', $wallet)->first();
- $invest->hash = $txData['data']['hash'];
- $invest->id_user = $id;
- $invest->wallet = $wallet;
- $invest->deposito = BlocktrailSDK::toBtc($txData['data']['estimated_value']);
- $invest->status = 'pendente';
- $invest->save();
- }
- $invest = Investimento::where(array('id_user' => $id, 'wallet' => $wallet));
Add Comment
Please, Sign In to add comment