Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 3:47 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: how to use with oscommerce
PostPosted: Wed Apr 05, 2006 5:50 am 
Anybody has any instruction on how to use it with
oscommerce? Which API to use ?

Thanks


Top
  
 
 Post subject:
PostPosted: Sat Apr 08, 2006 7:44 pm 
Offline

Joined: Mon Apr 03, 2006 9:48 am
Posts: 3
Could someone please reply to this message. I am also looking to intergrate oscommerce with a2billing to buy pin numbers.


Top
 Profile  
 
 Post subject: Oscommerce
PostPosted: Sun Apr 09, 2006 1:09 am 
I found this but I couldn't figure out how to make OScommerce set up for Calling card yet. I know this is not the place to discuss this, but if Areski or other developer knows about it and give us a clue, it will be great. I have OScommerce set but I couldn't set it up for calling card.

For third part integration, we created an API that will allow to create on the fly new account.
The API is in the directory "A2Billing_UI/api"
An example of integration over OsCommerce when a visitor will purchase a card, a new account
should be automatically created on Asterisk2Billing.
Then we will need a HTTP POST/GET Request over
A2Billing_UI/api/api_ecommerce.php?key=md5secretkey&productid=1&forceid=&lastname=Belaid&firstname=Arezqui will create the new account and send a subscription email to the buyer (E-Product -> template email)
E-Product let you create the product you are willing to sell on the third part application.
At the API call the productid will define wish product the user bought. You can define productID similar
at the productID you have on OsCommerce.

Hope it's clear :D We should move this on the Installation Guide


Top
  
 
 Post subject:
PostPosted: Tue May 30, 2006 7:15 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Hi, question about oscommerce
I get the idea, but how to pass the http link from checkout_process.php to a2billing api.
I need some php script to pass the line

http://localhost/A2........./productid=1.....


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 30, 2006 10:48 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
you have to create a http call, with php 5 I guess it simple there is function for this.
otherwise I might have a class that will allow u to make it easily but it will request some
docs too.

Rgds, Areski


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 01, 2006 9:42 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Here is solution
This is just for testing.

include this anywhere you want it
let's say checkout_process.php of oscommerce catalog
Anytime this php script gets called it will create a customer in A2billing
You have to have matching e-product created in A2billing productid=1


<?php
require "notify.php";
$go='key=xxxx&productid=1&forceid=&lastname=Callabress&firstname=Jordia&[email protected]';
fsockPost('http://www.xxx.com/A2Billing_UI/api/api_ecommerce.php',$go);
?>


create a new file
notify.php

<?
function fsockPost($url,$data) {
//Parse url
$web=parse_url($url);
//Set the port number
if($web[scheme] == "https") {
$web[port]="443";
$ssl="ssl://";
} else {
$web[port]="80";
}

//Create socket connection
$fp=@fsockopen($ssl . $web[host],$web[port],$errnum,$errstr,30);
//Error checking
if(!$fp) {
echo "Can't open socket to remote addr ($errnum): $errstr - please check your webserver configuration!<br>Connect str: $ssl . $web[host],$web[port],30<br>URL: $url<br>";
} else { //Posting Data
fputs($fp, "POST $web[path] HTTP/1.1\r\n");
fputs($fp, "Host: $web[host]\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ".strlen($data)."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data . "\r\n\r\n");

//loop through the response from the server
while(!feof($fp)) {
$info[]=@fgets($fp, 1024);
}

//close fp - we are done with it
fclose($fp);

//break up results into a string
$info=implode(",",$info);

}
return $info;
}
?>


Top
 Profile  
 
 Post subject: Please help.
PostPosted: Thu Oct 30, 2008 3:05 am 
Offline

Joined: Sat Jul 28, 2007 5:51 am
Posts: 79
I have tested your solutions, but there is nothing happened. What am I suppose to check? Will it create a new card with the amount of credit specified in E-product? or will it create a new voucher?

Thanks


Top
 Profile  
 
 Post subject: Re: how to use with oscommerce
PostPosted: Mon May 16, 2011 4:54 am 
Offline

Joined: Mon May 16, 2011 4:09 am
Posts: 5
Was there any resolution to this? I am interested in seeing this work. Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group