com.global.api.services.PayFacService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
package com.global.api.services;
import com.global.api.builders.PayFacBuilder;
import com.global.api.entities.Transaction;
import com.global.api.entities.User;
import com.global.api.entities.enums.TransactionModifier;
import com.global.api.entities.enums.TransactionType;
import com.global.api.entities.enums.UserType;
import com.global.api.entities.payFac.UserReference;
import com.global.api.terminals.abstractions.IDisposable;
import lombok.var;
public class PayFacService implements IDisposable {
public PayFacBuilder createMerchant() {
return
new PayFacBuilder(TransactionType.Create)
.withModifier(TransactionModifier.Merchant);
}
public PayFacBuilder getMerchantInfo(String merchantId) {
var userReference = new UserReference();
userReference.setUserId(merchantId);
userReference.setUserType(UserType.MERCHANT);
return
new PayFacBuilder(TransactionType.Fetch)
.withModifier(TransactionModifier.Merchant)
.withUserReference(userReference);
}
public PayFacBuilder createAccount() {
return new PayFacBuilder<>(TransactionType.CreateAccount);
}
public PayFacBuilder editAccount() {
return new PayFacBuilder<>(TransactionType.EditAccount);
}
@Override
public void dispose() {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy