Integration of escrow web services in a PHP site
Asked Answered
T

3

6

I want to integrate the services of escrow.com in my PHP site.

How would you get started with this goal, and what APIs provided would be the basic functionality? Do you have any PHP specific advice or gotchas? Would you recommend another service provider?

Tutti answered 29/7, 2010 at 10:7 Comment(0)
P
3

This is the first time I hear about escrow, but a quick scan of the site gives me:

this contact form to get more info:

https://escrow.com/contact/sales.asp

A FAQ: https://www.escrow.com/support/faq/index.asp?sid=8

Pokorny answered 29/7, 2010 at 10:15 Comment(0)
P
4

I'm working on an API project with this Company at the moment. I know looking at the documentation it all looks a little daunting, however, you can get away with making it as simple as a small cURL request.

I'd suggest starting with the "New escrow transaction" example provided, and build your request using the provided XML they offer, amended with your details.

Assign the XML to a variable, and pass it through a curl request similar to the below;

        // Initialise your cUrl object
    $ch = curl_init('https://xml.Escrow.com/Invoke/Partners/ProcessrequestXML.asp');

    //set your cURL options
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "\$xmldata=".urlencode($xml));

    //Start your cURL Transaction
    ob_start();

    //execute your cURL object with your parameters
    $result = curl_exec($ch);

    //set the returned info to a variable
    $info = curl_getinfo($ch);

    // close the transaction
    curl_close ($ch);

    //get the contents of the transaction
    $data = ob_get_contents();
    ob_end_clean();

    //optional; Redirect to a specific place
    header("Location:".$url);

The only advise I can offer is to read through the documentation carefully, and always check the values you are passing in.

Where possible, it is also a good idea to segregate the API functions into their own class, this will make maintenance and troubleshooting, as well as testing the functionality that much easier.

Pergola answered 5/12, 2013 at 20:59 Comment(1)
Guyvver, Is there any documentations or sample codes for this. If so please share.Takao
P
3

This is the first time I hear about escrow, but a quick scan of the site gives me:

this contact form to get more info:

https://escrow.com/contact/sales.asp

A FAQ: https://www.escrow.com/support/faq/index.asp?sid=8

Pokorny answered 29/7, 2010 at 10:15 Comment(0)
P
0

www.Transpact.com offers a similar but lower cost service. It is also UK Government (FSA and HMRC) registered.

It offers a simple SOAP API for easy integration into your website.

Patriotism answered 30/7, 2010 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.