-
Notifications
You must be signed in to change notification settings - Fork 146
Add StoreToken API implementation #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@rikterbeek please review when you get a chance. |
|
@rikterbeek @lancergr @rkewlani @Aleffio Gentle reminder to please review this pull request. |
|
Hi @ashwindas Thanks so much for this Pull Request! We are performing some internal tests against it and will keep you posted. Kind Regards, |
|
@lancergr thank you for the update! |
|
|
||
| return this; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add toString() :
@OverRide
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.getClass().getSimpleName());
sb.append("[merchantAccount=").append(merchantAccount);
sb.append(",shopperReference=").append(shopperReference);
sb.append(",shopperEmail=").append(shopperEmail);
sb.append(",hasCard=").append(card != null);
sb.append(",selectedBrand=").append(selectedBrand);
sb.append(",shopperStatement=").append(shopperStatement);
sb.append("]");
return sb.toString();
}
| this.result = result; | ||
| return this; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add toString() method :
@OverRide
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.getClass().getSimpleName());
sb.append("[");
sb.append("pspReference=").append(pspReference);
sb.append(",recurringDetailReference=").append(recurringDetailReference);
sb.append(",result=").append(result);
sb.append(",alias=").append(alias);
sb.append(",aliasType=").append(aliasType);
if(params!=null) {
sb.append(",redirectUrl=").append(redirectUrl);
sb.append(",redirectType=").append(redirectType);
}
sb.append("]");
return sb.toString();
}
| return this; | ||
| } | ||
|
|
||
| public StoreTokenRequest selectRecurringContract() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think setContractTypeRecurring() will be better name because it is setting the value.
| return this; | ||
| } | ||
|
|
||
| public StoreTokenRequest selectOneClickRecurringContract() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this method name too.
|
|
||
| public StoreTokenRequest selectOneClickContract() { | ||
| Recurring recurring = new Recurring(); | ||
| recurring.contract(Recurring.ContractEnum.ONECLICK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor : we can replace this by :
setRecurring(new Recurring().contract(Recurring.ContractEnum.ONECLICK));
| } | ||
|
|
||
| public StoreTokenRequest selectRecurringContract() { | ||
| Recurring recurring = new Recurring(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor : we can replace this by :
setRecurring(new Recurring().contract(Recurring.ContractEnum.RECURRING));
rkewlani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ ashwindas,
Thanks for pull request. I have reviewed your change and looks good to me. Only few minor changes are nice to have and I have left review comments for that.
Regards,
Rajni
Description
/recurring/storeToken API implementation is missing in adyen java lib. Adding an implementation similar to other /recurring APIs.