✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21613
    [app_id] => 5013
    [order_id] => 13247
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-8622-2215-17715
    [pg_ref_id] => GPA.3370-8622-2215-17715
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-8622-2215-17715
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779002791407","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13247","obfuscatedExternalProfileId":"42787","orderId":"GPA.3370-8622-2215-17715..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775805991407","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42787
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 07:26:31
    [end_date] => 2026-05-17 07:26:31
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 10:30:02
    [updated_at] => 2026-05-17 07:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21613
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 07:26:31
End Date: 2026-06-17 07:26:31
Original Order ID: GPA.3370-8622-2215-17715..1
Trimmed Order ID: GPA.3370-8622-2215-17715

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42787' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21613'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21436
    [app_id] => 5013
    [order_id] => 13057
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3398-6136-6243-96416
    [pg_ref_id] => GPA.3398-6136-6243-96416
    [device_id] => 0
    [gateway_subscription_id] => GPA.3398-6136-6243-96416
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778807458772","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13057","obfuscatedExternalProfileId":"42606","orderId":"GPA.3398-6136-6243-96416..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775610658772","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42606
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 01:10:58
    [end_date] => 2026-05-15 01:10:58
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 03:50:02
    [updated_at] => 2026-05-15 01:20:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21436
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 01:10:58
End Date: 2026-06-15 01:10:58
Original Order ID: GPA.3398-6136-6243-96416..1
Trimmed Order ID: GPA.3398-6136-6243-96416

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42606' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21436'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21416
    [app_id] => 5013
    [order_id] => 13034
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3387-3347-9034-58433
    [pg_ref_id] => GPA.3387-3347-9034-58433
    [device_id] => 0
    [gateway_subscription_id] => GPA.3387-3347-9034-58433
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778793199804","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3387-3347-9034-58433..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775596399804","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42580
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 21:13:19
    [end_date] => 2026-05-14 21:13:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 22:00:02
    [updated_at] => 2026-05-14 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21416
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 21:13:19
End Date: 2026-05-14 21:13:19
Original Order ID: GPA.3387-3347-9034-58433..0
Trimmed Order ID: GPA.3387-3347-9034-58433

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42580' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23155
    [app_id] => 5013
    [order_id] => 14086
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3381-8948-1128-17288
    [pg_ref_id] => GPA.3381-8948-1128-17288
    [device_id] => 1
    [gateway_subscription_id] => GPA.3381-8948-1128-17288
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43994
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-04 05:08:01
    [end_date] => 2026-05-11 05:08:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-04 05:05:57
    [updated_at] => 2026-05-11 05:10:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23155
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 05:08:01
End Date: 2026-05-11 05:08:01
Original Order ID: GPA.3381-8948-1128-17288..0
Trimmed Order ID: GPA.3381-8948-1128-17288

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43994' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15699
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778493837535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-05-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 13:10:01
    [updated_at] => 2026-05-11 10:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15699
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15699'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23940
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781172237535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-06-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 10:10:02
    [updated_at] => 2026-05-11 10:10:09
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23940
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23940'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21503
    [app_id] => 5013
    [order_id] => 12711
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3377-3289-2509-12326
    [pg_ref_id] => GPA.3377-3289-2509-12326
    [device_id] => 0
    [gateway_subscription_id] => GPA.3377-3289-2509-12326
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778809428914","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12711","obfuscatedExternalProfileId":"41963","orderId":"GPA.3377-3289-2509-12326..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775180551018","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41963
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 01:42:31
    [end_date] => 2026-05-15 01:43:48
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-15 01:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21503
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 01:42:31
End Date: 2026-05-15 01:43:48
Original Order ID: GPA.3377-3289-2509-12326..0
Trimmed Order ID: GPA.3377-3289-2509-12326

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41963' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24011
    [app_id] => 5013
    [order_id] => 14351
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3356-7639-5476-05177
    [pg_ref_id] => GPA.3356-7639-5476-05177
    [device_id] => 1
    [gateway_subscription_id] => GPA.3356-7639-5476-05177
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44336
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 22:13:18
    [end_date] => 2026-05-18 22:13:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 22:13:04
    [updated_at] => 2026-05-12 00:10:06
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24011
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-11 22:13:18
End Date: 2026-05-18 22:13:18
Original Order ID: GPA.3356-7639-5476-05177
Trimmed Order ID: GPA.3356-7639-5476-05177

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44336' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24011'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23282
    [app_id] => 5013
    [order_id] => 14155
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-9534-7287-04845
    [pg_ref_id] => GPA.3359-9534-7287-04845
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-9534-7287-04845
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44091
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 23:22:52
    [end_date] => 2026-05-12 23:22:52
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 23:22:20
    [updated_at] => 2026-05-12 23:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23282
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 23:22:52
End Date: 2027-05-12 23:22:52
Original Order ID: GPA.3359-9534-7287-04845..0
Trimmed Order ID: GPA.3359-9534-7287-04845

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44091' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23282'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23275
    [app_id] => 5013
    [order_id] => 14153
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3318-1721-1922-53193
    [pg_ref_id] => GPA.3318-1721-1922-53193
    [device_id] => 1
    [gateway_subscription_id] => GPA.3318-1721-1922-53193
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44085
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 21:18:15
    [end_date] => 2026-05-12 21:18:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 21:17:55
    [updated_at] => 2026-05-12 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23275
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 21:18:15
End Date: 2027-05-12 21:18:15
Original Order ID: GPA.3318-1721-1922-53193..0
Trimmed Order ID: GPA.3318-1721-1922-53193

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44085' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23275'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23225
    [app_id] => 5013
    [order_id] => 14134
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-7651-5101-88843
    [pg_ref_id] => GPA.3320-7651-5101-88843
    [device_id] => 1
    [gateway_subscription_id] => GPA.3320-7651-5101-88843
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43803
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 06:53:18
    [end_date] => 2026-05-12 06:53:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 06:52:25
    [updated_at] => 2026-05-12 07:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23225
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 06:53:18
End Date: 2026-05-12 06:53:18
Original Order ID: GPA.3320-7651-5101-88843
Trimmed Order ID: GPA.3320-7651-5101-88843

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43803' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21380
    [app_id] => 5013
    [order_id] => 6824
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-5908-2292-59926
    [pg_ref_id] => GPA.3320-5908-2292-59926
    [device_id] => 0
    [gateway_subscription_id] => GPA.3320-5908-2292-59926
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778765113728","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3320-5908-2292-59926..11","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744637113728","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38244
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-14 13:25:13
    [end_date] => 2026-05-14 13:25:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 13:30:02
    [updated_at] => 2026-05-14 13:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21380
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg

Price : 1.99
priceCurrency : USD
Start Date: 2025-04-14 13:25:13
End Date: 2026-06-14 13:25:13
Original Order ID: GPA.3320-5908-2292-59926..12
Trimmed Order ID: GPA.3320-5908-2292-59926

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38244' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21380'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23997
    [app_id] => 5013
    [order_id] => 14092
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-9973-3244-79502
    [pg_ref_id] => GPA.3392-9973-3244-79502
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-9973-3244-79502
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781197177136","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14092","obfuscatedExternalProfileId":"44007","orderId":"GPA.3392-9973-3244-79502..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777913977136","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44007
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 16:59:37
    [end_date] => 2026-06-11 16:59:37
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 19:00:02
    [updated_at] => 2026-05-11 19:00:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23997
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 16:59:37
End Date: 2026-06-11 16:59:37
Original Order ID: GPA.3392-9973-3244-79502..0
Trimmed Order ID: GPA.3392-9973-3244-79502

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44007' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23997'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23765
    [app_id] => 5013
    [order_id] => 14280
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-2672-3482-04482
    [pg_ref_id] => GPA.3359-2672-3482-04482
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-2672-3482-04482
    [pg_payment_data] => {}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44261
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => webhook
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-09 18:22:01
    [end_date] => 2026-05-16 18:22:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-09 18:24:04
    [updated_at] => 2026-05-16 18:30:02
    [is_cancelled] => 0
    [cancelled_at] => 0000-00-00 00:00:00
    [deactivation_type] => 
    [deactivation_date] => 0000-00-00 00:00:00
    [renewal_date] => 0000-00-00 00:00:00
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23765
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-09 18:22:01
End Date: 2026-05-16 18:22:01
Original Order ID: GPA.3359-2672-3482-04482
Trimmed Order ID: GPA.3359-2672-3482-04482

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44261' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21750
    [app_id] => 5013
    [order_id] => 13132
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4355-7650-95175
    [pg_ref_id] => GPA.3399-4355-7650-95175
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4355-7650-95175
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778870726108","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13132","obfuscatedExternalProfileId":"42162","orderId":"GPA.3399-4355-7650-95175..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775673926108","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42162
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 18:45:26
    [end_date] => 2026-05-15 18:45:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 01:20:03
    [updated_at] => 2026-05-15 18:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21750
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 18:45:26
End Date: 2026-06-15 18:45:26
Original Order ID: GPA.3399-4355-7650-95175..1
Trimmed Order ID: GPA.3399-4355-7650-95175

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42162' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21750'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15190
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778480915052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-05-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 09:30:02
    [updated_at] => 2026-05-11 06:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15190
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15190'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23917
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781159315052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-06-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:30:02
    [updated_at] => 2026-05-11 06:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23917
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23917'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23916
    [app_id] => 5013
    [order_id] => 14085
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3378-4171-5280-78225
    [pg_ref_id] => GPA.3378-4171-5280-78225
    [device_id] => 0
    [gateway_subscription_id] => GPA.3378-4171-5280-78225
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1810011268709","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14085","obfuscatedExternalProfileId":"43993","orderId":"GPA.3378-4171-5280-78225..0","paymentState":1,"priceAmountMicros":"40990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777870468709","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43993
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 04:54:28
    [end_date] => 2027-05-11 04:54:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:20:02
    [updated_at] => 2026-05-11 06:20:08
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23916
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-04 04:54:28
End Date: 2027-05-11 04:54:28
Original Order ID: GPA.3378-4171-5280-78225..0
Trimmed Order ID: GPA.3378-4171-5280-78225

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43993' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23916'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21668
    [app_id] => 5013
    [order_id] => 13253
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3314-4628-6040-67680
    [pg_ref_id] => GPA.3314-4628-6040-67680
    [device_id] => 0
    [gateway_subscription_id] => GPA.3314-4628-6040-67680
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779021206119","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13253","obfuscatedExternalProfileId":"42796","orderId":"GPA.3314-4628-6040-67680..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775824406119","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42796
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 12:33:26
    [end_date] => 2026-05-17 12:33:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 14:50:03
    [updated_at] => 2026-05-17 12:40:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21668
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 12:33:26
End Date: 2026-05-17 12:33:26
Original Order ID: GPA.3314-4628-6040-67680..0
Trimmed Order ID: GPA.3314-4628-6040-67680

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42796' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21596
    [app_id] => 5013
    [order_id] => 7451
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3302-3760-5945-64217
    [pg_ref_id] => GPA.3302-3760-5945-64217
    [device_id] => 0
    [gateway_subscription_id] => GPA.3302-3760-5945-64217
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778991959847","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3302-3760-5945-64217..5","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1757428891499","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38543
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-09-09 14:41:31
    [end_date] => 2026-05-17 04:25:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 04:30:02
    [updated_at] => 2026-05-17 04:30:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21596
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA

Price : 1.99
priceCurrency : USD
Start Date: 2025-09-09 14:41:31
End Date: 2026-06-17 04:25:59
Original Order ID: GPA.3302-3760-5945-64217..6
Trimmed Order ID: GPA.3302-3760-5945-64217

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38543' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21596'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23697
    [app_id] => 5013
    [order_id] => 14262
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3331-0153-4002-87312
    [pg_ref_id] => GPA.3331-0153-4002-87312
    [device_id] => 1
    [gateway_subscription_id] => GPA.3331-0153-4002-87312
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43108
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 22:51:35
    [end_date] => 2026-05-15 22:51:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-08 22:51:11
    [updated_at] => 2026-05-15 23:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23697
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-08 22:51:35
End Date: 2026-05-15 22:51:35
Original Order ID: GPA.3331-0153-4002-87312
Trimmed Order ID: GPA.3331-0153-4002-87312

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43108' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21504
    [app_id] => 5013
    [order_id] => 12735
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-6478-6508-75079
    [pg_ref_id] => GPA.3370-6478-6508-75079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-6478-6508-75079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778633459244","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12735","obfuscatedExternalProfileId":"42303","orderId":"GPA.3370-6478-6508-75079..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775220585577","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42303
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 12:49:45
    [end_date] => 2026-05-13 00:50:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-13 01:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21504
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 12:49:45
End Date: 2026-05-13 00:50:59
Original Order ID: GPA.3370-6478-6508-75079..0
Trimmed Order ID: GPA.3370-6478-6508-75079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42303' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21454
    [app_id] => 5013
    [order_id] => 13083
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3324-5252-5827-17785
    [pg_ref_id] => GPA.3324-5252-5827-17785
    [device_id] => 0
    [gateway_subscription_id] => GPA.3324-5252-5827-17785
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778829499091","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13083","obfuscatedExternalProfileId":"42260","orderId":"GPA.3324-5252-5827-17785..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775632699091","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42260
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 07:18:19
    [end_date] => 2026-05-15 07:18:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 09:20:02
    [updated_at] => 2026-05-15 07:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21454
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 07:18:19
End Date: 2026-06-15 07:18:19
Original Order ID: GPA.3324-5252-5827-17785..1
Trimmed Order ID: GPA.3324-5252-5827-17785

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42260' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21454'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24042
    [app_id] => 5013
    [order_id] => 14111
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3361-3178-8861-52435
    [pg_ref_id] => GPA.3361-3178-8861-52435
    [device_id] => 0
    [gateway_subscription_id] => GPA.3361-3178-8861-52435
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781225479625","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14111","obfuscatedExternalProfileId":"43961","orderId":"GPA.3361-3178-8861-52435..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777942279625","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 43961
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-05 00:51:19
    [end_date] => 2026-06-12 00:51:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 03:30:02
    [updated_at] => 2026-05-12 03:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24042
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-05 00:51:19
End Date: 2026-06-12 00:51:19
Original Order ID: GPA.3361-3178-8861-52435..0
Trimmed Order ID: GPA.3361-3178-8861-52435

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43961' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24042'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23946
    [app_id] => 5013
    [order_id] => 14334
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-8119-9873-34495
    [pg_ref_id] => GPA.3392-8119-9873-34495
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-8119-9873-34495..0
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 44178
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 12:29:30
    [end_date] => 2026-05-11 13:02:30
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 12:29:25
    [updated_at] => 2026-05-11 13:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23946
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-11 12:29:30
End Date: 2026-05-11 16:02:32
Original Order ID: GPA.3392-8119-9873-34495..6
Trimmed Order ID: GPA.3392-8119-9873-34495

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44178' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 16208
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778516402982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..3","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-05-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 16:30:02
    [updated_at] => 2026-05-11 16:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 16208
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '16208'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21272
    [app_id] => 5013
    [order_id] => 12907
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-4869-5509-71987
    [pg_ref_id] => GPA.3346-4869-5509-71987
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-4869-5509-71987
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778652642977","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12907","obfuscatedExternalProfileId":"42483","orderId":"GPA.3346-4869-5509-71987..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775455842977","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42483
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-06 06:10:42
    [end_date] => 2026-05-13 06:10:42
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-13 09:20:02
    [updated_at] => 2026-05-13 06:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21272
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-06 06:10:42
End Date: 2026-06-13 06:10:42
Original Order ID: GPA.3346-4869-5509-71987..1
Trimmed Order ID: GPA.3346-4869-5509-71987

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42483' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21272'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24051
    [app_id] => 5013
    [order_id] => 14364
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3354-3024-9181-24927
    [pg_ref_id] => GPA.3354-3024-9181-24927
    [device_id] => 0
    [gateway_subscription_id] => GPA.3313-8654-9262-56144..6
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44212
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 07:33:57
    [end_date] => 2026-05-08 08:11:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 06:26:01
    [updated_at] => 2026-05-12 09:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24051
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-12 06:26:09
End Date: 2026-05-12 07:04:10
Original Order ID: GPA.3354-3024-9181-24927..6
Trimmed Order ID: GPA.3354-3024-9181-24927

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44212' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 24027
    [app_id] => 5013
    [order_id] => 14356
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3333-8951-2461-80618
    [pg_ref_id] => GPA.3333-8951-2461-80618
    [device_id] => 0
    [gateway_subscription_id] => GPA.3333-8951-2461-80618
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 41436
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-12 00:35:28
    [end_date] => 2027-05-12 00:35:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 00:35:28
    [updated_at] => 2026-05-12 00:35:46
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24027
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-12 00:35:38
End Date: 2026-05-19 00:35:38
Original Order ID: GPA.3333-8951-2461-80618
Trimmed Order ID: GPA.3333-8951-2461-80618

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41436' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24027'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 23978
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781194802982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..4","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-06-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 16:30:02
    [updated_at] => 2026-05-11 16:30:07
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23978
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23978'
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub52
    [id] => 10247
    [app_id] => 5013
    [order_id] => 7293
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4290-3556-23909
    [pg_ref_id] => GPA.3399-4290-3556-23909
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4290-3556-23909
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":false,"autoResumeTimeMillis":null,"cancelReason":0,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778638541064","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3399-4290-3556-23909..0","paymentState":1,"priceAmountMicros":"19990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744510541064","userCancellationTimeMillis":"1766777611534"}
    [channel] => 
    [package_id] => 229
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 19.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38118
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-13 02:15:41
    [end_date] => 2026-05-13 02:15:41
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-03-23 09:58:19
    [updated_at] => 2026-05-13 02:16:05
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 1
    [record_id] => 10247
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub52 | Token: kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA

