public class Notification extends Entity implements HasStatus
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
reference
Referencia enviada por el comercio para la transacción
|
protected java.lang.Integer |
requestId
Identificador de la sesión a consultar.
|
protected java.lang.String |
signature
Firma para validar que la respuesta proviene de placetopay
|
protected Status |
status
Estado de esta solicitud, debe observar el estado interno de cada objeto.
|
| Constructor and Description |
|---|
Notification(org.json.JSONObject object,
java.lang.String tranKey) |
Notification(Status status,
java.lang.Integer requestId,
java.lang.String reference,
java.lang.String signature,
java.lang.String tranKey)
Normalmente no necesitas instanciar desde este constructor
|
Notification(java.lang.String content,
java.lang.String tranKey) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getReference()
Devuelve el parámetro reference
|
java.lang.Integer |
getRequestId()
Devuelve el parámetro requestId
|
java.lang.String |
getSignature()
Devuelve el parámetro signature
|
Status |
getStatus()
Devuelve el parámetro status
|
boolean |
isApproved() |
boolean |
isRejected() |
boolean |
isValidNotification() |
java.lang.String |
makeSignature() |
void |
setStatus(Status status)
Asigna el parámetro
status |
org.json.JSONObject |
toJsonObject() |
checkMissingFields, filterJSONObject, getValidator, isValid, isValid, setValidatorprotected Status status
protected final java.lang.Integer requestId
protected final java.lang.String reference
protected final java.lang.String signature
public Notification(Status status, java.lang.Integer requestId, java.lang.String reference, java.lang.String signature, java.lang.String tranKey)
public Notification(java.lang.String content,
java.lang.String tranKey)
throws BadPlaceToPayException
content - json contenttranKey - credentialBadPlaceToPayException - Si la estructura de la notificación no es correctapublic Notification(org.json.JSONObject object,
java.lang.String tranKey)
throws BadPlaceToPayException
object - json contenttranKey - credentialBadPlaceToPayException - Si la estructura de la notificación no es correctapublic java.lang.Integer getRequestId()
requestIdpublic java.lang.String getReference()
referencepublic java.lang.String getSignature()
signaturepublic Status getStatus()
public java.lang.String makeSignature()
public boolean isValidNotification()
public boolean isApproved()
public boolean isRejected()
public org.json.JSONObject toJsonObject()
toJsonObject in class Entity