This repository has been archived by the owner on Feb 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: duplicate index inclusion, new api library block missing.
- Loading branch information
Showing
2 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
app/code/local/Ebizmarts/SagePaySuite/Block/ApiLibrary.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* SagePaySuite PI integration library inclusion | ||
* | ||
* @category Ebizmarts | ||
* @package Ebizmarts_SagePaySuite | ||
* @author Ebizmarts <[email protected]> | ||
*/ | ||
class Ebizmarts_SagePaySuite_Block_ApiLibrary extends Mage_Core_Block_Template | ||
{ | ||
|
||
/** | ||
* Return URL for API Library | ||
* | ||
* @return string | ||
*/ | ||
public function getAPIUrl() | ||
{ | ||
$piModel = Mage::getModel('sagepaysuite/sagePayNit'); | ||
return $piModel->getUrl("api"); | ||
} | ||
|
||
/** | ||
* Disable url inclusion if not enabled | ||
* | ||
* @return string | ||
*/ | ||
protected function _toHtml() | ||
{ | ||
if(false === Mage::getStoreConfigFlag('payment/sagepaynit/active')){ | ||
return ''; | ||
} | ||
return parent::_toHtml(); | ||
} | ||
} |
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