spree_vpago 2.3.1.pre.pre1 → 2.3.1.pre.pre2
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf40b3c25765c51449876b91d832f1f34670a0827a5543678e630ff67cb45141
|
|
4
|
+
data.tar.gz: 2023ecce0492f44de3b007715d5ffc7449de960efe3c117bd1bd3380bba91425
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52dda8f760748e69b0b1f1cc628fa504d1d63984ccf56b61dad3421ce4c28353d6e00b8dc4aecc77593a9b899ed9245ca55f327b90038ca92f5f689038e05e1f
|
|
7
|
+
data.tar.gz: b2c383fbcef6fc0b2c91273624648fe8f514b5cf905eb35129c433998db240f59d1e9c2a6fd92583465c79520e6f656635ec93d2700df357d8475acf5c8095d0
|
data/Gemfile.lock
CHANGED
|
@@ -17,8 +17,6 @@ module Spree
|
|
|
17
17
|
|
|
18
18
|
validates :preferred_public_key, presence: true, if: :enable_pre_auth?
|
|
19
19
|
validates :preferred_abapay_khqr_deeplink_option, inclusion: { in: ABAPAY_KHQR_DEEPLINK_OPTIONS }, if: :abapay_khqr_deeplink?
|
|
20
|
-
|
|
21
|
-
# For initial save, there is no preferences yet, so validating them would failed. Only validate along with host or api key.
|
|
22
20
|
validates :preferred_payment_option, inclusion: { in: PAYMENT_OPTIONS }
|
|
23
21
|
|
|
24
22
|
def reviewing_mode?
|
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
</form>
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
|
+
const isMobile = <%= mobile_user_agent? %>;
|
|
17
|
+
|
|
18
|
+
const abapayKhqrDeeplink = <%= @payment.payment_method.abapay_khqr_deeplink? %>;
|
|
19
|
+
const shouldOpenAbaPayDeeplink = isMobile && <%= @payment.payment_method.open_abapay_deeplink? %>;
|
|
20
|
+
|
|
21
|
+
// If the device is not mobile, deeplinks won't work anyway,
|
|
22
|
+
// so we always open the checkout URL (KHQR page) for desktop users.
|
|
23
|
+
//
|
|
24
|
+
// On mobile, only open the checkout URL if explicitly enabled.
|
|
25
|
+
const shouldOpenCheckoutUrl = !isMobile || <%= @payment.payment_method.open_checkout_url? %>;
|
|
26
|
+
|
|
16
27
|
function showRedirectContainer(buttonLabel = null, onClick = null) {
|
|
17
28
|
const loadingContainer = document.getElementById('vpago_loading_container');
|
|
18
29
|
const redirectContainer = document.getElementById('vpago_redirect_container');
|
|
@@ -34,17 +45,6 @@
|
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
function submitFormViaJs(){
|
|
37
|
-
const isMobile = <%= mobile_user_agent? %>;
|
|
38
|
-
|
|
39
|
-
const abapayKhqrDeeplink = <%= @payment.payment_method.abapay_khqr_deeplink? %>;
|
|
40
|
-
const shouldOpenAbaPayDeeplink = isMobile && <%= @payment.payment_method.open_abapay_deeplink? %>;
|
|
41
|
-
|
|
42
|
-
// If the device is not mobile, deeplinks won't work anyway,
|
|
43
|
-
// so we always open the checkout URL (KHQR page) for desktop users.
|
|
44
|
-
//
|
|
45
|
-
// On mobile, only open the checkout URL if explicitly enabled.
|
|
46
|
-
const shouldOpenCheckoutUrl = !isMobile || <%= @payment.payment_method.open_checkout_url? %>;
|
|
47
|
-
|
|
48
48
|
var formData = new FormData(document.getElementById("aba_merchant_request"));
|
|
49
49
|
var checkoutUrl = document.getElementById("aba_merchant_request").action;
|
|
50
50
|
|
data/lib/spree_vpago/version.rb
CHANGED