lib/orbital/api.rb in killbill-orbital-0.1.17 vs lib/orbital/api.rb in killbill-orbital-0.1.18

- old
+ new

@@ -72,12 +72,13 @@ properties = merge_properties(properties, options) super(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context, with_trace_num_and_order_id(properties)) end def refund_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context) - if should_credit?(kb_payment_id, context, properties) - # Note: from the plugin perspective, this transaction is a CREDIT but Kill Bill doesn't care about PaymentTransactionInfoPlugin#TransactionType - return credit_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context) + credit_opts = properties_to_hash(properties) + if should_credit?(kb_payment_id, context, credit_opts) + # Note: from the plugin perspective, this transaction is a CREDIT but Kill Bill doesn't care about PaymentTransactionInfoPlugin#TransactionType + return credit_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, hash_to_properties(credit_opts), context) end # Pass extra parameters for the gateway here options = {} properties = merge_properties(properties, options)