Skip to content

Commit 1966a3a

Browse files
authored
Merge pull request #26 from PayU-EMEA/ver2
Varsion 2.0
2 parents ba281ee + 000a996 commit 1966a3a

File tree

139 files changed

+2482
-3958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+2482
-3958
lines changed

Api/AcceptOrderPaymentInterface.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,12 @@
44

55
use Magento\Payment\Gateway\Command\CommandException;
66

7-
/**
8-
* Interface AcceptOrderPaymentInterface
9-
*/
107
interface AcceptOrderPaymentInterface
118
{
129
/**
1310
* Accept order payment by capture payment, generate invoice and send email invoice email to customer
1411
*
15-
* @param string $txnId
16-
* @param float $amount
17-
* @param string|null $paymentId
18-
*
19-
* @return void
2012
* @throws CommandException
2113
*/
22-
public function execute($txnId, $amount, $paymentId = null);
14+
public function execute(string $txnId, float $amount, string $paymentId = null): void;
2315
}

Api/CancelOrderPaymentInterface.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@
22

33
namespace PayU\PaymentGateway\Api;
44

5-
/**
6-
* Interface CancelOrderPaymentInterface
7-
*/
85
interface CancelOrderPaymentInterface
96
{
10-
/**
11-
* Cancel order payment by cancel method
12-
*
13-
* @param string $txnId
14-
* @param float $amount
15-
*
16-
* @return void
17-
*/
18-
public function execute($txnId, $amount);
7+
public function execute(string $txnId, float $amount): void;
198
}

Api/CreateOrderResolverInterface.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

Api/GetAvailableLocaleInterface.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,10 @@
22

33
namespace PayU\PaymentGateway\Api;
44

5-
/**
6-
* Interface GetAvailableLocaleInterface
7-
* @package PayU\PaymentGateway\Api
8-
*/
95
interface GetAvailableLocaleInterface
106
{
117
/**
128
* Get current language Provide option to get only language from array parametes
13-
*
14-
* @param array $availableLanguages
15-
*
16-
* @return string
179
*/
18-
public function execute(array $availableLanguages = []);
10+
public function execute(array $availableLanguages = []): string;
1911
}

Api/PayUConfigInterface.php

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
*/
99
interface PayUConfigInterface
1010
{
11+
12+
/**
13+
* Redirect url key for UI
14+
*/
15+
const REDIRECT_URI_FIELD = 'redirectUri';
16+
1117
/**
1218
* Method code key
1319
*/
@@ -28,6 +34,11 @@ interface PayUConfigInterface
2834
*/
2935
const PAYU_SHOW_CVV_WIDGET = 'payuShowCvvWidget';
3036

37+
/**
38+
* Response status key
39+
*/
40+
const PAYU_RESPONSE_STATUS = 'payu_response_status';
41+
3142
/**
3243
* Sanbox code
3344
*/
@@ -56,12 +67,12 @@ interface PayUConfigInterface
5667
/**
5768
* PayU logo static link
5869
*/
59-
const PAYU_BANK_TRANSFER_LOGO_SRC = 'PayU_PaymentGateway::images/payu_logo.png';
70+
const PAYU_BANK_TRANSFER_LOGO_SRC = 'PayU_PaymentGateway::images/payu-logo.svg';
6071

6172
/**
6273
* PayU card logo static link
6374
*/
64-
const PAYU_CC_TRANSFER_LOGO_SRC = 'PayU_PaymentGateway::images/payu_cards.png';
75+
const PAYU_CC_TRANSFER_LOGO_SRC = 'PayU_PaymentGateway::images/card-visa-mc.svg';
6576

6677
/**
6778
* Pay by links code
@@ -95,20 +106,6 @@ interface PayUConfigInterface
95106
self::PAYU_BROWSER_LANGUAGE,
96107
];
97108

98-
/**
99-
* Get cache config
100-
*
101-
* @return PayUCacheConfigInterface
102-
*/
103-
public function getCacheConfig();
104-
105-
/**
106-
* Get Merchant POS ID
107-
*
108-
* @return string
109-
*/
110-
public function getMerchantPosiId();
111-
112109
/**
113110
* Set Environment SECURE|SANDBOX
114111
*
@@ -184,12 +181,9 @@ public function setCustomerExtId($customerId);
184181
/**
185182
* Set default config
186183
*
187-
* @param string $code
188-
* @param int|null $storeId
189-
*
190184
* @return $this
191185
*/
192-
public function setDefaultConfig($code, $storeId = null);
186+
public function setDefaultConfig(string $code, int $storeId = null): self;
193187

194188
/**
195189
* Set gateway config code
@@ -225,25 +219,11 @@ public function isStoreCardEnable();
225219
*/
226220
public function isRepaymentActive($code);
227221

228-
/**
229-
* Get Multi Currency Pricing Partner ID
230-
*
231-
* @return string
232-
*/
233-
public function getMultiCurrencyPricingPartnerId();
234-
235222
/**
236223
* Get payment methods order
237224
*
238225
* @return array
239226
*/
240227
public function getPaymentMethodsOrder();
241228

242-
/**
243-
* Get is enable currency rates for credit card
244-
*
245-
* @return bool
246-
*/
247-
public function isCrediCardCurrencyRates();
248-
249229
}

Api/PayUCreateOrderInterface.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

Api/PayUGetMultiCurrencyPricingInterface.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

Api/PayUGetOrderInterface.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

Api/PayUGetPayMethodsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface PayUGetPayMethodsInterface
2929
* @return array
3030
* @throws \OpenPayU_Exception
3131
*/
32-
public function execute();
32+
public function execute(string $code): array;
3333

3434
/**
3535
* Convert execute method to Json

Api/PayUMcpExchangeRateResolverInterface.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)