-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several fixes. Added / corrected documentation. Added more examples.
- Loading branch information
Showing
11 changed files
with
158 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
WebService::Dwolla version 0.01 | ||
WebService::Dwolla version 0.03 | ||
============================= | ||
|
||
INSTALLATION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use WebService::Dwolla; | ||
use Data::Dumper; | ||
|
||
my $api = WebService::Dwolla->new(); | ||
|
||
# Set key, secret, and OAuth token from config file. | ||
$api->set_api_config_from_file('/usr/local/etc/dwolla_api.conf'); | ||
|
||
# Example 1: Deposit money from a funding source into Dwolla account. | ||
|
||
my $source_id = 'a4946ae2d2b7f1f880790f31a36887f5'; | ||
my $pin = '1234'; | ||
my $amount = '1.00'; | ||
|
||
my $deposit = $api->deposit($source_id,$pin,$amount); | ||
if (!$deposit) { | ||
print Dumper($api->get_errors()); | ||
} else { | ||
print Dumper($deposit); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use WebService::Dwolla; # Include Dwolla REST API Client | ||
use Data::Dumper; # Include this to help with debugging. | ||
|
||
# Instantiate new client. | ||
my $api = WebService::Dwolla->new(); | ||
|
||
# Set key, secret, and OAuth token from config file. | ||
$api->set_api_config_from_file('/usr/local/etc/dwolla_api.conf'); | ||
|
||
# Example 1: Retrieve stats. | ||
|
||
my $stats = $api->stats(); | ||
|
||
if (!$stats) { | ||
print Dumper($api->get_errors()); | ||
} else { | ||
print Dumper($stats); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use WebService::Dwolla; | ||
use Data::Dumper; | ||
|
||
my $api = WebService::Dwolla->new(); | ||
|
||
# Set key, secret, and OAuth token from config file. | ||
$api->set_api_config_from_file('/usr/local/etc/dwolla_api.conf'); | ||
|
||
# Example 1: Withdraw money from a to a funding source. | ||
|
||
my $source_id = 'a4946ae2d2b7f1f880790f31a36887f5'; | ||
my $pin = '1234'; | ||
my $amount = '1.00'; | ||
|
||
my $withdrawal = $api->withdraw($source_id,$pin,$amount); | ||
if (!$withdrawal) { | ||
print Dumper($api->get_errors()); | ||
} else { | ||
print Dumper($withdrawal); | ||
} |
Oops, something went wrong.