|
44 | 44 | import com.flutterwave.raveandroid.data.SavedCard;
|
45 | 45 | import com.flutterwave.raveandroid.responses.ChargeResponse;
|
46 | 46 |
|
47 |
| -import org.json.JSONException; |
48 |
| -import org.json.JSONObject; |
49 |
| - |
50 | 47 | import java.util.List;
|
51 | 48 | import java.util.regex.Matcher;
|
52 | 49 | import java.util.regex.Pattern;
|
@@ -106,25 +103,25 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
106 | 103 | presenter = new CardPresenter(getActivity(), this);
|
107 | 104 | // Inflate the layout for this fragment
|
108 | 105 | v = inflater.inflate(R.layout.fragment_card, container, false);
|
109 |
| - otpTil = (TextInputLayout) v.findViewById(R.id.otpTil); |
110 |
| - otpEt = (TextInputEditText) v.findViewById(R.id.otpEv); |
111 |
| - otpButton = (Button) v.findViewById(R.id.otpButton); |
112 |
| - savedCardBtn = (Button) v.findViewById(R.id.savedCardButton); |
113 |
| - amountEt = (TextInputEditText) v.findViewById(R.id.amountTV); |
114 |
| - emailEt = (TextInputEditText) v.findViewById(R.id.emailTv); |
115 |
| - cardNoTv = (TextInputEditText) v.findViewById(R.id.cardNoTv); |
116 |
| - cardExpiryTv = (TextInputEditText) v.findViewById(R.id.cardExpiryTv); |
117 |
| - cvvTv = (TextInputEditText) v.findViewById(R.id.cvvTv); |
118 |
| - payButton = (Button) v.findViewById(R.id.payButton); |
119 |
| - saveCardSwitch = (SwitchCompat) v.findViewById(R.id.saveCardSwitch); |
120 |
| - amountTil = (TextInputLayout) v.findViewById(R.id.amountTil); |
121 |
| - emailTil = (TextInputLayout) v.findViewById(R.id.emailTil); |
122 |
| - cardNoTil = (TextInputLayout) v.findViewById(R.id.cardNoTil); |
123 |
| - cardExpiryTil = (TextInputLayout) v.findViewById(R.id.cardExpiryTil); |
124 |
| - cvvTil = (TextInputLayout) v.findViewById(R.id.cvvTil); |
125 |
| - webView = (WebView) v.findViewById(R.id.webview); |
126 |
| - pcidss_tv = (TextView) v.findViewById(R.id.pcidss_compliant_tv); |
127 |
| - progressContainer = (FrameLayout) v.findViewById(R.id.progressContainer); |
| 106 | + otpTil = (TextInputLayout) v.findViewById(R.id.rave_otpTil); |
| 107 | + otpEt = (TextInputEditText) v.findViewById(R.id.rave_otpEv); |
| 108 | + otpButton = (Button) v.findViewById(R.id.rave_otpButton); |
| 109 | + savedCardBtn = (Button) v.findViewById(R.id.rave_savedCardButton); |
| 110 | + amountEt = (TextInputEditText) v.findViewById(R.id.rave_amountTV); |
| 111 | + emailEt = (TextInputEditText) v.findViewById(R.id.rave_emailTv); |
| 112 | + cardNoTv = (TextInputEditText) v.findViewById(R.id.rave_cardNoTv); |
| 113 | + cardExpiryTv = (TextInputEditText) v.findViewById(R.id.rave_cardExpiryTv); |
| 114 | + cvvTv = (TextInputEditText) v.findViewById(R.id.rave_cvvTv); |
| 115 | + payButton = (Button) v.findViewById(R.id.rave_payButton); |
| 116 | + saveCardSwitch = (SwitchCompat) v.findViewById(R.id.rave_saveCardSwitch); |
| 117 | + amountTil = (TextInputLayout) v.findViewById(R.id.rave_amountTil); |
| 118 | + emailTil = (TextInputLayout) v.findViewById(R.id.rave_emailTil); |
| 119 | + cardNoTil = (TextInputLayout) v.findViewById(R.id.rave_cardNoTil); |
| 120 | + cardExpiryTil = (TextInputLayout) v.findViewById(R.id.rave_cardExpiryTil); |
| 121 | + cvvTil = (TextInputLayout) v.findViewById(R.id.rave_cvvTil); |
| 122 | + webView = (WebView) v.findViewById(R.id.rave_webview); |
| 123 | + pcidss_tv = (TextView) v.findViewById(R.id.rave_pcidss_compliant_tv); |
| 124 | + progressContainer = (FrameLayout) v.findViewById(R.id.rave_progressContainer); |
128 | 125 |
|
129 | 126 | ravePayInitializer = ((RavePayActivity) getActivity()).getRavePayInitializer();
|
130 | 127 |
|
@@ -190,8 +187,8 @@ public void onDialogExpirationSet(int reference, int year, int monthOfYear) {
|
190 | 187 |
|
191 | 188 | payButton.setOnClickListener(this);
|
192 | 189 |
|
193 |
| - otpLayout = (LinearLayout) v.findViewById(R.id.OTPButtomSheet); |
194 |
| - vbvLayout = (FrameLayout) v.findViewById(R.id.VBVBottomSheet); |
| 190 | + otpLayout = (LinearLayout) v.findViewById(R.id.rave_OTPButtomSheet); |
| 191 | + vbvLayout = (FrameLayout) v.findViewById(R.id.rave_VBVBottomSheet); |
195 | 192 | bottomSheetBehaviorOTP = BottomSheetBehavior.from(otpLayout);
|
196 | 193 | bottomSheetBehaviorVBV = BottomSheetBehavior.from(vbvLayout);
|
197 | 194 |
|
@@ -239,7 +236,7 @@ public boolean closeBottomSheetsIfOpen() {
|
239 | 236 | public void onClick(View v) {
|
240 | 237 |
|
241 | 238 | int i = v.getId();
|
242 |
| - if (i == R.id.payButton) { |
| 239 | + if (i == R.id.rave_payButton) { |
243 | 240 | validateDetails();
|
244 | 241 | }
|
245 | 242 |
|
@@ -406,9 +403,9 @@ public void onPinAuthModelSuggested(final Payload payload) {
|
406 | 403 | LayoutInflater inflater = LayoutInflater.from(getActivity());
|
407 | 404 | View v = inflater.inflate(R.layout.pin_layout, null, false);
|
408 | 405 |
|
409 |
| - Button pinBtn = (Button) v.findViewById(R.id.pinButton); |
410 |
| - final TextInputEditText pinEv = (TextInputEditText) v.findViewById(R.id.pinEv); |
411 |
| - final TextInputLayout pinTil = (TextInputLayout) v.findViewById(R.id.pinTil); |
| 406 | + Button pinBtn = (Button) v.findViewById(R.id.rave_pinButton); |
| 407 | + final TextInputEditText pinEv = (TextInputEditText) v.findViewById(R.id.rave_pinEv); |
| 408 | + final TextInputLayout pinTil = (TextInputLayout) v.findViewById(R.id.rave_pinTil); |
412 | 409 |
|
413 | 410 | pinBtn.setOnClickListener(new View.OnClickListener() {
|
414 | 411 | @Override
|
@@ -563,7 +560,7 @@ public void onPaymentFailed(String status, String responseAsJSONString) {
|
563 | 560 | public void showFullProgressIndicator(boolean active) {
|
564 | 561 |
|
565 | 562 | if (progressContainer == null) {
|
566 |
| - progressContainer = (FrameLayout) v.findViewById(R.id.progressContainer); |
| 563 | + progressContainer = (FrameLayout) v.findViewById(R.id.rave_progressContainer); |
567 | 564 | }
|
568 | 565 |
|
569 | 566 | if (active) {
|
@@ -591,7 +588,7 @@ public void showSavedCards(List<SavedCard> cards) {
|
591 | 588 | final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(getActivity());
|
592 | 589 | LayoutInflater inflater = LayoutInflater.from(getActivity());
|
593 | 590 | View v = inflater.inflate(R.layout.pick_saved_card_layout, null, false);
|
594 |
| - RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.recycler); |
| 591 | + RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.rave_recycler); |
595 | 592 |
|
596 | 593 | SavedCardRecyclerAdapter adapter = new SavedCardRecyclerAdapter();
|
597 | 594 | adapter.set(cards);
|
@@ -732,9 +729,9 @@ public void onAVS_VBVSECURECODEModelSuggested(final Payload payload) {
|
732 | 729 | LayoutInflater inflater = LayoutInflater.from(getActivity());
|
733 | 730 | View v = inflater.inflate(R.layout.avsvbv_layout, null, false);
|
734 | 731 |
|
735 |
| - Button zipBtn = (Button) v.findViewById(R.id.zipButton); |
736 |
| - final TextInputEditText zipEt = (TextInputEditText) v.findViewById(R.id.zipEt); |
737 |
| - final TextInputLayout zipTil = (TextInputLayout) v.findViewById(R.id.zipTil); |
| 732 | + Button zipBtn = (Button) v.findViewById(R.id.rave_zipButton); |
| 733 | + final TextInputEditText zipEt = (TextInputEditText) v.findViewById(R.id.rave_zipEt); |
| 734 | + final TextInputLayout zipTil = (TextInputLayout) v.findViewById(R.id.rave_zipTil); |
738 | 735 |
|
739 | 736 | zipBtn.setOnClickListener(new View.OnClickListener() {
|
740 | 737 | @Override
|
|
0 commit comments