#stripe #payment #api

libstripe

用于 Rust 的 Stripe 库

18 个版本

0.5.9 2019 年 6 月 14 日
0.5.7 2019 年 5 月 24 日
0.4.1 2018 年 12 月 31 日
0.4.0 2018 年 11 月 23 日
0.2.0 2017 年 10 月 2 日

#192 in 财务

Download history 63/week @ 2024-03-31

每月 53 次下载

MIT/Apache

315KB
8K SLoC

libstripe

Status Build Status

用于 Rust 的 Stripe 库。

注意:所有内容都可能发生变化,但所有内容都应该是稳定的。

示例

use libstripe::Client;
use libstripe::resources::core::customer::{Customer, CustomerParam};

fn main() {
    let client = Client::new("sk_test_..............");

    let mut param = CustomerParam::default();

    param.email = Some("[email protected]");
    param.description = Some("Example account");

    let customer = match Customer::create(&client, param) {
        Ok(cust) => cust,
        Err(e) => panic!("{}", e)
    };

    println!("{:?}", customer);

}

依赖关系

~23MB
~498K SLoC