Any questions about Documents Sellers, post it here .

Executing custom Web service after completion

  • vccampbell
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 3 months ago #10937 by vccampbell
Hi. I hope this is in the right forum. I have purchased the document seller along with the Auth Net SIM payment plugin. I am selling a software component that is licensed. The licensing product I purchased allows for license files to be generated by calling a web service. I would like to execute the web service after a successful checkout by passing in some customer information that was entered during the checkout process.

It doesn't look like it is possible with a configuration change. My question is where in the code should I place a call to my web service? Or if there are any other options, I'm open.

Thanks,
Craig

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #10941 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Executing custom Web service after completion
Hi

The simplest way is modifing the file authorize.net SIM plugin directly to call the web service. The step is:

1. Open the file components/com_dms/payments/os_authnetsim.php, looks at the code at verifyPayment() function, and add the code to call webservice after the line of code :
Code:
DMSHelper::sendEmails($row, $config);

You can access to any customer information via $row object. For example :

$row->first_name => Customer First Name

$row->last_name => Customer Last Name


The second solution is writing a plugin for DMS processing onAfterPaymentSuccess but it is difficult. So I think you should go with the solution I suggested above !

Tuan

Please Log in or Create an account to join the conversation.

  • vccampbell
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 3 months ago #10973 by vccampbell
Replied by vccampbell on topic Re: Executing custom Web service after completion
Hi. Thanks for the info. I have found the place in the code to call the web service. Me being a .NET guy will have to learn a little PHP, so I'll report back my results.

Thanks again.
Craig

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #11012 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Executing custom Web service after completion
OK Craig

If you need more help, please don't hesitate to ask !

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • vccampbell
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 3 months ago #11034 by vccampbell
Replied by vccampbell on topic Re: Executing custom Web service after completion
Hi Tuan,

I finally got it going. I ended up using the nusoap client to make the call to my web service.
Code:
$client = new nusoap_client('http://myservice.mydomain.com/service.asmx?WSDL', true); $param = array('auth_string' => 'secret', 'trans_id' => $row->transaction_id); $result = $client->call('authnet_payment_notification', array('parameters' => $param));

Pretty simple in the end, but took me a while to get the call just right.

Thanks for your help.

Craig

Please Log in or Create an account to join the conversation.