0

I have query regarding a commerce plugin which if anybody has solution it will be great help for me. We created a plugin for payment which extends commerce plugin in Craft CMS. But the transaction done through our plugin is failing because of an "invalid payment id." If a user does a transaction through the payment methods present in commerce, then it is successful. Reference ids generated by commerce plugin have a certain standard format like tr_UVDTDEFMB6 but in the case of our plugin, I am unable to do find where and how such reference id generates.

There is one method in Commerce_PaymentsService.php

private function _sendRequest($request, $transaction)
{
   $response = $request->send();//this generates transaction number and stores in db
}

How does $request->send() process? Please help me to find solution.

Thank You!

andreas
  • 16,357
  • 12
  • 72
  • 76
Prashant
  • 45
  • 5
  • `How does $request->send() process`... Find out what class is `$request` and than go to it's file and method `send`. Check it's implementation. Continue with other methods that are inside `send` – Justinas Aug 07 '17 at 10:22
  • Thank you Justinas for your inputs. My problem is resolved now for refernce id. – Prashant Aug 07 '17 at 13:35
  • I have one query, if I want to handle payment methods other than specified in commerce, how we can remove dependency of commerce plugin partially like some new payment methods which implemented through our customized plugin but dependency on commerce plugin. – Prashant Aug 07 '17 at 13:38
  • I want user should install plugin through composer. How to achieve that without manually changing any condition in commerce plugin. – Prashant Aug 07 '17 at 13:40

0 Answers0