br_pay/
alipay.rs

1use crate::PayMode;
2use json::JsonValue;
3
4#[derive(Clone)]
5pub struct AliPay {
6    pub corp_id: String,
7    pub agent_id: String,
8    pub secret: String,
9    pub access_token: String,
10    pub expires_in: i64,
11}
12
13impl PayMode for AliPay {
14    fn login(&self, _code: &str) -> Result<JsonValue, String> {
15        todo!()
16    }
17
18    fn jsapi(
19        &mut self,
20        _sub_mchid: &str,
21        _out_trade_no: &str,
22        _description: &str,
23        _total_fee: f64,
24        _notify_url: &str,
25        _sp_openid: &str,
26    ) -> Result<JsonValue, String> {
27        todo!()
28    }
29
30    fn order_trade(&mut self, _out_trade_no: &str, _sub_mchid: &str) -> Result<JsonValue, String> {
31        todo!()
32    }
33
34    fn refunds(&mut self, _sub_mchid: &str, _out_trade_no: &str, _transaction_id: &str, _out_refund_no: &str, _amount: f64, _total: f64, _currency: &str) -> Result<JsonValue, String> {
35        todo!()
36    }
37}