-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support partial payments #310
Conversation
LCOV of commit
|
LCOV of commit
|
LCOV of commit
|
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.
Generated code - no review required.
LCOV of commit
|
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.
Generated code - no review required.
LCOV of commit
|
LCOV of commit
|
LCOV of commit
|
ios/Classes/PlatformApi.swift
Outdated
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.
Generated code - no review required.
LCOV of commit
|
LCOV of commit
|
d79c350
to
1307490
Compare
LCOV of commit
|
1307490
to
9cc78f6
Compare
LCOV of commit
|
LCOV of commit
|
|
||
private func removeGiftCardPaymentMethods(paymentMethods: PaymentMethods) -> PaymentMethods { | ||
private func removeGiftCardPaymentMethods(paymentMethods: PaymentMethods, isPartialPaymentSupported: Bool) -> PaymentMethods { | ||
if isPartialPaymentSupported { |
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.
Just to be more Swifty it could be guard
as a common syntax for early exits.
@@ -51,12 +51,14 @@ class InstantAdvancedComponent: BaseInstantComponent, InstantComponentProtocol { | |||
onError(paymentEventDTO: paymentEventDTO) | |||
case .action: | |||
onAction(paymentEventDTO: paymentEventDTO) | |||
case .update: | |||
return |
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.
Some components silently return for case update
. Apple Pay has a dedicated comment for code clarity, just an observation, maybe it is worth to add same comments?
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.
Good suggestion, will add a comment here as well to enhance code clarity.
android/src/main/kotlin/com/adyen/checkout/flutter/dropIn/DropInPlatformApi.kt
Show resolved
Hide resolved
|
||
val balanceResult = mapToBalanceDropInServiceResult(message.contentIfNotHandled as String) | ||
lifecycleScope.launch { | ||
delay(300) |
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.
Is this delay necessary?
android/src/main/kotlin/com/adyen/checkout/flutter/dropIn/advanced/AdvancedDropInService.kt
Show resolved
Hide resolved
LCOV of commit
|
2b05fee
LCOV of commit
|
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.
Generated code. No review required.
guard !isPartialPaymentSupported else { | ||
return paymentMethods | ||
} |
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 this one is hard to read now 😅
Simple IF is better, since guard is for validation or edge-casese and here it is a pure Business logic.
if isPartialPaymentSupported {
return paymentMethods
}
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.
🙈
@@ -69,7 +69,7 @@ class AdyenCheckoutSession { | |||
InstantPaymentType.applePay, | |||
); | |||
} else if (configuration is DropInConfiguration) { | |||
return configuration.toDTO(sdkVersionNumber); | |||
return configuration.toDTO(sdkVersionNumber, true); |
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.
Maybe make this one a constant? Like:
configuration.toDTO(sdkVersionNumber, alwaysSupportPartialPayments);
LCOV of commit
|
Quality Gate failedFailed conditions |
No description provided.