pub struct Wechat {
pub appid: String,
pub secret: String,
pub mchid: String,
pub serial_no: String,
pub cert_path: String,
}Fields§
§appid: String服务商APPID
secret: String密钥
mchid: String服务商户号
serial_no: String证书号
cert_path: String证书路径
Implementations§
Trait Implementations§
Source§impl PayMode for Wechat
impl PayMode for Wechat
fn login(&self, code: &str) -> Result<JsonValue, String>
Source§fn jsapi(
&mut self,
sub_mchid: &str,
out_trade_no: &str,
description: &str,
total_fee: f64,
notify_url: &str,
sp_openid: &str,
) -> Result<JsonValue, String>
fn jsapi( &mut self, sub_mchid: &str, out_trade_no: &str, description: &str, total_fee: f64, notify_url: &str, sp_openid: &str, ) -> Result<JsonValue, String>
JSAPI 支付 Read more
Auto Trait Implementations§
impl Freeze for Wechat
impl RefUnwindSafe for Wechat
impl Send for Wechat
impl Sync for Wechat
impl Unpin for Wechat
impl UnwindSafe for Wechat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more