first commit
This commit is contained in:
30
plugins/stSantanderRatyPlugin/lib/stSantander.class.php
Normal file
30
plugins/stSantanderRatyPlugin/lib/stSantander.class.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
class stSantander
|
||||
{
|
||||
public function checkPaymentConfiguration()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function getCalculateRateUrl($total_amount)
|
||||
{
|
||||
$config = stConfig::getInstance('stSantanderRatyBackend');
|
||||
|
||||
return 'https://wniosek.eraty.pl/symulator/oblicz/numerSklepu/'.$config->get('shop_number').'/typProduktu/0/wartoscTowarow/'.$total_amount;
|
||||
}
|
||||
|
||||
public static function getFormUrl()
|
||||
{
|
||||
return 'https://wniosek.eraty.pl/formularz/';
|
||||
}
|
||||
|
||||
public static function isActive()
|
||||
{
|
||||
if (!PaymentTypePeer::isActive('stSantander')) return false;
|
||||
|
||||
$eraty = new stSantander();
|
||||
if (!$eraty->checkPaymentConfiguration()) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user