Price : 19.99
priceCurrency : USD
Start Date: 2025-04-13 02:15:41
End Date: 2026-05-13 02:15:41
Original Order ID: GPA.3399-4290-3556-23909..0
Trimmed Order ID: GPA.3399-4290-3556-23909

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38118' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21352
    [app_id] => 5013
    [order_id] => 12954
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3368-8153-0019-18099
    [pg_ref_id] => GPA.3368-8153-0019-18099
    [device_id] => 0
    [gateway_subscription_id] => GPA.3368-8153-0019-18099
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778729175155","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12954","obfuscatedExternalProfileId":"42540","orderId":"GPA.3368-8153-0019-18099..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775532375155","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42540
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 03:26:15
    [end_date] => 2026-05-14 03:26:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 07:20:02
    [updated_at] => 2026-05-14 03:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21352
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 03:26:15
End Date: 2026-06-14 03:26:15
Original Order ID: GPA.3368-8153-0019-18099..1
Trimmed Order ID: GPA.3368-8153-0019-18099

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42540' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21352'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21613
    [app_id] => 5013
    [order_id] => 13247
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-8622-2215-17715
    [pg_ref_id] => GPA.3370-8622-2215-17715
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-8622-2215-17715
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779002791407","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13247","obfuscatedExternalProfileId":"42787","orderId":"GPA.3370-8622-2215-17715..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775805991407","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42787
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 07:26:31
    [end_date] => 2026-05-17 07:26:31
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 10:30:02
    [updated_at] => 2026-05-17 07:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21613
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 07:26:31
End Date: 2026-06-17 07:26:31
Original Order ID: GPA.3370-8622-2215-17715..1
Trimmed Order ID: GPA.3370-8622-2215-17715

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42787' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21613'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21436
    [app_id] => 5013
    [order_id] => 13057
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3398-6136-6243-96416
    [pg_ref_id] => GPA.3398-6136-6243-96416
    [device_id] => 0
    [gateway_subscription_id] => GPA.3398-6136-6243-96416
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778807458772","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13057","obfuscatedExternalProfileId":"42606","orderId":"GPA.3398-6136-6243-96416..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775610658772","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42606
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 01:10:58
    [end_date] => 2026-05-15 01:10:58
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 03:50:02
    [updated_at] => 2026-05-15 01:20:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21436
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 01:10:58
End Date: 2026-06-15 01:10:58
Original Order ID: GPA.3398-6136-6243-96416..1
Trimmed Order ID: GPA.3398-6136-6243-96416

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42606' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21436'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21416
    [app_id] => 5013
    [order_id] => 13034
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3387-3347-9034-58433
    [pg_ref_id] => GPA.3387-3347-9034-58433
    [device_id] => 0
    [gateway_subscription_id] => GPA.3387-3347-9034-58433
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778793199804","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3387-3347-9034-58433..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775596399804","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42580
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 21:13:19
    [end_date] => 2026-05-14 21:13:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 22:00:02
    [updated_at] => 2026-05-14 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21416
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 21:13:19
End Date: 2026-05-14 21:13:19
Original Order ID: GPA.3387-3347-9034-58433..0
Trimmed Order ID: GPA.3387-3347-9034-58433

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42580' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23155
    [app_id] => 5013
    [order_id] => 14086
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3381-8948-1128-17288
    [pg_ref_id] => GPA.3381-8948-1128-17288
    [device_id] => 1
    [gateway_subscription_id] => GPA.3381-8948-1128-17288
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43994
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-04 05:08:01
    [end_date] => 2026-05-11 05:08:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-04 05:05:57
    [updated_at] => 2026-05-11 05:10:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23155
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 05:08:01
End Date: 2026-05-11 05:08:01
Original Order ID: GPA.3381-8948-1128-17288..0
Trimmed Order ID: GPA.3381-8948-1128-17288

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43994' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15699
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778493837535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-05-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 13:10:01
    [updated_at] => 2026-05-11 10:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15699
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15699'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24011
    [app_id] => 5013
    [order_id] => 14351
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3356-7639-5476-05177
    [pg_ref_id] => GPA.3356-7639-5476-05177
    [device_id] => 1
    [gateway_subscription_id] => GPA.3356-7639-5476-05177
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44336
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 22:13:18
    [end_date] => 2026-05-18 22:13:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 22:13:04
    [updated_at] => 2026-05-12 00:10:06
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24011
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-11 22:13:18
End Date: 2026-05-18 22:13:18
Original Order ID: GPA.3356-7639-5476-05177
Trimmed Order ID: GPA.3356-7639-5476-05177

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44336' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24011'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23940
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781172237535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-06-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 10:10:02
    [updated_at] => 2026-05-11 10:10:09
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23940
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23940'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21503
    [app_id] => 5013
    [order_id] => 12711
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3377-3289-2509-12326
    [pg_ref_id] => GPA.3377-3289-2509-12326
    [device_id] => 0
    [gateway_subscription_id] => GPA.3377-3289-2509-12326
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778809428914","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12711","obfuscatedExternalProfileId":"41963","orderId":"GPA.3377-3289-2509-12326..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775180551018","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41963
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 01:42:31
    [end_date] => 2026-05-15 01:43:48
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-15 01:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21503
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 01:42:31
End Date: 2026-05-15 01:43:48
Original Order ID: GPA.3377-3289-2509-12326..0
Trimmed Order ID: GPA.3377-3289-2509-12326

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41963' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23282
    [app_id] => 5013
    [order_id] => 14155
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-9534-7287-04845
    [pg_ref_id] => GPA.3359-9534-7287-04845
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-9534-7287-04845
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44091
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 23:22:52
    [end_date] => 2026-05-12 23:22:52
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 23:22:20
    [updated_at] => 2026-05-12 23:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23282
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 23:22:52
End Date: 2027-05-12 23:22:52
Original Order ID: GPA.3359-9534-7287-04845..0
Trimmed Order ID: GPA.3359-9534-7287-04845

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44091' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23282'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23275
    [app_id] => 5013
    [order_id] => 14153
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3318-1721-1922-53193
    [pg_ref_id] => GPA.3318-1721-1922-53193
    [device_id] => 1
    [gateway_subscription_id] => GPA.3318-1721-1922-53193
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44085
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 21:18:15
    [end_date] => 2026-05-12 21:18:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 21:17:55
    [updated_at] => 2026-05-12 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23275
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 21:18:15
End Date: 2027-05-12 21:18:15
Original Order ID: GPA.3318-1721-1922-53193..0
Trimmed Order ID: GPA.3318-1721-1922-53193

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44085' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23275'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23225
    [app_id] => 5013
    [order_id] => 14134
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-7651-5101-88843
    [pg_ref_id] => GPA.3320-7651-5101-88843
    [device_id] => 1
    [gateway_subscription_id] => GPA.3320-7651-5101-88843
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43803
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 06:53:18
    [end_date] => 2026-05-12 06:53:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 06:52:25
    [updated_at] => 2026-05-12 07:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23225
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 06:53:18
End Date: 2026-05-12 06:53:18
Original Order ID: GPA.3320-7651-5101-88843
Trimmed Order ID: GPA.3320-7651-5101-88843

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43803' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21380
    [app_id] => 5013
    [order_id] => 6824
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-5908-2292-59926
    [pg_ref_id] => GPA.3320-5908-2292-59926
    [device_id] => 0
    [gateway_subscription_id] => GPA.3320-5908-2292-59926
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778765113728","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3320-5908-2292-59926..11","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744637113728","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38244
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-14 13:25:13
    [end_date] => 2026-05-14 13:25:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 13:30:02
    [updated_at] => 2026-05-14 13:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21380
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg

Price : 1.99
priceCurrency : USD
Start Date: 2025-04-14 13:25:13
End Date: 2026-06-14 13:25:13
Original Order ID: GPA.3320-5908-2292-59926..12
Trimmed Order ID: GPA.3320-5908-2292-59926

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38244' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21380'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23997
    [app_id] => 5013
    [order_id] => 14092
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-9973-3244-79502
    [pg_ref_id] => GPA.3392-9973-3244-79502
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-9973-3244-79502
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781197177136","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14092","obfuscatedExternalProfileId":"44007","orderId":"GPA.3392-9973-3244-79502..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777913977136","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44007
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 16:59:37
    [end_date] => 2026-06-11 16:59:37
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 19:00:02
    [updated_at] => 2026-05-11 19:00:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23997
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 16:59:37
End Date: 2026-06-11 16:59:37
Original Order ID: GPA.3392-9973-3244-79502..0
Trimmed Order ID: GPA.3392-9973-3244-79502

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44007' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23997'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23765
    [app_id] => 5013
    [order_id] => 14280
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-2672-3482-04482
    [pg_ref_id] => GPA.3359-2672-3482-04482
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-2672-3482-04482
    [pg_payment_data] => {}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44261
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => webhook
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-09 18:22:01
    [end_date] => 2026-05-16 18:22:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-09 18:24:04
    [updated_at] => 2026-05-16 18:30:02
    [is_cancelled] => 0
    [cancelled_at] => 0000-00-00 00:00:00
    [deactivation_type] => 
    [deactivation_date] => 0000-00-00 00:00:00
    [renewal_date] => 0000-00-00 00:00:00
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23765
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-09 18:22:01
End Date: 2026-05-16 18:22:01
Original Order ID: GPA.3359-2672-3482-04482
Trimmed Order ID: GPA.3359-2672-3482-04482

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44261' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21750
    [app_id] => 5013
    [order_id] => 13132
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4355-7650-95175
    [pg_ref_id] => GPA.3399-4355-7650-95175
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4355-7650-95175
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778870726108","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13132","obfuscatedExternalProfileId":"42162","orderId":"GPA.3399-4355-7650-95175..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775673926108","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42162
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 18:45:26
    [end_date] => 2026-05-15 18:45:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 01:20:03
    [updated_at] => 2026-05-15 18:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21750
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 18:45:26
End Date: 2026-06-15 18:45:26
Original Order ID: GPA.3399-4355-7650-95175..1
Trimmed Order ID: GPA.3399-4355-7650-95175

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42162' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21750'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15190
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778480915052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-05-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 09:30:02
    [updated_at] => 2026-05-11 06:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15190
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15190'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23917
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781159315052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-06-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:30:02
    [updated_at] => 2026-05-11 06:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23917
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23917'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23916
    [app_id] => 5013
    [order_id] => 14085
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3378-4171-5280-78225
    [pg_ref_id] => GPA.3378-4171-5280-78225
    [device_id] => 0
    [gateway_subscription_id] => GPA.3378-4171-5280-78225
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1810011268709","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14085","obfuscatedExternalProfileId":"43993","orderId":"GPA.3378-4171-5280-78225..0","paymentState":1,"priceAmountMicros":"40990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777870468709","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43993
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 04:54:28
    [end_date] => 2027-05-11 04:54:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:20:02
    [updated_at] => 2026-05-11 06:20:08
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23916
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-04 04:54:28
End Date: 2027-05-11 04:54:28
Original Order ID: GPA.3378-4171-5280-78225..0
Trimmed Order ID: GPA.3378-4171-5280-78225

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43993' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23916'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21668
    [app_id] => 5013
    [order_id] => 13253
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3314-4628-6040-67680
    [pg_ref_id] => GPA.3314-4628-6040-67680
    [device_id] => 0
    [gateway_subscription_id] => GPA.3314-4628-6040-67680
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779021206119","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13253","obfuscatedExternalProfileId":"42796","orderId":"GPA.3314-4628-6040-67680..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775824406119","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42796
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 12:33:26
    [end_date] => 2026-05-17 12:33:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 14:50:03
    [updated_at] => 2026-05-17 12:40:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21668
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 12:33:26
End Date: 2026-05-17 12:33:26
Original Order ID: GPA.3314-4628-6040-67680..0
Trimmed Order ID: GPA.3314-4628-6040-67680

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42796' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21596
    [app_id] => 5013
    [order_id] => 7451
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3302-3760-5945-64217
    [pg_ref_id] => GPA.3302-3760-5945-64217
    [device_id] => 0
    [gateway_subscription_id] => GPA.3302-3760-5945-64217
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778991959847","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3302-3760-5945-64217..5","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1757428891499","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38543
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-09-09 14:41:31
    [end_date] => 2026-05-17 04:25:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 04:30:02
    [updated_at] => 2026-05-17 04:30:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21596
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA

Price : 1.99
priceCurrency : USD
Start Date: 2025-09-09 14:41:31
End Date: 2026-06-17 04:25:59
Original Order ID: GPA.3302-3760-5945-64217..6
Trimmed Order ID: GPA.3302-3760-5945-64217

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38543' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21596'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21760
    [app_id] => 5013
    [order_id] => 11676
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3340-6983-1659-64079
    [pg_ref_id] => GPA.3340-6983-1659-64079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3340-6983-1659-64079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779083233481","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"11676","obfuscatedExternalProfileId":"41033","orderId":"GPA.3340-6983-1659-64079..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1773208033481","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41033
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-03-11 05:47:13
    [end_date] => 2026-05-18 05:47:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 05:50:02
    [updated_at] => 2026-05-18 05:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21760
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q

Price : 3.99
priceCurrency : USD
Start Date: 2026-03-11 05:47:13
End Date: 2026-06-18 05:47:13
Original Order ID: GPA.3340-6983-1659-64079..2
Trimmed Order ID: GPA.3340-6983-1659-64079

================ Subscription Insert ================
INSERT INTO tbl_customer_subscriptions ( app_id, order_id, trans_id, pg_ref_id, device_id, gateway_subscription_id, pg_payment_data, channel, package_id, package_title, package_code, package_type, package_mode, price, basic_amount, tax_amt, subscriber_id, msisdn, role_type, gateway_type, pg_name, region_type, local_user, state_code, period, period_interval, trial_period, trial_length, subscription_type, output_video_limit, additional_cost_per_unit, no_videos, no_plays, status, platform, purchase_type, extended_status, start_date, end_date, autorenew, currency_id, currency, created, is_cancelled, deactivation_type, recurring, purchase_token, package_name ) VALUES ( '5013', '11676', 'GPA.3340-6983-1659-64079', 'GPA.3340-6983-1659-64079', '0', 'GPA.3340-6983-1659-64079', '{\"acknowledgementState\":1,\"autoRenewing\":true,\"autoResumeTimeMillis\":null,\"cancelReason\":null,\"countryCode\":\"US\",\"developerPayload\":\"ack-by-backend\",\"emailAddress\":null,\"expiryTimeMillis\":\"1781761633481\",\"externalAccountId\":null,\"familyName\":null,\"givenName\":null,\"kind\":\"androidpublisher#subscriptionPurchase\",\"linkedPurchaseToken\":null,\"obfuscatedExternalAccountId\":\"11676\",\"obfuscatedExternalProfileId\":\"41033\",\"orderId\":\"GPA.3340-6983-1659-64079..2\",\"paymentState\":1,\"priceAmountMicros\":\"3990000\",\"priceCurrencyCode\":\"USD\",\"profileId\":null,\"profileName\":null,\"promotionCode\":null,\"promotionType\":null,\"purchaseType\":null,\"startTimeMillis\":\"1773208033481\",\"userCancellationTimeMillis\":null}', '', '228', 'Monthly', '', '0', 'OTT', '3.99', '0.00', '0', '41033', '', '0', '3', 'google_inapp_purchase', '0', '0', '0', 'Month', '1', '', '0', '0', '0', '0', '0', '0', '2', 'cron', 'RENEWED', '0', '2026-03-11 05:47:13', '2026-06-18 05:47:13', '1', '4', 'USD', '2026-05-18 05:50:02', '0', '', '0', 'kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q', '' ) ✅ New renewal record inserted successfully.



✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23697
    [app_id] => 5013
    [order_id] => 14262
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3331-0153-4002-87312
    [pg_ref_id] => GPA.3331-0153-4002-87312
    [device_id] => 1
    [gateway_subscription_id] => GPA.3331-0153-4002-87312
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43108
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 22:51:35
    [end_date] => 2026-05-15 22:51:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-08 22:51:11
    [updated_at] => 2026-05-15 23:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23697
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-08 22:51:35
End Date: 2026-05-15 22:51:35
Original Order ID: GPA.3331-0153-4002-87312
Trimmed Order ID: GPA.3331-0153-4002-87312

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43108' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21504
    [app_id] => 5013
    [order_id] => 12735
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-6478-6508-75079
    [pg_ref_id] => GPA.3370-6478-6508-75079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-6478-6508-75079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778633459244","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12735","obfuscatedExternalProfileId":"42303","orderId":"GPA.3370-6478-6508-75079..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775220585577","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42303
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 12:49:45
    [end_date] => 2026-05-13 00:50:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-13 01:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21504
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 12:49:45
End Date: 2026-05-13 00:50:59
Original Order ID: GPA.3370-6478-6508-75079..0
Trimmed Order ID: GPA.3370-6478-6508-75079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42303' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21454
    [app_id] => 5013
    [order_id] => 13083
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3324-5252-5827-17785
    [pg_ref_id] => GPA.3324-5252-5827-17785
    [device_id] => 0
    [gateway_subscription_id] => GPA.3324-5252-5827-17785
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778829499091","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13083","obfuscatedExternalProfileId":"42260","orderId":"GPA.3324-5252-5827-17785..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775632699091","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42260
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 07:18:19
    [end_date] => 2026-05-15 07:18:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 09:20:02
    [updated_at] => 2026-05-15 07:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21454
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 07:18:19
End Date: 2026-06-15 07:18:19
Original Order ID: GPA.3324-5252-5827-17785..1
Trimmed Order ID: GPA.3324-5252-5827-17785

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42260' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21454'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24042
    [app_id] => 5013
    [order_id] => 14111
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3361-3178-8861-52435
    [pg_ref_id] => GPA.3361-3178-8861-52435
    [device_id] => 0
    [gateway_subscription_id] => GPA.3361-3178-8861-52435
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781225479625","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14111","obfuscatedExternalProfileId":"43961","orderId":"GPA.3361-3178-8861-52435..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777942279625","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 43961
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-05 00:51:19
    [end_date] => 2026-06-12 00:51:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 03:30:02
    [updated_at] => 2026-05-12 03:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24042
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-05 00:51:19
End Date: 2026-06-12 00:51:19
Original Order ID: GPA.3361-3178-8861-52435..0
Trimmed Order ID: GPA.3361-3178-8861-52435

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43961' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24042'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23946
    [app_id] => 5013
    [order_id] => 14334
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-8119-9873-34495
    [pg_ref_id] => GPA.3392-8119-9873-34495
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-8119-9873-34495..0
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 44178
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 12:29:30
    [end_date] => 2026-05-11 13:02:30
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 12:29:25
    [updated_at] => 2026-05-11 13:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23946
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-11 12:29:30
End Date: 2026-05-11 16:02:32
Original Order ID: GPA.3392-8119-9873-34495..6
Trimmed Order ID: GPA.3392-8119-9873-34495

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44178' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 16208
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778516402982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..3","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-05-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 16:30:02
    [updated_at] => 2026-05-11 16:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 16208
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '16208'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21272
    [app_id] => 5013
    [order_id] => 12907
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-4869-5509-71987
    [pg_ref_id] => GPA.3346-4869-5509-71987
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-4869-5509-71987
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778652642977","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12907","obfuscatedExternalProfileId":"42483","orderId":"GPA.3346-4869-5509-71987..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775455842977","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42483
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-06 06:10:42
    [end_date] => 2026-05-13 06:10:42
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-13 09:20:02
    [updated_at] => 2026-05-13 06:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21272
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-06 06:10:42
End Date: 2026-06-13 06:10:42
Original Order ID: GPA.3346-4869-5509-71987..1
Trimmed Order ID: GPA.3346-4869-5509-71987

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42483' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21272'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24051
    [app_id] => 5013
    [order_id] => 14364
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3354-3024-9181-24927
    [pg_ref_id] => GPA.3354-3024-9181-24927
    [device_id] => 0
    [gateway_subscription_id] => GPA.3313-8654-9262-56144..6
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44212
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 07:33:57
    [end_date] => 2026-05-08 08:11:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 06:26:01
    [updated_at] => 2026-05-12 09:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24051
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-12 06:26:09
End Date: 2026-05-12 07:04:10
Original Order ID: GPA.3354-3024-9181-24927..6
Trimmed Order ID: GPA.3354-3024-9181-24927

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44212' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 24027
    [app_id] => 5013
    [order_id] => 14356
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3333-8951-2461-80618
    [pg_ref_id] => GPA.3333-8951-2461-80618
    [device_id] => 0
    [gateway_subscription_id] => GPA.3333-8951-2461-80618
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 41436
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-12 00:35:28
    [end_date] => 2027-05-12 00:35:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 00:35:28
    [updated_at] => 2026-05-12 00:35:46
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24027
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-12 00:35:38
End Date: 2026-05-19 00:35:38
Original Order ID: GPA.3333-8951-2461-80618
Trimmed Order ID: GPA.3333-8951-2461-80618

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41436' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24027'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 23978
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781194802982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..4","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-06-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 16:30:02
    [updated_at] => 2026-05-11 16:30:07
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23978
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23978'
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub52
    [id] => 10247
    [app_id] => 5013
    [order_id] => 7293
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4290-3556-23909
    [pg_ref_id] => GPA.3399-4290-3556-23909
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4290-3556-23909
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":false,"autoResumeTimeMillis":null,"cancelReason":0,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778638541064","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3399-4290-3556-23909..0","paymentState":1,"priceAmountMicros":"19990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744510541064","userCancellationTimeMillis":"1766777611534"}
    [channel] => 
    [package_id] => 229
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 19.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38118
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-13 02:15:41
    [end_date] => 2026-05-13 02:15:41
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-03-23 09:58:19
    [updated_at] => 2026-05-13 02:16:05
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 1
    [record_id] => 10247
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub52 | Token: kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA

Price : 19.99
priceCurrency : USD
Start Date: 2025-04-13 02:15:41
End Date: 2026-05-13 02:15:41
Original Order ID: GPA.3399-4290-3556-23909..0
Trimmed Order ID: GPA.3399-4290-3556-23909

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38118' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21352
    [app_id] => 5013
    [order_id] => 12954
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3368-8153-0019-18099
    [pg_ref_id] => GPA.3368-8153-0019-18099
    [device_id] => 0
    [gateway_subscription_id] => GPA.3368-8153-0019-18099
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778729175155","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12954","obfuscatedExternalProfileId":"42540","orderId":"GPA.3368-8153-0019-18099..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775532375155","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42540
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 03:26:15
    [end_date] => 2026-05-14 03:26:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 07:20:02
    [updated_at] => 2026-05-14 03:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21352
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 03:26:15
End Date: 2026-06-14 03:26:15
Original Order ID: GPA.3368-8153-0019-18099..1
Trimmed Order ID: GPA.3368-8153-0019-18099

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42540' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21352'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21423
    [app_id] => 5013
    [order_id] => 13031
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3373-4110-1923-22492
    [pg_ref_id] => GPA.3373-4110-1923-22492
    [device_id] => 0
    [gateway_subscription_id] => GPA.3373-4110-1923-22492
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778791272687","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13031","obfuscatedExternalProfileId":"42576","orderId":"GPA.3373-4110-1923-22492..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775594472687","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42576
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 20:41:12
    [end_date] => 2026-05-14 20:41:12
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 23:20:02
    [updated_at] => 2026-05-14 20:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21423
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 20:41:12
End Date: 2026-06-14 20:41:12
Original Order ID: GPA.3373-4110-1923-22492..1
Trimmed Order ID: GPA.3373-4110-1923-22492

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42576' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21423'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21613
    [app_id] => 5013
    [order_id] => 13247
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-8622-2215-17715
    [pg_ref_id] => GPA.3370-8622-2215-17715
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-8622-2215-17715
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779002791407","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13247","obfuscatedExternalProfileId":"42787","orderId":"GPA.3370-8622-2215-17715..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775805991407","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42787
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 07:26:31
    [end_date] => 2026-05-17 07:26:31
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 10:30:02
    [updated_at] => 2026-05-17 07:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21613
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 07:26:31
End Date: 2026-06-17 07:26:31
Original Order ID: GPA.3370-8622-2215-17715..1
Trimmed Order ID: GPA.3370-8622-2215-17715

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42787' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21613'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21436
    [app_id] => 5013
    [order_id] => 13057
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3398-6136-6243-96416
    [pg_ref_id] => GPA.3398-6136-6243-96416
    [device_id] => 0
    [gateway_subscription_id] => GPA.3398-6136-6243-96416
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778807458772","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13057","obfuscatedExternalProfileId":"42606","orderId":"GPA.3398-6136-6243-96416..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775610658772","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42606
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 01:10:58
    [end_date] => 2026-05-15 01:10:58
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 03:50:02
    [updated_at] => 2026-05-15 01:20:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21436
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 01:10:58
End Date: 2026-06-15 01:10:58
Original Order ID: GPA.3398-6136-6243-96416..1
Trimmed Order ID: GPA.3398-6136-6243-96416

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42606' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21436'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21416
    [app_id] => 5013
    [order_id] => 13034
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3387-3347-9034-58433
    [pg_ref_id] => GPA.3387-3347-9034-58433
    [device_id] => 0
    [gateway_subscription_id] => GPA.3387-3347-9034-58433
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778793199804","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3387-3347-9034-58433..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775596399804","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42580
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 21:13:19
    [end_date] => 2026-05-14 21:13:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 22:00:02
    [updated_at] => 2026-05-14 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21416
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 21:13:19
End Date: 2026-05-14 21:13:19
Original Order ID: GPA.3387-3347-9034-58433..0
Trimmed Order ID: GPA.3387-3347-9034-58433

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42580' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23155
    [app_id] => 5013
    [order_id] => 14086
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3381-8948-1128-17288
    [pg_ref_id] => GPA.3381-8948-1128-17288
    [device_id] => 1
    [gateway_subscription_id] => GPA.3381-8948-1128-17288
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43994
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-04 05:08:01
    [end_date] => 2026-05-11 05:08:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-04 05:05:57
    [updated_at] => 2026-05-11 05:10:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23155
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 05:08:01
End Date: 2026-05-11 05:08:01
Original Order ID: GPA.3381-8948-1128-17288..0
Trimmed Order ID: GPA.3381-8948-1128-17288

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43994' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15699
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778493837535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-05-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 13:10:01
    [updated_at] => 2026-05-11 10:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15699
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15699'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24011
    [app_id] => 5013
    [order_id] => 14351
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3356-7639-5476-05177
    [pg_ref_id] => GPA.3356-7639-5476-05177
    [device_id] => 1
    [gateway_subscription_id] => GPA.3356-7639-5476-05177
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44336
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 22:13:18
    [end_date] => 2026-05-18 22:13:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 22:13:04
    [updated_at] => 2026-05-12 00:10:06
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24011
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-11 22:13:18
End Date: 2026-05-18 22:13:18
Original Order ID: GPA.3356-7639-5476-05177
Trimmed Order ID: GPA.3356-7639-5476-05177

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44336' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24011'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23940
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781172237535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-06-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 10:10:02
    [updated_at] => 2026-05-11 10:10:09
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23940
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23940'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21503
    [app_id] => 5013
    [order_id] => 12711
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3377-3289-2509-12326
    [pg_ref_id] => GPA.3377-3289-2509-12326
    [device_id] => 0
    [gateway_subscription_id] => GPA.3377-3289-2509-12326
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778809428914","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12711","obfuscatedExternalProfileId":"41963","orderId":"GPA.3377-3289-2509-12326..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775180551018","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41963
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 01:42:31
    [end_date] => 2026-05-15 01:43:48
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-15 01:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21503
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 01:42:31
End Date: 2026-05-15 01:43:48
Original Order ID: GPA.3377-3289-2509-12326..0
Trimmed Order ID: GPA.3377-3289-2509-12326

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41963' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23282
    [app_id] => 5013
    [order_id] => 14155
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-9534-7287-04845
    [pg_ref_id] => GPA.3359-9534-7287-04845
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-9534-7287-04845
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44091
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 23:22:52
    [end_date] => 2026-05-12 23:22:52
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 23:22:20
    [updated_at] => 2026-05-12 23:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23282
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 23:22:52
End Date: 2027-05-12 23:22:52
Original Order ID: GPA.3359-9534-7287-04845..0
Trimmed Order ID: GPA.3359-9534-7287-04845

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44091' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23282'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23275
    [app_id] => 5013
    [order_id] => 14153
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3318-1721-1922-53193
    [pg_ref_id] => GPA.3318-1721-1922-53193
    [device_id] => 1
    [gateway_subscription_id] => GPA.3318-1721-1922-53193
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44085
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 21:18:15
    [end_date] => 2026-05-12 21:18:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 21:17:55
    [updated_at] => 2026-05-12 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23275
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 21:18:15
End Date: 2027-05-12 21:18:15
Original Order ID: GPA.3318-1721-1922-53193..0
Trimmed Order ID: GPA.3318-1721-1922-53193

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44085' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23275'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23225
    [app_id] => 5013
    [order_id] => 14134
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-7651-5101-88843
    [pg_ref_id] => GPA.3320-7651-5101-88843
    [device_id] => 1
    [gateway_subscription_id] => GPA.3320-7651-5101-88843
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43803
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 06:53:18
    [end_date] => 2026-05-12 06:53:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 06:52:25
    [updated_at] => 2026-05-12 07:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23225
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 06:53:18
End Date: 2026-05-12 06:53:18
Original Order ID: GPA.3320-7651-5101-88843
Trimmed Order ID: GPA.3320-7651-5101-88843

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43803' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21380
    [app_id] => 5013
    [order_id] => 6824
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-5908-2292-59926
    [pg_ref_id] => GPA.3320-5908-2292-59926
    [device_id] => 0
    [gateway_subscription_id] => GPA.3320-5908-2292-59926
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778765113728","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3320-5908-2292-59926..11","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744637113728","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38244
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-14 13:25:13
    [end_date] => 2026-05-14 13:25:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 13:30:02
    [updated_at] => 2026-05-14 13:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21380
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg

Price : 1.99
priceCurrency : USD
Start Date: 2025-04-14 13:25:13
End Date: 2026-06-14 13:25:13
Original Order ID: GPA.3320-5908-2292-59926..12
Trimmed Order ID: GPA.3320-5908-2292-59926

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38244' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21380'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23997
    [app_id] => 5013
    [order_id] => 14092
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-9973-3244-79502
    [pg_ref_id] => GPA.3392-9973-3244-79502
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-9973-3244-79502
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781197177136","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14092","obfuscatedExternalProfileId":"44007","orderId":"GPA.3392-9973-3244-79502..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777913977136","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44007
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 16:59:37
    [end_date] => 2026-06-11 16:59:37
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 19:00:02
    [updated_at] => 2026-05-11 19:00:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23997
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 16:59:37
End Date: 2026-06-11 16:59:37
Original Order ID: GPA.3392-9973-3244-79502..0
Trimmed Order ID: GPA.3392-9973-3244-79502

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44007' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23997'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23765
    [app_id] => 5013
    [order_id] => 14280
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-2672-3482-04482
    [pg_ref_id] => GPA.3359-2672-3482-04482
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-2672-3482-04482
    [pg_payment_data] => {}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44261
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => webhook
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-09 18:22:01
    [end_date] => 2026-05-16 18:22:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-09 18:24:04
    [updated_at] => 2026-05-16 18:30:02
    [is_cancelled] => 0
    [cancelled_at] => 0000-00-00 00:00:00
    [deactivation_type] => 
    [deactivation_date] => 0000-00-00 00:00:00
    [renewal_date] => 0000-00-00 00:00:00
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23765
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-09 18:22:01
End Date: 2026-05-16 18:22:01
Original Order ID: GPA.3359-2672-3482-04482
Trimmed Order ID: GPA.3359-2672-3482-04482

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44261' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21750
    [app_id] => 5013
    [order_id] => 13132
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4355-7650-95175
    [pg_ref_id] => GPA.3399-4355-7650-95175
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4355-7650-95175
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778870726108","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13132","obfuscatedExternalProfileId":"42162","orderId":"GPA.3399-4355-7650-95175..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775673926108","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42162
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 18:45:26
    [end_date] => 2026-05-15 18:45:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 01:20:03
    [updated_at] => 2026-05-15 18:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21750
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 18:45:26
End Date: 2026-06-15 18:45:26
Original Order ID: GPA.3399-4355-7650-95175..1
Trimmed Order ID: GPA.3399-4355-7650-95175

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42162' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21750'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15190
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778480915052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-05-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 09:30:02
    [updated_at] => 2026-05-11 06:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15190
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15190'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23917
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781159315052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-06-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:30:02
    [updated_at] => 2026-05-11 06:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23917
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23917'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23916
    [app_id] => 5013
    [order_id] => 14085
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3378-4171-5280-78225
    [pg_ref_id] => GPA.3378-4171-5280-78225
    [device_id] => 0
    [gateway_subscription_id] => GPA.3378-4171-5280-78225
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1810011268709","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14085","obfuscatedExternalProfileId":"43993","orderId":"GPA.3378-4171-5280-78225..0","paymentState":1,"priceAmountMicros":"40990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777870468709","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43993
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 04:54:28
    [end_date] => 2027-05-11 04:54:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:20:02
    [updated_at] => 2026-05-11 06:20:08
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23916
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-04 04:54:28
End Date: 2027-05-11 04:54:28
Original Order ID: GPA.3378-4171-5280-78225..0
Trimmed Order ID: GPA.3378-4171-5280-78225

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43993' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23916'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21668
    [app_id] => 5013
    [order_id] => 13253
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3314-4628-6040-67680
    [pg_ref_id] => GPA.3314-4628-6040-67680
    [device_id] => 0
    [gateway_subscription_id] => GPA.3314-4628-6040-67680
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779021206119","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13253","obfuscatedExternalProfileId":"42796","orderId":"GPA.3314-4628-6040-67680..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775824406119","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42796
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 12:33:26
    [end_date] => 2026-05-17 12:33:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 14:50:03
    [updated_at] => 2026-05-17 12:40:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21668
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 12:33:26
End Date: 2026-05-17 12:33:26
Original Order ID: GPA.3314-4628-6040-67680..0
Trimmed Order ID: GPA.3314-4628-6040-67680

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42796' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21596
    [app_id] => 5013
    [order_id] => 7451
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3302-3760-5945-64217
    [pg_ref_id] => GPA.3302-3760-5945-64217
    [device_id] => 0
    [gateway_subscription_id] => GPA.3302-3760-5945-64217
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778991959847","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3302-3760-5945-64217..5","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1757428891499","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38543
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-09-09 14:41:31
    [end_date] => 2026-05-17 04:25:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 04:30:02
    [updated_at] => 2026-05-17 04:30:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21596
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA

Price : 1.99
priceCurrency : USD
Start Date: 2025-09-09 14:41:31
End Date: 2026-06-17 04:25:59
Original Order ID: GPA.3302-3760-5945-64217..6
Trimmed Order ID: GPA.3302-3760-5945-64217

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38543' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21596'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21760
    [app_id] => 5013
    [order_id] => 11676
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3340-6983-1659-64079
    [pg_ref_id] => GPA.3340-6983-1659-64079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3340-6983-1659-64079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779083233481","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"11676","obfuscatedExternalProfileId":"41033","orderId":"GPA.3340-6983-1659-64079..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1773208033481","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41033
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-03-11 05:47:13
    [end_date] => 2026-05-18 05:47:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 05:50:02
    [updated_at] => 2026-05-18 05:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21760
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q

