package net.sourceforge.fenixedu.domain.candidacy.accounting; import net.sourceforge.fenixedu.domain.candidacy.SecondCycleCandidacy; import net.sourceforge.fenixedu.domain.candidacy.SubmittedDataCandidacySituation; import net.sourceforge.fenixedu.domain.transactions.PaymentType; import org.joda.time.DateTime; public class PayPalCandidacyPaymentDetails extends PayPalCandidacyPaymentDetails_Base { public PayPalCandidacyPaymentDetails(SecondCycleCandidacy candidacy) { super(); setPayed(Boolean.FALSE); setSecondCycleCandidacy(candidacy); setAmount(candidacy.getDegreeCurricularPlan().getActiveCandidacyPeriod(candidacy.getExecutionYear()).getCost()); } @Override public boolean isCandidacyPayed() { return getPayed(); } @Override public boolean isPaypal() { return true; } public String getPaypalPaymentCode() { return CandidacyCostDetail.getCandidacyCostDetail(getAmount()).getPaypalCode(); } @Override public PaymentType getPaymentType() { return PaymentType.PAYPAL; } }