Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cashfree theme builder crashes app #6

Closed
Subhrajyotimodak opened this issue Aug 10, 2022 · 0 comments
Closed

Cashfree theme builder crashes app #6

Subhrajyotimodak opened this issue Aug 10, 2022 · 0 comments

Comments

@Subhrajyotimodak
Copy link

While passing the CFThemeBuilder in CFDropCheckoutPayment class, following things are happening:
On iOS => app crashes without any error
On android => nothing happens

Below is a snippet of usage:

const createPayment = async (order_id: string) => {
    try {
      const token = await getCashFreeToken();
      if (!token) return;
      const session = new CFSession(token, order_id, CFEnvironment.SANDBOX);
      const paymentMode = new CFPaymentComponentBuilder()
        .add(CFPaymentModes.NB)
        .add(CFPaymentModes.UPI)
        .add(CFPaymentModes.EMI)
        .add(CFPaymentModes.CARD)
        .add(CFPaymentModes.PAYPAL)
        .add(CFPaymentModes.WALLET)
        .add(CFPaymentModes.PAY_LATER)
        .build();
      const theme = new CFThemeBuilder()
        .setButtonTextColor(colors.white_one)
        .setPrimaryTextColor(colors.black_one)
        .setSecondaryTextColor(colors.gray_two)
        .setButtonBackgroundColor(colors.black_five)
        .setNavigationBarTextColor(colors.black_five)
        .setNavigationBarBackgroundColor(colors.white_one)
        .build();
      const dropPayment = new CFDropCheckoutPayment(
        session,
        paymentMode,
        null
        // theme
      );
      CFPaymentGatewayService.doPayment(dropPayment);
    } catch (error) {
      console.error(error);
    }
  }

Following are the dependencies:

  "dependencies": {
    "@hookstate/core": "^3.0.13",
    "@react-native-clipboard/clipboard": "^1.10.0",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/geolocation": "^2.1.0",
    "@react-native-community/netinfo": "^9.3.0",
    "@react-navigation/bottom-tabs": "^6.2.0",
    "@react-navigation/devtools": "^6.0.8",
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/native-stack": "^6.5.2",
    "@sentry/react-native": "^4.1.3",
    "@types/react-native-global-props": "^1.1.1",
    "axios": "^0.27.2",
    "core-js": "^3.6.5",
    "form-data": "^4.0.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "node-libs-react-native": "^1.2.1",
    "phosphor-react-native": "^1.1.1",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "^0.67.2",
    "react-native-camera": "^4.2.1",
    "react-native-cashfree-pg-sdk": "^1.0.1",
    "react-native-chart-kit": "^6.12.0",
    "react-native-contacts": "^7.0.4",
    "react-native-date-picker": "^4.2.2",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-gesture-handler": "^2.5.0",
    "react-native-global-font": "^1.0.3",
    "react-native-global-props": "^1.1.5",
    "react-native-image-picker": "^4.8.4",
    "react-native-maps": "^0.31.1",
    "react-native-paper": "^4.12.0",
    "react-native-permissions": "^3.3.1",
    "react-native-qrcode-scanner": "^1.5.5",
    "react-native-reanimated": "^2.9.1",
    "react-native-safe-area-context": "^4.2.4",
    "react-native-screens": "^3.13.1",
    "react-native-shadow-2": "^6.0.4",
    "react-qr-code": "^2.0.7",
    "react-query": "^3.39.0",
    "react-router-dom": "^6.3.0",
    "regenerator-runtime": "0.13.7",
    "simple-socket-client": "github:Subhrajyotimodak/Simple-Socket-Client",
    "tslib": "^2.0.0",
    "url-search-params-polyfill": "^8.1.1"
  },
  "devDependencies": {
    "@nrwl/cli": "13.9.5",
    "@nrwl/detox": "13.9.5",
    "@nrwl/eslint-plugin-nx": "13.9.5",
    "@nrwl/jest": "13.9.5",
    "@nrwl/linter": "13.9.5",
    "@nrwl/react": "13.9.5",
    "@nrwl/react-native": "13.9.5",
    "@nrwl/web": "13.9.5",
    "@nrwl/workspace": "13.9.5",
    "@react-native-async-storage/async-storage": "1.16.1",
    "@react-native-community/cli": "7.0.1",
    "@react-native-community/cli-platform-android": "7.0.1",
    "@react-native-community/cli-platform-ios": "7.0.1",
    "@swc/core": "~1.2.143",
    "@testing-library/jest-dom": "5.16.2",
    "@testing-library/jest-native": "4.0.4",
    "@testing-library/react": "12.1.4",
    "@testing-library/react-hooks": "7.0.2",
    "@testing-library/react-native": "9.0.0",
    "@types/jest": "27.0.2",
    "@types/lodash": "^4.14.182",
    "@types/node": "^16.11.34",
    "@types/react": "18.0.0",
    "@types/react-dom": "18.0.0",
    "@types/react-native": "0.67.2",
    "@typescript-eslint/eslint-plugin": "~5.10.0",
    "@typescript-eslint/parser": "~5.10.0",
    "babel-jest": "27.2.3",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "detox": "19.5.1",
    "eslint": "~8.7.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-import": "2.25.4",
    "eslint-plugin-jsx-a11y": "6.5.1",
    "eslint-plugin-react": "^7.29.3",
    "eslint-plugin-react-hooks": "4.3.0",
    "jest": "27.2.3",
    "jest-circus": "27.2.3",
    "jest-react-native": "18.0.0",
    "metro": "0.69.0",
    "metro-react-native-babel-preset": "0.69.0",
    "metro-resolver": "0.69.0",
    "nx": "13.9.5",
    "prettier": "^2.5.1",
    "react-native-config": "^1.4.5",
    "react-native-flipper": "^0.155.0",
    "react-native-svg": "12.3.0",
    "react-native-svg-transformer": "1.0.0",
    "react-test-renderer": "17.0.2",
    "swc-loader": "0.1.15",
    "ts-jest": "27.0.5",
    "ts-transformer-keys": "^0.4.3",
    "typescript": "^4.5.2"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants