forked from SAP-archive/yaas-node-red-contrib-yaas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.html
53 lines (52 loc) · 2.18 KB
/
checkout.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
<script type="text/javascript">
RED.nodes.registerType('checkout',{
category: 'yaas',
color: '#1b91e2',
defaults: {
yaasCustomerCredentials: {type:"yaas-customer-credentials", required:true},
yaasCredentials: {type:"yaas-credentials", required:true},
stripeCredentials : {type:"stripe-credentials", required:true},
siteCode : {value:"main", required:true},
currency : {value:"USD", required:true}
},
inputs: 1,
outputs: 1,
icon: "yaas.png",
paletteLabel: 'checkout',
label: function() {
return 'checkout';
}
});
</script>
<script type="text/x-red" data-template-name="checkout">
<div class="form-row">
<label for="node-input-yaasCustomerCredentials"><i class="fa fa-user"></i> Customer</label>
<input type="text" id="node-input-yaasCustomerCredentials">
</div>
<div class="form-row">
<label for="node-input-yaasCredentials"><i class="fa fa-user-secret"></i> Credentials</label>
<input type="text" id="node-input-yaasCredentials">
</div>
<div class="form-row">
<label for="node-input-stripeCredentials"><i class="fa fa-user-secret"></i> Stripe Credentials</label>
<input type="text" id="node-input-stripeCredentials">
</div>
<div class="form-row">
<label for="node-input-siteCode"><i class="fa fa-globe"></i> Site code</label>
<input type="text" id="node-input-siteCode">
</div>
<div class="form-row">
<label for="node-input-currency"><i class="fa fa-money"></i> Currency</label>
<input type="text" id="node-input-currency">
</div>
</script>
<script type="text/x-red" data-help-name="checkout">
<p>
The Checkout node checks out a shopping cart, of a defined Customer. Therefore the Customer, YaaS and Stripe Credentials have to be defined for this node.
<p>
It is also possible to send the Customer Id (email address) as input (<code>msg.payload</code>). In this case the defined Customer will be ignored.
</p>
<p>
The node returns the Order Id as text in the <code>msg.payload</code>.
</p>
</script>