forked from toxcox/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfulfillorder.php
39 lines (34 loc) · 1.05 KB
/
fulfillorder.php
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
<?php
// Load WP environment
require_once('../../../wp-load.php');
require_once('PaypalDigitalDownload_Plugin.php');
/**
* @param array $paymentInfoArray
*/
function fulfill_order($paymentInfoArray)
{
$plugin = new PaypalDigitalDownload_Plugin;
?>
<html>
<body>
<p>This CFDB Editor download link will be good for 24 hours:</p>
<p><a href="<?php echo $plugin->generateDownloadLink() ?>">contact-form-to-database-extension-edit.zip</a></p>
<p>If you have any problems with the download, please contact <a href="mailto:[email protected]">[email protected]</a></p>
</body>
</html>
<?php
try{
$cfdb_data= (object) array(
'title' => 'Paypal',
'posted_data' => $paymentInfoArray,
'uploaded_files' => null
);
do_action_ref_array( 'cfdb_submit', array( &$cfdb_data ) );
}
catch (Exception $ex) {
error_log(sprintf('CFDB Error: %s:%s %s %s', $ex->getFile(), $ex->getLine(), $ex->getMessage(), $ex->getTraceAsString()),
1,
}
}
?>