Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (txtCVV.length() > 3)
- Toast.makeText(VistaMedioPagos.this, "El codigo de seguridad debe ser de tres dígitos!", Toast.LENGTH_SHORT).show();
- else {
- if (!txtCVV.getText().toString().trim().isEmpty() && txtCVV.length() == 3){
- Thread thread = new Thread(){
- @Override
- public void run() {
- int idprod = getIntent().getExtras().getInt("idprod");
- final String res = enviarPost(idprod, getIntent().getExtras().getString("email"), total, 1);
- runOnUiThread(new Runnable() {
- @Override
- public void run() {
- int r = objJASON(res);
- Toast.makeText(VistaMedioPagos.this, "Producto se ha comprado correctamente!", Toast.LENGTH_SHORT).show();
- }
- });
- }
- };
- thread.start();
- }
- else
- Toast.makeText(VistaMedioPagos.this, "Debes escribir el código de seguridad", Toast.LENGTH_LONG).show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement