Fixed Error: Event data received from Stripe does not contain the expected values

Nirjonadda

Well-known member
Affected version
2.1.8
Lot of Error Payment provider log.

Code:
Action: Error: Event data received from Stripe does not contain the expected values.

User: Unknown user

Date: Sunday at 12:45 AM

Purchase request key: N/A

Transaction ID: evt_1GUdSyBkGIL8oaERL8tZC4gW

Subscriber ID: N/A

Payment profile: Unknown profile

Code:
array(46) {
  ["id"] => string(27) "ch_1GUdSwBkGIL8oaERaC0F5cv9"
  ["object"] => string(6) "charge"
  ["amount"] => int(500)
  ["amount_refunded"] => int(0)
  ["application"] => NULL
  ["application_fee"] => NULL
  ["application_fee_amount"] => NULL
  ["balance_transaction"] => string(28) "txn_1GUdSyBkGIL8oaERLmQb5fMw"
  ["billing_details"] => array(4) {
    ["address"] => array(6) {
      ["city"] => NULL
      ["country"] => NULL
      ["line1"] => NULL
      ["line2"] => NULL
      ["postal_code"] => NULL
      ["state"] => NULL
    }
    ["email"] => NULL
    ["name"] => NULL
    ["phone"] => NULL
  }
  ["calculated_statement_descriptor"] => string(21) "MY SITE"
  ["captured"] => bool(true)
  ["created"] => int(1586112306)
  ["currency"] => string(3) "eur"
  ["customer"] => string(18) "cus_FBKnUzRiIrvWG6"
  ["description"] => string(19) "Subscription update"
  ["destination"] => NULL
  ["dispute"] => NULL
  ["disputed"] => bool(false)
  ["failure_code"] => NULL
  ["failure_message"] => NULL
  ["fraud_details"] => array(0) {
  }
  ["invoice"] => string(27) "in_1GUcWjBkGIL8oaERLzdXG5J0"
  ["livemode"] => bool(true)
  ["metadata"] => array(0) {
  }
  ["on_behalf_of"] => NULL
  ["order"] => NULL
  ["outcome"] => array(5) {
    ["network_status"] => string(19) "approved_by_network"
    ["reason"] => NULL
    ["risk_level"] => string(6) "normal"
    ["seller_message"] => string(17) "Payment complete."
    ["type"] => string(10) "authorized"
  }
  ["paid"] => bool(true)
  ["payment_intent"] => string(27) "pi_1GUdSvBkGIL8oaERIWlcKbRU"
  ["payment_method"] => string(27) "pm_1G8rwMBkGIL8oaERGyiKV61w"
  ["payment_method_details"] => array(2) {
    ["card"] => array(12) {
      ["brand"] => string(10) "mastercard"
      ["checks"] => array(3) {
        ["address_line1_check"] => NULL
        ["address_postal_code_check"] => NULL
        ["cvc_check"] => NULL
      }
      ["country"] => string(2) "BD"
      ["exp_month"] => int(11)
      ["exp_year"] => int(2020)
      ["fingerprint"] => string(16) "uZYGAEagYrAfKCAr"
      ["funding"] => string(6) "credit"
      ["installments"] => NULL
      ["last4"] => string(4) "2259"
      ["network"] => string(10) "mastercard"
      ["three_d_secure"] => NULL
      ["wallet"] => NULL
    }
    ["type"] => string(4) "card"
  }
  ["receipt_email"] => string(21) "@gmail.com"
  ["receipt_number"] => string(9) "2811-7254"
  ["receipt_url"] => string(118) "https://pay.stripe.com/receipts/acct_1CbbokBkGIL8oaER/ch_1GUdSwBkGIL8oaERaC0F5cv9/rcpt_H2iuTxwhio60dyzIYBKXGfwdfG5uzq3"
  ["refunded"] => bool(false)
  ["refunds"] => array(5) {
    ["object"] => string(4) "list"
    ["data"] => array(0) {
    }
    ["has_more"] => bool(false)
    ["total_count"] => int(0)
    ["url"] => string(47) "/v1/charges/ch_1GUdSwBkGIL8oaERaC0F5cv9/refunds"
  }
  ["review"] => NULL
  ["shipping"] => NULL
  ["source"] => NULL
  ["source_transfer"] => NULL
  ["statement_descriptor"] => string(21) "MY SITE"
  ["statement_descriptor_suffix"] => NULL
  ["status"] => string(9) "succeeded"
  ["transfer_data"] => NULL
  ["transfer_group"] => NULL
  ["eventType"] => string(16) "charge.succeeded"
}
 
I can't explain why your users aren't being promoted but the API version and this payment provider log aren't related in the slightest to it.

Have you modified the list of events that your webhook sends?
 
When Cancellation: Payment refunded/reversed, downgraded then another log happened with Unknown profile. Please note: This issue happened with Paypal Payment, not Stripe.

ScreenShot00347.png

ScreenShot00348.png

Code:
Action:Information: No purchase request key. Unrelated payment, no action to take.

User: Unknown user

Date: Today at 2:33 PM

Purchase request key: N/A

Transaction ID: 35T698655W655102V

Subscriber ID: N/A

Payment profile: Unknown profile

Log details

array(16) {
  ["payment_date"] => string(25) "00:52:05 May 12, 2020 PDT"
  ["txn_id"] => string(17) "35T698655W655102V"
  ["receiver_email"] => string(20) "@gmail.com"
  ["case_creation_date"] => string(25) "01:33:10 May 12, 2020 PDT"
  ["notify_version"] => string(3) "3.9"
  ["case_type"] => string(7) "dispute"
  ["txn_type"] => string(8) "new_case"
  ["charset"] => string(12) "windows-1252"
  ["payer_email"] => string(18) "@yahoo.co.uk"
  ["business"] => string(20) "@gmail.com"
  ["reason_code"] => string(11) "non_receipt"
  ["case_id"] => string(13) "PP-D-65768933"
  ["verify_sign"] => string(56) "AybQa9.8KjiW2xuH63D2QN7X501KAIU.WyBa6Q.y77eZ7jUqvjYStkCP"
  ["receiver_id"] => string(13) "SD8A5UCFXMGJS"
  ["payer_id"] => string(13) "8E82R2KYQPG3S"
  ["ipn_track_id"] => string(13) "94e8d80fae1b3"
}
 
We've now made changes in 2.2 so that this particular Stripe event won't get logged. Specifically, for subscriptions, we focus on the invoice payment, so we don't log errors (due to lack of sufficient identifying info) for charges that are attached to an invoice.
 
Yeah, I am seeing issues as well trying to create a new subscription payment with the latest API version in Stripe.
 
There might be some confusion over the significance of the Stripe API version. The only thing it affects is the REST API calls our PHP makes to Stripe. This is specific to the code in the payment handler. It doesn't affect the the JS (we load v3) and other code can use a different REST API version. Using a different API version for XF's payment handling which change absolutely nothing from an end user perspective.

In terms of the webhook, the API version of that is actually part of the webhook being defined, rather than anything we specifically set. I have just done a couple test purchases with a webhook calling back to XF with the latest API version and they processed as expected.

If you're having problems with that (for a payment created via the XF payment framework), then please track that in a separate bug report, though please confirm the issue on the most recent version of 2.2 if possible as there are significant changes to the Stripe payment flow/code there that are potentially relevant.
 
Back
Top Bottom