Trait PayMode

Source
pub trait PayMode {
Show 18 methods // Required methods fn jsapi_ticket(&mut self, url: &str) -> Result<JsonValue, String>; fn get_openid(&mut self, code: &str) -> Result<JsonValue, String>; fn get_sub_mchid(&mut self, sub_mchid: &str) -> Result<JsonValue, String>; 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>; 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 micropay( &mut self, auth_code: &str, sub_mchid: &str, out_trade_no: &str, description: &str, total_fee: f64, org_openid: &str, ip: &str, ) -> Result<JsonValue, String>; fn close( &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>; fn pay_micropay_query( &mut self, out_trade_no: &str, sub_mchid: &str, ) -> Result<JsonValue, String>; fn pay_notify( &mut self, nonce: &str, ciphertext: &str, associated_data: &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>; fn refund_notify( &mut self, nonce: &str, ciphertext: &str, associated_data: &str, ) -> Result<JsonValue, String>; fn refund_query( &mut self, trade_no: &str, out_refund_no: &str, sub_mchid: &str, ) -> Result<JsonValue, String>; fn incoming( &mut self, business_code: &str, contact_info: JsonValue, subject_info: JsonValue, business_info: JsonValue, settlement_info: JsonValue, bank_account_info: JsonValue, ) -> Result<JsonValue, String>;
}

Required Methods§

Source

fn jsapi_ticket(&mut self, url: &str) -> Result<JsonValue, String>

获取商户号和状态

Source

fn get_openid(&mut self, code: &str) -> Result<JsonValue, String>

Source

fn get_sub_mchid(&mut self, sub_mchid: &str) -> Result<JsonValue, String>

获取商户号和状态

Source

fn notify(&mut self, data: JsonValue) -> Result<JsonValue, String>

Source

fn config(&mut self) -> JsonValue

Source

fn login(&mut self, code: &str) -> Result<JsonValue, String>

Source

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>

支付

  • out_trade_no 商户订单号
  • sub_mchid 子商户号
  • description 商品名称
  • total_fee 支付金额
  • notify_url 通知地址
  • sp_openid 支付客户ID
Source

fn micropay( &mut self, 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 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>

订单查询

  • out_trade_no 商户订单号
  • sub_mchid 子商户号
Source

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>

支付成功通知

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>

订单退款

Source

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>

退款通知

Source

fn refund_query( &mut self, trade_no: &str, out_refund_no: &str, sub_mchid: &str, ) -> Result<JsonValue, String>

退款查询

Source

fn incoming( &mut self, business_code: &str, contact_info: JsonValue, subject_info: JsonValue, business_info: JsonValue, settlement_info: JsonValue, bank_account_info: JsonValue, ) -> Result<JsonValue, String>

进件

Implementors§