forked from cloudappsetup/html5-dg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (36 loc) · 893 Bytes
/
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
<!-- INSERT SCRIPT INCLUDES INTO PAGE BODY -->
<script src="https://www.paypalobjects.com/js/external/dg.js"></script>
<script src="client/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="client/pptransact.js"></script>
<input type="button" onclick="bill()" value="Bill" />
<input type="button" onclick="verify()" value="Verify" />
<script>
//INITIALIZE SESSION WITH APPROPRIATE LANGUAGE
pptransact.init('php',true);
//CALL BILL FUNCTION TO INITIALIZE BILL
function bill(){
pptransact.bill({
userId:'888888',
itemId:'123',
itemQty:'1',
successCallback: function(data){
//bill success
},
failCallback: function(data){
//bill cancelled
}
});
}
function verify(){
pptransact.verify({
userId:'888888',
itemId:'123',
successCallback: function(data){
//verify success
},
failCallback: function(data){
//verify failed
}
});
}
</script>