Linked Questions

Popular Questions

How do I call Transpact API using PHP code within Wordpress

Asked by At

This maybe a bit of a noob question, but I have searched and come up short. I have a website where I want to use as the payment method. My site uses woocommerce but creating a separate gateway doesn’t seem to be an option. I have received communication from Transpact that the calling of their API is simple, a single line of php code and they have sent me the following code, but while I can edit it for the bits I need, I’m struggling to see where to start with this. Here’s what they sent;

An example of PHP code to use the API might be to use something like:

$ap_param = array(
    'Username'=>[email protected]', 
    'MoneySenderEmail'=>" [email protected] ", 
    'MoneyRecipientEmail'=>" [email protected] ", 
    'Amount'=>2000, 'Currency'=>"EUR", 
    'OriginatorFee'=> 6.98, 
    'NameReferee'=>"Fred Smith", 
    'EmailReferee'=>"[email protected]", 
    'Conditions'=>"PeterPiper picked a peck of pickled peppers. So what",

$client = new SoapClient("");

$result = $client->__call("CreateTranspact", array($ap_param));

Can anyone advise me where to start. It seems quite incomplete as an instruction and they can’t help further. I’d appreciate any pointers.

edit --- I've now found this tutorial So I'm going to follow that and see how I get on. Hopefully if I manage it, I can add the files so others can use it. I'm sure I'll have to ask for specific help on here who I get stuck.

Related Questions