3 releases (breaking)

0.2.0 Sep 10, 2019
0.1.0 Jan 12, 2019
0.0.0 Jan 10, 2019

#371 in Finance

MIT license

26KB
423 lines

A crate that serves to abstract away the network aspect of interfacing with paypal. Created by nikos

Creating a payment is done using the create_payment function.

let token = paypal::get_token("my_id", "my_secret")?;
let amount = TransactionAmount {
    currency: "USD".to_string(),
    total: "100.00".to_string()
};
let new_payment = payment::new(
    &token.access_token,
    "mysite.com/whooyoupaid",
    "mysite.com/nooyoufailed",
    PaymentMethod::Paypal,
    PaymentIntent::Sale,
    vec![Transaction { amount }],
)?;

Dependencies

~23MB
~470K SLoC