Price : 3.99
priceCurrency : USD
Start Date: 2026-03-11 05:47:13
End Date: 2026-06-18 05:47:13
Original Order ID: GPA.3340-6983-1659-64079..2
Trimmed Order ID: GPA.3340-6983-1659-64079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41033' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21760'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23697
    [app_id] => 5013
    [order_id] => 14262
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3331-0153-4002-87312
    [pg_ref_id] => GPA.3331-0153-4002-87312
    [device_id] => 1
    [gateway_subscription_id] => GPA.3331-0153-4002-87312
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43108
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 22:51:35
    [end_date] => 2026-05-15 22:51:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-08 22:51:11
    [updated_at] => 2026-05-15 23:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23697
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-08 22:51:35
End Date: 2026-05-15 22:51:35
Original Order ID: GPA.3331-0153-4002-87312
Trimmed Order ID: GPA.3331-0153-4002-87312

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43108' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21504
    [app_id] => 5013
    [order_id] => 12735
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-6478-6508-75079
    [pg_ref_id] => GPA.3370-6478-6508-75079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-6478-6508-75079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778633459244","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12735","obfuscatedExternalProfileId":"42303","orderId":"GPA.3370-6478-6508-75079..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775220585577","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42303
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 12:49:45
    [end_date] => 2026-05-13 00:50:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-13 01:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21504
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 12:49:45
End Date: 2026-05-13 00:50:59
Original Order ID: GPA.3370-6478-6508-75079..0
Trimmed Order ID: GPA.3370-6478-6508-75079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42303' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21454
    [app_id] => 5013
    [order_id] => 13083
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3324-5252-5827-17785
    [pg_ref_id] => GPA.3324-5252-5827-17785
    [device_id] => 0
    [gateway_subscription_id] => GPA.3324-5252-5827-17785
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778829499091","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13083","obfuscatedExternalProfileId":"42260","orderId":"GPA.3324-5252-5827-17785..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775632699091","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42260
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 07:18:19
    [end_date] => 2026-05-15 07:18:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 09:20:02
    [updated_at] => 2026-05-15 07:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21454
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 07:18:19
End Date: 2026-06-15 07:18:19
Original Order ID: GPA.3324-5252-5827-17785..1
Trimmed Order ID: GPA.3324-5252-5827-17785

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42260' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21454'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24042
    [app_id] => 5013
    [order_id] => 14111
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3361-3178-8861-52435
    [pg_ref_id] => GPA.3361-3178-8861-52435
    [device_id] => 0
    [gateway_subscription_id] => GPA.3361-3178-8861-52435
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781225479625","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14111","obfuscatedExternalProfileId":"43961","orderId":"GPA.3361-3178-8861-52435..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777942279625","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 43961
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-05 00:51:19
    [end_date] => 2026-06-12 00:51:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 03:30:02
    [updated_at] => 2026-05-12 03:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24042
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-05 00:51:19
End Date: 2026-06-12 00:51:19
Original Order ID: GPA.3361-3178-8861-52435..0
Trimmed Order ID: GPA.3361-3178-8861-52435

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43961' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24042'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23946
    [app_id] => 5013
    [order_id] => 14334
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-8119-9873-34495
    [pg_ref_id] => GPA.3392-8119-9873-34495
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-8119-9873-34495..0
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 44178
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 12:29:30
    [end_date] => 2026-05-11 13:02:30
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 12:29:25
    [updated_at] => 2026-05-11 13:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23946
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-11 12:29:30
End Date: 2026-05-11 16:02:32
Original Order ID: GPA.3392-8119-9873-34495..6
Trimmed Order ID: GPA.3392-8119-9873-34495

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44178' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 16208
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778516402982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..3","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-05-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 16:30:02
    [updated_at] => 2026-05-11 16:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 16208
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '16208'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21272
    [app_id] => 5013
    [order_id] => 12907
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-4869-5509-71987
    [pg_ref_id] => GPA.3346-4869-5509-71987
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-4869-5509-71987
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778652642977","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12907","obfuscatedExternalProfileId":"42483","orderId":"GPA.3346-4869-5509-71987..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775455842977","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42483
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-06 06:10:42
    [end_date] => 2026-05-13 06:10:42
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-13 09:20:02
    [updated_at] => 2026-05-13 06:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21272
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-06 06:10:42
End Date: 2026-06-13 06:10:42
Original Order ID: GPA.3346-4869-5509-71987..1
Trimmed Order ID: GPA.3346-4869-5509-71987

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42483' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21272'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24051
    [app_id] => 5013
    [order_id] => 14364
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3354-3024-9181-24927
    [pg_ref_id] => GPA.3354-3024-9181-24927
    [device_id] => 0
    [gateway_subscription_id] => GPA.3313-8654-9262-56144..6
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44212
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 07:33:57
    [end_date] => 2026-05-08 08:11:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 06:26:01
    [updated_at] => 2026-05-12 09:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24051
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-12 06:26:09
End Date: 2026-05-12 07:04:10
Original Order ID: GPA.3354-3024-9181-24927..6
Trimmed Order ID: GPA.3354-3024-9181-24927

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44212' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 24027
    [app_id] => 5013
    [order_id] => 14356
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3333-8951-2461-80618
    [pg_ref_id] => GPA.3333-8951-2461-80618
    [device_id] => 0
    [gateway_subscription_id] => GPA.3333-8951-2461-80618
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 41436
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-12 00:35:28
    [end_date] => 2027-05-12 00:35:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 00:35:28
    [updated_at] => 2026-05-12 00:35:46
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24027
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-12 00:35:38
End Date: 2026-05-19 00:35:38
Original Order ID: GPA.3333-8951-2461-80618
Trimmed Order ID: GPA.3333-8951-2461-80618

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41436' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24027'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 23978
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781194802982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..4","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-06-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 16:30:02
    [updated_at] => 2026-05-11 16:30:07
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23978
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23978'
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub52
    [id] => 10247
    [app_id] => 5013
    [order_id] => 7293
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4290-3556-23909
    [pg_ref_id] => GPA.3399-4290-3556-23909
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4290-3556-23909
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":false,"autoResumeTimeMillis":null,"cancelReason":0,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778638541064","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3399-4290-3556-23909..0","paymentState":1,"priceAmountMicros":"19990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744510541064","userCancellationTimeMillis":"1766777611534"}
    [channel] => 
    [package_id] => 229
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 19.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38118
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-13 02:15:41
    [end_date] => 2026-05-13 02:15:41
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-03-23 09:58:19
    [updated_at] => 2026-05-13 02:16:05
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 1
    [record_id] => 10247
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub52 | Token: kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA

Price : 19.99
priceCurrency : USD
Start Date: 2025-04-13 02:15:41
End Date: 2026-05-13 02:15:41
Original Order ID: GPA.3399-4290-3556-23909..0
Trimmed Order ID: GPA.3399-4290-3556-23909

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38118' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21352
    [app_id] => 5013
    [order_id] => 12954
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3368-8153-0019-18099
    [pg_ref_id] => GPA.3368-8153-0019-18099
    [device_id] => 0
    [gateway_subscription_id] => GPA.3368-8153-0019-18099
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778729175155","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12954","obfuscatedExternalProfileId":"42540","orderId":"GPA.3368-8153-0019-18099..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775532375155","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42540
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 03:26:15
    [end_date] => 2026-05-14 03:26:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 07:20:02
    [updated_at] => 2026-05-14 03:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21352
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 03:26:15
End Date: 2026-06-14 03:26:15
Original Order ID: GPA.3368-8153-0019-18099..1
Trimmed Order ID: GPA.3368-8153-0019-18099

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42540' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21352'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21423
    [app_id] => 5013
    [order_id] => 13031
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3373-4110-1923-22492
    [pg_ref_id] => GPA.3373-4110-1923-22492
    [device_id] => 0
    [gateway_subscription_id] => GPA.3373-4110-1923-22492
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778791272687","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13031","obfuscatedExternalProfileId":"42576","orderId":"GPA.3373-4110-1923-22492..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775594472687","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42576
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 20:41:12
    [end_date] => 2026-05-14 20:41:12
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 23:20:02
    [updated_at] => 2026-05-14 20:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21423
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 20:41:12
End Date: 2026-06-14 20:41:12
Original Order ID: GPA.3373-4110-1923-22492..1
Trimmed Order ID: GPA.3373-4110-1923-22492

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42576' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21423'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21613
    [app_id] => 5013
    [order_id] => 13247
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-8622-2215-17715
    [pg_ref_id] => GPA.3370-8622-2215-17715
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-8622-2215-17715
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779002791407","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13247","obfuscatedExternalProfileId":"42787","orderId":"GPA.3370-8622-2215-17715..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775805991407","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42787
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 07:26:31
    [end_date] => 2026-05-17 07:26:31
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 10:30:02
    [updated_at] => 2026-05-17 07:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21613
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 07:26:31
End Date: 2026-06-17 07:26:31
Original Order ID: GPA.3370-8622-2215-17715..1
Trimmed Order ID: GPA.3370-8622-2215-17715

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42787' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21613'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21436
    [app_id] => 5013
    [order_id] => 13057
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3398-6136-6243-96416
    [pg_ref_id] => GPA.3398-6136-6243-96416
    [device_id] => 0
    [gateway_subscription_id] => GPA.3398-6136-6243-96416
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778807458772","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13057","obfuscatedExternalProfileId":"42606","orderId":"GPA.3398-6136-6243-96416..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775610658772","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42606
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 01:10:58
    [end_date] => 2026-05-15 01:10:58
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 03:50:02
    [updated_at] => 2026-05-15 01:20:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21436
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 01:10:58
End Date: 2026-06-15 01:10:58
Original Order ID: GPA.3398-6136-6243-96416..1
Trimmed Order ID: GPA.3398-6136-6243-96416

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42606' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21436'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21416
    [app_id] => 5013
    [order_id] => 13034
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3387-3347-9034-58433
    [pg_ref_id] => GPA.3387-3347-9034-58433
    [device_id] => 0
    [gateway_subscription_id] => GPA.3387-3347-9034-58433
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778793199804","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3387-3347-9034-58433..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775596399804","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42580
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 21:13:19
    [end_date] => 2026-05-14 21:13:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 22:00:02
    [updated_at] => 2026-05-14 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21416
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 21:13:19
End Date: 2026-05-14 21:13:19
Original Order ID: GPA.3387-3347-9034-58433..0
Trimmed Order ID: GPA.3387-3347-9034-58433

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42580' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23155
    [app_id] => 5013
    [order_id] => 14086
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3381-8948-1128-17288
    [pg_ref_id] => GPA.3381-8948-1128-17288
    [device_id] => 1
    [gateway_subscription_id] => GPA.3381-8948-1128-17288
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43994
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-04 05:08:01
    [end_date] => 2026-05-11 05:08:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-04 05:05:57
    [updated_at] => 2026-05-11 05:10:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23155
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 05:08:01
End Date: 2026-05-11 05:08:01
Original Order ID: GPA.3381-8948-1128-17288..0
Trimmed Order ID: GPA.3381-8948-1128-17288

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43994' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15699
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778493837535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-05-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 13:10:01
    [updated_at] => 2026-05-11 10:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15699
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15699'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24011
    [app_id] => 5013
    [order_id] => 14351
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3356-7639-5476-05177
    [pg_ref_id] => GPA.3356-7639-5476-05177
    [device_id] => 1
    [gateway_subscription_id] => GPA.3356-7639-5476-05177
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44336
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 22:13:18
    [end_date] => 2026-05-18 22:13:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 22:13:04
    [updated_at] => 2026-05-12 00:10:06
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24011
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-11 22:13:18
End Date: 2026-05-18 22:13:18
Original Order ID: GPA.3356-7639-5476-05177
Trimmed Order ID: GPA.3356-7639-5476-05177

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44336' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24011'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23940
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781172237535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-06-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 10:10:02
    [updated_at] => 2026-05-11 10:10:09
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23940
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23940'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21503
    [app_id] => 5013
    [order_id] => 12711
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3377-3289-2509-12326
    [pg_ref_id] => GPA.3377-3289-2509-12326
    [device_id] => 0
    [gateway_subscription_id] => GPA.3377-3289-2509-12326
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778809428914","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12711","obfuscatedExternalProfileId":"41963","orderId":"GPA.3377-3289-2509-12326..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775180551018","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41963
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 01:42:31
    [end_date] => 2026-05-15 01:43:48
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-15 01:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21503
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 01:42:31
End Date: 2026-05-15 01:43:48
Original Order ID: GPA.3377-3289-2509-12326..0
Trimmed Order ID: GPA.3377-3289-2509-12326

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41963' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23282
    [app_id] => 5013
    [order_id] => 14155
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-9534-7287-04845
    [pg_ref_id] => GPA.3359-9534-7287-04845
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-9534-7287-04845
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44091
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 23:22:52
    [end_date] => 2026-05-12 23:22:52
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 23:22:20
    [updated_at] => 2026-05-12 23:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23282
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 23:22:52
End Date: 2027-05-12 23:22:52
Original Order ID: GPA.3359-9534-7287-04845..0
Trimmed Order ID: GPA.3359-9534-7287-04845

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44091' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23282'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23275
    [app_id] => 5013
    [order_id] => 14153
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3318-1721-1922-53193
    [pg_ref_id] => GPA.3318-1721-1922-53193
    [device_id] => 1
    [gateway_subscription_id] => GPA.3318-1721-1922-53193
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44085
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 21:18:15
    [end_date] => 2026-05-12 21:18:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 21:17:55
    [updated_at] => 2026-05-12 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23275
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 21:18:15
End Date: 2027-05-12 21:18:15
Original Order ID: GPA.3318-1721-1922-53193..0
Trimmed Order ID: GPA.3318-1721-1922-53193

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44085' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23275'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23225
    [app_id] => 5013
    [order_id] => 14134
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-7651-5101-88843
    [pg_ref_id] => GPA.3320-7651-5101-88843
    [device_id] => 1
    [gateway_subscription_id] => GPA.3320-7651-5101-88843
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43803
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 06:53:18
    [end_date] => 2026-05-12 06:53:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 06:52:25
    [updated_at] => 2026-05-12 07:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23225
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 06:53:18
End Date: 2026-05-12 06:53:18
Original Order ID: GPA.3320-7651-5101-88843
Trimmed Order ID: GPA.3320-7651-5101-88843

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43803' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21380
    [app_id] => 5013
    [order_id] => 6824
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-5908-2292-59926
    [pg_ref_id] => GPA.3320-5908-2292-59926
    [device_id] => 0
    [gateway_subscription_id] => GPA.3320-5908-2292-59926
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778765113728","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3320-5908-2292-59926..11","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744637113728","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38244
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-14 13:25:13
    [end_date] => 2026-05-14 13:25:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 13:30:02
    [updated_at] => 2026-05-14 13:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21380
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg

Price : 1.99
priceCurrency : USD
Start Date: 2025-04-14 13:25:13
End Date: 2026-06-14 13:25:13
Original Order ID: GPA.3320-5908-2292-59926..12
Trimmed Order ID: GPA.3320-5908-2292-59926

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38244' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21380'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23997
    [app_id] => 5013
    [order_id] => 14092
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-9973-3244-79502
    [pg_ref_id] => GPA.3392-9973-3244-79502
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-9973-3244-79502
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781197177136","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14092","obfuscatedExternalProfileId":"44007","orderId":"GPA.3392-9973-3244-79502..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777913977136","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44007
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 16:59:37
    [end_date] => 2026-06-11 16:59:37
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 19:00:02
    [updated_at] => 2026-05-11 19:00:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23997
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 16:59:37
End Date: 2026-06-11 16:59:37
Original Order ID: GPA.3392-9973-3244-79502..0
Trimmed Order ID: GPA.3392-9973-3244-79502

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44007' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23997'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23765
    [app_id] => 5013
    [order_id] => 14280
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-2672-3482-04482
    [pg_ref_id] => GPA.3359-2672-3482-04482
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-2672-3482-04482
    [pg_payment_data] => {}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44261
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => webhook
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-09 18:22:01
    [end_date] => 2026-05-16 18:22:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-09 18:24:04
    [updated_at] => 2026-05-16 18:30:02
    [is_cancelled] => 0
    [cancelled_at] => 0000-00-00 00:00:00
    [deactivation_type] => 
    [deactivation_date] => 0000-00-00 00:00:00
    [renewal_date] => 0000-00-00 00:00:00
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23765
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-09 18:22:01
End Date: 2026-05-16 18:22:01
Original Order ID: GPA.3359-2672-3482-04482
Trimmed Order ID: GPA.3359-2672-3482-04482

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44261' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21750
    [app_id] => 5013
    [order_id] => 13132
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4355-7650-95175
    [pg_ref_id] => GPA.3399-4355-7650-95175
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4355-7650-95175
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778870726108","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13132","obfuscatedExternalProfileId":"42162","orderId":"GPA.3399-4355-7650-95175..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775673926108","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42162
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 18:45:26
    [end_date] => 2026-05-15 18:45:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 01:20:03
    [updated_at] => 2026-05-15 18:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21750
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 18:45:26
End Date: 2026-06-15 18:45:26
Original Order ID: GPA.3399-4355-7650-95175..1
Trimmed Order ID: GPA.3399-4355-7650-95175

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42162' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21750'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15190
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778480915052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-05-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 09:30:02
    [updated_at] => 2026-05-11 06:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15190
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15190'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23917
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781159315052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-06-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:30:02
    [updated_at] => 2026-05-11 06:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23917
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23917'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23916
    [app_id] => 5013
    [order_id] => 14085
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3378-4171-5280-78225
    [pg_ref_id] => GPA.3378-4171-5280-78225
    [device_id] => 0
    [gateway_subscription_id] => GPA.3378-4171-5280-78225
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1810011268709","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14085","obfuscatedExternalProfileId":"43993","orderId":"GPA.3378-4171-5280-78225..0","paymentState":1,"priceAmountMicros":"40990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777870468709","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43993
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 04:54:28
    [end_date] => 2027-05-11 04:54:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:20:02
    [updated_at] => 2026-05-11 06:20:08
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23916
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-04 04:54:28
End Date: 2027-05-11 04:54:28
Original Order ID: GPA.3378-4171-5280-78225..0
Trimmed Order ID: GPA.3378-4171-5280-78225

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43993' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23916'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21668
    [app_id] => 5013
    [order_id] => 13253
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3314-4628-6040-67680
    [pg_ref_id] => GPA.3314-4628-6040-67680
    [device_id] => 0
    [gateway_subscription_id] => GPA.3314-4628-6040-67680
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779021206119","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13253","obfuscatedExternalProfileId":"42796","orderId":"GPA.3314-4628-6040-67680..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775824406119","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42796
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 12:33:26
    [end_date] => 2026-05-17 12:33:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 14:50:03
    [updated_at] => 2026-05-17 12:40:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21668
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 12:33:26
End Date: 2026-05-17 12:33:26
Original Order ID: GPA.3314-4628-6040-67680..0
Trimmed Order ID: GPA.3314-4628-6040-67680

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42796' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21596
    [app_id] => 5013
    [order_id] => 7451
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3302-3760-5945-64217
    [pg_ref_id] => GPA.3302-3760-5945-64217
    [device_id] => 0
    [gateway_subscription_id] => GPA.3302-3760-5945-64217
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778991959847","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3302-3760-5945-64217..5","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1757428891499","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38543
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-09-09 14:41:31
    [end_date] => 2026-05-17 04:25:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 04:30:02
    [updated_at] => 2026-05-17 04:30:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21596
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA

