pub enum Pay {
Wechat(Wechat),
Alipay(AliPay),
Ccbc(Ccbc),
Yrcc(Yrcc),
None,
}Variants§
Implementations§
Trait Implementations§
Source§impl PayMode for Pay
impl PayMode for Pay
fn notify(&mut self, data: JsonValue) -> Result<JsonValue, String>
fn config(&mut self) -> JsonValue
fn auth(&mut self, code: &str) -> Result<JsonValue, String>
Source§fn pay(
&mut self,
channel: &str,
types: Types,
sub_mchid: &str,
out_trade_no: &str,
description: &str,
total_fee: f64,
sp_openid: &str,
) -> Result<JsonValue, String>
fn pay( &mut self, channel: &str, types: Types, sub_mchid: &str, out_trade_no: &str, description: &str, total_fee: f64, sp_openid: &str, ) -> Result<JsonValue, String>
支付 Read more
fn micropay( &mut self, channel: &str, auth_code: &str, sub_mchid: &str, out_trade_no: &str, description: &str, total_fee: f64, org_openid: &str, ip: &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
fn pay_micropay_query( &mut self, out_trade_no: &str, sub_mchid: &str, ) -> Result<JsonValue, String>
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>
订单退款
fn micropay_refund( &mut self, sub_mchid: &str, out_trade_no: &str, transaction_id: &str, out_refund_no: &str, amount: f64, total: f64, currency: &str, refund_text: &str, ) -> Result<JsonValue, String>
Source§fn refund_notify(
&mut self,
nonce: &str,
ciphertext: &str,
associated_data: &str,
) -> Result<JsonValue, String>
fn refund_notify( &mut self, nonce: &str, ciphertext: &str, associated_data: &str, ) -> Result<JsonValue, String>
退款通知
Auto Trait Implementations§
impl Freeze for Pay
impl RefUnwindSafe for Pay
impl Send for Pay
impl Sync for Pay
impl Unpin for Pay
impl UnwindSafe for Pay
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