Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. if (txtCVV.length() > 3)
  2. Toast.makeText(VistaMedioPagos.this, "El codigo de seguridad debe ser de tres dígitos!", Toast.LENGTH_SHORT).show();
  3. else {
  4. if (!txtCVV.getText().toString().trim().isEmpty() && txtCVV.length() == 3){
  5. Thread thread = new Thread(){
  6. @Override
  7. public void run() {
  8. int idprod = getIntent().getExtras().getInt("idprod");
  9.  
  10. final String res = enviarPost(idprod, getIntent().getExtras().getString("email"), total, 1);
  11.  
  12. runOnUiThread(new Runnable() {
  13. @Override
  14. public void run() {
  15. int r = objJASON(res);
  16.  
  17. Toast.makeText(VistaMedioPagos.this, "Producto se ha comprado correctamente!", Toast.LENGTH_SHORT).show();
  18. }
  19. });
  20. }
  21. };
  22. thread.start();
  23. }
  24. else
  25. Toast.makeText(VistaMedioPagos.this, "Debes escribir el código de seguridad", Toast.LENGTH_LONG).show();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement