-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasptest.asp
More file actions
51 lines (36 loc) · 1.03 KB
/
asptest.asp
File metadata and controls
51 lines (36 loc) · 1.03 KB
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
<html>
<head>
<title>Calling Zarinpal web service from classic ASP</title>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient")
oSOAP.ClientProperty("ServerHTTPRequest") = True
oSOAP.mssoapinit("https://www.zarinpal.com/pg/services/WebGate/wsdl")
Dim orderId
Dim amount
orderId = Request("ordertext")
amount = Request("amounttext")
Dim authority
Dim desc
desc = "سفارش شماره: " & orderId;
authority = 0
CALL oSOAP.PaymentRequest( "YOUR MERCHENT CODE", amount, "http://www.yoursite.com/callbackpage.asp", desc, authority)
IF Len(authority) = 36 THEN
Response.Redirect( "https://www.zarinpal.com/pg/StartPay/" & authority )
End IF
End If
%>
<FORM method=POST name="form1">
Order Id :
<INPUT type="text" name="ordertext">
<br>
Amount :
<INPUT type="text" name="amounttext" ID="Text1">
<br>
<br>
<INPUT type="submit" value="Start Pay" name="submitPay">
</form>
</body>
</html>