pub struct AliPay {
pub appid: String,
pub sp_mchid: String,
pub app_auth_token: String,
pub app_private: String,
pub content_encryp: String,
pub alipay_public_key: String,
pub notify_url: String,
}Fields§
§appid: String应用appid
sp_mchid: String服务商商家号
app_auth_token: String授权token
app_private: String应用私钥证书路径
content_encryp: String接口内容加密密钥
alipay_public_key: String支付宝公钥
notify_url: StringImplementations§
Trait Implementations§
Source§impl PayMode for AliPay
impl PayMode for AliPay
fn notify(&mut self, data: JsonValue) -> Result<JsonValue, String>
fn config(&mut self) -> JsonValue
fn login(&mut self, code: &str) -> Result<JsonValue, String>
fn auth(&mut self, code: &str) -> Result<JsonValue, String>
Source§fn pay(
&mut self,
types: Types,
sub_mchid: &str,
out_trade_no: &str,
description: &str,
total_fee: f64,
sp_openid: &str,
) -> Result<JsonValue, String>
fn pay( &mut self, types: Types, sub_mchid: &str, out_trade_no: &str, description: &str, total_fee: f64, sp_openid: &str, ) -> Result<JsonValue, String>
支付 Read more
Source§fn close(
&mut self,
_out_trade_no: &str,
_sub_mchid: &str,
) -> Result<JsonValue, String>
fn close( &mut self, _out_trade_no: &str, _sub_mchid: &str, ) -> Result<JsonValue, String>
关闭订单
Source§fn pay_query(
&mut self,
out_trade_no: &str,
sub_mchid: &str,
) -> Result<JsonValue, String>
fn pay_query( &mut self, out_trade_no: &str, sub_mchid: &str, ) -> Result<JsonValue, String>
订单查询 Read more
Source§fn pay_notify(
&mut self,
_nonce: &str,
_ciphertext: &str,
_associated_data: &str,
) -> Result<JsonValue, String>
fn pay_notify( &mut self, _nonce: &str, _ciphertext: &str, _associated_data: &str, ) -> Result<JsonValue, String>
支付成功通知
Source§fn refund(
&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>
fn refund( &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>
订单退款
Auto Trait Implementations§
impl Freeze for AliPay
impl RefUnwindSafe for AliPay
impl Send for AliPay
impl Sync for AliPay
impl Unpin for AliPay
impl UnwindSafe for AliPay
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