-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathRefundTransaction.php
More file actions
98 lines (89 loc) · 2.79 KB
/
RefundTransaction.php
File metadata and controls
98 lines (89 loc) · 2.79 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!--
RefundTransaction.html
This is the main page for RefundTransaction sample.
This page allow the user to enter the required
parameters for RefundTransaction API call and a Submit button
that calls RefundReceipt.php.
Called by index.html.
Calls RefundReceipt.php.
-->
<?php
$transaction_id = $_REQUEST['transaction_id'];
if(!isset($transaction_id))
$transaction_id='';
$amount = $_REQUEST['amount'];
if(!isset($amount))
$amount = '0.00';
$currency = $_REQUEST['currency'];
if(!isset($currency))
$currency = 'USD';
?>
<html>
<head>
<title>PayPal PHP SDK - RefundTransaction API</title>
<link href="sdk.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br>
<center>
<font size=2 color=black face=Verdana><b>RefundTransaction</b></font>
<br><br>
<form method="POST" action="RefundReceipt.php">
<table class="api">
<tr>
<td class="thinfield">
Transaction ID:</td>
<td>
<input type="text" name="transactionID" value=<?php echo $transaction_id;?>></td>
<td><b>(Required)</b></td>
</tr>
<tr>
<td class="thinfield">
Refund Type:</td>
<td>
<select name="refundType">
<option value="Full">Full</option>
<option value="Partial">Partial</option>
</select>
</td>
</tr>
<tr>
<td class="thinfield">
Amount:</td>
<td>
<input type="text" name="amount" value=<?php echo $amount;?> />
<select name="currency">
<?php
$cur_list = array('USD', 'GBP', 'EUR', 'JPY', 'CAD', 'AUD');
for($s=0; $s < sizeof($cur_list); $s++) {
$selected = (!strcmp($currency, $cur_list[$s])) ? 'selected' : '';
?>
<option ><?php echo $cur_list[$s];?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td />
<td>
<b>(Required if Partial Refund)</b>
</td>
</tr>
<tr>
<td class="thinfield">
Memo:</td>
<td>
<textarea name="memo" cols="30" rows="4"></textarea></td>
</tr>
<tr>
<td class="thinfield">
</td>
<td>
<input type="Submit" value="Submit" /></td>
</tr>
</table>
</form>
</center>
<a class="home" id="CallsLink" href="index.html">Home</a>
</body>
</html>