mirror of
https://github.com/jlengrand/adyen-java-spark-online-payments.git
synced 2026-03-10 08:01:24 +00:00
Updated static resources
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
.gradle/
|
||||
.idea/
|
||||
|
||||
.DS_Store
|
||||
*.DS_Store
|
||||
|
||||
build/
|
||||
bin/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Enter your information below
|
||||
# No quotation marks are required
|
||||
[DEFAULT]
|
||||
merchant_account =
|
||||
checkout_apikey =
|
||||
origin_key =
|
||||
checkout_payment_methods_url = https://checkout-test.adyen.com/v52/paymentMethods
|
||||
checkout_payments_url = https://checkout-test.adyen.com/v52/payments
|
||||
checkout_detail_url = https://checkout-test.adyen.com/v52/payments/details
|
||||
merchantAccount = TylerDouglas
|
||||
apiKey = AQEyhmfxL4jIYhVBw0m/n3Q5qf3VaY9UCJ1+XWZe9W27jmlZiiSaWGoa4mOFeQne5hiuhQsQwV1bDb7kfNy1WIxIIkxgBw==-hJYG90gqLYPclLs6We+q8CUtAsa+KgXr/iWftd+rrCM=-89EKHpWfW8ABmGF3
|
||||
originKey = pub.v2.8115499067697722.aHR0cDovL2xvY2FsaG9zdDo4MDgw.I4ixvXum4JGOjgI0Nd3YQ49P4AWvIncxMv41suCoW1Y
|
||||
paymentMethodsUrl = https://checkout-test.adyen.com/v52/paymentMethods
|
||||
paymentsUrl = https://checkout-test.adyen.com/v52/payments
|
||||
paymentsDetailsUrl = https://checkout-test.adyen.com/v52/payments/details
|
||||
BIN
src/.DS_Store
vendored
BIN
src/.DS_Store
vendored
Binary file not shown.
BIN
src/main/.DS_Store
vendored
BIN
src/main/.DS_Store
vendored
Binary file not shown.
@@ -1,11 +1,10 @@
|
||||
package model;
|
||||
|
||||
import com.adyen.Client;
|
||||
import com.adyen.Config;
|
||||
import com.adyen.enums.Environment;
|
||||
import com.adyen.model.Amount;
|
||||
import com.adyen.model.checkout.LineItem;
|
||||
import com.adyen.model.checkout.PaymentsRequest;
|
||||
import com.adyen.model.checkout.PaymentsResponse;
|
||||
import com.adyen.model.checkout.*;
|
||||
import com.adyen.service.Checkout;
|
||||
import com.adyen.service.exception.ApiException;
|
||||
import com.google.gson.Gson;
|
||||
@@ -17,6 +16,7 @@ import java.io.IOException;
|
||||
|
||||
public class Payments {
|
||||
|
||||
|
||||
public static String makePayment(PaymentsRequest paymentsRequest) {
|
||||
Client client = new Client(Main.apiKey, Environment.TEST);
|
||||
Checkout checkout = new Checkout(client);
|
||||
|
||||
BIN
src/main/resources/.DS_Store
vendored
BIN
src/main/resources/.DS_Store
vendored
Binary file not shown.
@@ -2,80 +2,80 @@
|
||||
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-family: "Fakt", sans-serif, Helvetica, Arial;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-family: "Fakt", sans-serif, Helvetica, Arial;
|
||||
}
|
||||
|
||||
*,
|
||||
:after,
|
||||
:before {
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a,
|
||||
u {
|
||||
text-decoration: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#header {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #e6e9eb;
|
||||
height: 44px;
|
||||
left: 0;
|
||||
margin-bottom: 24px;
|
||||
padding: 14px 26px;
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #e6e9eb;
|
||||
height: 44px;
|
||||
left: 0;
|
||||
margin-bottom: 24px;
|
||||
padding: 14px 26px;
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
|
||||
.button {
|
||||
background: #00112c;
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
transition: background 0.3s ease-out, box-shadow 0.3s ease-out;
|
||||
width: 100%;
|
||||
background: #00112c;
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
transition: background 0.3s ease-out, box-shadow 0.3s ease-out;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background: #1c3045;
|
||||
box-shadow: 0 3px 4px rgba(0, 15, 45, 0.2);
|
||||
background: #1c3045;
|
||||
box-shadow: 0 3px 4px rgba(0, 15, 45, 0.2);
|
||||
}
|
||||
|
||||
.button:active {
|
||||
background: #3a4a5c;
|
||||
background: #3a4a5c;
|
||||
}
|
||||
|
||||
.button:disabled {
|
||||
background: #e6e9eb;
|
||||
box-shadow: none;
|
||||
cursor: not-allowed;
|
||||
-webkit-user-select: all;
|
||||
-moz-user-select: all;
|
||||
-ms-user-select: all;
|
||||
user-select: all;
|
||||
background: #e6e9eb;
|
||||
box-shadow: none;
|
||||
cursor: not-allowed;
|
||||
-webkit-user-select: all;
|
||||
-moz-user-select: all;
|
||||
-ms-user-select: all;
|
||||
user-select: all;
|
||||
}
|
||||
|
||||
/* end General page body */
|
||||
@@ -83,129 +83,129 @@ a:hover {
|
||||
/* Index page */
|
||||
|
||||
.main-container {
|
||||
margin: auto;
|
||||
max-width: 1048px;
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: auto;
|
||||
max-width: 1048px;
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.integration-list {
|
||||
display: flex;
|
||||
margin-top: 6%;
|
||||
max-width: 1048px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
margin-top: 6%;
|
||||
max-width: 1048px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.integration-list {
|
||||
margin-left: -8px;
|
||||
margin-bottom: -8px;
|
||||
margin-right: -8px;
|
||||
}
|
||||
.integration-list {
|
||||
margin-left: -8px;
|
||||
margin-bottom: -8px;
|
||||
margin-right: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.integration-list {
|
||||
margin-left: -16px;
|
||||
margin-bottom: -16px;
|
||||
margin-right: -16px;
|
||||
}
|
||||
.integration-list {
|
||||
margin-left: -16px;
|
||||
margin-bottom: -16px;
|
||||
margin-right: -16px;
|
||||
}
|
||||
}
|
||||
|
||||
.integration-list-item {
|
||||
background: #f7f8f9;
|
||||
border-radius: 6px;
|
||||
flex: 1 1 0;
|
||||
margin: 4px;
|
||||
min-width: 40%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid #f7f8f9;
|
||||
background: #f7f8f9;
|
||||
border-radius: 6px;
|
||||
flex: 1 1 0;
|
||||
margin: 4px;
|
||||
min-width: 40%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid #f7f8f9;
|
||||
}
|
||||
|
||||
.integration-list-item:hover {
|
||||
box-shadow: 0 16px 24px 0 #e5eaef;
|
||||
text-decoration: none;
|
||||
border: 1px solid #06f;
|
||||
box-shadow: 0 16px 24px 0 #e5eaef;
|
||||
text-decoration: none;
|
||||
border: 1px solid #06f;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.integration-list-item {
|
||||
margin-left: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-right: 16px;
|
||||
margin-top: 16px;
|
||||
min-width: 25%;
|
||||
}
|
||||
.integration-list-item {
|
||||
margin-left: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-right: 16px;
|
||||
margin-top: 16px;
|
||||
min-width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.integration-list-item-link {
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.integration-list-item-link {
|
||||
padding-left: 28px;
|
||||
padding-bottom: 28px;
|
||||
padding-right: 28px;
|
||||
padding-top: 28px;
|
||||
}
|
||||
.integration-list-item-link {
|
||||
padding-left: 28px;
|
||||
padding-bottom: 28px;
|
||||
padding-right: 28px;
|
||||
padding-top: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.integration-list-item-title {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
color: #00112c;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
margin: 10px 0 0;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
color: #00112c;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.integration-list-item-title {
|
||||
font-size: 24px;
|
||||
margin-left: 0;
|
||||
margin-bottom: 6px;
|
||||
margin-right: 0;
|
||||
}
|
||||
.integration-list-item-title {
|
||||
font-size: 24px;
|
||||
margin-left: 0;
|
||||
margin-bottom: 6px;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.integration-list-item-subtitle {
|
||||
color: #00112c;
|
||||
font-size: 0.67em;
|
||||
font-weight: 700;
|
||||
margin: 10px 0 0;
|
||||
color: #00112c;
|
||||
font-size: 0.67em;
|
||||
font-weight: 700;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.integration-list-item-subtitle {
|
||||
font-size: 16px;
|
||||
margin-left: 0;
|
||||
margin-bottom: 6px;
|
||||
margin-right: 0;
|
||||
}
|
||||
.integration-list-item-subtitle {
|
||||
font-size: 16px;
|
||||
margin-left: 0;
|
||||
margin-bottom: 6px;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.title-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
margin-top: 10%;
|
||||
color: #00112c;
|
||||
margin-top: 10%;
|
||||
color: #00112c;
|
||||
}
|
||||
|
||||
/* end Index page */
|
||||
@@ -213,100 +213,117 @@ a:hover {
|
||||
/* Cart preview page */
|
||||
|
||||
.shopping-cart {
|
||||
float: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.shopping-cart {
|
||||
padding-left: 0;
|
||||
padding-bottom: 0;
|
||||
padding-right: 0;
|
||||
padding-top: 3px;
|
||||
}
|
||||
.shopping-cart {
|
||||
padding-left: 0;
|
||||
padding-bottom: 0;
|
||||
padding-right: 0;
|
||||
padding-top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.shopping-cart-link {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order-summary-list {
|
||||
border-top: 1px solid #e6e9eb;
|
||||
border-top: 1px solid #e6e9eb;
|
||||
}
|
||||
|
||||
.order-summary-list-list-item {
|
||||
border-bottom: 1px solid #e6e9eb;
|
||||
display: flex;
|
||||
height: 97px;
|
||||
border-bottom: 1px solid #e6e9eb;
|
||||
display: flex;
|
||||
height: 97px;
|
||||
}
|
||||
|
||||
.order-summary-list-list-item-image {
|
||||
height: 64px;
|
||||
margin: 16px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin: 16px;
|
||||
width: 64px;
|
||||
}
|
||||
|
||||
.order-summary-list-list-item-title {
|
||||
font-weight: 700;
|
||||
margin: auto auto auto 0;
|
||||
font-weight: 700;
|
||||
margin: auto auto auto 0;
|
||||
}
|
||||
|
||||
.order-summary-list-list-item-price {
|
||||
color: #687282;
|
||||
margin: auto 16px;
|
||||
text-align: right;
|
||||
width: 80px;
|
||||
color: #687282;
|
||||
margin: auto 16px;
|
||||
text-align: right;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.order-summary-list-list-item-price {
|
||||
margin-left: 24px;
|
||||
margin-bottom: auto;
|
||||
margin-right: 24px;
|
||||
margin-top: auto;
|
||||
}
|
||||
.order-summary-list-list-item-price {
|
||||
margin-left: 24px;
|
||||
margin-bottom: auto;
|
||||
margin-right: 24px;
|
||||
margin-top: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.order-summary-list-list-item-remove-product {
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
height: 25px;
|
||||
margin: auto 0;
|
||||
padding: 0;
|
||||
width: 25px;
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
height: 25px;
|
||||
margin: auto 0;
|
||||
padding: 0;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.cart {
|
||||
text-align: center;
|
||||
margin-top: 80px;
|
||||
text-align: center;
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
.cart-footer {
|
||||
font-weight: 700;
|
||||
margin-top: 17px;
|
||||
text-align: right;
|
||||
font-weight: 700;
|
||||
margin-top: 17px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.cart-footer {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.cart-footer {
|
||||
margin-top: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-footer .button {
|
||||
margin-top: 30px;
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.cart-footer .button {
|
||||
margin-top: 0;
|
||||
width: 288px;
|
||||
}
|
||||
.cart-footer .button {
|
||||
margin-top: 0;
|
||||
width: 288px;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-footer-amount {
|
||||
margin-left: 16px;
|
||||
margin-right: 24px;
|
||||
margin-left: 16px;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
.whole-preview {
|
||||
margin: auto;
|
||||
max-width: 1110px;
|
||||
padding: 0 16px;
|
||||
margin: auto;
|
||||
max-width: 1110px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
@media (min-width: 1440px) {
|
||||
.whole-preview {
|
||||
padding-left: 0;
|
||||
padding-bottom: 0;
|
||||
padding-right: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
.whole-preview {
|
||||
padding-left: 0;
|
||||
padding-bottom: 0;
|
||||
padding-right: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* end of Cart preview page */
|
||||
@@ -314,68 +331,68 @@ a:hover {
|
||||
/* Payment page */
|
||||
|
||||
#payment-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#payment-page .container {
|
||||
margin-top: 100px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
max-width: 1110px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
margin-top: 100px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
max-width: 1110px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.checkout-component {
|
||||
background: #f7f8f9;
|
||||
border: 1px solid #e6e9eb;
|
||||
border-radius: 12px;
|
||||
margin: 8px 0;
|
||||
background: #f7f8f9;
|
||||
border: 1px solid #e6e9eb;
|
||||
border-radius: 12px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
/* Adyen Components */
|
||||
.payment {
|
||||
width: 100%;
|
||||
padding-top: 0px !important;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
width: 100%;
|
||||
padding-top: 0px !important;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1076px) {
|
||||
#payment-page .container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
#payment-page .container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.payment {
|
||||
align-self: center;
|
||||
max-width: 610px;
|
||||
}
|
||||
.payment {
|
||||
align-self: center;
|
||||
max-width: 610px;
|
||||
}
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: #f7f8f9;
|
||||
border: 1px solid #e6e9eb;
|
||||
border-radius: 12px;
|
||||
padding-top: 18px;
|
||||
padding-bottom: 18px;
|
||||
width: 100%;
|
||||
max-width: 450px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: #f7f8f9;
|
||||
border: 1px solid #e6e9eb;
|
||||
border-radius: 12px;
|
||||
padding-top: 18px;
|
||||
padding-bottom: 18px;
|
||||
width: 100%;
|
||||
max-width: 450px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1076px) {
|
||||
.payment-container {
|
||||
align-self: center;
|
||||
max-width: 610px;
|
||||
}
|
||||
.payment-container {
|
||||
align-self: center;
|
||||
max-width: 610px;
|
||||
}
|
||||
}
|
||||
|
||||
/* end Payments page */
|
||||
@@ -383,15 +400,15 @@ a:hover {
|
||||
/* Dropin page */
|
||||
|
||||
#dropin {
|
||||
width: 100%;
|
||||
max-width: 450px;
|
||||
width: 100%;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1076px) {
|
||||
#dropin {
|
||||
width: 100%;
|
||||
max-width: 610px;
|
||||
}
|
||||
#dropin {
|
||||
width: 100%;
|
||||
max-width: 610px;
|
||||
}
|
||||
}
|
||||
|
||||
/* end Dropin page */
|
||||
@@ -399,84 +416,86 @@ a:hover {
|
||||
/* Customer billing information form */
|
||||
|
||||
.address {
|
||||
background: #f7f8f9;
|
||||
border: 1px solid #e6e9eb;
|
||||
border-radius: 12px;
|
||||
background: #f7f8f9;
|
||||
border: 1px solid #e6e9eb;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.billing-header {
|
||||
padding: 1em 1em 0px 1em;
|
||||
padding: 1em 1em 0px 1em;
|
||||
}
|
||||
|
||||
.address-form {
|
||||
padding: 1em;
|
||||
border-radius: 3px;
|
||||
padding: 1em;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.address-form * {
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-form input {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
font-size: 0.8em;
|
||||
padding: 0.5em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
font-size: 0.8em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.address-form input[type="text"] {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.address-label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
transition: color 0.1s ease-out;
|
||||
white-space: nowrap;
|
||||
font-size: 0.81em;
|
||||
font-weight: 400;
|
||||
line-height: 13px;
|
||||
padding-bottom: 5px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
transition: color 0.1s ease-out;
|
||||
white-space: nowrap;
|
||||
font-size: 0.81em;
|
||||
font-weight: 400;
|
||||
line-height: 13px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.address-input {
|
||||
display: inline-grid;
|
||||
width: 100%;
|
||||
display: inline-grid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.address-input:first-child {
|
||||
padding-right: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.address-input:last-child {
|
||||
padding-left: 4px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.address-input.full-width {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.address-line {
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.address-line4 div {
|
||||
width: 33.3%;
|
||||
width: 33.3%;
|
||||
}
|
||||
|
||||
.customer-form {
|
||||
width: 100%;
|
||||
max-width: 610px;
|
||||
margin-bottom: 16px;
|
||||
width: 100%;
|
||||
max-width: 610px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1076px) {
|
||||
.customer-form {
|
||||
align-self: center;
|
||||
max-width: 610px;
|
||||
}
|
||||
.customer-form {
|
||||
align-self: center;
|
||||
max-width: 610px;
|
||||
}
|
||||
}
|
||||
|
||||
/* end Customer billing information page */
|
||||
@@ -484,44 +503,44 @@ a:hover {
|
||||
/* Status page */
|
||||
|
||||
.status-container {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 100px 0 126px;
|
||||
text-align: center;
|
||||
margin: 100px 0 126px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.status .status-image {
|
||||
display: block;
|
||||
height: 100px;
|
||||
margin: 16px auto 0;
|
||||
display: block;
|
||||
height: 100px;
|
||||
margin: 16px auto 0;
|
||||
}
|
||||
|
||||
.status .status-image-thank-you {
|
||||
height: 66px;
|
||||
height: 66px;
|
||||
}
|
||||
|
||||
.status .status-message {
|
||||
margin: 8px 0 24px;
|
||||
margin: 8px 0 24px;
|
||||
}
|
||||
|
||||
.status .button {
|
||||
max-width: 236px;
|
||||
max-width: 236px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.status .button {
|
||||
max-width: 200px;
|
||||
}
|
||||
.status .button {
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.title-status {
|
||||
margin-top: 10%;
|
||||
text-align: center;
|
||||
margin-top: 10%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* end Status page */
|
||||
|
||||
BIN
src/main/resources/static/img/.DS_Store
vendored
BIN
src/main/resources/static/img/.DS_Store
vendored
Binary file not shown.
BIN
src/main/resources/static/img/MyDemo.gif
Normal file
BIN
src/main/resources/static/img/MyDemo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
@@ -10,7 +10,6 @@ const structureRequest = (data) => {
|
||||
paymentRequest['browserInfo'] = data.browserInfo;
|
||||
}
|
||||
|
||||
console.log(paymentRequest);
|
||||
return paymentRequest;
|
||||
};
|
||||
|
||||
@@ -19,7 +18,7 @@ const handleFinalState = (resultCode) => {
|
||||
if (resultCode === 'Authorised') {
|
||||
window.location.href = "http://localhost:8080/success";
|
||||
|
||||
} else if (resultCode === 'Pending') {
|
||||
} else if (resultCode === 'Pending' || resultCode === 'Received') {
|
||||
window.location.href = "http://localhost:8080/pending";
|
||||
|
||||
} else if (resultCode === 'Error') {
|
||||
@@ -63,7 +62,7 @@ const onSubmit = (state, component) => {
|
||||
};
|
||||
|
||||
const onAdditionalDetails = (state, component) => {
|
||||
console.log("On additionalDetails triggered");
|
||||
console.log("OnAdditionalDetails triggered");
|
||||
fetch(`/api/submitAdditionalDetails`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -80,7 +79,8 @@ const onAdditionalDetails = (state, component) => {
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
throw Error(error);
|
||||
console.log(error);
|
||||
window.location.href = "http://localhost:8080/failed";
|
||||
});
|
||||
};
|
||||
|
||||
@@ -91,59 +91,30 @@ const onError = (error) => {
|
||||
|
||||
// Create Adyen checkout instance and initilize component
|
||||
const createAdyenCheckout = () => {
|
||||
|
||||
// Get /paymentMethods call and clientKey response Jinja2 passed back to <script> tag
|
||||
const paymentMethods = JSON.parse(document.getElementById('payment-methods').innerHTML);
|
||||
const originKey = document.getElementById('origin-key').innerHTML;
|
||||
|
||||
// Placeholder values
|
||||
const translations = {
|
||||
// "en-US": {
|
||||
// "creditCard.numberField.title": "Custom Card Name",
|
||||
// }
|
||||
};
|
||||
const clientKey = JSON.parse(document.getElementById('client-key').innerHTML);
|
||||
|
||||
// Docs for custom styling of dropin - https://docs.adyen.com/checkout/drop-in-web/customization
|
||||
// Docs for configuration changes to components (configurations are payment method specific) E.g. Cards - https://docs.adyen.com/payment-methods/cards/web-component#show-the-available-cards-in-your-payment-form
|
||||
const paymentMethodsConfiguration = {
|
||||
// applepay: { // Example required configuration for Apple Pay
|
||||
// configuration: {
|
||||
// merchantName: 'Adyen Test merchant', // Name to be displayed on the form
|
||||
// merchantIdentifier: 'adyen.test.merchant' // Your Apple merchant identifier as described in https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrequest/2951611-merchantidentifier
|
||||
// },
|
||||
// onValidateMerchant: (resolve, reject, validationURL) => {
|
||||
// // Call the validation endpoint with validationURL.
|
||||
// // Call resolve(MERCHANTSESSION) or reject() to complete merchant validation.
|
||||
// }
|
||||
// },
|
||||
// paywithgoogle: { // Example required configuration for Google Pay
|
||||
// environment: "TEST", // Change this to PRODUCTION when you're ready to accept live Google Pay payments
|
||||
// configuration: {
|
||||
// gatewayMerchantId: "TylerDouglas", // Your Adyen merchant or company account name. Remove this field in TEST.
|
||||
// merchantIdentifier: "12345678910111213141" // Required for PRODUCTION. Remove this field in TEST. Your Google Merchant ID as described in https://developers.google.com/pay/api/web/guides/test-and-deploy/deploy-production-environment#obtain-your-merchantID
|
||||
// }
|
||||
// },
|
||||
card: { // Example optional configuration for Cards
|
||||
// hideCVC: false, // Change this to true to hide the CVC field for stored cards. false is default
|
||||
// placeholders: { # Change placeholder text for the following fields
|
||||
// encryptedCardNumber: "",
|
||||
// encryptedSecurityCode: ""
|
||||
// },
|
||||
// billingAddressRequired: true,
|
||||
// hasHolderName: true,
|
||||
// holderNameRequired: true,
|
||||
card: {
|
||||
hasHolderName: true,
|
||||
holderNameRequired: true,
|
||||
enableStoreDetails: true,
|
||||
name: 'Credit or debit card'
|
||||
},
|
||||
ach: { // Default ACH user information
|
||||
ach: {
|
||||
holderName: 'Ach User',
|
||||
data: {
|
||||
billingAddress: {
|
||||
street: 'Infinite Loop',
|
||||
postalCode: '95014',
|
||||
city: 'Cupertino',
|
||||
houseNumberOrName: '1',
|
||||
country: 'US',
|
||||
stateOrProvince: 'CA'
|
||||
}
|
||||
}
|
||||
billingAddressRequired: false
|
||||
},
|
||||
paypal: {
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: 1000
|
||||
},
|
||||
environment: "test", // Change this to "live" when you're ready to accept live PayPal payments
|
||||
countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production.
|
||||
intent: "authorize", // Change this to "authorize" if the payments should not be captured immediately. Contact Support to enable this flow.
|
||||
}
|
||||
};
|
||||
|
||||
@@ -152,21 +123,26 @@ const createAdyenCheckout = () => {
|
||||
showPayButton: true,
|
||||
locale: "en_US",
|
||||
environment: "test",
|
||||
originKey: originKey,
|
||||
clientKey: clientKey,
|
||||
paymentMethodsResponse: paymentMethods,
|
||||
translations: translations,
|
||||
onSubmit: onSubmit,
|
||||
onAdditionalDetails: onAdditionalDetails,
|
||||
onError: onError
|
||||
};
|
||||
return new AdyenCheckout(configObj);
|
||||
};
|
||||
const integrationType = document.getElementById('integration-type').innerHTML;
|
||||
const integrationType = JSON.parse(document.getElementById('integration-type').innerHTML);
|
||||
|
||||
// Adjust style for Dropin
|
||||
// Adjust style for Specific Components
|
||||
if (integrationType === 'dropin') {
|
||||
document.getElementById('component').style.padding = '0em';
|
||||
document.getElementsByClassName('checkout-component')[0].style.border = 'none';
|
||||
let container = document.getElementsByClassName('checkout-component')[0];
|
||||
container.style.border = 'none';
|
||||
container.style.padding = '0';
|
||||
} else if (integrationType === 'paypal') {
|
||||
let el = document.querySelector('.payment');
|
||||
el.style.display = 'flex';
|
||||
el.style.justifyContent = 'center';
|
||||
}
|
||||
|
||||
const checkout = createAdyenCheckout();
|
||||
|
||||
Reference in New Issue
Block a user