https://github.com/web2solutions/paypalrest
Consume Paypal REST API via perl
https://github.com/web2solutions/paypalrest
Last synced: over 1 year ago
JSON representation
Consume Paypal REST API via perl
- Host: GitHub
- URL: https://github.com/web2solutions/paypalrest
- Owner: web2solutions
- Created: 2014-10-25T06:26:18.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2020-11-11T02:59:12.000Z (over 5 years ago)
- Last Synced: 2025-02-04T13:44:43.317Z (over 1 year ago)
- Language: Perl
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PaypalREST
===========
PaypalREST - Consume Paypal REST API via perl
***This is not for production purpose anymore***
## INSTALL
$ cpan App::cpanminus
$ cpanm git://github.com/web2solutions/PaypalREST.git
## SYNOPSIS
````perl
use PaypalREST;
my $paypal = PaypalREST->new(
$client_id
,$client_secret
);
````
## Methods
**PaypalREST->new()**
**PaypalREST->live()**
**PaypalREST->rest()**
**PaypalREST->pay_with_ballance()**
**PaypalREST->execute_payment()**
**PaypalREST->pay_as_guest()**
**PaypalREST->pay_with_stored_cc()**
**PaypalREST->get_payment()**
**PaypalREST->get_payments()**
**PaypalREST->vault_credit_card()**
**PaypalREST->get_credit_card()**
## Examples
**Pay with Paypal balance**
````perl
my $payment = $paypal->pay_with_ballance({
amount => 1.59,
description => 'pay for service',
return_url => 'your_return_url',
cancel_url => 'your_cancel_url'
});
# then execute payment
my $payment = $paypal->execute_payment({
execute_url => $execute_url,
payer_id => $payer_id
});
````
**Pay with Credit card balance**
````perl
my $payment = $paypal->pay_as_guest({
number => '4353185781082049',
type => 'visa',
cvv2 => '442',
expire_month => 3,
expire_year => 2018,
amount => 3.58,
first_name => 'Steve',
last_name => 'Jobs',
line1 => 'Street 345',
city => 'Palo Alto',
state => 'CA',
postal_code => '4444',
country_code => 'US',
description => 'pay for service'
});
````
### TODO
- doc
- examples
- build