reza fixed payment

master
Reza_ashrafi 3 years ago
parent 406d4ce8a2
commit e4e653118c
  1. 11
      src/redux/actions/userFactor.js
  2. 5
      src/redux/reducers/userFactor.js
  3. 7
      src/screens/QR/layouts/Scan/index.js

@ -24,12 +24,11 @@ const userFactor = {
},
//vod
payment:
(data1 = {}, data2 = {}) =>
async (dispatch) => {
await proxy.post("userProduct/addVOD", data1, { dispatch });
await proxy.post("userFactor/paymentVOD", data2, { dispatch });
},
// payment:
// (data1 = {}, data2 = {}) =>
// async (dispatch) => {
// await proxy.post("userFactor/payment", data1, { dispatch });
// },
verify:
(data = {}) =>
async (dispatch) =>

@ -1,4 +1,5 @@
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
import {Linking} from "react-native";
const initialState = {
loading: false,
@ -43,6 +44,7 @@ export default function userFactor(state = initialState, action) {
case "userFactor/delete":
return { ...state, loading: false, error: null };
case "userFactor/payment":
Linking.openURL(data);
return { ...state, loading: false, error: null };
//vod
case "userFactor/myList":
@ -51,7 +53,8 @@ export default function userFactor(state = initialState, action) {
return { ...state, loading: false, info: data.factorInfo, error: null };
case "userFactor/deleteUserOffCode":
return { ...state, loading: false, error: null };
case "userFactor/paymentVOD":
case "userFactor/payment":
console.log(data);
return { ...state, loading: false, error: null, isVerified: false };
case "userFactor/verifyVOD":
return { ...state, loading: false, error: null, isVerified: true };

@ -34,18 +34,11 @@ function Scan({ route, theme, page }) {
}, []);
const handleBarCodeScanned = ({ type, data }) => {
setScanned(true);
if (page === "activation") {
setTimeout(() => {
setScanned(false);
}, 300);
navigation.replace("Activation", {
data: data.slice(data.lastIndexOf("/") + 1, data.length),
});
} else {
setTimeout(() => {
setScanned(false);
}, 300);
navigation.replace("QRContent", {
data: data.slice(data.lastIndexOf("/") + 1, data.length),
});

Loading…
Cancel
Save