This repository has been archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
paypal.xml
71 lines (67 loc) · 3.48 KB
/
paypal.xml
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
<extension>
<title>PayPal Extension</title>
<label>PayPal</label>
<copyright>Copyright (c) 2006-2009 MindTouch Inc.</copyright>
<description>Add a PayPal button to your wiki.</description>
<uri.help>http://developer.mindtouch.com/App_Catalog/Paypal</uri.help>
<uri.logo>http://scripts.mindtouch.com/logos/paypal-logo.gif</uri.logo>
<namespace>paypal</namespace>
<config>
<param name="price/{product-name}" type="num">Set the price for the product with name 'product-name'.</param>
<param name="email" type="str">The email for your PayPal account.</param>
</config>
<function>
<name>buynow</name>
<description>Easily add a Buy Now button to your wiki page</description>
<param name="name" type="str">Name of product to sell.</param>
<param name="image" type="uri" optional="true">Custom button image.</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<eval:if test="!config['price'][args.name]">Product name "<eval:expr>args.name</eval:expr>" doesn't exist. Please check your configuration.</eval:if>
<eval:if test="config['price'][args.name]">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" eval:value="config['email']" />
<input type="hidden" name="item_name" eval:value="args.name" />
<input type="hidden" name="amount" eval:value="config['price'][args.name]" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="bn" value="IC_Sample" />
<input type="image" eval:src="args.image ?? 'https://www.paypal.com/en_US/i/btn/x-click-but23.gif'" name="submit" />
<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>
</eval:if>
</body>
</html>
</return>
</function>
<function>
<name>donate</name>
<description>Easily add a Donation button to your wiki page</description>
<param name="name" type="str">Name of product to sell.</param>
<param name="image" type="uri" optional="true">Custom button image.</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<eval:if test="!config['price'][args.name]">Product name "<eval:expr>args.name</eval:expr>" doesn't exist. Please check your configuration.</eval:if>
<eval:if test="config['price'][args.name]">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" eval:value="config['email']" />
<input type="hidden" name="item_name" eval:value="args.name" />
<input type="hidden" name="amount" eval:value="config['price'][args.name]" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="bn" value="IC_Sample" />
<input type="image" eval:src="args.image ?? 'https://www.sandbox.paypal.com/en_US/i/btn/x-click-but21.gif'" name="submit" />
<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>
</eval:if>
</body>
</html>
</return>
</function>
</extension>