ladeiko / node-apple-receipt-verify

A Node.js module for In-App-Purchase receipt validation for iOS.
MIT License
92 stars 25 forks source link

Validate function returns no products again #24

Closed viktorzavadil closed 3 years ago

viktorzavadil commented 3 years ago

At first, I would like to thank you for your work.

For now (version 1.9.2) validation does not return products, array is empty. I switched to verbose mode and it seems apple send all data.

Product in response has no expires_date_ms or expires_date, but for all cases I set ignoreExpired to false with same effect (no products returned from validate function).

In version 1.8.0 everything works fine.

From log:

<Apple> Sandbox validation successful: { receipt:
  { receipt_type: 'ProductionSandbox',
    adam_id: 0,
    app_item_id: 0,
    bundle_id: 'com.engramo.Engramo',
    application_version: '1.12.1',
    download_id: 0,
    version_external_identifier: 0,
    receipt_creation_date: '2021-01-28 13:10:18 Etc/GMT',
    receipt_creation_date_ms: '1611839418000',
    receipt_creation_date_pst: '2021-01-28 05:10:18 America/Los_Angeles',
    request_date: '2021-01-28 13:10:22 Etc/GMT',
    request_date_ms: '1611839422797',
    request_date_pst: '2021-01-28 05:10:22 America/Los_Angeles',
    original_purchase_date: '2013-08-01 07:00:00 Etc/GMT',
    original_purchase_date_ms: '1375340400000',
    original_purchase_date_pst: '2013-08-01 00:00:00 America/Los_Angeles',
    original_application_version: '1.0',
    in_app: [ [Object] ] },
  environment: 'Sandbox',
  latest_receipt_info:
  [ { quantity: '1',
      product_id: 'com.engramo.purchase.one_month_subscription',
      transaction_id: '1000000770527496',
      original_transaction_id: '1000000770527496',
      purchase_date: '2021-01-27 17:33:41 Etc/GMT',
      purchase_date_ms: '1611768821000',
      purchase_date_pst: '2021-01-27 09:33:41 America/Los_Angeles',
      original_purchase_date: '2021-01-27 17:33:41 Etc/GMT',
      original_purchase_date_ms: '1611768821000',
      original_purchase_date_pst: '2021-01-27 09:33:41 America/Los_Angeles',
      is_trial_period: 'false' } ],
  latest_receipt: 'MIIT...',
  status: 0 }

Thank you.

ladeiko commented 3 years ago

I will check and fix asap

ladeiko commented 3 years ago

I published 1.9.3 and reverted changes made, please check it

viktorzavadil commented 3 years ago

@ladeiko It works! It's repaired in 1.9.3. Thank you.

isonlaxman commented 3 years ago

Hi, I'm opening this again. I'm getting the same issue, validate returns an empty array for me too. I'm on version 1.9.3