I donβt know if there is any specific example of using ActiveMerchant Integrations (maybe this will help: http://peepcode.com/products/activemerchant-pdf ), but I can say that it depends on the payment gateway.
I would suggest to conduct a test transaction and see which parameters will be returned to you by the gateway, and then create a code that uses these parameters.
For example, in the case of 2checkout, you want to check the hash of the return that 2checkout returns in order to verify the transaction and make a payment record (it is possible to keep the original parameters obtained from 2checkout). Of course, this also depends on the type of notification method that your payment gateway provides.
source share