Price : 1.99
priceCurrency : USD
Start Date: 2025-09-09 14:41:31
End Date: 2026-06-17 04:25:59
Original Order ID: GPA.3302-3760-5945-64217..6
Trimmed Order ID: GPA.3302-3760-5945-64217

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38543' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21596'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21760
    [app_id] => 5013
    [order_id] => 11676
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3340-6983-1659-64079
    [pg_ref_id] => GPA.3340-6983-1659-64079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3340-6983-1659-64079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779083233481","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"11676","obfuscatedExternalProfileId":"41033","orderId":"GPA.3340-6983-1659-64079..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1773208033481","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41033
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-03-11 05:47:13
    [end_date] => 2026-05-18 05:47:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 05:50:02
    [updated_at] => 2026-05-18 05:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21760
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q

Price : 3.99
priceCurrency : USD
Start Date: 2026-03-11 05:47:13
End Date: 2026-06-18 05:47:13
Original Order ID: GPA.3340-6983-1659-64079..2
Trimmed Order ID: GPA.3340-6983-1659-64079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41033' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21760'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23697
    [app_id] => 5013
    [order_id] => 14262
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3331-0153-4002-87312
    [pg_ref_id] => GPA.3331-0153-4002-87312
    [device_id] => 1
    [gateway_subscription_id] => GPA.3331-0153-4002-87312
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43108
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 22:51:35
    [end_date] => 2026-05-15 22:51:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-08 22:51:11
    [updated_at] => 2026-05-15 23:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23697
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-08 22:51:35
End Date: 2026-05-15 22:51:35
Original Order ID: GPA.3331-0153-4002-87312
Trimmed Order ID: GPA.3331-0153-4002-87312

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43108' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21788
    [app_id] => 5013
    [order_id] => 8311
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3329-5340-7275-16018
    [pg_ref_id] => GPA.3329-5340-7275-16018
    [device_id] => 0
    [gateway_subscription_id] => GPA.3329-5340-7275-16018
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"GB","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779113949424","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3329-5340-7275-16018..3","paymentState":1,"priceAmountMicros":"1890000","priceCurrencyCode":"GBP","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1766067549424","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.89
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 39049
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-18 14:19:09
    [end_date] => 2026-05-18 14:19:09
    [autorenew] => 1
    [currency_id] => 4
    [currency] => GBP
    [u_currency] => 
    [created] => 2026-04-18 14:20:02
    [updated_at] => 2026-05-18 14:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21788
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA

Price : 1.89
priceCurrency : GBP
Start Date: 2025-12-18 14:19:09
End Date: 2026-06-18 14:19:09
Original Order ID: GPA.3329-5340-7275-16018..4
Trimmed Order ID: GPA.3329-5340-7275-16018

================ Subscription Insert ================
INSERT INTO tbl_customer_subscriptions ( app_id, order_id, trans_id, pg_ref_id, device_id, gateway_subscription_id, pg_payment_data, channel, package_id, package_title, package_code, package_type, package_mode, price, basic_amount, tax_amt, subscriber_id, msisdn, role_type, gateway_type, pg_name, region_type, local_user, state_code, period, period_interval, trial_period, trial_length, subscription_type, output_video_limit, additional_cost_per_unit, no_videos, no_plays, status, platform, purchase_type, extended_status, start_date, end_date, autorenew, currency_id, currency, created, is_cancelled, deactivation_type, recurring, purchase_token, package_name ) VALUES ( '5013', '8311', 'GPA.3329-5340-7275-16018', 'GPA.3329-5340-7275-16018', '0', 'GPA.3329-5340-7275-16018', '{\"acknowledgementState\":1,\"autoRenewing\":true,\"autoResumeTimeMillis\":null,\"cancelReason\":null,\"countryCode\":\"GB\",\"developerPayload\":\"\",\"emailAddress\":null,\"expiryTimeMillis\":\"1781792349424\",\"externalAccountId\":null,\"familyName\":null,\"givenName\":null,\"kind\":\"androidpublisher#subscriptionPurchase\",\"linkedPurchaseToken\":null,\"obfuscatedExternalAccountId\":null,\"obfuscatedExternalProfileId\":null,\"orderId\":\"GPA.3329-5340-7275-16018..4\",\"paymentState\":1,\"priceAmountMicros\":\"1890000\",\"priceCurrencyCode\":\"GBP\",\"profileId\":null,\"profileName\":null,\"promotionCode\":null,\"promotionType\":null,\"purchaseType\":null,\"startTimeMillis\":\"1766067549424\",\"userCancellationTimeMillis\":null}', '', '230', 'Annual', '', '3', 'OTT', '1.89', '0.00', '0', '39049', '', '2', '3', 'google_inapp_purchase', '1', '1', '0', 'Year', '1', '', '0', '0', '0', '0', '0', '0', '2', 'cron', 'RENEWED', '0', '2025-12-18 14:19:09', '2026-06-18 14:19:09', '1', '4', 'GBP', '2026-05-18 14:20:02', '0', '', '0', 'ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA', '' ) ✅ New renewal record inserted successfully.

Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21504
    [app_id] => 5013
    [order_id] => 12735
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-6478-6508-75079
    [pg_ref_id] => GPA.3370-6478-6508-75079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-6478-6508-75079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778633459244","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12735","obfuscatedExternalProfileId":"42303","orderId":"GPA.3370-6478-6508-75079..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775220585577","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42303
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 12:49:45
    [end_date] => 2026-05-13 00:50:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-13 01:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21504
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 12:49:45
End Date: 2026-05-13 00:50:59
Original Order ID: GPA.3370-6478-6508-75079..0
Trimmed Order ID: GPA.3370-6478-6508-75079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42303' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21454
    [app_id] => 5013
    [order_id] => 13083
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3324-5252-5827-17785
    [pg_ref_id] => GPA.3324-5252-5827-17785
    [device_id] => 0
    [gateway_subscription_id] => GPA.3324-5252-5827-17785
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778829499091","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13083","obfuscatedExternalProfileId":"42260","orderId":"GPA.3324-5252-5827-17785..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775632699091","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42260
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 07:18:19
    [end_date] => 2026-05-15 07:18:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 09:20:02
    [updated_at] => 2026-05-15 07:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21454
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 07:18:19
End Date: 2026-06-15 07:18:19
Original Order ID: GPA.3324-5252-5827-17785..1
Trimmed Order ID: GPA.3324-5252-5827-17785

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42260' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21454'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24042
    [app_id] => 5013
    [order_id] => 14111
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3361-3178-8861-52435
    [pg_ref_id] => GPA.3361-3178-8861-52435
    [device_id] => 0
    [gateway_subscription_id] => GPA.3361-3178-8861-52435
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781225479625","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14111","obfuscatedExternalProfileId":"43961","orderId":"GPA.3361-3178-8861-52435..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777942279625","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 43961
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-05 00:51:19
    [end_date] => 2026-06-12 00:51:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 03:30:02
    [updated_at] => 2026-05-12 03:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24042
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-05 00:51:19
End Date: 2026-06-12 00:51:19
Original Order ID: GPA.3361-3178-8861-52435..0
Trimmed Order ID: GPA.3361-3178-8861-52435

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43961' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24042'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21794
    [app_id] => 5013
    [order_id] => 6568
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3307-7923-4945-89472
    [pg_ref_id] => GPA.3307-7923-4945-89472
    [device_id] => 0
    [gateway_subscription_id] => GPA.3307-7923-4945-89472
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779116342143","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3307-7923-4945-89472..10","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1747666742143","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38048
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-05-19 14:59:02
    [end_date] => 2026-05-18 14:59:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 15:00:02
    [updated_at] => 2026-05-18 15:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21794
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-05-19 14:59:02
End Date: 2026-06-18 14:59:02
Original Order ID: GPA.3307-7923-4945-89472..11
Trimmed Order ID: GPA.3307-7923-4945-89472

================ Subscription Insert ================
INSERT INTO tbl_customer_subscriptions ( app_id, order_id, trans_id, pg_ref_id, device_id, gateway_subscription_id, pg_payment_data, channel, package_id, package_title, package_code, package_type, package_mode, price, basic_amount, tax_amt, subscriber_id, msisdn, role_type, gateway_type, pg_name, region_type, local_user, state_code, period, period_interval, trial_period, trial_length, subscription_type, output_video_limit, additional_cost_per_unit, no_videos, no_plays, status, platform, purchase_type, extended_status, start_date, end_date, autorenew, currency_id, currency, created, is_cancelled, deactivation_type, recurring, purchase_token, package_name ) VALUES ( '5013', '6568', 'GPA.3307-7923-4945-89472', 'GPA.3307-7923-4945-89472', '0', 'GPA.3307-7923-4945-89472', '{\"acknowledgementState\":1,\"autoRenewing\":true,\"autoResumeTimeMillis\":null,\"cancelReason\":null,\"countryCode\":\"US\",\"developerPayload\":\"\",\"emailAddress\":null,\"expiryTimeMillis\":\"1781794742143\",\"externalAccountId\":null,\"familyName\":null,\"givenName\":null,\"kind\":\"androidpublisher#subscriptionPurchase\",\"linkedPurchaseToken\":null,\"obfuscatedExternalAccountId\":null,\"obfuscatedExternalProfileId\":null,\"orderId\":\"GPA.3307-7923-4945-89472..11\",\"paymentState\":1,\"priceAmountMicros\":\"1990000\",\"priceCurrencyCode\":\"USD\",\"profileId\":null,\"profileName\":null,\"promotionCode\":null,\"promotionType\":null,\"purchaseType\":null,\"startTimeMillis\":\"1747666742143\",\"userCancellationTimeMillis\":null}', '', '230', 'Annual', '', '3', 'OTT', '1.99', '0.00', '0', '38048', '', '2', '3', 'google_inapp_purchase', '1', '1', '0', 'Year', '1', '', '0', '0', '0', '0', '0', '0', '2', 'cron', 'RENEWED', '0', '2025-05-19 14:59:02', '2026-06-18 14:59:02', '1', '4', 'USD', '2026-05-18 15:00:02', '0', '', '0', 'gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ', '' ) ✅ New renewal record inserted successfully.



✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23946
    [app_id] => 5013
    [order_id] => 14334
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-8119-9873-34495
    [pg_ref_id] => GPA.3392-8119-9873-34495
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-8119-9873-34495..0
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 44178
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 12:29:30
    [end_date] => 2026-05-11 13:02:30
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 12:29:25
    [updated_at] => 2026-05-11 13:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23946
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-11 12:29:30
End Date: 2026-05-11 16:02:32
Original Order ID: GPA.3392-8119-9873-34495..6
Trimmed Order ID: GPA.3392-8119-9873-34495

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44178' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 16208
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778516402982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..3","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-05-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 16:30:02
    [updated_at] => 2026-05-11 16:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 16208
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '16208'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21272
    [app_id] => 5013
    [order_id] => 12907
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-4869-5509-71987
    [pg_ref_id] => GPA.3346-4869-5509-71987
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-4869-5509-71987
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778652642977","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12907","obfuscatedExternalProfileId":"42483","orderId":"GPA.3346-4869-5509-71987..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775455842977","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42483
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-06 06:10:42
    [end_date] => 2026-05-13 06:10:42
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-13 09:20:02
    [updated_at] => 2026-05-13 06:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21272
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-06 06:10:42
End Date: 2026-06-13 06:10:42
Original Order ID: GPA.3346-4869-5509-71987..1
Trimmed Order ID: GPA.3346-4869-5509-71987

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42483' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21272'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24051
    [app_id] => 5013
    [order_id] => 14364
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3354-3024-9181-24927
    [pg_ref_id] => GPA.3354-3024-9181-24927
    [device_id] => 0
    [gateway_subscription_id] => GPA.3313-8654-9262-56144..6
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44212
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 07:33:57
    [end_date] => 2026-05-08 08:11:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 06:26:01
    [updated_at] => 2026-05-12 09:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24051
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-12 06:26:09
End Date: 2026-05-12 07:04:10
Original Order ID: GPA.3354-3024-9181-24927..6
Trimmed Order ID: GPA.3354-3024-9181-24927

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44212' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 24027
    [app_id] => 5013
    [order_id] => 14356
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3333-8951-2461-80618
    [pg_ref_id] => GPA.3333-8951-2461-80618
    [device_id] => 0
    [gateway_subscription_id] => GPA.3333-8951-2461-80618
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 41436
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-12 00:35:28
    [end_date] => 2027-05-12 00:35:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 00:35:28
    [updated_at] => 2026-05-12 00:35:46
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24027
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-12 00:35:38
End Date: 2026-05-19 00:35:38
Original Order ID: GPA.3333-8951-2461-80618
Trimmed Order ID: GPA.3333-8951-2461-80618

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41436' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24027'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 23978
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781194802982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..4","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-06-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 16:30:02
    [updated_at] => 2026-05-11 16:30:07
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23978
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23978'
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub52
    [id] => 10247
    [app_id] => 5013
    [order_id] => 7293
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4290-3556-23909
    [pg_ref_id] => GPA.3399-4290-3556-23909
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4290-3556-23909
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":false,"autoResumeTimeMillis":null,"cancelReason":0,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778638541064","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3399-4290-3556-23909..0","paymentState":1,"priceAmountMicros":"19990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744510541064","userCancellationTimeMillis":"1766777611534"}
    [channel] => 
    [package_id] => 229
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 19.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38118
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-13 02:15:41
    [end_date] => 2026-05-13 02:15:41
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-03-23 09:58:19
    [updated_at] => 2026-05-13 02:16:05
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 1
    [record_id] => 10247
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub52 | Token: kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA

Price : 19.99
priceCurrency : USD
Start Date: 2025-04-13 02:15:41
End Date: 2026-05-13 02:15:41
Original Order ID: GPA.3399-4290-3556-23909..0
Trimmed Order ID: GPA.3399-4290-3556-23909

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38118' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21352
    [app_id] => 5013
    [order_id] => 12954
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3368-8153-0019-18099
    [pg_ref_id] => GPA.3368-8153-0019-18099
    [device_id] => 0
    [gateway_subscription_id] => GPA.3368-8153-0019-18099
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778729175155","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12954","obfuscatedExternalProfileId":"42540","orderId":"GPA.3368-8153-0019-18099..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775532375155","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42540
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 03:26:15
    [end_date] => 2026-05-14 03:26:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 07:20:02
    [updated_at] => 2026-05-14 03:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21352
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 03:26:15
End Date: 2026-06-14 03:26:15
Original Order ID: GPA.3368-8153-0019-18099..1
Trimmed Order ID: GPA.3368-8153-0019-18099

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42540' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21352'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21423
    [app_id] => 5013
    [order_id] => 13031
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3373-4110-1923-22492
    [pg_ref_id] => GPA.3373-4110-1923-22492
    [device_id] => 0
    [gateway_subscription_id] => GPA.3373-4110-1923-22492
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778791272687","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13031","obfuscatedExternalProfileId":"42576","orderId":"GPA.3373-4110-1923-22492..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775594472687","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42576
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 20:41:12
    [end_date] => 2026-05-14 20:41:12
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 23:20:02
    [updated_at] => 2026-05-14 20:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21423
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 20:41:12
End Date: 2026-06-14 20:41:12
Original Order ID: GPA.3373-4110-1923-22492..1
Trimmed Order ID: GPA.3373-4110-1923-22492

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42576' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21423'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21613
    [app_id] => 5013
    [order_id] => 13247
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-8622-2215-17715
    [pg_ref_id] => GPA.3370-8622-2215-17715
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-8622-2215-17715
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779002791407","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13247","obfuscatedExternalProfileId":"42787","orderId":"GPA.3370-8622-2215-17715..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775805991407","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42787
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 07:26:31
    [end_date] => 2026-05-17 07:26:31
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 10:30:02
    [updated_at] => 2026-05-17 07:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21613
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 07:26:31
End Date: 2026-06-17 07:26:31
Original Order ID: GPA.3370-8622-2215-17715..1
Trimmed Order ID: GPA.3370-8622-2215-17715

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42787' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21613'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21436
    [app_id] => 5013
    [order_id] => 13057
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3398-6136-6243-96416
    [pg_ref_id] => GPA.3398-6136-6243-96416
    [device_id] => 0
    [gateway_subscription_id] => GPA.3398-6136-6243-96416
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778807458772","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13057","obfuscatedExternalProfileId":"42606","orderId":"GPA.3398-6136-6243-96416..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775610658772","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42606
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 01:10:58
    [end_date] => 2026-05-15 01:10:58
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 03:50:02
    [updated_at] => 2026-05-15 01:20:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21436
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 01:10:58
End Date: 2026-06-15 01:10:58
Original Order ID: GPA.3398-6136-6243-96416..1
Trimmed Order ID: GPA.3398-6136-6243-96416

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42606' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21436'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21416
    [app_id] => 5013
    [order_id] => 13034
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3387-3347-9034-58433
    [pg_ref_id] => GPA.3387-3347-9034-58433
    [device_id] => 0
    [gateway_subscription_id] => GPA.3387-3347-9034-58433
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778793199804","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3387-3347-9034-58433..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775596399804","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42580
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 21:13:19
    [end_date] => 2026-05-14 21:13:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 22:00:02
    [updated_at] => 2026-05-14 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21416
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 21:13:19
End Date: 2026-05-14 21:13:19
Original Order ID: GPA.3387-3347-9034-58433..0
Trimmed Order ID: GPA.3387-3347-9034-58433

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42580' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23155
    [app_id] => 5013
    [order_id] => 14086
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3381-8948-1128-17288
    [pg_ref_id] => GPA.3381-8948-1128-17288
    [device_id] => 1
    [gateway_subscription_id] => GPA.3381-8948-1128-17288
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43994
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-04 05:08:01
    [end_date] => 2026-05-11 05:08:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-04 05:05:57
    [updated_at] => 2026-05-11 05:10:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23155
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 05:08:01
End Date: 2026-05-11 05:08:01
Original Order ID: GPA.3381-8948-1128-17288..0
Trimmed Order ID: GPA.3381-8948-1128-17288

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43994' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15699
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778493837535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-05-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 13:10:01
    [updated_at] => 2026-05-11 10:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15699
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15699'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24011
    [app_id] => 5013
    [order_id] => 14351
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3356-7639-5476-05177
    [pg_ref_id] => GPA.3356-7639-5476-05177
    [device_id] => 1
    [gateway_subscription_id] => GPA.3356-7639-5476-05177
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44336
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 22:13:18
    [end_date] => 2026-05-18 22:13:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 22:13:04
    [updated_at] => 2026-05-12 00:10:06
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24011
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-11 22:13:18
End Date: 2026-05-18 22:13:18
Original Order ID: GPA.3356-7639-5476-05177
Trimmed Order ID: GPA.3356-7639-5476-05177

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44336' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24011'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23940
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781172237535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-06-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 10:10:02
    [updated_at] => 2026-05-11 10:10:09
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23940
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23940'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21503
    [app_id] => 5013
    [order_id] => 12711
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3377-3289-2509-12326
    [pg_ref_id] => GPA.3377-3289-2509-12326
    [device_id] => 0
    [gateway_subscription_id] => GPA.3377-3289-2509-12326
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778809428914","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12711","obfuscatedExternalProfileId":"41963","orderId":"GPA.3377-3289-2509-12326..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775180551018","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41963
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 01:42:31
    [end_date] => 2026-05-15 01:43:48
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-15 01:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21503
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 01:42:31
End Date: 2026-05-15 01:43:48
Original Order ID: GPA.3377-3289-2509-12326..0
Trimmed Order ID: GPA.3377-3289-2509-12326

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41963' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23282
    [app_id] => 5013
    [order_id] => 14155
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-9534-7287-04845
    [pg_ref_id] => GPA.3359-9534-7287-04845
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-9534-7287-04845
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44091
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 23:22:52
    [end_date] => 2026-05-12 23:22:52
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 23:22:20
    [updated_at] => 2026-05-12 23:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23282
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 23:22:52
End Date: 2027-05-12 23:22:52
Original Order ID: GPA.3359-9534-7287-04845..0
Trimmed Order ID: GPA.3359-9534-7287-04845

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44091' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23282'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23275
    [app_id] => 5013
    [order_id] => 14153
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3318-1721-1922-53193
    [pg_ref_id] => GPA.3318-1721-1922-53193
    [device_id] => 1
    [gateway_subscription_id] => GPA.3318-1721-1922-53193
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44085
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 21:18:15
    [end_date] => 2026-05-12 21:18:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 21:17:55
    [updated_at] => 2026-05-12 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23275
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 21:18:15
End Date: 2027-05-12 21:18:15
Original Order ID: GPA.3318-1721-1922-53193..0
Trimmed Order ID: GPA.3318-1721-1922-53193

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44085' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23275'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23225
    [app_id] => 5013
    [order_id] => 14134
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-7651-5101-88843
    [pg_ref_id] => GPA.3320-7651-5101-88843
    [device_id] => 1
    [gateway_subscription_id] => GPA.3320-7651-5101-88843
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43803
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 06:53:18
    [end_date] => 2026-05-12 06:53:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 06:52:25
    [updated_at] => 2026-05-12 07:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23225
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 06:53:18
End Date: 2026-05-12 06:53:18
Original Order ID: GPA.3320-7651-5101-88843
Trimmed Order ID: GPA.3320-7651-5101-88843

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43803' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21380
    [app_id] => 5013
    [order_id] => 6824
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-5908-2292-59926
    [pg_ref_id] => GPA.3320-5908-2292-59926
    [device_id] => 0
    [gateway_subscription_id] => GPA.3320-5908-2292-59926
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778765113728","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3320-5908-2292-59926..11","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744637113728","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38244
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-14 13:25:13
    [end_date] => 2026-05-14 13:25:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 13:30:02
    [updated_at] => 2026-05-14 13:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21380
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg

Price : 1.99
priceCurrency : USD
Start Date: 2025-04-14 13:25:13
End Date: 2026-06-14 13:25:13
Original Order ID: GPA.3320-5908-2292-59926..12
Trimmed Order ID: GPA.3320-5908-2292-59926

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38244' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21380'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23997
    [app_id] => 5013
    [order_id] => 14092
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-9973-3244-79502
    [pg_ref_id] => GPA.3392-9973-3244-79502
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-9973-3244-79502
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781197177136","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14092","obfuscatedExternalProfileId":"44007","orderId":"GPA.3392-9973-3244-79502..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777913977136","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44007
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 16:59:37
    [end_date] => 2026-06-11 16:59:37
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 19:00:02
    [updated_at] => 2026-05-11 19:00:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23997
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 16:59:37
End Date: 2026-06-11 16:59:37
Original Order ID: GPA.3392-9973-3244-79502..0
Trimmed Order ID: GPA.3392-9973-3244-79502

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44007' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23997'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23765
    [app_id] => 5013
    [order_id] => 14280
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-2672-3482-04482
    [pg_ref_id] => GPA.3359-2672-3482-04482
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-2672-3482-04482
    [pg_payment_data] => {}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44261
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => webhook
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-09 18:22:01
    [end_date] => 2026-05-16 18:22:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-09 18:24:04
    [updated_at] => 2026-05-16 18:30:02
    [is_cancelled] => 0
    [cancelled_at] => 0000-00-00 00:00:00
    [deactivation_type] => 
    [deactivation_date] => 0000-00-00 00:00:00
    [renewal_date] => 0000-00-00 00:00:00
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23765
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-09 18:22:01
End Date: 2026-05-16 18:22:01
Original Order ID: GPA.3359-2672-3482-04482
Trimmed Order ID: GPA.3359-2672-3482-04482

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44261' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21750
    [app_id] => 5013
    [order_id] => 13132
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4355-7650-95175
    [pg_ref_id] => GPA.3399-4355-7650-95175
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4355-7650-95175
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778870726108","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13132","obfuscatedExternalProfileId":"42162","orderId":"GPA.3399-4355-7650-95175..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775673926108","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42162
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 18:45:26
    [end_date] => 2026-05-15 18:45:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 01:20:03
    [updated_at] => 2026-05-15 18:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21750
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 18:45:26
End Date: 2026-06-15 18:45:26
Original Order ID: GPA.3399-4355-7650-95175..1
Trimmed Order ID: GPA.3399-4355-7650-95175

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42162' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21750'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15190
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778480915052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-05-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 09:30:02
    [updated_at] => 2026-05-11 06:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15190
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15190'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23917
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781159315052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-06-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:30:02
    [updated_at] => 2026-05-11 06:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23917
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23917'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23916
    [app_id] => 5013
    [order_id] => 14085
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3378-4171-5280-78225
    [pg_ref_id] => GPA.3378-4171-5280-78225
    [device_id] => 0
    [gateway_subscription_id] => GPA.3378-4171-5280-78225
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1810011268709","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14085","obfuscatedExternalProfileId":"43993","orderId":"GPA.3378-4171-5280-78225..0","paymentState":1,"priceAmountMicros":"40990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777870468709","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43993
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 04:54:28
    [end_date] => 2027-05-11 04:54:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:20:02
    [updated_at] => 2026-05-11 06:20:08
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23916
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-04 04:54:28
End Date: 2027-05-11 04:54:28
Original Order ID: GPA.3378-4171-5280-78225..0
Trimmed Order ID: GPA.3378-4171-5280-78225

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43993' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23916'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21668
    [app_id] => 5013
    [order_id] => 13253
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3314-4628-6040-67680
    [pg_ref_id] => GPA.3314-4628-6040-67680
    [device_id] => 0
    [gateway_subscription_id] => GPA.3314-4628-6040-67680
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779021206119","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13253","obfuscatedExternalProfileId":"42796","orderId":"GPA.3314-4628-6040-67680..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775824406119","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42796
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 12:33:26
    [end_date] => 2026-05-17 12:33:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 14:50:03
    [updated_at] => 2026-05-17 12:40:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21668
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 12:33:26
End Date: 2026-05-17 12:33:26
Original Order ID: GPA.3314-4628-6040-67680..0
Trimmed Order ID: GPA.3314-4628-6040-67680

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42796' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21596
    [app_id] => 5013
    [order_id] => 7451
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3302-3760-5945-64217
    [pg_ref_id] => GPA.3302-3760-5945-64217
    [device_id] => 0
    [gateway_subscription_id] => GPA.3302-3760-5945-64217
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778991959847","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3302-3760-5945-64217..5","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1757428891499","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38543
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-09-09 14:41:31
    [end_date] => 2026-05-17 04:25:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 04:30:02
    [updated_at] => 2026-05-17 04:30:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21596
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA

Price : 1.99
priceCurrency : USD
Start Date: 2025-09-09 14:41:31
End Date: 2026-06-17 04:25:59
Original Order ID: GPA.3302-3760-5945-64217..6
Trimmed Order ID: GPA.3302-3760-5945-64217

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38543' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21596'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21760
    [app_id] => 5013
    [order_id] => 11676
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3340-6983-1659-64079
    [pg_ref_id] => GPA.3340-6983-1659-64079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3340-6983-1659-64079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779083233481","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"11676","obfuscatedExternalProfileId":"41033","orderId":"GPA.3340-6983-1659-64079..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1773208033481","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41033
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-03-11 05:47:13
    [end_date] => 2026-05-18 05:47:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 05:50:02
    [updated_at] => 2026-05-18 05:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21760
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q

Price : 3.99
priceCurrency : USD
Start Date: 2026-03-11 05:47:13
End Date: 2026-06-18 05:47:13
Original Order ID: GPA.3340-6983-1659-64079..2
Trimmed Order ID: GPA.3340-6983-1659-64079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41033' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21760'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23697
    [app_id] => 5013
    [order_id] => 14262
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3331-0153-4002-87312
    [pg_ref_id] => GPA.3331-0153-4002-87312
    [device_id] => 1
    [gateway_subscription_id] => GPA.3331-0153-4002-87312
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43108
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 22:51:35
    [end_date] => 2026-05-15 22:51:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-08 22:51:11
    [updated_at] => 2026-05-15 23:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23697
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-08 22:51:35
End Date: 2026-05-15 22:51:35
Original Order ID: GPA.3331-0153-4002-87312
Trimmed Order ID: GPA.3331-0153-4002-87312

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43108' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21788
    [app_id] => 5013
    [order_id] => 8311
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3329-5340-7275-16018
    [pg_ref_id] => GPA.3329-5340-7275-16018
    [device_id] => 0
    [gateway_subscription_id] => GPA.3329-5340-7275-16018
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"GB","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779113949424","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3329-5340-7275-16018..3","paymentState":1,"priceAmountMicros":"1890000","priceCurrencyCode":"GBP","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1766067549424","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.89
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 39049
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-18 14:19:09
    [end_date] => 2026-05-18 14:19:09
    [autorenew] => 1
    [currency_id] => 4
    [currency] => GBP
    [u_currency] => 
    [created] => 2026-04-18 14:20:02
    [updated_at] => 2026-05-18 14:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21788
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA

Price : 1.89
priceCurrency : GBP
Start Date: 2025-12-18 14:19:09
End Date: 2026-06-18 14:19:09
Original Order ID: GPA.3329-5340-7275-16018..4
Trimmed Order ID: GPA.3329-5340-7275-16018

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '39049' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21788'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21504
    [app_id] => 5013
    [order_id] => 12735
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-6478-6508-75079
    [pg_ref_id] => GPA.3370-6478-6508-75079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-6478-6508-75079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778633459244","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12735","obfuscatedExternalProfileId":"42303","orderId":"GPA.3370-6478-6508-75079..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775220585577","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42303
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 12:49:45
    [end_date] => 2026-05-13 00:50:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-13 01:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21504
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 12:49:49
End Date: 2026-05-13 00:50:59
Original Order ID: GPA.3370-6478-6508-75079..0
Trimmed Order ID: GPA.3370-6478-6508-75079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42303' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21454
    [app_id] => 5013
    [order_id] => 13083
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3324-5252-5827-17785
    [pg_ref_id] => GPA.3324-5252-5827-17785
    [device_id] => 0
    [gateway_subscription_id] => GPA.3324-5252-5827-17785
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778829499091","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13083","obfuscatedExternalProfileId":"42260","orderId":"GPA.3324-5252-5827-17785..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775632699091","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42260
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 07:18:19
    [end_date] => 2026-05-15 07:18:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 09:20:02
    [updated_at] => 2026-05-15 07:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21454
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 07:18:19
End Date: 2026-06-15 07:18:19
Original Order ID: GPA.3324-5252-5827-17785..1
Trimmed Order ID: GPA.3324-5252-5827-17785

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42260' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21454'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24042
    [app_id] => 5013
    [order_id] => 14111
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3361-3178-8861-52435
    [pg_ref_id] => GPA.3361-3178-8861-52435
    [device_id] => 0
    [gateway_subscription_id] => GPA.3361-3178-8861-52435
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781225479625","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14111","obfuscatedExternalProfileId":"43961","orderId":"GPA.3361-3178-8861-52435..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777942279625","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 43961
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-05 00:51:19
    [end_date] => 2026-06-12 00:51:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 03:30:02
    [updated_at] => 2026-05-12 03:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24042
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-05 00:51:19
End Date: 2026-06-12 00:51:19
Original Order ID: GPA.3361-3178-8861-52435..0
Trimmed Order ID: GPA.3361-3178-8861-52435

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43961' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24042'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21794
    [app_id] => 5013
    [order_id] => 6568
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3307-7923-4945-89472
    [pg_ref_id] => GPA.3307-7923-4945-89472
    [device_id] => 0
    [gateway_subscription_id] => GPA.3307-7923-4945-89472
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779116342143","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3307-7923-4945-89472..10","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1747666742143","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38048
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-05-19 14:59:02
    [end_date] => 2026-05-18 14:59:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 15:00:02
    [updated_at] => 2026-05-18 15:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21794
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-05-19 14:59:02
End Date: 2026-06-18 14:59:02
Original Order ID: GPA.3307-7923-4945-89472..11
Trimmed Order ID: GPA.3307-7923-4945-89472

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38048' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21794'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23946
    [app_id] => 5013
    [order_id] => 14334
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-8119-9873-34495
    [pg_ref_id] => GPA.3392-8119-9873-34495
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-8119-9873-34495..0
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 44178
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 12:29:30
    [end_date] => 2026-05-11 13:02:30
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 12:29:25
    [updated_at] => 2026-05-11 13:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23946
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-11 12:29:30
End Date: 2026-05-11 16:02:32
Original Order ID: GPA.3392-8119-9873-34495..6
Trimmed Order ID: GPA.3392-8119-9873-34495

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44178' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 16208
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778516402982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..3","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-05-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 16:30:02
    [updated_at] => 2026-05-11 16:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 16208
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '16208'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21272
    [app_id] => 5013
    [order_id] => 12907
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-4869-5509-71987
    [pg_ref_id] => GPA.3346-4869-5509-71987
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-4869-5509-71987
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778652642977","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12907","obfuscatedExternalProfileId":"42483","orderId":"GPA.3346-4869-5509-71987..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775455842977","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42483
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-06 06:10:42
    [end_date] => 2026-05-13 06:10:42
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-13 09:20:02
    [updated_at] => 2026-05-13 06:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21272
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-06 06:10:42
End Date: 2026-06-13 06:10:42
Original Order ID: GPA.3346-4869-5509-71987..1
Trimmed Order ID: GPA.3346-4869-5509-71987

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42483' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21272'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24051
    [app_id] => 5013
    [order_id] => 14364
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3354-3024-9181-24927
    [pg_ref_id] => GPA.3354-3024-9181-24927
    [device_id] => 0
    [gateway_subscription_id] => GPA.3313-8654-9262-56144..6
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44212
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 07:33:57
    [end_date] => 2026-05-08 08:11:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 06:26:01
    [updated_at] => 2026-05-12 09:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24051
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-12 06:26:09
End Date: 2026-05-12 07:04:10
Original Order ID: GPA.3354-3024-9181-24927..6
Trimmed Order ID: GPA.3354-3024-9181-24927

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44212' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 24027
    [app_id] => 5013
    [order_id] => 14356
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3333-8951-2461-80618
    [pg_ref_id] => GPA.3333-8951-2461-80618
    [device_id] => 0
    [gateway_subscription_id] => GPA.3333-8951-2461-80618
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 41436
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-12 00:35:28
    [end_date] => 2027-05-12 00:35:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 00:35:28
    [updated_at] => 2026-05-12 00:35:46
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24027
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-12 00:35:38
End Date: 2026-05-19 00:35:38
Original Order ID: GPA.3333-8951-2461-80618
Trimmed Order ID: GPA.3333-8951-2461-80618

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41436' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24027'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 23978
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781194802982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..4","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-06-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 16:30:02
    [updated_at] => 2026-05-11 16:30:07
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23978
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23978'
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub52
    [id] => 10247
    [app_id] => 5013
    [order_id] => 7293
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4290-3556-23909
    [pg_ref_id] => GPA.3399-4290-3556-23909
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4290-3556-23909
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":false,"autoResumeTimeMillis":null,"cancelReason":0,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778638541064","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3399-4290-3556-23909..0","paymentState":1,"priceAmountMicros":"19990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744510541064","userCancellationTimeMillis":"1766777611534"}
    [channel] => 
    [package_id] => 229
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 19.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38118
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-13 02:15:41
    [end_date] => 2026-05-13 02:15:41
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-03-23 09:58:19
    [updated_at] => 2026-05-13 02:16:05
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 1
    [record_id] => 10247
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub52 | Token: kioedimdddghendhfbadcned.AO-J1OxpnzEtD0-sT3QGWk3J_iMwolJnvWQpFbLSCH_dCEIexZ-W69Tghb8is5ptQSbNbZ31E-z0E_wnBeMs9uojh237TWDJlA

