This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$headers = [ | |
'Authorization' => 'Token token='.env('PSPDFKIT_TOKEN'), | |
'Content-Type' => "application/pdf", | |
//"Content-Length" => filesize($request->file('attachment')) | |
]; | |
$body = [ | |
'file' => $request->file('attachment'), | |
'document_id' => substr(str_shuffle($permitted_chars), 0, 10) | |
]; | |
$client = new \GuzzleHttp\Client(['base_uri' => 'http://localhost:5000/api/']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function httpRequest($url, $body) { | |
$method = "POST"; | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, $url); | |
curl_setopt($curl, CURLOPT_HEADER, 0); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | |
if ($body) { | |
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($body)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public $base_url = "https://spaceangelsnetwork.api-us1.com"; | |
public $secure_token; | |
public $debug = false; | |
function __construct($secure_token = NULL) { | |
$this->secure_token = config('services.active_campaign.key'); | |
if($secure_token) $this->secure_token = $secure_token; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('viewerLoaded', () => { | |
const docViewer = readerControl.docViewer; | |
// Add customization here | |
docViewer.setMargin(20); | |
readerControl.disableElements([ | |
'searchButton', | |
'stickyToolButton', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("HTTP/1.1 200 OK"); // Forcing the 200 OK header as WP can return 404 otherwise | |
$orders = get_orders_ids_by_product_id(498); | |
$output = array(); | |
foreach($orders as $o){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('form').submit(function(e){ | |
var button = $(this).find('button[type="submit"]'); | |
var text = button.text(); | |
var loader = '../images/spinner.gif'; | |
button.attr("disabled", true); | |
button.text('').append('<img src="/static/images/spinner-solid.svg" class="spinner" alt="loader">') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remote: -----> Installing dependencies... | |
remote: Composer version 1.9.0 2019-08-02 20:55:32 | |
remote: Loading composer repositories with package information | |
remote: Installing dependencies from lock file | |
remote: Package operations: 2 installs, 0 updates, 0 removals | |
remote: - Installing setasign/setapdf-core (2.32.0.1371): Downloading (75%) | |
remote: | |
remote: [Composer\Downloader\TransportException] | |
remote: The 'https://www.setasign.com/downloads/2298773/SetaPDF-Core_2.32.0.1371-without-demos.zip' URL required authentication. | |
remote: You must be using the interactive console to authenticate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//config/queue.php | |
<?php | |
return [ | |
'default' => env('QUEUE_CONNECTION', 'database'), | |
'connections' => [ | |
'sync' => [ | |
'driver' => 'redis', | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fit = true; | |
$path = base_path().'/public'; | |
$file = $path .'/forms/doc-27.pdf'; | |
$docDeal = str_replace(' ', '-', strtolower($deal->name)); | |
$docInvestor = str_replace(' ', '-', strtolower($user->name)); | |
$date = date('m-d-Y'); | |
$signature = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $request->base64_signature)); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
$writer = new SetaPDF_Core_Writer_Http('output.pdf', true); | |
$document = SetaPDF_Core_Document::loadByFilename('test.pdf', $writer); | |
$formFiller = new SetaPDF_FormFiller($document); | |
$fields = $formFiller->getFields(); | |
$stamper = new SetaPDF_Stamper($document); |
NewerOlder