Newer
Older
<?php
namespace QUI\ERP\Payments\Stripe\PaymentMethods;
use QUI;
use QUI\ERP\Accounting\Invoice\Invoice;
use QUI\ERP\Accounting\Invoice\InvoiceView;
use QUI\ERP\Accounting\Payments\Payments;
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* Class ApplePay
*
* Payment via Apple Pay
*/
class ApplePay extends AbstractBrowserPay
{
/**
* @return string
*/
public function getTitle()
{
return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.ApplePay.title');
}
/**
* @return string
*/
public function getDescription()
{
return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.ApplePay.description');
}
/**
* Get title for frontend
*
* @return string
*/
public function getFrontendTitle()
{
return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.frontend.ApplePay.title');
}
/**
* Get description for frontend
*
* @return string
*/
public function getFrontendDescription()
{
return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.frontend.ApplePay.description');
}
/**
* Get title for the Payment step (OrderProcess)
*
* @return string
*/
public function getPaymentStepTitle()
{
return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.PaymentStep.title.ApplePay');
}
/**
* Get description step for the Payment step (OrderProcess)
*
* @return string
*/
public function getPaymentStepInfo()
{
return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.PaymentStep.info.ApplePay');
}
/**
* Get type of Browser this BrowserPay works with
*
* @return string[]
public function getBrowserTypes()
return [
\Browser::BROWSER_IPHONE,
\Browser::BROWSER_IPAD,
\Browser::BROWSER_SAFARI
];
/**
* Return the payment icon (the URL path)
* Can be overwritten
*
* @return string
*/
public function getIcon()
{
return Payments::getInstance()->getHost().
URL_OPT_DIR.
'quiqqer/payment-stripe/bin/images/Payment_ApplePay.png';
}
/**
* Return the extra text for the invoice
*
* @param Invoice|InvoiceView $Invoice
* @return mixed
*/
public function getInvoiceInformationText($Invoice)
{
try {
return $Invoice->getCustomer()->getLocale()->get(
'quiqqer/payment-stripe',
'additional_invoice_text.ApplePay'
);
} catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception);
return '';
}
}