Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="order3">
- <h1 class="page-title">##cart_title##:</h1>
- <div class="EFBlock rounded-small MrgnT">
- <form action="/##lang##/cart_lighttv_login" method="post" name="orderF">
- <table class="fixed width100p middle PdngBase">
- <tr class="title cufon">
- <th style="width:60px;border-left:1px;">##cart_amount##</th>
- <th style="text-align:left;"><span class="green">##cart_product##</span></th>
- <th style="width:100px;">##cart_price##</th>
- <th style="width:120px;border-right:0px;">##cart_sum##</th>
- </tr>
- ##cart_content##
- <div id="error" class="error5">##cart_please_select_payment_type##</div>
- <div class="submit-line relative floats">
- <a href="/##lang##/##cart_order_type##" class="button green-button-prev100" style="float:left;text-decoration:none;"><span class="cufon">##order1_back##</span></a>
- <a onclick="checkCartContent();" class="button green-button-next100" style="text-decoration:none;"><span class="cufon">##order1_next##</span></a>
- </div>
- <input type="hidden" name="checkOrdCode" value="##cart_check_code##"/>
- </form>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- {
- var body = {
- "stamp": "29858472953",
- "reference": "9187445",
- "amount": 1590,
- "currency": "EUR",
- "language": "FI",
- "items": [
- {
- "unitPrice": 1590,
- "units": 1,
- "vatPercentage": 24,
- "productCode": "#927502759",
- "deliveryDate": "2018-03-07",
- "description": "Cat ladder",
- "category": "Pet supplies",
- "merchant": "375917",
- "stamp": "29858472952",
- "reference": "9187445"
- }
- ],
- "customer": {
- "email": "erja.esimerkki@example.org",
- "firstName": "Erja",
- "lastName": "Esimerkki",
- "phone": "+358501234567",
- "vatId": "FI12345671"
- },
- "deliveryAddress": {
- "streetAddress": "Eteläpuisto 2 C",
- "postalCode": "33200",
- "city": "Tampere",
- "county": "Pirkanmaa",
- "country": "FI"
- },
- "invoicingAddress": {
- "streetAddress": "Gebhardinaukio 1",
- "postalCode": "00510",
- "city": "Helsinki",
- "county": "Uusimaa",
- "country": "FI"
- },
- "redirectUrls": {
- "success": "https://ecom.example.org/success",
- "cancel": "https://ecom.example.org/cancel"
- },
- "callbackUrls": {
- "success": "https://ecom.example.org/success",
- "cancel": "https://ecom.example.org/cancel"
- }
- }
- };
- console.log(body);
- var url = 'https://api.checkout.fi';
- $.ajax({
- url: url,
- // headers: {
- // 'Content-Type':'application/x-www-form-urlencoded'
- // },
- method: 'POST',
- dataType: 'json',
- data: body,
- success: function(data){
- console.log('succes: '+data);
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement