123456789101112131415161718192021222324252627282930313233 |
- import Alipay from 'react-native-yunpeng-alipay';
- export default class aliPay {
- /**
- * 支付宝支付
- * @param {Object} params_body 参数Object {partner:"",seller_id:"",out_trade_no:"",subject:"",body:"",total_fee:"",notify_url:"",service:"",payment_type:"",_input_charset:"",it_b_pay:"",sign:"",sign_type:""}
-
- */
- static pay(params_body) {
- let data = 'partner=' + params_body.partner + '&';
- 'seller_id=' + params_body.seller_id + '&';
- 'out_trade_no=' + params_body.out_trade_no + '&';
- 'subject=' + params_body.subject + '&';
- 'body=' + params_body.body + '&';
- 'total_fee=' + params_body.total_fee + '&';
- 'notify_url=' + params_body.notify_url + '&';
- 'service=' + params_body.service + '&';
- 'payment_type=' + params_body.payment_type + '&';
- '_input_charset=' + params_body._input_charset + '&';
- 'it_b_pay=' + params_body.it_b_pay + '&';
- 'sign=' + params_body.sign + '&';
- 'sign_type=' + params_body.sign_type;
- Alipay.pay(data).then(
- function(data) {
- console.log(data);
- },
- function(err) {
- console.log(err);
- }
- );
- }
- }
|