1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#![deny(missing_docs)]
pub mod error;
mod payment;
mod request;
mod token;
mod types;
pub use token::get_token;
pub use types::{
Address, ApplicationContext, CreditCard, CreditCardToken, FailureReason, FundingInstrument,
LinkDescription, ListPaymentResponse, NormalizationStatus, Payer, PayerStatus, Payment,
PaymentIntent, PaymentMethod, RedirectUrls, State, Transaction, TransactionAmount,
};
pub use payment::*;
#[cfg(feature = "test-mode")]
const _ADDR: &str = "https://api.sandbox.paypal.com/v1";
#[cfg(not(feature = "test-mode"))]
const _ADDR: &str = "https://api.paypal.com/v1";
fn _make_endpoint(ep: &str) -> String {
format!("{}{}", _ADDR, ep)
}