Price : 19.99
priceCurrency : USD
Start Date: 2025-04-13 02:15:41
End Date: 2026-05-13 02:15:41
Original Order ID: GPA.3399-4290-3556-23909..0
Trimmed Order ID: GPA.3399-4290-3556-23909

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38118' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21352
    [app_id] => 5013
    [order_id] => 12954
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3368-8153-0019-18099
    [pg_ref_id] => GPA.3368-8153-0019-18099
    [device_id] => 0
    [gateway_subscription_id] => GPA.3368-8153-0019-18099
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778729175155","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12954","obfuscatedExternalProfileId":"42540","orderId":"GPA.3368-8153-0019-18099..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775532375155","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42540
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 03:26:15
    [end_date] => 2026-05-14 03:26:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 07:20:02
    [updated_at] => 2026-05-14 03:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21352
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: eblilhblokkchffkdlgfmona.AO-J1OxLNL4EutR9Cn4hwpUZEebYcSfkyQDlI5T9hr0XGUws_p4QlFv47FlNyPJebK2O5vku8hZltpZqPDE7tjr3Q4chK9LFGw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 03:26:15
End Date: 2026-06-14 03:26:15
Original Order ID: GPA.3368-8153-0019-18099..1
Trimmed Order ID: GPA.3368-8153-0019-18099

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42540' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21352'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21423
    [app_id] => 5013
    [order_id] => 13031
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3373-4110-1923-22492
    [pg_ref_id] => GPA.3373-4110-1923-22492
    [device_id] => 0
    [gateway_subscription_id] => GPA.3373-4110-1923-22492
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778791272687","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13031","obfuscatedExternalProfileId":"42576","orderId":"GPA.3373-4110-1923-22492..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775594472687","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42576
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 20:41:12
    [end_date] => 2026-05-14 20:41:12
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 23:20:02
    [updated_at] => 2026-05-14 20:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21423
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: laneoaipfhohmfclhbambgof.AO-J1OxQ-mz3YlAHlM8kxZezB-wouqMkpRQxCk6VKnotka8k10LPl8vB3rZ_0r7765oQRJ1VdcNM6IH8N5wYcV19ZQe5pMqFIA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 20:41:12
End Date: 2026-06-14 20:41:12
Original Order ID: GPA.3373-4110-1923-22492..1
Trimmed Order ID: GPA.3373-4110-1923-22492

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42576' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21423'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21613
    [app_id] => 5013
    [order_id] => 13247
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-8622-2215-17715
    [pg_ref_id] => GPA.3370-8622-2215-17715
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-8622-2215-17715
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779002791407","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13247","obfuscatedExternalProfileId":"42787","orderId":"GPA.3370-8622-2215-17715..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775805991407","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42787
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 07:26:31
    [end_date] => 2026-05-17 07:26:31
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 10:30:02
    [updated_at] => 2026-05-17 07:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21613
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gdghnjknjmcneodkdkcciham.AO-J1OxsSAKBCvEQSAXYvtX2s6sLsQh0JPoZzuIWdeOUpHs2CgaJRnfmQXWuTMuDF9bcwiFn0Sho5y7cB2NrcV3Sigr9xlvZDA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 07:26:31
End Date: 2026-06-17 07:26:31
Original Order ID: GPA.3370-8622-2215-17715..1
Trimmed Order ID: GPA.3370-8622-2215-17715

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42787' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21613'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21436
    [app_id] => 5013
    [order_id] => 13057
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3398-6136-6243-96416
    [pg_ref_id] => GPA.3398-6136-6243-96416
    [device_id] => 0
    [gateway_subscription_id] => GPA.3398-6136-6243-96416
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778807458772","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13057","obfuscatedExternalProfileId":"42606","orderId":"GPA.3398-6136-6243-96416..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775610658772","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42606
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 01:10:58
    [end_date] => 2026-05-15 01:10:58
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 03:50:02
    [updated_at] => 2026-05-15 01:20:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21436
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: bkcjgabkeklgalekgfflhfed.AO-J1OwyxnAcXDePDndJoeKszsCJ8hNIV5p8bNYnBjN3MiTpFB1L-y1t5z0igzGqBc1DoSFuE8t-ByBgKWqcczXalkaZhLosdQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 01:10:58
End Date: 2026-06-15 01:10:58
Original Order ID: GPA.3398-6136-6243-96416..1
Trimmed Order ID: GPA.3398-6136-6243-96416

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42606' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21436'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 1

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21416
    [app_id] => 5013
    [order_id] => 13034
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3387-3347-9034-58433
    [pg_ref_id] => GPA.3387-3347-9034-58433
    [device_id] => 0
    [gateway_subscription_id] => GPA.3387-3347-9034-58433
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778793199804","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3387-3347-9034-58433..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775596399804","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42580
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-07 21:13:19
    [end_date] => 2026-05-14 21:13:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 22:00:02
    [updated_at] => 2026-05-14 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21416
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ejlpaafhbjmfapmgadjeeibp.AO-J1Owp1DpQRwLej87aY5i5Hd-ogdUo0_K2Ay17y5d3D0Bta6qjBuKG0wLzGRxGQ6NcbRBcGm3fm6x-zGopg28h1APKgv8QpA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-07 21:13:19
End Date: 2026-05-14 21:13:19
Original Order ID: GPA.3387-3347-9034-58433..0
Trimmed Order ID: GPA.3387-3347-9034-58433

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42580' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23155
    [app_id] => 5013
    [order_id] => 14086
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3381-8948-1128-17288
    [pg_ref_id] => GPA.3381-8948-1128-17288
    [device_id] => 1
    [gateway_subscription_id] => GPA.3381-8948-1128-17288
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43994
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-04 05:08:01
    [end_date] => 2026-05-11 05:08:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-04 05:05:57
    [updated_at] => 2026-05-11 05:10:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23155
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: ajofppjheggolbpibffkhemm.AO-J1Oyl8_xL2aqZ8cgpDJSLljtgNqvpUYfTD7W-2R5imrh0isAF87WR2aGGOco7BL22giAuGjFHuuCB6xw22rlKeYSeFVGAPQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 05:08:01
End Date: 2026-05-11 05:08:01
Original Order ID: GPA.3381-8948-1128-17288..0
Trimmed Order ID: GPA.3381-8948-1128-17288

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43994' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15699
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778493837535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-05-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 13:10:01
    [updated_at] => 2026-05-11 10:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15699
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15699'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24011
    [app_id] => 5013
    [order_id] => 14351
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3356-7639-5476-05177
    [pg_ref_id] => GPA.3356-7639-5476-05177
    [device_id] => 1
    [gateway_subscription_id] => GPA.3356-7639-5476-05177
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44336
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 22:13:18
    [end_date] => 2026-05-18 22:13:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 22:13:04
    [updated_at] => 2026-05-12 00:10:06
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24011
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mokkjnghemoipjhijhldoajn.AO-J1OyjDgP43cnp4If2hKO-crY3TQmQP6YB_CsWxqeRCsr40_mfb2dgttHfxptfbayhaHI8W5Njb7_6WMLdVz6sNEWctXn4qw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-11 22:13:18
End Date: 2026-05-18 22:13:18
Original Order ID: GPA.3356-7639-5476-05177
Trimmed Order ID: GPA.3356-7639-5476-05177

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44336' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24011'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23940
    [app_id] => 5013
    [order_id] => 12806
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3348-5120-7751-08507
    [pg_ref_id] => GPA.3348-5120-7751-08507
    [device_id] => 0
    [gateway_subscription_id] => GPA.3348-5120-7751-08507
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781172237535","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12806","obfuscatedExternalProfileId":"42373","orderId":"GPA.3348-5120-7751-08507..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775297037535","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42373
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 10:03:57
    [end_date] => 2026-06-11 10:03:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 10:10:02
    [updated_at] => 2026-05-11 10:10:09
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23940
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: koedepolmndajdnalepbbgeg.AO-J1OxnfJP2uXJ5QR73PVn-HwZFCjUNhH7yBbUe4gdlIsTN1cyGd7v-I6c86kyp1AR6Tb5qPCDs94YzA78V2gCLEARE0tPQBw

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 10:03:57
End Date: 2026-06-11 10:03:57
Original Order ID: GPA.3348-5120-7751-08507..1
Trimmed Order ID: GPA.3348-5120-7751-08507

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42373' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23940'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21503
    [app_id] => 5013
    [order_id] => 12711
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3377-3289-2509-12326
    [pg_ref_id] => GPA.3377-3289-2509-12326
    [device_id] => 0
    [gateway_subscription_id] => GPA.3377-3289-2509-12326
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778809428914","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12711","obfuscatedExternalProfileId":"41963","orderId":"GPA.3377-3289-2509-12326..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775180551018","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41963
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 01:42:31
    [end_date] => 2026-05-15 01:43:48
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-15 01:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21503
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pgblmejmjkkfcnfcbfieklok.AO-J1OwALPy0CNLM7pzcBMAqzbpRh-d2XPxHIjCOLa12cBa7QrThIcBp2OcRZmmxcbPB6ceDiSLJTkxhwqO7vRIK3ufWe_ZYNg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 01:42:31
End Date: 2026-05-15 01:43:48
Original Order ID: GPA.3377-3289-2509-12326..0
Trimmed Order ID: GPA.3377-3289-2509-12326

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41963' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23282
    [app_id] => 5013
    [order_id] => 14155
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-9534-7287-04845
    [pg_ref_id] => GPA.3359-9534-7287-04845
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-9534-7287-04845
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44091
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 23:22:52
    [end_date] => 2026-05-12 23:22:52
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 23:22:20
    [updated_at] => 2026-05-12 23:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23282
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: bnpdfdgakjhcmaeemnibnnfj.AO-J1Oxss0VSxp8s37G6SpLJSkYiI_FuqXMD9GcKow9dIyIEtTBKQ880v_RomJd4mGuYTjjPiGHYLJx6T-5SB4xMvZifyZvQQA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 23:22:52
End Date: 2027-05-12 23:22:52
Original Order ID: GPA.3359-9534-7287-04845..0
Trimmed Order ID: GPA.3359-9534-7287-04845

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44091' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23282'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23275
    [app_id] => 5013
    [order_id] => 14153
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3318-1721-1922-53193
    [pg_ref_id] => GPA.3318-1721-1922-53193
    [device_id] => 1
    [gateway_subscription_id] => GPA.3318-1721-1922-53193
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44085
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 21:18:15
    [end_date] => 2026-05-12 21:18:15
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 21:17:55
    [updated_at] => 2026-05-12 21:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23275
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: mgpdgmnondfbiooiclnlgkec.AO-J1OwMLHDdsAqUw_i-OWdeYrbL5gGPNr3epHw4mRKgtqsoYebf5QYuZO0LUP-VMueSVC8mZypQk1B1nT8pX1ow1W8xWHY8wQ

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 21:18:15
End Date: 2027-05-12 21:18:15
Original Order ID: GPA.3318-1721-1922-53193..0
Trimmed Order ID: GPA.3318-1721-1922-53193

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44085' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23275'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23225
    [app_id] => 5013
    [order_id] => 14134
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-7651-5101-88843
    [pg_ref_id] => GPA.3320-7651-5101-88843
    [device_id] => 1
    [gateway_subscription_id] => GPA.3320-7651-5101-88843
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43803
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-05 06:53:18
    [end_date] => 2026-05-12 06:53:18
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-05 06:52:25
    [updated_at] => 2026-05-12 07:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23225
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: kpdokfkbgnnhjodibccilofn.AO-J1OzGqV9jXQGrXpR5d0iW1-TzRRbv2a0ZkZ9vNb98Zbit0i4Ep46eSJWVGM4brpITledNJjTYC4BIPGxEcFDEznRy5I6xeg

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-05 06:53:18
End Date: 2026-05-12 06:53:18
Original Order ID: GPA.3320-7651-5101-88843
Trimmed Order ID: GPA.3320-7651-5101-88843

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43803' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21380
    [app_id] => 5013
    [order_id] => 6824
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3320-5908-2292-59926
    [pg_ref_id] => GPA.3320-5908-2292-59926
    [device_id] => 0
    [gateway_subscription_id] => GPA.3320-5908-2292-59926
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778765113728","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3320-5908-2292-59926..11","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1744637113728","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38244
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-04-14 13:25:13
    [end_date] => 2026-05-14 13:25:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-14 13:30:02
    [updated_at] => 2026-05-14 13:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21380
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: pjabahiocfmnblbbegddhbjl.AO-J1OzMRKs8ElAy5VeFkqpbE9-ZPNlPR6yFDiO2r4sH_tlOeaEMTxWHsJcf7XeD13Huil8OyqG5mxt7GfsKyIpZgm7g5q75Sg

Price : 1.99
priceCurrency : USD
Start Date: 2025-04-14 13:25:13
End Date: 2026-06-14 13:25:13
Original Order ID: GPA.3320-5908-2292-59926..12
Trimmed Order ID: GPA.3320-5908-2292-59926

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38244' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21380'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23997
    [app_id] => 5013
    [order_id] => 14092
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-9973-3244-79502
    [pg_ref_id] => GPA.3392-9973-3244-79502
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-9973-3244-79502
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781197177136","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14092","obfuscatedExternalProfileId":"44007","orderId":"GPA.3392-9973-3244-79502..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777913977136","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 44007
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 16:59:37
    [end_date] => 2026-06-11 16:59:37
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 19:00:02
    [updated_at] => 2026-05-11 19:00:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23997
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fdpdegiocohiglkdjkkfeiob.AO-J1OxAqlXWedE2v3E2IkFDVkrXnlf-jgWiRT0Xx_W8AaMg2TUgIGCtcATj5cy6XKCOpig6H65f7uNk2a6BXp0A391xUZMQuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-04 16:59:37
End Date: 2026-06-11 16:59:37
Original Order ID: GPA.3392-9973-3244-79502..0
Trimmed Order ID: GPA.3392-9973-3244-79502

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44007' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23997'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23765
    [app_id] => 5013
    [order_id] => 14280
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3359-2672-3482-04482
    [pg_ref_id] => GPA.3359-2672-3482-04482
    [device_id] => 1
    [gateway_subscription_id] => GPA.3359-2672-3482-04482
    [pg_payment_data] => {}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44261
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => webhook
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-09 18:22:01
    [end_date] => 2026-05-16 18:22:01
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-09 18:24:04
    [updated_at] => 2026-05-16 18:30:02
    [is_cancelled] => 0
    [cancelled_at] => 0000-00-00 00:00:00
    [deactivation_type] => 
    [deactivation_date] => 0000-00-00 00:00:00
    [renewal_date] => 0000-00-00 00:00:00
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23765
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: chgiedmhhbhilpiaencpncbp.AO-J1OwI8DsVlwB0dyd8berMMO4DjY8Nfayz-TiIyNc2rAhvTi7lnX2BYkGvqT8v6NfDRv7LV8of1hYHKaJCj3EyZJ4aCXIiuQ

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-09 18:22:01
End Date: 2026-05-16 18:22:01
Original Order ID: GPA.3359-2672-3482-04482
Trimmed Order ID: GPA.3359-2672-3482-04482

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44261' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21750
    [app_id] => 5013
    [order_id] => 13132
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3399-4355-7650-95175
    [pg_ref_id] => GPA.3399-4355-7650-95175
    [device_id] => 0
    [gateway_subscription_id] => GPA.3399-4355-7650-95175
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778870726108","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13132","obfuscatedExternalProfileId":"42162","orderId":"GPA.3399-4355-7650-95175..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775673926108","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42162
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 18:45:26
    [end_date] => 2026-05-15 18:45:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 01:20:03
    [updated_at] => 2026-05-15 18:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21750
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: mlndabalcbfpldemlffhgchf.AO-J1OwblxUQGCVQY-0NyGDrYXLNR2bOFKthclWk9cTvtJDfY70UKRkrVyCgL7kJa62jH1hxC-PF0VV8IQgK-0ZC2nVv4CLR3A

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 18:45:26
End Date: 2026-06-15 18:45:26
Original Order ID: GPA.3399-4355-7650-95175..1
Trimmed Order ID: GPA.3399-4355-7650-95175

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42162' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21750'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 15190
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778480915052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-05-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 09:30:02
    [updated_at] => 2026-05-11 06:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 15190
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '15190'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 23917
    [app_id] => 5013
    [order_id] => 12797
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-8177-0231-33306
    [pg_ref_id] => GPA.3346-8177-0231-33306
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-8177-0231-33306
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1781159315052","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12797","obfuscatedExternalProfileId":"42366","orderId":"GPA.3346-8177-0231-33306..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775284115052","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42366
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-04 06:28:35
    [end_date] => 2026-06-11 06:28:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:30:02
    [updated_at] => 2026-05-11 06:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23917
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jankfiofcblnenkaaoncfpfa.AO-J1OxawR2Nydc87EjE6CBXaaIfG1MQ0fUMIkCHi8zvWqK23TKjukmrOm9PGg2s5DLzXjWLXEzULlp4z4A0q8DJX0kEMjj6sg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-04 06:28:35
End Date: 2026-06-11 06:28:35
Original Order ID: GPA.3346-8177-0231-33306..1
Trimmed Order ID: GPA.3346-8177-0231-33306

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42366' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23917'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23916
    [app_id] => 5013
    [order_id] => 14085
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3378-4171-5280-78225
    [pg_ref_id] => GPA.3378-4171-5280-78225
    [device_id] => 0
    [gateway_subscription_id] => GPA.3378-4171-5280-78225
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1810011268709","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14085","obfuscatedExternalProfileId":"43993","orderId":"GPA.3378-4171-5280-78225..0","paymentState":1,"priceAmountMicros":"40990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777870468709","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43993
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-04 04:54:28
    [end_date] => 2027-05-11 04:54:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 06:20:02
    [updated_at] => 2026-05-11 06:20:08
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23916
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: iimldkoifllceglhimmjaajn.AO-J1Owv9NFX2R6bV6WgljFO8lujlYXeXOpBBvu8R9R_bn-BfERng6OChbUFDL7m-G9u8f971cEmXO_ILvEyw-79GfY2I_OSnA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-04 04:54:28
End Date: 2027-05-11 04:54:28
Original Order ID: GPA.3378-4171-5280-78225..0
Trimmed Order ID: GPA.3378-4171-5280-78225

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43993' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '23916'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21668
    [app_id] => 5013
    [order_id] => 13253
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3314-4628-6040-67680
    [pg_ref_id] => GPA.3314-4628-6040-67680
    [device_id] => 0
    [gateway_subscription_id] => GPA.3314-4628-6040-67680
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779021206119","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13253","obfuscatedExternalProfileId":"42796","orderId":"GPA.3314-4628-6040-67680..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775824406119","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42796
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-10 12:33:26
    [end_date] => 2026-05-17 12:33:26
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 14:50:03
    [updated_at] => 2026-05-17 12:40:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21668
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: khnekmfkkomnccdeblmjafnm.AO-J1OyhqJLh62T-ZUI4OJy9O4wOZjikzrHCIQ6aybj8POwefdisyzp9tkoh5uQM73pvM4zhA5dKmJxPY6PwRfzJn_i7zr8ZeA

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-10 12:33:26
End Date: 2026-05-17 12:33:26
Original Order ID: GPA.3314-4628-6040-67680..0
Trimmed Order ID: GPA.3314-4628-6040-67680

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42796' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21596
    [app_id] => 5013
    [order_id] => 7451
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3302-3760-5945-64217
    [pg_ref_id] => GPA.3302-3760-5945-64217
    [device_id] => 0
    [gateway_subscription_id] => GPA.3302-3760-5945-64217
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778991959847","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3302-3760-5945-64217..5","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1757428891499","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38543
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-09-09 14:41:31
    [end_date] => 2026-05-17 04:25:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-17 04:30:02
    [updated_at] => 2026-05-17 04:30:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21596
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: eblmboeglolijmeflebhngjh.AO-J1OywFLQFn2XWtv4MU3btKtblGRnBBKmwyNFC_8gmcHIxem62OmLSNfCGEze_uZWoVmvVryCT7nk_s6JV7_AOPbX8aPlTBA

