开发者

Integrating Dwolla with PHP with their API

Foreword: Okay I've used APIs in the past such as TwitterAPI but I always used a library and some documentation to assist me with connections, and retrieving tokens. I have a basic understanding of how API's work.

Okay so I've tried multiple ways of requesting the dwolla API with PHP I've tried making a

<form action="https://www.dwolla.com/payment/pay" method="post">
<input type="hidden" name="key" value="soMeVerYLongAcsiiKey"/>
<input type="hidden" name="secret" value="soMeVerYLongAcsiiseCret"/>
</form>

I actually got a json reponse from the above code but i could never get it to accept my credentials.

I also tried doing something like string queries such as https://www.dwolla.com/payment/pay?key=someverylongAcssikey&secret=someverylonAcessisecret

I've attempted at signing up at the Dwolla.org/d website for their official forums by they are taking for ever to accept me. I also tried the "Developer Forums" link which took me here http://getsatisfaction.com/dwolla and I开发者_如何学运维 posted my dilemma on there too no response.

I just need some quick and dirty php pseudo code to make a request so customers can quickly just pay for their merchandise.

I would like to use the oAuth2.0 method

If you are a Bitcoiner, please post your Bitcoin address and I will accommodate you for your help. Thanks everyone!


Finally got a respone from the Dwolla Developers and they are saying this way of doing it is deprecated as the SOAP API for Dwolla is deprecated and the recommended way for using the API is the REST API.


You use the SOAP protocol to communicate with their API.

Here is a link to a discussion on the API: http://www.dwolla.org/d/showthread.php?3-SOAP-API

Here is a link to the php.net database on SOAP, and how to implement it: http://www.php.net/manual/en/class.soapclient.php

This is the address that you use to communicate with the API:

https://www.dwolla.com/api/API.svc?wsdl

You authenticate with an API key, generated in your dwolla API settings, I believe. Then you can use the other functions of the API.

Sorry can't be more specific right now, it's pretty late here right now. But it's pretty easy to do, just read through the documentation on both of those links, and you should figure it out.


Have you defined all your parameters properly? Also, you can call the methods directly. For a full method list, uncomment the three lines after SoapClient is instanciated.

$client = new SoapClient("https://www.dwolla.com/api/TestAPI.svc?wsdl");
# header('content-type: text/plain');
# var_dump($client->__getFunctions());
# exit;

$params = array(
  'ApiKey' => $apiKey,
  'ApiCode' => $apiCode,
  'Amount' => 1.00,
  'Description' => $description,
  'CustomerID' => $customerId
);

var_dump($client->RequestPaymentKey($params));

//RequestPaymentKey returns a boolean: true if the request was successfully processed, False or exception otherwise

http://payb.tc/nuri

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