From 273b63b5541e94a0ac0db96f7f859239dfae019b Mon Sep 17 00:00:00 2001 From: banditVedant Date: Tue, 10 Oct 2023 15:20:50 +0530 Subject: [PATCH] 1. Order Summary Module In-progress. 2. Wallet and Razorpay integration pending --- .idea/deploymentTargetDropDown.xml | 4 +- .idea/misc.xml | 8 + app/build.gradle | 3 +- app/src/main/AndroidManifest.xml | 17 +- .../ui/NavigationDrawer_Dashboard.java | 1 - .../java/com/BugBazaar/ui/TestActivity.java | 32 +- .../main/java/com/BugBazaar/ui/cart/Cart.java | 1 - .../com/BugBazaar/ui/cart/CartActivity.java | 7 +- .../BugBazaar/ui/cart/CartDatabaseHelper.java | 2 + .../BugBazaar/ui/cart/CartItemDBModel.java | 1 + .../BugBazaar/ui/payment/OrderSummary.java | 133 ++++++++ .../BugBazaar/ui/payment/TestRazorPay.java | 91 ++++++ app/src/main/res/drawable/icon_razorpay.png | Bin 0 -> 4818 bytes app/src/main/res/drawable/icon_wallet.png | Bin 0 -> 14427 bytes app/src/main/res/drawable/summary_box.xml | 6 + .../drawable/summary_box_rounded_corner.xml | 6 + app/src/main/res/layout/activity_maincart.xml | 2 +- .../res/layout/activity_order_summary.xml | 297 ++++++++++++++++++ app/src/main/res/layout/activity_test.xml | 44 +-- .../res/layout/activity_test_razor_pay.xml | 16 + app/src/main/res/values/colors.xml | 1 + build.gradle | 1 + 22 files changed, 637 insertions(+), 36 deletions(-) create mode 100644 app/src/main/java/com/BugBazaar/ui/payment/OrderSummary.java create mode 100644 app/src/main/java/com/BugBazaar/ui/payment/TestRazorPay.java create mode 100644 app/src/main/res/drawable/icon_razorpay.png create mode 100644 app/src/main/res/drawable/icon_wallet.png create mode 100644 app/src/main/res/drawable/summary_box.xml create mode 100644 app/src/main/res/drawable/summary_box_rounded_corner.xml create mode 100644 app/src/main/res/layout/activity_order_summary.xml create mode 100644 app/src/main/res/layout/activity_test_razor_pay.xml diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index e616acf..aada2d5 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -7,11 +7,11 @@ - + - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index db7ec8f..21f362b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,3 +1,4 @@ + @@ -10,4 +11,11 @@ + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 26bb1fe..0f6e8e2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,6 @@ dependencies { implementation 'androidx.cardview:cardview:1.0.0' implementation group: 'com.cloudinary', name: 'cloudinary-android', version: '1.24.0' implementation 'com.google.android.material:material:1.4.0' // Use the latest version - - + implementation 'com.razorpay:checkout:1.6.33' } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c0f1988..3e9c379 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,7 +5,7 @@ - + @@ -31,6 +31,15 @@ android:usesCleartextTraffic="true" tools:replace="android:fullBackupContent" tools:targetApi="31"> + + + @@ -39,7 +48,7 @@ android:exported="true" /> + android:exported="true" /> @@ -60,7 +69,7 @@ android:exported="false" /> + android:exported="true" /> @@ -74,7 +83,7 @@ + android:scheme="bb" /> cartItems; + private TextView txtProdQuantityOS; + private TextView txtTotalCostOS; + private TextView txtFinalCostOS; + private RadioGroup rbGroupPaymentOptions; + private RadioButton rbPayViaWallet; + private RadioButton rbPayViaRazorpay; + Button btnProceedPaymentOS; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_order_summary); + //Toolbar title set + TextView toolbarTitle = findViewById(R.id.toolbarTitle); + toolbarTitle.setText("Order Summary"); + txtProdQuantityOS=findViewById(R.id.txtProdQuantityOS); + txtTotalCostOS=findViewById(R.id.txtTotalCostOS); + txtFinalCostOS=findViewById(R.id.txtFinalCostOS); + btnProceedPaymentOS=findViewById(R.id.btnProceedPaymentOS); + + // Initialize the RadioGroup and RadioButton elements + rbGroupPaymentOptions = findViewById(R.id.rbGroupPaymentOptions); + rbPayViaWallet = findViewById(R.id.rbPayViaWallet); + rbPayViaRazorpay = findViewById(R.id.rbPayViaRazorpay); + + // Initialize your CartDatabaseHelper + CartDatabaseHelper cartDBHelper = new CartDatabaseHelper(this, "cart.db", null, 1); + // Initialize your cartItems list and populate it with all items from the database + cartItems = cartDBHelper.getAllRecords(); + // Initialize prodQuantity to store the product quantity + int prodQuantity = 0; + // Iterate through the list of cart items and retrieve the product_quantity from the database + for (CartItem cartItem : cartItems) { + // Retrieve the product name for each item + String productName = cartItem.getProductName(); + + // Retrieve the product quantity from the database using a query + int quantity = getProductQuantityFromDatabase(cartDBHelper, productName); + + // Add the quantity to prodQuantity + prodQuantity += quantity; + //Set the product quantity + txtProdQuantityOS.setText(String.valueOf(prodQuantity)); + + + Intent intent = getIntent(); + int totalCost = intent.getIntExtra("totalPrice", 0); + // Format the totalCost and set it in the TextView + String formattedTotalCost = formatPrice(totalCost); + txtTotalCostOS.setText(formattedTotalCost); + + int deliveryCharges=536; + + //Final Cost to be sent to Razorpay or wallet + int finalCost = totalCost + deliveryCharges; + String formattedFinalCost = formatPrice(finalCost); + txtFinalCostOS.setText(formattedFinalCost); + + // Set an OnCheckedChangeListener to the RadioGroup + rbGroupPaymentOptions.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + + @Override + public void onCheckedChanged(RadioGroup group, int checkedId) { + Log.d("RB Intitated","RB Intitated"); + if (checkedId == R.id.rbPayViaWallet) { + rbPayViaWallet.setChecked(true); // Set the "Pay via Wallet" RadioButton as selected + rbPayViaRazorpay.setChecked(false); // Clear the selection of "Pay via Razorpay" + Toast.makeText(getApplicationContext(),"Pay Via Wallet",Toast.LENGTH_SHORT).show(); + } else if (checkedId == R.id.rbPayViaRazorpay) { + rbPayViaWallet.setChecked(false); + rbPayViaRazorpay.setChecked(true); + Toast.makeText(getApplicationContext(),"Pay Via Razorpay",Toast.LENGTH_SHORT).show(); + }else + Toast.makeText(getApplicationContext(),"No button selected",Toast.LENGTH_SHORT).show(); + } + }); + + } + } + // Define a method to retrieve product_quantity from the database based on product name + private int getProductQuantityFromDatabase(CartDatabaseHelper dbHelper, String productName) { + int quantity = 0; + SQLiteDatabase db = dbHelper.getReadableDatabase(); + Cursor cursor = db.query( + CartItemDBModel.CartItemEntry.TABLE_NAME, // Table name + new String[]{CartItemDBModel.CartItemEntry.COLUMN_QUANTITY}, // Columns to retrieve + CartItemDBModel.CartItemEntry.COLUMN_PRODUCT_NAME + "=?", // Selection criteria + new String[]{productName}, // Selection arguments + null, // Group by + null, // Having + null // Order by + ); + + if (cursor != null && cursor.moveToFirst()) { + quantity = cursor.getInt(cursor.getColumnIndexOrThrow(CartItemDBModel.CartItemEntry.COLUMN_QUANTITY)); + cursor.close(); + } + + return quantity; + } + private String formatPrice(int price) { + return String.format("₹%,d", price); + } + //Code to handle backbutton + public void onBackButtonClick(View view) { + onBackPressed(); // Navigate back to the previous activity + } +} \ No newline at end of file diff --git a/app/src/main/java/com/BugBazaar/ui/payment/TestRazorPay.java b/app/src/main/java/com/BugBazaar/ui/payment/TestRazorPay.java new file mode 100644 index 0000000..7bc04ba --- /dev/null +++ b/app/src/main/java/com/BugBazaar/ui/payment/TestRazorPay.java @@ -0,0 +1,91 @@ +package com.BugBazaar.ui.payment; + +import androidx.appcompat.app.AppCompatActivity; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.Toast; + +import com.razorpay.Checkout; +import com.razorpay.PaymentResultListener; // Import the PaymentResultListener +import com.BugBazaar.R; +import org.json.JSONException; +import org.json.JSONObject; + +public class TestRazorPay extends AppCompatActivity implements PaymentResultListener { // Implement the interface + private Button btnProceedPayment; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_test_razor_pay); + btnProceedPayment = findViewById(R.id.btnProceedPayment); + + // Initialize Razorpay with your API key + Checkout.preload(getApplicationContext()); + Checkout checkout = new Checkout(); + checkout.setKeyID("rzp_test_YEExgm42Uvy0u1"); + + btnProceedPayment.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + // Create payment options + JSONObject options = new JSONObject(); + try { + options.put("name", "BugBazaar Retailers"); + options.put("description", "Purchase Description"); + //options.put("image", "YOUR_LOGO_URL"); + options.put("currency", "INR"); // Change to your currency code + options.put("amount", "10000"); // Change to the actual amount in paise + //options.put("order_id", "23287827788382387231923921392173123123213"); // The order ID received from your server + options.put("prefill.email", "customer@example.com"); + options.put("prefill.contact", "1234567890"); + } catch (JSONException e) { + e.printStackTrace(); + // Handle JSON exception here + } + + // Open Razorpay payment dialog + try { + checkout.open(TestRazorPay.this, options); + } catch (Exception e) { + e.printStackTrace(); + // Handle any exceptions that may occur while opening the payment dialog + } + } + }); + } + + public void onPaymentSuccess(String s) { + Toast.makeText(this,"Payment Successful",Toast.LENGTH_SHORT).show(); + } + + @Override + public void onPaymentError(int code, String response) { + // Handle payment error + // This method is called when there is a payment error + + // Log the error code and response for debugging + Log.e("Razorpay Error", "Error Code: " + code); + Log.e("Razorpay Error", "Error Response: " + response); + + // You can display an error message to the user or take appropriate action based on the error code and response + // For example, you can show a Toast message with the error details: + Toast.makeText(this, "Payment Error: " + response, Toast.LENGTH_SHORT).show(); + + // You can also perform additional error handling based on the error code if needed + switch (code) { + case Checkout.NETWORK_ERROR: + // Handle network-related errors + break; + case Checkout.INVALID_OPTIONS: + // Handle invalid payment options + break; + case Checkout.PAYMENT_CANCELED: + // Handle payment cancellation by the user + break; + // Add more cases for specific error codes as needed + } + } +} diff --git a/app/src/main/res/drawable/icon_razorpay.png b/app/src/main/res/drawable/icon_razorpay.png new file mode 100644 index 0000000000000000000000000000000000000000..465275cb50fa3362b485ed449f37c1c127997cba GIT binary patch literal 4818 zcmX|FcTkhv(@lT`MG}e<2we%i_bN(9I-vyw3?)hj=_pkQO?sCu9R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I!|} zILeZ#Pi!Ahn5TQ|F?UL?Bq=6}G#cyf2qHUvKlTS|TgUd9vD_D5DeQ*8f+h{0x}oGg z4s*L;9*L?paMN53~gg5W2Sqd6cr#re6MS+uJ#p+lcG*l(NDKw~Fy# z1Jvd-(mf?&HnYl&D{FSuFC0_P7DD^>vSuW5jG~7fu5!n?Q+NJt91EQ$KMJY?>YO+n z)qJ$lO!gh;n<6WltnIus8tk+XdI+H`_qd96qfyKf3D< zOc*%CeMbJh0E=Tk$5gS}T(H|?xUCy#?OcC<2W>KOWeoxi@ix--wfhk PU;s~)v=l4l(Qp0_MmO~{ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/icon_wallet.png b/app/src/main/res/drawable/icon_wallet.png new file mode 100644 index 0000000000000000000000000000000000000000..010a1362cd977c16a371bb9e7239cfe2f8e2e91b GIT binary patch literal 14427 zcmch8gM}`4s^b>5x__mquD@r3Dei1q7u_ z7U}Lguix+Q-unmK=RS`<>^twwsW~&}oX^br?6$rp)rBh;U@#aJQcE2LgAszCgfMba z@Mp&#cLe@WcxsvZz+k>tq5lL$?f!Vs$nxlx*&{;_r$>Hv-i|OoKR+=S_Xj=>cAk!6 z9^THGYYJCjFisd!UB$>hYjq+ZIm`V(gliLQw>4SNzqvsZkek9qBiGdisrm zTUBc*pm^QTczskpE8XX{dvL^~34@994>s|<$i)BO|E^cX!^3!MUrv@-BLz>TJq0V7 z<|;lScp@&f|A;b&A1@)dF=b{jUd%V)VKuHSs?Ex4Cx&Q3rt0kp=OKjiT)v~>&-XAb zRNf9%TNX1TVMPu$?<{k9L4IfO>H{NDiq|}77}8aKyLhmulSO?J+c|Z=B^6!!J)Dn9 zi(m0G9Sqs0vu-RN;mOE#^;X^JC>1uG(swG^P-?ltpO6!2K2X7~rI>SJrc7BVilOMT zJe|KO^#f$wCopi_WZP6JDscG`xd%a?e1&zMbs&4c(<%27nhy(JXEaO>KfdHzbZ2Qo zW({4V+Ze*XQAb)5gz_Dr)_Er{!hqO5+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=e8dhgI8i2tNRTum>{I%A@e%tlT_ z0aE&8PZ$P+J`QMkbXhWsR2RvnnV38#9=0$2!%B}WKfT6=;76&)@Wt056wn7Gw-Rgg zMhKTATAE|d(jCC~%)M){%mI!Z6~!z<@Hq%QKiFMHF!U>@C5`?2&_`5PWBIyei43%X0OOWy2mD+?&%aUSE`j^+ z`P4XJfOjuJSN(su@psm%`72fiUe|94G##l3y~cII z^OfpPA{=bbuU-)oeV|p1#c;8nu5xYe-#@{1+^U zs9l)d-}7ZX2r3tq*&%W_6n28_1431QWzz2Rr{)lBBC%^&YOMY + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/summary_box_rounded_corner.xml b/app/src/main/res/drawable/summary_box_rounded_corner.xml new file mode 100644 index 0000000..7c40b35 --- /dev/null +++ b/app/src/main/res/drawable/summary_box_rounded_corner.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_maincart.xml b/app/src/main/res/layout/activity_maincart.xml index 2f179cd..87eaaed 100644 --- a/app/src/main/res/layout/activity_maincart.xml +++ b/app/src/main/res/layout/activity_maincart.xml @@ -95,7 +95,7 @@ android:layout_width="match_parent" android:id="@+id/checkoutButton" android:layout_width="match_parent" android:layout_height="60dp" - android:text="Proceed to Payment" + android:text="Checkout" android:textSize="18dp" android:layout_gravity="bottom" android:background="@drawable/sharp_button_corners"/> diff --git a/app/src/main/res/layout/activity_order_summary.xml b/app/src/main/res/layout/activity_order_summary.xml new file mode 100644 index 0000000..a563fb1 --- /dev/null +++ b/app/src/main/res/layout/activity_order_summary.xml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + android:id="@+id/radioGroup"> + + + + + + + + + diff --git a/app/src/main/res/layout/activity_test_razor_pay.xml b/app/src/main/res/layout/activity_test_razor_pay.xml new file mode 100644 index 0000000..0a34b7c --- /dev/null +++ b/app/src/main/res/layout/activity_test_razor_pay.xml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 17c5be4..fd66b72 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -14,5 +14,6 @@ #4CAF50 #2196F3 #AAB4B9 + #774E94C4 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 0104ee8..e8ea4df 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ buildscript { } dependencies { classpath 'com.google.gms:google-services:4.3.15' + } }// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins {