diff --git a/android/src/main/java/com/reactnativepaymob/PaymobModule.java b/android/src/main/java/com/reactnativepaymob/PaymobModule.java index 7d98b3d..8456996 100644 --- a/android/src/main/java/com/reactnativepaymob/PaymobModule.java +++ b/android/src/main/java/com/reactnativepaymob/PaymobModule.java @@ -172,7 +172,14 @@ public void presentPayVC(ReadableMap params, Promise promise) { if(params.getString("buttonText") != null) { pay_intent.putExtra("PAY_BUTTON_TEXT", params.getString("buttonText")); } - pay_intent.putExtra(PayActivityIntentKeys.THEME_COLOR, R.color.colorPrimary); + + try { + int colorValue = ContextCompat.getColor(currentActivity, R.color.colorPrimary); + pay_intent.putExtra(PayActivityIntentKeys.THEME_COLOR, colorValue); + } catch (Resources.NotFoundException e) { + // + } + pay_intent.putExtra("language", params.getBoolean("isEnglish") ? "en" : "ar"); pay_intent.putExtra("ActionBar", false);