1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Oinktube/plugin/YPTWallet/plugins/YPTWalletBlockonomics/YPTWalletBlockonomics.php
2021-01-01 17:20:30 +08:00

40 lines
1.1 KiB
PHP

<?php
/**
-2 : PAYMENT_EXPIRED
-1 : PAYMENT_ERROR (Happens when Paid BTC amount is not matching expected value)
0 : UNPAID
1 : IN_PROCESS
2 : PAID
*/
global $global;
require_once $global['systemRootPath'] . 'plugin/YPTWallet/YPTWalletPlugin.php';
class YPTWalletBlockonomics extends YPTWalletPlugin{
public function getAprovalLink() {
global $global;
$plugin = AVideoPlugin::loadPluginIfEnabled("PayPalYPT");
$payment = $plugin->setUpPayment(
$this->getInvoiceNumber(),
$this->getRedirectURL(),
$this->getCancelURL(),
$this->getValue(),
$this->getCurrency());
if (!empty($payment)) {
return $payment->getApprovalLink();
}
return false;
}
public function getAprovalButton() {
global $global;
include $global['systemRootPath'].'plugin/YPTWallet/plugins/YPTWalletBlockonomics/confirmButton.php';
}
public function getEmptyDataObject() {
global $global;
$obj = new stdClass();
return $obj;
}
}