本文整理汇总了PHP中Am_Paysystem_Abstract::isNotAcceptableForInvoice方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Paysystem_Abstract::isNotAcceptableForInvoice方法的具体用法?PHP Am_Paysystem_Abstract::isNotAcceptableForInvoice怎么用?PHP Am_Paysystem_Abstract::isNotAcceptableForInvoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Paysystem_Abstract
的用法示例。
在下文中一共展示了Am_Paysystem_Abstract::isNotAcceptableForInvoice方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($invoice->rebill_times) {
return "Interkassa cannot handle products with recurring payment plan";
}
return parent::isNotAcceptableForInvoice($invoice);
}
示例2: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if (!in_array($invoice->rebill_times, array(0, IProduct::RECURRING_REBILLS))) {
return 'Can not handle invoice with defined rebill times';
}
return parent::isNotAcceptableForInvoice($invoice);
}
示例3: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($invoice->rebill_times && $invoice->first_period != $invoice->second_period) {
return "WorldPay cannot handle products with different first and second period";
}
return parent::isNotAcceptableForInvoice($invoice);
}
示例4: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($err = parent::isNotAcceptableForInvoice($invoice)) {
return $err;
}
if ($invoice->rebill_times >= 1 && ($err = $this->checkPeriod(new Am_Period($invoice->first_period)))) {
return array($err);
}
if ($invoice->rebill_times >= 2 && ($err = $this->checkPeriod(new Am_Period($invoice->second_period)))) {
return array($err);
}
}
示例5: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($ret = parent::isNotAcceptableForInvoice($invoice)) {
return $ret;
}
foreach ($invoice->getItems() as $item) {
if (!(double) $item->first_total && (double) $item->second_total) {
return array("2Checkout does not support products with free trial");
}
if ($item->rebill_times && $item->second_period != $item->first_period) {
return array(___("2Checkout is unable to handle billing for product [{$item->item_title}] - second_period must be equal to first_period"));
}
}
}
示例6: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($invoice->first_period != $invoice->second_period) {
return ___('Can not handle this billing terms');
}
if ($invoice->rebill_times != IProduct::RECURRING_REBILLS) {
return ___('Can not handle this billing terms');
}
$period = new Am_Period($invoice->first_period);
if (!in_array($period->getUnit(), array('m', 'w', 'y')) || $period->getCount() != 1) {
return ___('Can not handle this billing terms');
}
return parent::isNotAcceptableForInvoice($invoice);
}
示例7: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($err = parent::isNotAcceptableForInvoice($invoice)) {
return $err;
}
if ($invoice->rebill_times >= 1 && ($err = $this->checkPeriod(new Am_Period($invoice->first_period)))) {
return array($err);
}
if ($invoice->rebill_times >= 2 && ($err = $this->checkPeriod(new Am_Period($invoice->second_period)))) {
return array($err);
}
if ($invoice->rebill_times != IProduct::RECURRING_REBILLS && $invoice->rebill_times > 52) {
return array('PayPal can not handle subscription terms with number of rebills more than 52');
}
}
示例8: isNotAcceptableForInvoice
public function isNotAcceptableForInvoice(Invoice $invoice)
{
if ($invoice->rebill_times) {
$first_period = new Am_Period($invoice->first_period);
if (!(double) $invoice->first_total) {
return ___('Can not handle this billing terms');
}
if ($invoice->first_period != $invoice->second_period && $first_period->getUnit() != 'd') {
return ___('Can not handle this billing terms');
}
if (!in_array($invoice->second_period, array_keys($this->rebill_type_map))) {
return ___('Can not handle this billing terms');
}
}
return parent::isNotAcceptableForInvoice($invoice);
}
示例9: isNotAcceptableForInvoice
function isNotAcceptableForInvoice(Invoice $invoice)
{
if (!$invoice->first_total) {
return "Free trials are not supported!";
}
if ($invoice->rebill_times) {
try {
$this->getPeriod($invoice->second_period);
} catch (Exception $e) {
return $e->getMessage();
}
}
return parent::isNotAcceptableForInvoice($invoice);
}