Txn_id missing at Refund Notification

Hi there,
i have a problem with idevaffiliate integration and stripe. Problem is the missing txn_id when Refund Notification is fired.

OK, step by step. User is level 0. User subscribes at my website to get access to, lets say, level 1. He pays 10 EUR via stripe. Everything works fine, user is upgraded to level 1 and a payment notification is fired. Within this notification the transaction id is transmitted to idevaffiliate (%%txn_id%%). idevaffiliate creates a commission for this transaction identified by the txn_id. Everything ok so far.
Then i refund the payment at stripe. s2member receives the event and fires a “refund notification”. But in this notification there is no access to the txn_id. But idevaffiliate needs exactly this txn_id to know which transaction was refunded! Without this txn_id idevaffiliate is not able to remove the created commission. Because of that i receive and (debug) email like:

 The API file (terminate_commission.php) tried to remove a commission and couldn't.
 Reason:
      - No order number was received.
  -------- 
  Message Auto-Sent By iDevAffiliate 9.1 

I do not understand this. Why is txn_id not available when firing a refund notification? In the (very old) documentation they use %%parent_txn_id%% which has nothing in common with the payment transaction id %%txn_id%%. When i use the %%parent_txn_id%% i receive the following email:

 The API file (terminate_commission.php) tried to remove a commission and couldn't.
 Reason:
      - No commission was found with the provided order number.

 Order Number Received: sub_B0Lq2mgFTbqimt
  -------- 
 Message Auto-Sent By iDevAffiliate 9.1 

Am i missing something? Or is this a bug which kills the “automatically remove commission when payment is refunded”?

@jaswrks I think it is a bug. I was able to get the refund procedure to work by editing

stripe-notify-in.inc.php

In

case 'charge.refunded':  

i changed the line

$ipn['parent_txn_id'] = $ipn_signup_vars['subscr_id'];    

to

$ipn['parent_txn_id'] = $stripe_charge->id;

After that i could use parent_txn_id for the notification to iDev and the commission is canceled.
Of course this is just a workaround. The best solution would be to add a new variable to this notification which holds the transaction id. Something like:

$ipn['txn_id'] = $stripe_charge->id;