iyzico/iyzipay-php

Subscription Webhooks Return Correct conversationId but Callback Returns NULL

Opened this issue · 0 comments

There is a discrepancy between the conversationId returned by the subscription webhooks and the one received in the callback. The webhook returns the correct conversationId, but the callback shows it as NULL.

Process:

  • Created a form using the same process outlined in samples/subscription-samples/create_subscription_with_checkout_form.php.
  • Displayed the form to the user using echo $checkoutFormInitialize->getCheckoutFormContent();.
  • After the user completed the payment, the iyzico callback page was triggered using the sample samples/subscription-samples/retrieve_subscription_checkout_form_result.php.
  • Retrieved the result with the following code: $result = RetrieveSubscriptionCheckoutForm::retrieve($request, $config::options());
  • Inspected the result using var_dump($result) and noticed that the conversationId was NULL: ["conversationId":"Iyzipay\IyzipayResource":private] => NULL
  • Checked the iyzico webhook log and confirmed that the conversationId was correct and matched the one used while creating the checkout form.

Expected Result:

  • The conversationId should be correctly set and match the one used during the creation of the checkout form: $request->setConversationId("{$orderId}");

Actual Result:

  • The conversationId in the callback is NULL.

Steps to Reproduce:

  • Follow the sample process in samples/subscription-samples/create_subscription_with_checkout_form.php.
  • Display the checkout form and complete the payment.
  • Observe the result in the callback page and check the value of conversationId.

Additional Information:

  • The conversationId in the webhook log is correct, but the callback result shows NULL.
  • This issue prevents the double verification of subscriptions through the callback. However, since the correct conversationId is received through the webhooks, the subscription system remains operational.