-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Klarna Payment Context Support (#403)
- Loading branch information
1 parent
f678ed2
commit 6a82f00
Showing
10 changed files
with
135 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/com/checkout/payments/contexts/PaymentContextDetailsStatusType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.checkout.payments.contexts; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public enum PaymentContextDetailsStatusType { | ||
|
||
@SerializedName("Created") | ||
CREATED, | ||
|
||
@SerializedName("Approved") | ||
APPROVED, | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/checkout/payments/request/source/contexts/PaymentContextsKlarnaSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.checkout.payments.request.source.contexts; | ||
|
||
import com.checkout.common.AccountHolder; | ||
import com.checkout.common.PaymentSourceType; | ||
import com.checkout.payments.request.source.AbstractRequestSource; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@ToString(callSuper = true) | ||
public final class PaymentContextsKlarnaSource extends AbstractRequestSource { | ||
|
||
@SerializedName("account_holder") | ||
private AccountHolder accountHolder; | ||
|
||
|
||
@Builder | ||
private PaymentContextsKlarnaSource(final AccountHolder accountHolder) { | ||
super(PaymentSourceType.KLARNA); | ||
this.accountHolder = accountHolder; | ||
|
||
} | ||
|
||
public PaymentContextsKlarnaSource() { | ||
super(PaymentSourceType.KLARNA); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...a/com/checkout/payments/response/source/contexts/PaymentContextsPayPalResponseSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.checkout.payments.response.source.contexts; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@ToString(callSuper = true) | ||
@NoArgsConstructor | ||
public final class PaymentContextsPayPalResponseSource extends AbstractPaymentContextsResponseSource implements ResponseSource { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters