Updates
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.test.payment.models;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -8,6 +9,17 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MpesaResponse {
|
||||
private String status;
|
||||
private String message;
|
||||
|
||||
@JsonProperty("MerchantRequestID")
|
||||
private String merchantRequestID;
|
||||
|
||||
@JsonProperty("ResponseCode")
|
||||
private String responseCode;
|
||||
@JsonProperty("CheckoutRequestID")
|
||||
private String checkoutRequestId;
|
||||
@JsonProperty("CustomerMessage")
|
||||
private String customerMessage;
|
||||
@JsonProperty("ResponseDescription")
|
||||
private String responseDescription;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PaymentRequest {
|
||||
private String phoneNumber;
|
||||
private double amount;
|
||||
private long phoneNumber;
|
||||
private int amount;
|
||||
private String accountReference;
|
||||
private String transactionDesc;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
package com.test.payment.models;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.*;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Entity
|
||||
@Table("transactions")
|
||||
public class Transaction {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
private String phoneNumber;
|
||||
private double amount;
|
||||
private long phoneNumber;
|
||||
private long amount;
|
||||
private String status;
|
||||
private String checkoutRequestId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user