Update: 2026-05-16 02:14:53
This commit is contained in:
@@ -19,7 +19,7 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var tvStatus: TextView
|
||||
private lateinit var btnPro: Button
|
||||
private lateinit var btnAnnual: Button
|
||||
private lateinit var btnBasic: Button
|
||||
|
||||
// Payment Overlay UI
|
||||
private lateinit var layoutOverlay: LinearLayout
|
||||
@@ -35,8 +35,8 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
setContentView(R.layout.activity_subscription)
|
||||
|
||||
tvStatus = findViewById(R.id.tv_current_status)
|
||||
btnBasic = findViewById(R.id.btn_subscribe_basic)
|
||||
btnPro = findViewById(R.id.btn_subscribe_pro)
|
||||
btnAnnual = findViewById(R.id.btn_subscribe_annual)
|
||||
|
||||
layoutOverlay = findViewById(R.id.layout_payment_overlay)
|
||||
tvRefCode = findViewById(R.id.tv_ref_code)
|
||||
@@ -45,8 +45,8 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
|
||||
updateStatusUI()
|
||||
|
||||
btnPro.setOnClickListener { startPaymentFlow("pro", 10.0) }
|
||||
btnAnnual.setOnClickListener { startPaymentFlow("annual", 80.0) }
|
||||
btnBasic.setOnClickListener { startPaymentFlow("basic", 10.0) }
|
||||
btnPro.setOnClickListener { startPaymentFlow("pro", 17.0) }
|
||||
|
||||
btnCancel.setOnClickListener {
|
||||
stopPaymentFlow()
|
||||
@@ -59,9 +59,9 @@ class SubscriptionActivity : AppCompatActivity() {
|
||||
val today = SubscriptionManager.ridesToday
|
||||
|
||||
val planText = when(plan) {
|
||||
"pro" -> "احترافي (لا محدود)"
|
||||
"annual" -> "سنوي (لا محدود)"
|
||||
else -> "مجاني (1 طلب / يوم)"
|
||||
"basic" -> "أساسي (3 تطبيقات)"
|
||||
"pro" -> "احترافي (5 تطبيقات)"
|
||||
else -> "مجاني (تطبيق واحد)"
|
||||
}
|
||||
|
||||
tvStatus.text = "الخطة الحالية: $planText\nاستهلاك اليوم: $today / $limit"
|
||||
|
||||
@@ -46,12 +46,11 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- Pro Plan -->
|
||||
<!-- Free Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:elevation="4dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
@@ -59,7 +58,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة الاحترافية"
|
||||
android:text="الخطة المجانية"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -67,7 +66,41 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10.00 JOD / شهر"
|
||||
android:text="0.00 JOD / مدى الحياة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="• رحلة واحدة يومياً\n• تطبيق واحد فقط"
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Basic Annual Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة الأساسية (سنوي)"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10.00 JOD / سنة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -81,7 +114,57 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="✅ طلبات غير محدودة (Unlimited)\n✅ أولوية قصوى في القبول\n✅ دعم جميع التطبيقات\n✅ فلاتر السعر والمسافة المتقدمة"
|
||||
android:text="✅ طلبات غير محدودة\n✅ أولوية في القبول\n✅ تدعم 3 تطبيقات فقط"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="13sp"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_subscribe_basic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_button"
|
||||
android:text="تفعيل سنوي عبر CliQ"
|
||||
android:textColor="#FFFFFF" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Pro Annual Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:elevation="4dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة الاحترافية (سنوي)"
|
||||
android:textColor="#FFD700"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="17.00 JOD / سنة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:background="#33FFFFFF" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="✅ طلبات غير محدودة\n✅ أقصى سرعة وقوة في القبول\n✅ تدعم جميع الـ 5 تطبيقات"
|
||||
android:textColor="#CCCCCC"
|
||||
android:textSize="13sp"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
@@ -92,54 +175,11 @@
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_button_primary"
|
||||
android:text="تفعيل عبر CliQ"
|
||||
android:text="تفعيل سنوي عبر CliQ"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Annual Plan -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="الخطة السنوية (الأكثر توفيراً)"
|
||||
android:textColor="#FFD700"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="80.00 JOD / سنة"
|
||||
android:textColor="#00D4AA"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="وفر 40 دينار سنوياً مع تفعيل دائم\nشامل جميع التحديثات القادمة"
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_subscribe_annual"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_button"
|
||||
android:text="تفعيل سنوي عبر CliQ"
|
||||
android:textColor="#FFFFFF" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ try {
|
||||
$fingerprint = $payment['fingerprint'];
|
||||
$plan = $payment['plan'];
|
||||
|
||||
// Calculate expiration (e.g. basic=30 days, annual=365 days)
|
||||
$days = ($plan === 'annual') ? 365 : 30;
|
||||
// All plans are now Annual (365 days)
|
||||
$days = 365;
|
||||
$expiresAt = date('Y-m-d H:i:s', strtotime("+$days days"));
|
||||
|
||||
// Check if user already has a subscription to extend it
|
||||
|
||||
@@ -290,46 +290,46 @@
|
||||
|
||||
<!-- Pricing -->
|
||||
<section class="container" id="pricing">
|
||||
<h2 class="section-title">باقات الاشتراك</h2>
|
||||
<h2 class="section-title">باقات الاشتراك السنوية</h2>
|
||||
<div class="pricing-grid">
|
||||
<!-- Basic -->
|
||||
<!-- Free -->
|
||||
<div class="pricing-card">
|
||||
<i class="fa-solid fa-gift pricing-icon"></i>
|
||||
<h3>الخطة المجانية</h3>
|
||||
<div class="price">0 <span>JOD / مدى الحياة</span></div>
|
||||
<ul class="plan-features">
|
||||
<li><i class="fa-solid fa-check"></i> رحلة واحدة يومياً للتجربة</li>
|
||||
<li><i class="fa-solid fa-check"></i> تجربة الفلاتر الأساسية</li>
|
||||
<li><i class="fa-solid fa-check"></i> تطبيق واحد فقط</li>
|
||||
</ul>
|
||||
<p style="color: var(--text-muted); font-size: 0.9rem;">مثالية للتجربة قبل الاشتراك</p>
|
||||
</div>
|
||||
|
||||
<!-- Basic Annual -->
|
||||
<div class="pricing-card">
|
||||
<i class="fa-solid fa-star-half-stroke pricing-icon"></i>
|
||||
<h3>الخطة الأساسية</h3>
|
||||
<div class="price">2.5 <span>JOD / شهر</span></div>
|
||||
<h3>الخطة الأساسية (سنوي)</h3>
|
||||
<div class="price">10.0 <span>JOD / سنة</span></div>
|
||||
<ul class="plan-features">
|
||||
<li><i class="fa-solid fa-check"></i> 10 طلبات يومياً</li>
|
||||
<li><i class="fa-solid fa-check"></i> إحصائيات الاستخدام</li>
|
||||
<li><i class="fa-solid fa-check"></i> فلاتر متقدمة</li>
|
||||
<li><i class="fa-solid fa-check"></i> طلبات غير محدودة (Unlimited)</li>
|
||||
<li><i class="fa-solid fa-check"></i> أولوية في سرعة القبول</li>
|
||||
<li><i class="fa-solid fa-check"></i> تدعم <strong>3 تطبيقات</strong> فقط</li>
|
||||
</ul>
|
||||
<p style="color: var(--text-muted); font-size: 0.9rem;"><i class="fa-solid fa-wallet"></i> تفعيل فوري عبر CliQ</p>
|
||||
</div>
|
||||
|
||||
<!-- Pro (Premium) -->
|
||||
<!-- Pro Annual -->
|
||||
<div class="pricing-card premium">
|
||||
<i class="fa-solid fa-crown pricing-icon"></i>
|
||||
<h3>الخطة الاحترافية</h3>
|
||||
<div class="price">10.0 <span>JOD / شهر</span></div>
|
||||
<h3>الخطة الاحترافية (سنوي)</h3>
|
||||
<div class="price">17.0 <span>JOD / سنة</span></div>
|
||||
<ul class="plan-features">
|
||||
<li><i class="fa-solid fa-check"></i> طلبات لا محدودة (Unlimited)</li>
|
||||
<li><i class="fa-solid fa-check"></i> أولوية قصوى في سرعة القبول</li>
|
||||
<li><i class="fa-solid fa-check"></i> دعم كامل لجميع التطبيقات</li>
|
||||
<li><i class="fa-solid fa-check"></i> طلبات غير محدودة (Unlimited)</li>
|
||||
<li><i class="fa-solid fa-check"></i> أقصى سرعة وقوة في القبول</li>
|
||||
<li><i class="fa-solid fa-check"></i> تدعم جميع <strong>الـ 5 تطبيقات</strong></li>
|
||||
</ul>
|
||||
<p style="color: var(--secondary); font-size: 0.9rem;"><i class="fa-solid fa-wallet"></i> تفعيل فوري عبر CliQ</p>
|
||||
</div>
|
||||
|
||||
<!-- Annual -->
|
||||
<div class="pricing-card">
|
||||
<i class="fa-solid fa-calendar-check pricing-icon"></i>
|
||||
<h3>الخطة السنوية</h3>
|
||||
<div class="price">80.0 <span>JOD / سنة</span></div>
|
||||
<ul class="plan-features">
|
||||
<li><i class="fa-solid fa-check"></i> توفير 40 دينار سنوياً</li>
|
||||
<li><i class="fa-solid fa-check"></i> تفعيل مستمر لا ينقطع</li>
|
||||
<li><i class="fa-solid fa-check"></i> وصول حصري للتحديثات</li>
|
||||
</ul>
|
||||
<p style="color: var(--text-muted); font-size: 0.9rem;"><i class="fa-solid fa-wallet"></i> تفعيل فوري عبر CliQ</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user