-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (44 loc) · 1.77 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<title>payple-test</title>
<meta charset="utf-8" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://testcpay.payple.kr/js/cpay.payple.1.0.1.js"></script>
</head>
<body>
<script>
const key = {
cst_id: 'test',
cust_key: 'abcd1234567890',
auth_url: 'https://testcpay.payple.kr/php/auth.php'
}
const form = {
name: '하얀눈',
amount: 11000,
buyer_no: `payple_${ new Date().getMilliseconds() }`,
buyer_email: 'example@example.com',
buyer_name : '김테스트',
buyer_tel: '01012345678'
}
const data = {
PCD_CST_ID: key.cst_id,
PCD_CUST_KEY: key.cust_key,
PCD_AUTH_URL: key.auth_url,
PCD_CPAY_VER: '1.0.1', /* required */
PCD_PAY_TYPE: 'transfer', /* required */
PCD_PAY_WORK: 'PAY', /* required */
PCD_PAY_GOODS: form.name, /* required */
PCD_PAY_TOTAL: form.amount, /* required */
PCD_PAYER_NO: form.buyer_no, /* required */
PCD_PAY_ISTAX: 'N', /* Default: Y, 비과세: N */
PCD_PAYER_EMAIL: form.buyer_email,
PCD_PAYER_NAME: form.buyer_name,
PCD_PAYER_HP: form.buyer_tel,
// PCD_RST_URL: '/redirect.html',
callbackFunction: e => console.log(e)
}
PaypleCpayAuthCheck(data)
</script>
</body>
</html>