Sunday, June 6, 2021

stripe cancel subscription using curl in php

stripe cancel subscription using curl in php

In this post we will show you stripe cancel subscription using curl in php, hear for stripe cancel subscription using curl in php we will give you demo and example for implement.

stripe cancel subscriptionCanceling subscriptions

Subscriptions can be canceled through the API:

1
2
3
   -u sk_test_a85RX6H48G5dfD55FDF77: \
   -X DELETE

Code for stripe cancel subscription using curl in php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function curl_del($path)
{
    // Add your key
    $headers = array('Authorization: Bearer sk_test_a85RX6H48G5dfD55FDF77');
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $path);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $result = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); 
    curl_close($ch);
    return $result;
}
 
// add your subscriptions id
$curl_del = curl_del($path);
echo "<pre>";
print_r($curl_del);
echo "</pre>";

 cSource: https://www.onlinecode.org/stripe-cancel-subscription-using-curl-php/


Saturday, May 29, 2021

jQuery DataTables: ROWSPAN in table body TBODY

 jQuery DataTables plugin doesn’t yet support COLSPAN and ROWSPAN attributes in table body. However there is a RowsGroup plugin for jQuery DataTables that emulates appearance of using ROWSPAN attribute by grouping cells together.

Plugin requires jQuery DataTables version 1.10 or above. According to the author’s post on DataTables forum, this plugin has the following features:

  • supports nested multi grouping rows
  • supports both client-side and server-side processing
  • correctly handles single-column and multi-column ordering

To use the plugin, you need to include JavaScript file dataTables.rowsGroup.js and use rowsGroup option as shown below. Option rowsGroup should be an array of the column selectors in order you want the grouping to be applied.

var table = $('#example').DataTable({
   'rowsGroup': [2]
});

More details on usage can be found on plugin’s project page.

$(document).ready(function(){
   var table = $('#example').DataTable({
      'ajax': 'https://api.myjson.com/bins/qgcu',
      'rowsGroup': [2]
   });
});

In addition to the above code, the following Javascript library files are loaded for use in this example:

//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
https://cdn.datatables.net/v/dt/dt-1.10.12/datatables.min.js
https://cdn.rawgit.com/ashl1/datatables-rowsgroup/fbd569b8768155c7a9a62568e66a64115887d7d0/dataTables.rowsGroup.js


Credits & Source: https://www.gyrocode.com/articles/jquery-datatables-rowspan-in-table-body-tbody/

How to change the PHP version for subfolders or subdomains

  How to change the PHP version for subfolders or subdomains Setting a specific PHP version for a specific websites, subfolders or subdomain...