com.safecharge.request.RefundTransactionRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of safecharge-sdk-java Show documentation
Show all versions of safecharge-sdk-java Show documentation
SafeCharge’s REST API SDK for Java provides developer tools for accessing Safecharge's REST API. SafeCharge’s REST API is a simple,
easy to use, secure and stateless API, which enables online merchants and service providers to process consumer payments through SafeCharge’s
payment gateway. The API supports merchants of all levels of PCI certification, from their online and mobile merchant applications, and is
compatible with a large variety of payment options, i.e. payment cards, alternative payment methods, etc.
package com.safecharge.request;
import javax.validation.ConstraintViolationException;
import com.safecharge.request.builder.SafechargeTransactionBuilder;
import com.safecharge.util.Constants;
import com.safecharge.util.ValidChecksum;
import com.safecharge.util.ValidationUtils;
/**
* Copyright (C) 2007-2017 SafeCharge International Group Limited.
*
* Request to refund a transaction.
*
* This request can be used to refund a previously settled transaction. Full or partial refunds are supported.
* When partial refunds are issued, multiple refund requests can be performed for up to the entire amount
* of the original settled transaction.
*
* @author Nikola Dichev
* @see SettleTransactionRequest
* @see VoidTransactionRequest
* @since 3/20/2017
*/
@ValidChecksum(orderMappingName = Constants.ChecksumOrderMapping.REFUND_GW_TRANSACTION)
public class RefundTransactionRequest
extends SafechargeTransactionRequest {
public static Builder builder() {
return new Builder();
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("RefundTransactionRequest{");
sb.append(super.toString())
.append('}');
return sb.toString();
}
public static class Builder extends SafechargeTransactionBuilder {
/**
* Builds the request.
*
* @return {@link SafechargeRequest} object build from the params set by this builder
* @throws ConstraintViolationException if the validation of the params fails
*/
@Override
public SafechargeBaseRequest build() throws ConstraintViolationException {
RefundTransactionRequest voidTransactionRequest = new RefundTransactionRequest();
return ValidationUtils.validate(super.build(voidTransactionRequest));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy