-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autowiring HmacValidator instead of creating a new instance everytime
- Loading branch information
pavan
committed
Nov 22, 2024
1 parent
d1198c5
commit f3f9c73
Showing
14 changed files
with
91 additions
and
58 deletions.
There are no files selected for viewing
9 changes: 8 additions & 1 deletion
9
checkout-example-advanced/src/main/java/com/adyen/checkout/Config.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 |
---|---|---|
@@ -1,12 +1,19 @@ | ||
package com.adyen.checkout; | ||
|
||
import com.adyen.util.HMACValidator; | ||
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
|
||
@Configuration | ||
public class Config { | ||
@Bean | ||
public LayoutDialect layoutDialect() { | ||
return new LayoutDialect(); | ||
} | ||
|
||
@Bean | ||
public HMACValidator getHmacValidator() { | ||
return new HMACValidator(); | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
checkout-example/src/main/java/com/adyen/checkout/Config.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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package com.adyen.checkout; | ||
|
||
import com.adyen.util.HMACValidator; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class Config { | ||
@Bean | ||
public LayoutDialect layoutDialect() { | ||
return new LayoutDialect(); | ||
} | ||
|
||
@Bean | ||
public HMACValidator getHmacValidator() { | ||
return new HMACValidator(); | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
giftcard-example/src/main/java/com/adyen/giftcard/Config.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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package com.adyen.giftcard; | ||
|
||
import com.adyen.util.HMACValidator; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class Config { | ||
@Bean | ||
public LayoutDialect layoutDialect() { | ||
return new LayoutDialect(); | ||
} | ||
|
||
@Bean | ||
public HMACValidator getHmacValidator() { | ||
return new HMACValidator(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package com.adyen.giving; | ||
|
||
import com.adyen.util.HMACValidator; | ||
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
|
||
@Configuration | ||
public class Config { | ||
@Bean | ||
public LayoutDialect layoutDialect() { | ||
return new LayoutDialect(); | ||
} | ||
|
||
@Bean | ||
public HMACValidator getHmacValidator() { | ||
return new HMACValidator(); | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
in-person-payments-example/src/main/java/com/adyen/ipp/Config.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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package com.adyen.ipp; | ||
|
||
import com.adyen.util.HMACValidator; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class Config { | ||
@Bean | ||
public LayoutDialect layoutDialect() { | ||
return new LayoutDialect(); | ||
} | ||
|
||
@Bean | ||
public HMACValidator getHmacValidator() { | ||
return new HMACValidator(); | ||
} | ||
} |
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
paybylink-example/src/main/java/com/adyen/paybylink/Config.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.adyen.paybylink; | ||
|
||
import com.adyen.util.HMACValidator; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class Config { | ||
|
||
@Bean | ||
public HMACValidator getHmacValidator() { | ||
return new HMACValidator(); | ||
} | ||
} |
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
Oops, something went wrong.