public final class EwayRapidAccessCodeStore
extends java.lang.Object
TokenCustomerID on the member
Rapid bank account.
Subclass by merchant + Rapid method:
CreateTokenCustomer / UpdateTokenCustomer → EwayRapidAccessCodeCustomerTokenPayment + MEMBERSHIP → EwayRapidAccessCodeMembershipTokenPayment + EVENTS is not supported yetStatus workflow: PENDING (POST) → APPROVED | DECLINED | UNCONFIRMED | MANUAL_REVIEW (GET). APPROVED and DECLINED are terminal. GET never creates a row.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
applyQueryResult(MutableDataSource mds,
EwayRapidAccessCodeResult result,
EwayRapidAccessCode accessCode,
java.lang.String merchant,
boolean queryConfirmed)
Update the existing AccessCode row from Rapid GET and persist
TokenCustomerID on the member bank account when Rapid returned one.
|
static EwayRapidAccessCode |
createPending(MutableDataSource mds,
java.lang.String accessCode,
java.lang.String merchant,
java.lang.String rapidMethod,
EwayRapidConnectionMethod connectionMethod,
int amountCents,
Member member)
Insert PENDING after Rapid create.
|
static EwayRapidAccessCode |
createPending(MutableDataSource mds,
java.lang.String accessCode,
java.lang.String merchant,
java.lang.String rapidMethod,
EwayRapidConnectionMethod connectionMethod,
int amountCents,
Member member,
MembershipInvoicePayment payment)
Insert PENDING after Rapid create.
|
static java.lang.String |
dbClassName(java.lang.String merchant,
java.lang.String rapidMethod)
Concrete DBClass for this merchant and Rapid method.
|
static EwayRapidAccessCode |
findByAccessCode(DataSource ds,
java.lang.String accessCode)
Find the persisted AccessCode attempt.
|
static boolean |
isTerminal(java.lang.String statusCode) |
static java.lang.String |
nextStatus(java.lang.String current,
java.lang.String proposed)
APPROVED / DECLINED are not overwritten.
|
static java.lang.String |
proposedStatusCode(EwayRapidAccessCodeResult result,
boolean queryConfirmed,
boolean tokenRequired,
boolean tokenSaved)
Next status from Rapid GET.
|
static BankAccount |
saveTokenCustomerId(MutableDataSource mds,
EwayRapidAccessCodeResult result,
Member member,
java.lang.String merchant)
Write Rapid TokenCustomerID onto the member Rapid bank account for this
merchant.
|
static java.lang.String |
tokenCustomerIdFor(Member member,
java.lang.String merchant)
Stored Rapid TokenCustomerID for UpdateTokenCustomer.
|
@CheckReturnValue
@Nonnull
public static java.lang.String dbClassName(@Nullable
java.lang.String merchant,
@Nullable
java.lang.String rapidMethod)
merchant - MEMBERSHIP or EVENTSrapidMethod - CreateTokenCustomer, UpdateTokenCustomer, or TokenPaymentEwayRapidAccessCodeCustomer or EwayRapidAccessCodeMembership class namejava.lang.UnsupportedOperationException - when TokenPayment is used with the EVENTS merchant@CheckReturnValue
@Nonnull
public static java.lang.String proposedStatusCode(@Nullable
EwayRapidAccessCodeResult result,
boolean queryConfirmed,
boolean tokenRequired,
boolean tokenSaved)
result - Rapid GET mapping, or null when the query failedqueryConfirmed - false when Rapid GET still failed after retriestokenRequired - true when Rapid returned a TokenCustomerID to storetokenSaved - true when that token was written to the member bank accountACCESS_CODE_* list code@CheckReturnValue
public static boolean isTerminal(@Nullable
java.lang.String statusCode)
statusCode - ACCESS_CODE_* list code, or null@CheckReturnValue
@Nonnull
public static java.lang.String nextStatus(@Nonnull
java.lang.String current,
@Nonnull
java.lang.String proposed)
current - stored status codeproposed - status from this GETcurrent when terminal, otherwise proposed@CheckReturnValue @Nullable public static EwayRapidAccessCode findByAccessCode(@Nonnull DataSource ds, @Nullable java.lang.String accessCode) throws java.lang.Exception
ds - datasourceaccessCode - Rapid AccessCodenull when blank or not storedjava.lang.Exception - a serious problem@CheckReturnValue @Nonnull public static EwayRapidAccessCode createPending(@Nonnull MutableDataSource mds, @Nonnull java.lang.String accessCode, @Nullable java.lang.String merchant, @Nullable java.lang.String rapidMethod, @Nullable EwayRapidConnectionMethod connectionMethod, int amountCents, @Nullable Member member) throws java.lang.Exception
mds - writable datasourceaccessCode - Rapid AccessCode from createmerchant - MEMBERSHIP or EVENTSrapidMethod - Rapid MethodconnectionMethod - hosted form style, or nullamountCents - Rapid Payment.TotalAmountmember - session member (person is set on Customer rows)java.lang.Exception - a serious problem@CheckReturnValue @Nonnull public static EwayRapidAccessCode createPending(@Nonnull MutableDataSource mds, @Nonnull java.lang.String accessCode, @Nullable java.lang.String merchant, @Nullable java.lang.String rapidMethod, @Nullable EwayRapidConnectionMethod connectionMethod, int amountCents, @Nullable Member member, @Nullable MembershipInvoicePayment payment) throws java.lang.Exception
payment on the mandatory EwayRapidAccessCodeMembership.setPayment(com.aspc.dal.layers.aspc_app.membership.MembershipInvoicePayment, java.lang.String...) field.mds - writable datasourceaccessCode - Rapid AccessCode from createmerchant - MEMBERSHIP or EVENTSrapidMethod - Rapid MethodconnectionMethod - hosted form style, or nullamountCents - Rapid Payment.TotalAmountmember - member (person is set on Customer rows)payment - membership invoice payment for TokenPayment, or nulljava.lang.Exception - a serious problem@CheckReturnValue
public static boolean applyQueryResult(@Nonnull
MutableDataSource mds,
@Nullable
EwayRapidAccessCodeResult result,
@Nonnull
EwayRapidAccessCode accessCode,
@Nullable
java.lang.String merchant,
boolean queryConfirmed)
throws java.lang.Exception
NotFoundException if this
AccessCode was not stored by POST.mds - writable datasourceresult - Rapid GET mapping, or null when unconfirmedaccessCode - Rapid AccessCodemerchant - MEMBERSHIP or EVENTSqueryConfirmed - false when Rapid GET still failed after retriesNotFoundException - when the AccessCode row does not existjava.lang.Exception - a serious problem@CheckReturnValue
@Nonnull
public static java.lang.String tokenCustomerIdFor(@Nullable
Member member,
@Nullable
java.lang.String merchant)
throws java.lang.Exception
Member.bankAccount, events uses Member.bankAccountEvent.member - session membermerchant - MEMBERSHIP or EVENTSjava.lang.Exception - a serious problem@CheckReturnValue @Nullable public static BankAccount saveTokenCustomerId(@Nonnull MutableDataSource mds, @Nullable EwayRapidAccessCodeResult result, @Nullable Member member, @Nullable java.lang.String merchant) throws java.lang.Exception
BankAccount.ewayToken.
Setting EwayRawTokenCustomerID also sets account type to EWAY_RAPID.mds - writable datasourceresult - Rapid GET mappingmember - session membermerchant - MEMBERSHIP or EVENTSnull when there is nothing to persistjava.lang.Exception - a serious problemstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.