Price : 1.99
priceCurrency : USD
Start Date: 2025-09-09 14:41:31
End Date: 2026-06-17 04:25:59
Original Order ID: GPA.3302-3760-5945-64217..6
Trimmed Order ID: GPA.3302-3760-5945-64217

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38543' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21596'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21760
    [app_id] => 5013
    [order_id] => 11676
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3340-6983-1659-64079
    [pg_ref_id] => GPA.3340-6983-1659-64079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3340-6983-1659-64079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1779083233481","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"11676","obfuscatedExternalProfileId":"41033","orderId":"GPA.3340-6983-1659-64079..1","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1773208033481","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 41033
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-03-11 05:47:13
    [end_date] => 2026-05-18 05:47:13
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 05:50:02
    [updated_at] => 2026-05-18 05:50:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21760
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: kmgafafiholgdheplnkknhha.AO-J1OyCGODvb3xXQQmF9x0UGnvhhyQI-WfF2q8xAm6DjKPyJVTy1_m0KqumAMeBZgr2xnkcWae8u2eaWiqdNIZhz8CQAzPC4Q

Price : 3.99
priceCurrency : USD
Start Date: 2026-03-11 05:47:13
End Date: 2026-06-18 05:47:13
Original Order ID: GPA.3340-6983-1659-64079..2
Trimmed Order ID: GPA.3340-6983-1659-64079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41033' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21760'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23697
    [app_id] => 5013
    [order_id] => 14262
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3331-0153-4002-87312
    [pg_ref_id] => GPA.3331-0153-4002-87312
    [device_id] => 1
    [gateway_subscription_id] => GPA.3331-0153-4002-87312
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 43108
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 22:51:35
    [end_date] => 2026-05-15 22:51:35
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-08 22:51:11
    [updated_at] => 2026-05-15 23:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23697
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: jmfpbkhjbncomffffhbhfjhe.AO-J1OwVk6h44Ahh4rFKRZNOnJFUsv3M1IRUcMoI_CWBFO3eHlrPgOiBLAsV0pbmTNIOEAedj6IeCiPCx6sCc_OL4U7Hi5vn3g

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-08 22:51:35
End Date: 2026-05-15 22:51:35
Original Order ID: GPA.3331-0153-4002-87312
Trimmed Order ID: GPA.3331-0153-4002-87312

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43108' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21788
    [app_id] => 5013
    [order_id] => 8311
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3329-5340-7275-16018
    [pg_ref_id] => GPA.3329-5340-7275-16018
    [device_id] => 0
    [gateway_subscription_id] => GPA.3329-5340-7275-16018
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"GB","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779113949424","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3329-5340-7275-16018..3","paymentState":1,"priceAmountMicros":"1890000","priceCurrencyCode":"GBP","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1766067549424","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.89
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 39049
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-18 14:19:09
    [end_date] => 2026-05-18 14:19:09
    [autorenew] => 1
    [currency_id] => 4
    [currency] => GBP
    [u_currency] => 
    [created] => 2026-04-18 14:20:02
    [updated_at] => 2026-05-18 14:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21788
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocahdofjefdaolonlcinaoca.AO-J1Oy5ymkHIt1L3oTKNp-bUJtt58GM4224UI13Kv0-SMlb5xIJSjL0j4dyBU6FAwiLFx-V8gLs2e_4Vr-jlnkt7ImfbiyIVA

Price : 1.89
priceCurrency : GBP
Start Date: 2025-12-18 14:19:09
End Date: 2026-06-18 14:19:09
Original Order ID: GPA.3329-5340-7275-16018..4
Trimmed Order ID: GPA.3329-5340-7275-16018

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '39049' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21788'
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21504
    [app_id] => 5013
    [order_id] => 12735
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3370-6478-6508-75079
    [pg_ref_id] => GPA.3370-6478-6508-75079
    [device_id] => 0
    [gateway_subscription_id] => GPA.3370-6478-6508-75079
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778633459244","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12735","obfuscatedExternalProfileId":"42303","orderId":"GPA.3370-6478-6508-75079..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775220585577","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 42303
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-03 12:49:45
    [end_date] => 2026-05-13 00:50:59
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-16 00:00:03
    [updated_at] => 2026-05-13 01:00:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21504
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: pmanlcjegejblbebjdlififi.AO-J1OydpfEEjl08IFZeZzO43-T5s3qIjOWgBBYo0o6cIQE-giRveSyMXvMO3x1Q4Qd2SCW8lR8WMZQ46uiSwPv5SI_Edndong

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-03 12:49:49
End Date: 2026-05-13 00:50:59
Original Order ID: GPA.3370-6478-6508-75079..0
Trimmed Order ID: GPA.3370-6478-6508-75079

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42303' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21454
    [app_id] => 5013
    [order_id] => 13083
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3324-5252-5827-17785
    [pg_ref_id] => GPA.3324-5252-5827-17785
    [device_id] => 0
    [gateway_subscription_id] => GPA.3324-5252-5827-17785
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778829499091","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"13083","obfuscatedExternalProfileId":"42260","orderId":"GPA.3324-5252-5827-17785..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775632699091","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42260
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-08 07:18:19
    [end_date] => 2026-05-15 07:18:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-15 09:20:02
    [updated_at] => 2026-05-15 07:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21454
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: gacgdmgpmbjehlogfchmflhf.AO-J1Oyx9FmndO7PGffv6vptjFkQLJcP8LiPEJv016u_tT71rQKFg-uHktEEXUqyx0d2l41EAC8jor6GuR-BYgJMHQg_RTpCZg

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-08 07:18:19
End Date: 2026-06-15 07:18:19
Original Order ID: GPA.3324-5252-5827-17785..1
Trimmed Order ID: GPA.3324-5252-5827-17785

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42260' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21454'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24042
    [app_id] => 5013
    [order_id] => 14111
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3361-3178-8861-52435
    [pg_ref_id] => GPA.3361-3178-8861-52435
    [device_id] => 0
    [gateway_subscription_id] => GPA.3361-3178-8861-52435
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1781225479625","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"14111","obfuscatedExternalProfileId":"43961","orderId":"GPA.3361-3178-8861-52435..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1777942279625","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 43961
    [msisdn] => 
    [role_type] => 1
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 2
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-05-05 00:51:19
    [end_date] => 2026-06-12 00:51:19
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 03:30:02
    [updated_at] => 2026-05-12 03:30:11
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24042
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: fkhjkcidfopohpppaepbbajp.AO-J1OxNxfJHU0OWx2wogs5Sur4iiTzNHdpwn_Ey6j8VYpJ63bkdLaM6YzIglSRiTdCZeOUJWh214147klsV1ByU3rPZVjki7w

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-05 00:51:19
End Date: 2026-06-12 00:51:19
Original Order ID: GPA.3361-3178-8861-52435..0
Trimmed Order ID: GPA.3361-3178-8861-52435

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '43961' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24042'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC â„šī¸ No records found!✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 21794
    [app_id] => 5013
    [order_id] => 6568
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3307-7923-4945-89472
    [pg_ref_id] => GPA.3307-7923-4945-89472
    [device_id] => 0
    [gateway_subscription_id] => GPA.3307-7923-4945-89472
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1779116342143","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3307-7923-4945-89472..10","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1747666742143","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 38048
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-05-19 14:59:02
    [end_date] => 2026-05-18 14:59:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-18 15:00:02
    [updated_at] => 2026-05-18 15:00:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21794
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: gkgnecopnejkcmccbcklfghh.AO-J1Oxqq6m3ViFrTKxiAqNLSeKCQyU-YmhXHS47Rdj0UCy1-Ma6wyqXqVOB79KVCP53DUE_yjvVIzx07lCgAvDOp5fCstZwhQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-05-19 14:59:02
End Date: 2026-06-18 14:59:02
Original Order ID: GPA.3307-7923-4945-89472..11
Trimmed Order ID: GPA.3307-7923-4945-89472

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '38048' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21794'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 23946
    [app_id] => 5013
    [order_id] => 14334
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3392-8119-9873-34495
    [pg_ref_id] => GPA.3392-8119-9873-34495
    [device_id] => 0
    [gateway_subscription_id] => GPA.3392-8119-9873-34495..0
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 44178
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-11 12:29:30
    [end_date] => 2026-05-11 13:02:30
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-11 12:29:25
    [updated_at] => 2026-05-11 13:10:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 23946
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: pgnihjmmlfdbmgnkfppgdaba.AO-J1Owx2nQO0v94XrVbkO1lSVkWCJKkqDgPA2tvajb5gFBPXQa24KeTVA-kFEYLoXbV-PaYMLlbA0FFFlXfentNukKGu2iCCw

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-11 12:29:30
End Date: 2026-05-11 16:02:32
Original Order ID: GPA.3392-8119-9873-34495..6
Trimmed Order ID: GPA.3392-8119-9873-34495

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44178' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.core.587.sub4
    [id] => 16208
    [app_id] => 5013
    [order_id] => 5616
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3382-0793-0489-88759
    [pg_ref_id] => GPA.3382-0793-0489-88759
    [device_id] => 0
    [gateway_subscription_id] => GPA.3382-0793-0489-88759
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"","emailAddress":null,"expiryTimeMillis":"1778516402982","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":null,"obfuscatedExternalProfileId":null,"orderId":"GPA.3382-0793-0489-88759..3","paymentState":1,"priceAmountMicros":"1990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1765470002982","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 230
    [package_title] => Annual
    [package_code] => 
    [package_type] => 3
    [package_mode] => OTT
    [price] => 1.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 37524
    [msisdn] => 
    [role_type] => 2
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 1
    [local_user] => 1
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2025-12-11 16:20:02
    [end_date] => 2026-05-11 16:20:02
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-11 16:30:02
    [updated_at] => 2026-05-11 16:30:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 16208
)

Checking: com.maz.combo587 | Product: com.maz.core.587.sub4 | Token: ocmekkiabkfpkaggfgjpmemk.AO-J1Oz_UE9_LznFl2Cho90SLHl8-IjOYbsDa3JalGznQASts_wC44Rtla3BMiTjpzPkmy8z2yKTW1Cq1ZKkyOypLePhohCNaQ

Price : 1.99
priceCurrency : USD
Start Date: 2025-12-11 16:20:02
End Date: 2026-06-11 16:20:02
Original Order ID: GPA.3382-0793-0489-88759..4
Trimmed Order ID: GPA.3382-0793-0489-88759

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '37524' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '16208'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 21272
    [app_id] => 5013
    [order_id] => 12907
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3346-4869-5509-71987
    [pg_ref_id] => GPA.3346-4869-5509-71987
    [device_id] => 0
    [gateway_subscription_id] => GPA.3346-4869-5509-71987
    [pg_payment_data] => {"acknowledgementState":1,"autoRenewing":true,"autoResumeTimeMillis":null,"cancelReason":null,"countryCode":"US","developerPayload":"ack-by-backend","emailAddress":null,"expiryTimeMillis":"1778652642977","externalAccountId":null,"familyName":null,"givenName":null,"kind":"androidpublisher#subscriptionPurchase","linkedPurchaseToken":null,"obfuscatedExternalAccountId":"12907","obfuscatedExternalProfileId":"42483","orderId":"GPA.3346-4869-5509-71987..0","paymentState":1,"priceAmountMicros":"3990000","priceCurrencyCode":"USD","profileId":null,"profileName":null,"promotionCode":null,"promotionType":null,"purchaseType":null,"startTimeMillis":"1775455842977","userCancellationTimeMillis":null}
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 0.00
    [tax_amt] => 0
    [subscriber_id] => 42483
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 0
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 0
    [no_plays] => 0
    [status] => 7
    [ack_status] => 0
    [platform] => cron
    [purchase_type] => RENEWED
    [extended_status] => 0
    [start_date] => 2026-04-06 06:10:42
    [end_date] => 2026-05-13 06:10:42
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-04-13 09:20:02
    [updated_at] => 2026-05-13 06:20:02
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 21272
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: imabgbaalkkfbhghlgiifene.AO-J1Oz5hp_VvwgJSjD5tU-wH9iN-dwNhjp_vtQG-cseK8GRr1rUtI1Wc6QO0oIcr-M9ipUXNY-4Frt0_abGZumHgC0sU7_O1w

Price : 3.99
priceCurrency : USD
Start Date: 2026-04-06 06:10:42
End Date: 2026-06-13 06:10:42
Original Order ID: GPA.3346-4869-5509-71987..1
Trimmed Order ID: GPA.3346-4869-5509-71987

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '42483' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '21272'

✅ Script finished.✅ DB connected!!
đŸ—‘ī¸ Older than 7 days records deleted successfully!
✅ Data inserted successfully! Rows inserted: 0

SELECT TP.recuring_inappplan_id, TCS.*, tmp.record_id FROM tbl_customer_subscriptions AS TCS JOIN tbl_packages AS TP ON TCS.package_id = TP.id JOIN ( SELECT record_id FROM temp_lac WHERE processed_at IS NULL OR processed_at <= NOW() - INTERVAL 4 HOUR ORDER BY record_id ASC LIMIT 20 ) AS tmp ON TCS.id = tmp.record_id GROUP BY TCS.gateway_subscription_id ORDER BY TCS.id DESC
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.1month.3.99usd
    [id] => 24051
    [app_id] => 5013
    [order_id] => 14364
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3354-3024-9181-24927
    [pg_ref_id] => GPA.3354-3024-9181-24927
    [device_id] => 0
    [gateway_subscription_id] => GPA.3313-8654-9262-56144..6
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 228
    [package_title] => Monthly
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 3.99
    [u_price] => 0.00
    [basic_amount] => 3.99
    [tax_amt] => 0
    [subscriber_id] => 44212
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Month
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 7
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-08 07:33:57
    [end_date] => 2026-05-08 08:11:57
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 06:26:01
    [updated_at] => 2026-05-12 09:50:03
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24051
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.1month.3.99usd | Token: jkclhlifclgikgpgahkghpff.AO-J1OxTR6oH64NOoQ_AaTasU3hkPyLh8ucturgt6iQOXfsv95MW5kWRpKQMyp-WGeHR8YswfuB-UXFlmY5AHVUml7XeTRbPQw

Price : 3.99
priceCurrency : USD
Start Date: 2026-05-12 06:26:09
End Date: 2026-05-12 07:04:10
Original Order ID: GPA.3354-3024-9181-24927..6
Trimmed Order ID: GPA.3354-3024-9181-24927

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '44212' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1
Array
(
    [recuring_inappplan_id] => com.maz.combo587.rec.annual.40.99usd
    [id] => 24027
    [app_id] => 5013
    [order_id] => 14356
    [mandate_id] => 
    [merchant_id] => 
    [mandate_token] => 
    [payment_method_type] => 
    [payer_vpa] => 
    [txn_type] => 
    [trans_id] => GPA.3333-8951-2461-80618
    [pg_ref_id] => GPA.3333-8951-2461-80618
    [device_id] => 0
    [gateway_subscription_id] => GPA.3333-8951-2461-80618
    [pg_payment_data] => 
    [channel] => 
    [package_id] => 227
    [package_title] => Annual
    [package_code] => 
    [package_type] => 0
    [package_mode] => OTT
    [price] => 40.99
    [u_price] => 0.00
    [basic_amount] => 40.99
    [tax_amt] => 0
    [subscriber_id] => 41436
    [msisdn] => 
    [role_type] => 0
    [gateway_type] => 3
    [pg_name] => google_inapp_purchase
    [pg_mode] => 
    [region_type] => 0
    [local_user] => 0
    [state_code] => 0
    [period] => Year
    [period_interval] => 1
    [trial_period] => 
    [trial_length] => 
    [subscription_type] => 0
    [output_video_limit] => 0
    [additional_cost_per_unit] => 0
    [no_videos] => 
    [no_plays] => 
    [status] => 2
    [ack_status] => 0
    [platform] => platform
    [purchase_type] => PURCHASED
    [extended_status] => 0
    [start_date] => 2026-05-12 00:35:28
    [end_date] => 2027-05-12 00:35:28
    [autorenew] => 1
    [currency_id] => 4
    [currency] => USD
    [u_currency] => 
    [created] => 2026-05-12 00:35:28
    [updated_at] => 2026-05-12 00:35:46
    [is_cancelled] => 0
    [cancelled_at] => 
    [deactivation_type] => 
    [deactivation_date] => 
    [renewal_date] => 
    [renewal_count] => 0
    [mandate_revoke] => 0
    [recurring] => 0
    [purchase_token] => klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA
    [package_name] => 
    [email_sent] => 0
    [back_dated] => 0
    [record_id] => 24027
)

Checking: com.maz.combo587 | Product: com.maz.combo587.rec.annual.40.99usd | Token: klpopoeppddfnjlelncmapop.AO-J1OxwEIuGHDwzX1htT_q6yVSG_FWAjA7oaPOFGkblrPNa9RZWB9TvUIESb6qcXNp6QSZBWenkfoGD0gHBNzArI3yJvIYXoA

Price : 40.99
priceCurrency : USD
Start Date: 2026-05-12 00:35:38
End Date: 2026-05-19 00:35:38
Original Order ID: GPA.3333-8951-2461-80618
Trimmed Order ID: GPA.3333-8951-2461-80618

================ Subscription Update or Skip ================
SELECT * FROM tbl_customer_subscriptions WHERE subscriber_id = '41436' AND `status` IN ('2','3') AND pg_name = 'google_inapp_purchase' ORDER BY id DESC LIMIT 1

✅ No update needed, just mark processed_at in temp_lac.

UPDATE temp_lac SET processed_at = NOW() WHERE record_id = '24027'

✅ Script finished.