@licklist/design 0.59.0-dev.5 → 0.59.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +1 -0
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +99 -113
- package/package.json +1 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +12 -4
- package/src/iframe/ryft/utils/ryft-form.ts +8 -4
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +1 -0
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +99 -113
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":";AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAC;AAKnH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED,eAAO,MAAM,eAAe,gGAOzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":";AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAC;AAKnH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED,eAAO,MAAM,eAAe,gGAOzB,oBAAoB,gBAsKtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),n=e(r),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),n=e(r),i=require("react-router-dom"),a=require("../../static/loader/BlockLoader.js"),o=require("react-i18next"),d=e(require("react-bootstrap/Button")),u=require("react-hook-form"),l=require("../../static/loader/ButtonLoader.js"),c=e(require("react-bootstrap/Alert"));require("../../static/index.js");var s=require("@licklist/plugins/dist/hooks/Ryft/useRyftPayment"),f=require("./utils/ryft-form.js"),m={insufficient_funds:"insufficientFunds",declined_do_not_honour:"declinedDoNotHonour",invalid_card_number:"invalidCardNumber",restricted_card:"restrictedCard",security_violation:"securityViolation",expired_card:"expiredCard",gateway_reject:"gatewayReject",bad_track_data:"badTrackData","3ds_authentication_failure":"3dsAuthenticationFailure",unknown_error:"unknownError"};exports.RyftPaymentForm=function(e){var v,y,_,E=e.accountId,g=e.isCreateLoading,h=e.providerPaymentSettings,p=e.initRyft,b=e.resetReferrer,R=e.onSubmit,q=o.useTranslation(["Design","Validation","Ryft"]).t,N=r.useRef(null),S=i.useHistory(),k=t.__read(r.useState(!1),2),w=k[0],P=k[1],T=t.__read(r.useState(!1),2),F=T[0],A=T[1],j=t.__read(r.useState(!1),2),x=j[0],C=j[1],D=t.__read(r.useState(void 0),2),M=D[0],L=D[1],U=s.useRyftPayment().addEventHandler,V=u.useForm(),B=function(){b&&b()},I=function(e){(null==e?void 0:e.id)&&(null==e?void 0:e.returnUrl)&&(window.location.href="".concat(e.returnUrl,"&ps=").concat(e.id),B())};return r.useEffect((function(){var e,t,r,n,i;!(null===(t=null===(e=N.current)||void 0===e?void 0:e.childNodes)||void 0===t?void 0:t.length)||(null===(n=null===(r=N.current)||void 0===r?void 0:r.childNodes)||void 0===n?void 0:n.length)<3||!(null===(i=E.data)||void 0===i?void 0:i.account_id)||f.injectComponentsInRyftForm({t:q,additionalPaymentMethodsEnabled:null==h?void 0:h.additionalPaymentMethodsEnabled})}),[null===(y=null===(v=N.current)||void 0===v?void 0:v.childNodes)||void 0===y?void 0:y.length]),r.useEffect((function(){var e;(null===(e=E.data)||void 0===e?void 0:e.account_id)&&!E.isError&&p((function(){U("cardValidationChanged",(function(e){P(e.isValid)})),C(!1)}),(function(){return C(!0)}))}),[null===(_=E.data)||void 0===_?void 0:_.account_id]),E.isLoading||E.isFetching||g?n.createElement("div",{className:"mt-5 pt-5"},n.createElement(a.BlockLoader,null)):E.isError?n.createElement("div",{className:"mt-5 ryft-init-failure"},n.createElement(c,{key:"danger",variant:"danger"},n.createElement("h5",null,q("Ryft:errorMessage")),q("Ryft:noPaymentProviderFound"))):x?n.createElement("div",{className:"mt-5 ryft-init-failure"},n.createElement(c,{key:"danger",variant:"danger"},n.createElement("h5",null,q("Ryft:errorMessage")),q("Ryft:initFailureMessage"),n.createElement("div",{className:"flex flex-column align-items-center mt-4"},n.createElement(d,{variant:"primary",onClick:function(){S.go(0)}},q("Ryft:refresh"))))):n.createElement(n.Fragment,null,n.createElement("form",{ref:N,id:"ryft-pay-form",noValidate:!0,onSubmit:V.handleSubmit((function(){return t.__awaiter(void 0,void 0,void 0,(function(){var e,r,n;return t.__generator(this,(function(t){switch(t.label){case 0:A(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,R()];case 2:if((e=t.sent())||L("unknown_error"),"requiredAction"in e){if(e.status!==s.RYFT_STATUS_PENDING_ACTION||!(null===(n=e.requiredAction)||void 0===n?void 0:n.url))return I(e),[2];window.location.href=e.requiredAction.url,B()}return e.status===s.RYFT_STATUS_APPROVED||e.status===s.RYFT_STATUS_CAPTURED?(I(e),[2]):(e.lastError&&(L(e.lastError),B()),[3,5]);case 3:return r=t.sent(),L(r),[3,5];case 4:return A(!1),[7];case 5:return[2]}}))}))})),className:"ryft-payment-form"},n.createElement("div",{className:"submit-button-wrapper mt-4 p-1"},n.createElement(d,{type:"submit",disabled:F||!w},F&&n.createElement(l.ButtonLoader,null),q("Design:buyNow"))),M&&n.createElement("div",{id:"ryft-payment-error"},q("".concat(m[M])))))},exports.ryftErrorMap=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAO,MAAM,0BAA0B;OAIlC,UAAU,MAAM,EAAE,CAAC;sCACY,OAAO;
|
|
1
|
+
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAO,MAAM,0BAA0B;OAIlC,UAAU,MAAM,EAAE,CAAC;sCACY,OAAO;UA6C1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.injectComponentsInRyftForm=function(e){var t=e.t,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.injectComponentsInRyftForm=function(e){var t,n,i,d=e.t,o=e.additionalPaymentMethodsEnabled,r=document.getElementById("ryft-pay-iframe");if(r){null===(t=document.getElementById("card-title-container"))||void 0===t||t.remove();var a=document.createElement("div"),l=document.createElement("div"),m=document.createElement("div");m.id="card-title-container",a.textContent=d("Design:enterCardDetails"),l.className="bold-text form-label",l.innerText=d("Design:paymentDetails"),m.append(a,l),null==r||r.before(m);var c=document.getElementById("ryft-pay-grid");if(c&&o){null===(n=document.getElementById("mobile-pay-title"))||void 0===n||n.remove(),null===(i=document.getElementById("mobile-pay-divider-container"))||void 0===i||i.remove();var v=document.createElement("div"),u=document.createElement("div"),y=document.createElement("div"),p=document.createElement("div");v.className="mobile-pay-title",v.innerText=d("Design:expressCheckoutWith"),v.id="mobile-pay-title",u.id="mobile-pay-divider-text",u.innerText="or",y.id="mobile-pay-divider",p.id="mobile-pay-divider-container",p.append(u,y),c.before(v),c.after(p)}}};
|
|
@@ -47,141 +47,127 @@
|
|
|
47
47
|
margin-left: 0.5rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.ryft-payment-form {
|
|
51
|
-
.submit-button-wrapper {
|
|
52
|
-
margin: -1rem 0 1rem;
|
|
53
|
-
|
|
54
|
-
button {
|
|
55
|
-
width: 100%;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
#mobile-pay-divider-container {
|
|
59
|
-
display: flex;
|
|
60
|
-
position: relative;
|
|
61
|
-
margin-bottom: 1rem;
|
|
62
|
-
#mobile-pay-divider-text {
|
|
63
|
-
margin-right: 1rem;
|
|
64
|
-
font-size: 0.875rem;
|
|
65
|
-
font-weight: 600;
|
|
66
|
-
}
|
|
67
|
-
#mobile-pay-divider {
|
|
68
|
-
width: 100%;
|
|
69
|
-
border-bottom: 1px #dfdfdf solid;
|
|
70
|
-
margin-bottom: 0.6rem;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
#card-title-container {
|
|
75
|
-
height: auto;
|
|
76
|
-
border: none;
|
|
77
|
-
margin-bottom: 0.5rem;
|
|
78
|
-
text-align: left;
|
|
79
|
-
:first-child {
|
|
80
|
-
font-size: 1rem;
|
|
81
|
-
font-weight: 600;
|
|
82
|
-
margin-bottom: 1rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.form-label {
|
|
86
|
-
margin-bottom: 0.5rem;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
.mobile-pay-title {
|
|
90
|
-
display: block;
|
|
91
|
-
font-weight: 600;
|
|
92
|
-
font-size: 1rem;
|
|
93
|
-
color: black;
|
|
94
|
-
padding: 0;
|
|
95
|
-
font-style: normal;
|
|
96
|
-
font-family: inherit;
|
|
97
|
-
margin-bottom: 1rem;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
50
|
.form {
|
|
101
51
|
.input {
|
|
102
52
|
border: 2px solid #525252 !important;
|
|
103
53
|
}
|
|
104
54
|
}
|
|
105
55
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
114
|
-
.ryft-pay-grid {
|
|
115
|
-
width: 100%;
|
|
116
|
-
max-width: 15.5rem;
|
|
117
|
-
margin-bottom: 1rem;
|
|
56
|
+
@include media-breakpoint-down(sm) {
|
|
57
|
+
.left-block-container {
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
overflow: visible;
|
|
118
60
|
}
|
|
119
|
-
.ryft-pay-apple-pay-button {
|
|
120
|
-
border-radius: 0.25rem;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.divider {
|
|
125
|
-
display: none !important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
@include media-breakpoint-down(sm) {
|
|
129
|
-
.left-block-container {
|
|
130
|
-
max-height: 100%;
|
|
131
|
-
overflow: visible;
|
|
132
61
|
}
|
|
133
62
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@include media-breakpoint-down(sm) {
|
|
137
|
-
flex-direction: column-reverse;
|
|
138
|
-
overflow: scroll;
|
|
139
63
|
|
|
140
64
|
@include media-breakpoint-down(sm) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
65
|
+
flex-direction: column-reverse;
|
|
66
|
+
overflow: scroll;
|
|
67
|
+
|
|
68
|
+
@include media-breakpoint-down(sm) {
|
|
69
|
+
.left-block {
|
|
70
|
+
min-height: 100%;
|
|
71
|
+
}
|
|
72
|
+
.right-block {
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
width: 100%;
|
|
75
|
+
.children-wrapper {
|
|
76
|
+
.accordion {
|
|
77
|
+
.collapse {
|
|
78
|
+
overflow: visible;
|
|
79
|
+
overflow-x: unset;
|
|
80
|
+
scrollbar-width: unset;
|
|
81
|
+
}
|
|
153
82
|
}
|
|
154
83
|
}
|
|
155
84
|
}
|
|
156
85
|
}
|
|
157
86
|
}
|
|
158
87
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
88
|
+
::-webkit-scrollbar {
|
|
89
|
+
display: none;
|
|
90
|
+
scrollbar-width: none;
|
|
91
|
+
}
|
|
163
92
|
}
|
|
164
93
|
}
|
|
165
94
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
max-width: 100%;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
95
|
+
#ryft-threeDSMethodIframe {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ryft-payment-form {
|
|
100
|
+
.submit-button-wrapper {
|
|
101
|
+
margin: -1rem 0 1rem;
|
|
102
|
+
|
|
103
|
+
button {
|
|
104
|
+
width: 100%;
|
|
181
105
|
}
|
|
182
106
|
}
|
|
107
|
+
#mobile-pay-divider-container {
|
|
108
|
+
display: flex;
|
|
109
|
+
position: relative;
|
|
110
|
+
margin-bottom: 1rem;
|
|
111
|
+
#mobile-pay-divider-text {
|
|
112
|
+
margin-right: 1rem;
|
|
113
|
+
font-size: 0.875rem;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
}
|
|
116
|
+
#mobile-pay-divider {
|
|
117
|
+
width: 100%;
|
|
118
|
+
border-bottom: 1px #dfdfdf solid;
|
|
119
|
+
margin-bottom: 0.6rem;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
#card-title-container {
|
|
124
|
+
height: auto;
|
|
125
|
+
border: none;
|
|
126
|
+
margin-bottom: 0.5rem;
|
|
127
|
+
text-align: left;
|
|
128
|
+
:first-child {
|
|
129
|
+
font-size: 1rem;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
margin-bottom: 1rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.form-label {
|
|
135
|
+
margin-bottom: 0.5rem;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
.mobile-pay-title {
|
|
139
|
+
display: block;
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
font-size: 1rem;
|
|
142
|
+
color: black;
|
|
143
|
+
padding: 0;
|
|
144
|
+
font-style: normal;
|
|
145
|
+
font-family: inherit;
|
|
146
|
+
margin-bottom: 1rem;
|
|
147
|
+
}
|
|
183
148
|
}
|
|
184
149
|
|
|
185
|
-
|
|
186
|
-
|
|
150
|
+
@include media-breakpoint-up(md) {
|
|
151
|
+
.ryft-payment-form,
|
|
152
|
+
.iframe-payment-form {
|
|
153
|
+
position: relative;
|
|
154
|
+
max-height: 300px !important;
|
|
155
|
+
.submit-button-wrapper {
|
|
156
|
+
max-width: 15.5rem;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
161
|
+
.ryft-pay-grid {
|
|
162
|
+
width: 100%;
|
|
163
|
+
max-width: 15.5rem;
|
|
164
|
+
margin-bottom: 1rem;
|
|
165
|
+
}
|
|
166
|
+
.ryft-pay-apple-pay-button {
|
|
167
|
+
border-radius: 0.25rem;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.divider {
|
|
171
|
+
display: none !important;
|
|
172
|
+
}
|
|
187
173
|
}
|
package/package.json
CHANGED
|
@@ -123,18 +123,26 @@ export const RyftPaymentForm = ({
|
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
useEffect(
|
|
126
|
-
() =>
|
|
126
|
+
() => {
|
|
127
|
+
if (
|
|
128
|
+
!formRef.current?.childNodes?.length ||
|
|
129
|
+
formRef.current?.childNodes?.length < 3 ||
|
|
130
|
+
!accountId.data?.account_id
|
|
131
|
+
) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
127
134
|
injectComponentsInRyftForm({
|
|
128
135
|
t,
|
|
129
136
|
additionalPaymentMethodsEnabled:
|
|
130
137
|
providerPaymentSettings?.additionalPaymentMethodsEnabled,
|
|
131
|
-
})
|
|
138
|
+
});
|
|
139
|
+
},
|
|
132
140
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
141
|
[formRef.current?.childNodes?.length]
|
|
134
142
|
);
|
|
135
143
|
|
|
136
144
|
useEffect(() => {
|
|
137
|
-
if (!accountId.data || accountId.isError) return;
|
|
145
|
+
if (!accountId.data?.account_id || accountId.isError) return;
|
|
138
146
|
|
|
139
147
|
initRyft(
|
|
140
148
|
() => {
|
|
@@ -148,7 +156,7 @@ export const RyftPaymentForm = ({
|
|
|
148
156
|
);
|
|
149
157
|
|
|
150
158
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
151
|
-
}, [accountId.data]);
|
|
159
|
+
}, [accountId.data?.account_id]);
|
|
152
160
|
|
|
153
161
|
if (accountId.isLoading || accountId.isFetching || isCreateLoading)
|
|
154
162
|
return (
|
|
@@ -8,13 +8,12 @@ export const injectComponentsInRyftForm = ({
|
|
|
8
8
|
additionalPaymentMethodsEnabled?: boolean;
|
|
9
9
|
}) => {
|
|
10
10
|
const cardContainer = document.getElementById("ryft-pay-iframe");
|
|
11
|
-
const oldCardDividerContainer = document.getElementById(
|
|
12
|
-
"card-title-container"
|
|
13
|
-
);
|
|
14
11
|
|
|
15
|
-
if (!cardContainer
|
|
12
|
+
if (!cardContainer) {
|
|
16
13
|
return;
|
|
17
14
|
}
|
|
15
|
+
// Removing of the old title container
|
|
16
|
+
document.getElementById("card-title-container")?.remove();
|
|
18
17
|
|
|
19
18
|
const cardTitle = document.createElement("div");
|
|
20
19
|
const cardText = document.createElement("div");
|
|
@@ -32,6 +31,10 @@ export const injectComponentsInRyftForm = ({
|
|
|
32
31
|
return;
|
|
33
32
|
}
|
|
34
33
|
|
|
34
|
+
// Removing of the old mobile title container and divider container
|
|
35
|
+
document.getElementById("mobile-pay-title")?.remove();
|
|
36
|
+
document.getElementById("mobile-pay-divider-container")?.remove();
|
|
37
|
+
|
|
35
38
|
// Adding title and divider for apple and google pay button
|
|
36
39
|
const mobilePayTitle = document.createElement("div");
|
|
37
40
|
const dividerText = document.createElement("div");
|
|
@@ -39,6 +42,7 @@ export const injectComponentsInRyftForm = ({
|
|
|
39
42
|
const container = document.createElement("div");
|
|
40
43
|
mobilePayTitle.className = "mobile-pay-title";
|
|
41
44
|
mobilePayTitle.innerText = t("Design:expressCheckoutWith");
|
|
45
|
+
mobilePayTitle.id = "mobile-pay-title";
|
|
42
46
|
dividerText.id = "mobile-pay-divider-text";
|
|
43
47
|
dividerText.innerText = "or";
|
|
44
48
|
divider.id = "mobile-pay-divider";
|
|
@@ -47,141 +47,127 @@
|
|
|
47
47
|
margin-left: 0.5rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.ryft-payment-form {
|
|
51
|
-
.submit-button-wrapper {
|
|
52
|
-
margin: -1rem 0 1rem;
|
|
53
|
-
|
|
54
|
-
button {
|
|
55
|
-
width: 100%;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
#mobile-pay-divider-container {
|
|
59
|
-
display: flex;
|
|
60
|
-
position: relative;
|
|
61
|
-
margin-bottom: 1rem;
|
|
62
|
-
#mobile-pay-divider-text {
|
|
63
|
-
margin-right: 1rem;
|
|
64
|
-
font-size: 0.875rem;
|
|
65
|
-
font-weight: 600;
|
|
66
|
-
}
|
|
67
|
-
#mobile-pay-divider {
|
|
68
|
-
width: 100%;
|
|
69
|
-
border-bottom: 1px #dfdfdf solid;
|
|
70
|
-
margin-bottom: 0.6rem;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
#card-title-container {
|
|
75
|
-
height: auto;
|
|
76
|
-
border: none;
|
|
77
|
-
margin-bottom: 0.5rem;
|
|
78
|
-
text-align: left;
|
|
79
|
-
:first-child {
|
|
80
|
-
font-size: 1rem;
|
|
81
|
-
font-weight: 600;
|
|
82
|
-
margin-bottom: 1rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.form-label {
|
|
86
|
-
margin-bottom: 0.5rem;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
.mobile-pay-title {
|
|
90
|
-
display: block;
|
|
91
|
-
font-weight: 600;
|
|
92
|
-
font-size: 1rem;
|
|
93
|
-
color: black;
|
|
94
|
-
padding: 0;
|
|
95
|
-
font-style: normal;
|
|
96
|
-
font-family: inherit;
|
|
97
|
-
margin-bottom: 1rem;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
50
|
.form {
|
|
101
51
|
.input {
|
|
102
52
|
border: 2px solid #525252 !important;
|
|
103
53
|
}
|
|
104
54
|
}
|
|
105
55
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
114
|
-
.ryft-pay-grid {
|
|
115
|
-
width: 100%;
|
|
116
|
-
max-width: 15.5rem;
|
|
117
|
-
margin-bottom: 1rem;
|
|
56
|
+
@include media-breakpoint-down(sm) {
|
|
57
|
+
.left-block-container {
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
overflow: visible;
|
|
118
60
|
}
|
|
119
|
-
.ryft-pay-apple-pay-button {
|
|
120
|
-
border-radius: 0.25rem;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.divider {
|
|
125
|
-
display: none !important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
@include media-breakpoint-down(sm) {
|
|
129
|
-
.left-block-container {
|
|
130
|
-
max-height: 100%;
|
|
131
|
-
overflow: visible;
|
|
132
61
|
}
|
|
133
62
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@include media-breakpoint-down(sm) {
|
|
137
|
-
flex-direction: column-reverse;
|
|
138
|
-
overflow: scroll;
|
|
139
63
|
|
|
140
64
|
@include media-breakpoint-down(sm) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
65
|
+
flex-direction: column-reverse;
|
|
66
|
+
overflow: scroll;
|
|
67
|
+
|
|
68
|
+
@include media-breakpoint-down(sm) {
|
|
69
|
+
.left-block {
|
|
70
|
+
min-height: 100%;
|
|
71
|
+
}
|
|
72
|
+
.right-block {
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
width: 100%;
|
|
75
|
+
.children-wrapper {
|
|
76
|
+
.accordion {
|
|
77
|
+
.collapse {
|
|
78
|
+
overflow: visible;
|
|
79
|
+
overflow-x: unset;
|
|
80
|
+
scrollbar-width: unset;
|
|
81
|
+
}
|
|
153
82
|
}
|
|
154
83
|
}
|
|
155
84
|
}
|
|
156
85
|
}
|
|
157
86
|
}
|
|
158
87
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
88
|
+
::-webkit-scrollbar {
|
|
89
|
+
display: none;
|
|
90
|
+
scrollbar-width: none;
|
|
91
|
+
}
|
|
163
92
|
}
|
|
164
93
|
}
|
|
165
94
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
max-width: 100%;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
95
|
+
#ryft-threeDSMethodIframe {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ryft-payment-form {
|
|
100
|
+
.submit-button-wrapper {
|
|
101
|
+
margin: -1rem 0 1rem;
|
|
102
|
+
|
|
103
|
+
button {
|
|
104
|
+
width: 100%;
|
|
181
105
|
}
|
|
182
106
|
}
|
|
107
|
+
#mobile-pay-divider-container {
|
|
108
|
+
display: flex;
|
|
109
|
+
position: relative;
|
|
110
|
+
margin-bottom: 1rem;
|
|
111
|
+
#mobile-pay-divider-text {
|
|
112
|
+
margin-right: 1rem;
|
|
113
|
+
font-size: 0.875rem;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
}
|
|
116
|
+
#mobile-pay-divider {
|
|
117
|
+
width: 100%;
|
|
118
|
+
border-bottom: 1px #dfdfdf solid;
|
|
119
|
+
margin-bottom: 0.6rem;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
#card-title-container {
|
|
124
|
+
height: auto;
|
|
125
|
+
border: none;
|
|
126
|
+
margin-bottom: 0.5rem;
|
|
127
|
+
text-align: left;
|
|
128
|
+
:first-child {
|
|
129
|
+
font-size: 1rem;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
margin-bottom: 1rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.form-label {
|
|
135
|
+
margin-bottom: 0.5rem;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
.mobile-pay-title {
|
|
139
|
+
display: block;
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
font-size: 1rem;
|
|
142
|
+
color: black;
|
|
143
|
+
padding: 0;
|
|
144
|
+
font-style: normal;
|
|
145
|
+
font-family: inherit;
|
|
146
|
+
margin-bottom: 1rem;
|
|
147
|
+
}
|
|
183
148
|
}
|
|
184
149
|
|
|
185
|
-
|
|
186
|
-
|
|
150
|
+
@include media-breakpoint-up(md) {
|
|
151
|
+
.ryft-payment-form,
|
|
152
|
+
.iframe-payment-form {
|
|
153
|
+
position: relative;
|
|
154
|
+
max-height: 300px !important;
|
|
155
|
+
.submit-button-wrapper {
|
|
156
|
+
max-width: 15.5rem;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
161
|
+
.ryft-pay-grid {
|
|
162
|
+
width: 100%;
|
|
163
|
+
max-width: 15.5rem;
|
|
164
|
+
margin-bottom: 1rem;
|
|
165
|
+
}
|
|
166
|
+
.ryft-pay-apple-pay-button {
|
|
167
|
+
border-radius: 0.25rem;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.divider {
|
|
171
|
+
display: none !important;
|
|
172
|
+
}
|
|
187
173
|
}
|