paypal 0.2.0

A library to communicate with paypal api
Documentation

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 }],
)?;