This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Payjs | |
{ | |
private $url = 'https://payjs.cn/api/native'; | |
private $key = ''; // 填写通信密钥 | |
private $mchid = ''; // 特写商户号 | |
public function __construct($data=null) { | |
$this->data = $data; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta name="format-detection" content="email=no"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<link href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css" rel="stylesheet"> | |
<script src="https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$mchid = '**************'; // PAYJS 商户号 | |
$key = '**************'; // 通信密钥 | |
// 构造订单参数 | |
$data = [ | |
'mchid' => $mchid, | |
'body' => '我是一个测试订单标题', | |
'total_fee' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://api.stripe.com/v1/charges \ | |
-d mchid=***** \ | |
-d total_fee=999 \ | |
-d out_trade_no=123412342134 \ | |
-d body="订单标题" \ | |
-d notify_url="https://www.baidu.com" \ | |
-d sign=************ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, urllib2, sys | |
import ssl | |
host = 'https://payjs.cn' | |
path = '/api/native' | |
method = 'POST' | |
bodys = {} | |
url = host + path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using System.IO; | |
//using System.Text; | |
//using System.Net; | |
//using System.Net.Security; | |
//using System.Security.Cryptography.X509Certificates; | |
private const String host = "https://payjs.cn"; | |
private const String path = "/api/native"; | |
private const String method = "POST"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *host = @"https://payjs.cn"; | |
NSString *path = @"/api/native"; | |
NSString *method = @"POST"; | |
NSString *querys = @""; | |
NSString *url = [NSString stringWithFormat:@"%@%@%@", host, path , querys]; | |
NSString *bodys = @"mchid=****&total_fee=12&out_trade_no=2134099892932&sign=******************"; | |
//或者base64 | |
//NSString *bodys = @"image=data:image/jpeg;base64,/9j/4A......"; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: url] cachePolicy:1 timeoutInterval: 5]; | |
request.HTTPMethod = method; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
String host = "https://payjs.cn"; | |
String path = "/api/native"; | |
String method = "POST"; | |
Map<String, String> headers = new HashMap<String, String>(); | |
Map<String, String> querys = new HashMap<String, String>(); | |
Map<String, String> bodys = new HashMap<String, String>(); | |
bodys.put("mchid", "********"); | |
bodys.put("total_fee", "********"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Payjs | |
{ | |
private $url = 'https://payjs.cn/api/refund'; | |
private $key = ''; // 填写通信密钥 | |
private $mchid = ''; // 特写商户号 | |
public function __construct($payjs_order_id=null) { | |
$this->payjs_order_id = $payjs_order_id; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 本代码为演示碎片代码 | |
// 需与文档中小程序章节结合使用 https://help.payjs.cn | |
// 跳转 | |
// 为小程序的支付按钮绑定事件 | |
bindPay: function() { | |
// 待传入的 | |
wx.request({ | |
url: '商户侧后端请求支付参数的网址', |
OlderNewer