All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.fingerprintsoft.payment.paygate.domain.TransactionStatusRequest Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package co.fingerprintsoft.payment.paygate.domain;

import co.fingerprintsoft.payment.paygate.MD5ToString;
import lombok.*;

import java.security.NoSuchAlgorithmException;

@Data
@EqualsAndHashCode(of = {"payRequestId"})
@RequiredArgsConstructor
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class TransactionStatusRequest {

    @NonNull
    private String payRequestId;
    @NonNull
    private String reference;

    public String calculateChecksum(String encryptedKey,Long payGateId) throws NoSuchAlgorithmException {
        StringBuilder sb = new StringBuilder();
        sb.append(payGateId);
        sb.append(payRequestId);
        sb.append(reference);
        sb.append(encryptedKey);
        return MD5ToString.md5String(sb);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy