Skip to content

Commit 907ceda

Browse files
Deyjandiactions-user
authored andcommitted
Fix styling
1 parent 6434a90 commit 907ceda

13 files changed

+179
-175
lines changed

src/Commands/RequestWebhookKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function handle(): int
1919
{
2020
$this->envPath = base_path('.env');
2121

22-
if (env(self::ENV_KEY) && !$this->option('force')) {
22+
if (env(self::ENV_KEY) && ! $this->option('force')) {
2323
if ($this->confirm('Webhook verification key already exists. Do you wish to continue?')) {
2424
$this->replaceEnvKey();
2525
} else {

src/Enums/VivaWalletEnv.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function requestWebhookKey(): array
2626
},
2727
'options' => [
2828
'auth' => ClientAuth::basic(config(self::CFG_KEY_USERNAME), config(self::CFG_KEY_PASSWORD)),
29-
]
29+
],
3030
];
3131
}
3232

@@ -41,8 +41,8 @@ public function requestToken(): array
4141
'options' => [
4242
'auth' => ClientAuth::basic(config(self::CFG_KEY_CLIENT_ID), config(self::CFG_KEY_CLIENT_SECRET)),
4343
'headers' => ['Content-Type' => 'application/x-www-form-urlencoded'],
44-
'form_params' => ['grant_type' => 'client_credentials']
45-
]
44+
'form_params' => ['grant_type' => 'client_credentials'],
45+
],
4646
];
4747
}
4848

@@ -57,10 +57,10 @@ public function createOrder(array $data): array
5757
'options' => [
5858
'headers' => [
5959
'Authorization' => ClientAuth::token(VivaWalletToken::getInstance()),
60-
'Content-Type' => 'application/json'
60+
'Content-Type' => 'application/json',
6161
],
6262
'json' => $data,
63-
]
63+
],
6464
];
6565
}
6666

@@ -83,8 +83,8 @@ public function retrieveTransaction(string $transaction_id): array
8383
'options' => [
8484
'headers' => [
8585
'Authorization' => ClientAuth::token(VivaWalletToken::getInstance()),
86-
]
87-
]
86+
],
87+
],
8888
];
8989
}
9090
}

src/Enums/VivaWalletEventId.php

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -41,72 +41,72 @@ enum VivaWalletEventId: int
4141
public static function type(self $value): string
4242
{
4343
return match ($value) {
44-
self::Undefined => 'System',
45-
self::Incomplete3dsFlow => 'User',
46-
self::Failed3DSValidation => 'User',
47-
self::PaymentsPolicyAcquiringRestriction => 'System',
48-
self::ReferToCardIssuer => 'Issuer',
49-
self::InvalidMerchantNumber => 'Issuer',
50-
self::PickUpCard => 'Issuer',
51-
self::DoNotHonor => 'Issuer',
52-
self::GeneralError => 'Issuer',
53-
self::InvalidTransaction => 'Issuer',
54-
self::InvalidAmount => 'System',
55-
self::InvalidCardNumber => 'User',
56-
self::InvalidIssuer => 'System',
57-
self::FormatError => 'System',
58-
self::LostCard => 'Issuer',
59-
self::StolenCard => 'User',
60-
self::InsufficientFunds => 'Issuer',
61-
self::ExpiredCard => 'User',
62-
self::FunctionNotPermittedToCardholder => 'Issuer',
63-
self::FunctionNotPermittedToTerminal => 'Issuer',
64-
self::WithdrawalLimitExceeded => 'Issuer',
65-
self::RestrictedCard => 'Issuer',
66-
self::IssuerResponseSecurityViolation => 'Issuer',
67-
self::SoftDecline => 'Issuer',
68-
self::CallIssuer => 'Issuer',
69-
self::PinEntryTriesExceeded => 'User',
70-
self::ToAccountIsInvalidOrNonExistent => 'System',
71-
self::SystemMalfunction => 'System',
72-
self::GenericError => 'System',
73-
self::SoftDecline2 => 'Issuer',
44+
self::Undefined => 'System',
45+
self::Incomplete3dsFlow => 'User',
46+
self::Failed3DSValidation => 'User',
47+
self::PaymentsPolicyAcquiringRestriction => 'System',
48+
self::ReferToCardIssuer => 'Issuer',
49+
self::InvalidMerchantNumber => 'Issuer',
50+
self::PickUpCard => 'Issuer',
51+
self::DoNotHonor => 'Issuer',
52+
self::GeneralError => 'Issuer',
53+
self::InvalidTransaction => 'Issuer',
54+
self::InvalidAmount => 'System',
55+
self::InvalidCardNumber => 'User',
56+
self::InvalidIssuer => 'System',
57+
self::FormatError => 'System',
58+
self::LostCard => 'Issuer',
59+
self::StolenCard => 'User',
60+
self::InsufficientFunds => 'Issuer',
61+
self::ExpiredCard => 'User',
62+
self::FunctionNotPermittedToCardholder => 'Issuer',
63+
self::FunctionNotPermittedToTerminal => 'Issuer',
64+
self::WithdrawalLimitExceeded => 'Issuer',
65+
self::RestrictedCard => 'Issuer',
66+
self::IssuerResponseSecurityViolation => 'Issuer',
67+
self::SoftDecline => 'Issuer',
68+
self::CallIssuer => 'Issuer',
69+
self::PinEntryTriesExceeded => 'User',
70+
self::ToAccountIsInvalidOrNonExistent => 'System',
71+
self::SystemMalfunction => 'System',
72+
self::GenericError => 'System',
73+
self::SoftDecline2 => 'Issuer',
7474
};
7575
}
7676

7777
public static function explanation(self $value): string
7878
{
7979
return match ($value) {
80-
self::Undefined => 'Undefined.',
81-
self::Incomplete3dsFlow => 'Browser closed before authentication finished.',
82-
self::Failed3DSValidation => 'Wrong password or two-factor auth code entered.',
83-
self::PaymentsPolicyAcquiringRestriction => 'Payments Policy Acquiring Restriction.',
84-
self::ReferToCardIssuer => 'The issuing bank prevented the transaction.',
85-
self::InvalidMerchantNumber => 'Security violation (source is not correct issuer).',
86-
self::PickUpCard => 'The card has been designated as lost or stolen.',
87-
self::DoNotHonor => 'The issuing bank declined the transaction without an explanation.',
88-
self::GeneralError => 'The card issuer has declined the transaction as there is a problem with the card number.',
89-
self::InvalidTransaction => 'The bank has declined the transaction because of an invalid format or field. This indicates the card details were incorrect.',
90-
self::InvalidAmount => 'The card issuer has declined the transaction because of an invalid format or field.',
91-
self::InvalidCardNumber => 'The card issuer has declined the transaction as the credit card number is incorrectly entered or does not exist.',
92-
self::InvalidIssuer => 'The card issuer doesn\'t exist.',
93-
self::FormatError => 'The card issuer does not recognise the transaction details being entered. This is due to a format error.',
94-
self::LostCard => 'The card issuer has declined the transaction as the card has been reported lost.',
95-
self::StolenCard => 'The card has been designated as lost or stolen.',
96-
self::InsufficientFunds => 'The card has insufficient funds to cover the cost of the transaction.',
97-
self::ExpiredCard => 'The payment gateway declined the transaction because the expiration date is expired or does not match.',
98-
self::FunctionNotPermittedToCardholder => 'The card issuer has declined the transaction as the credit card cannot be used for this type of transaction.',
99-
self::FunctionNotPermittedToTerminal => 'The card issuer has declined the transaction as the credit card cannot be used for this type of transaction.',
100-
self::WithdrawalLimitExceeded => 'Exceeds withdrawal amount limit.',
101-
self::RestrictedCard => 'The customer\'s bank has declined their card.',
102-
self::IssuerResponseSecurityViolation => 'Flag raised due to security validation problem.',
103-
self::SoftDecline => 'The issuer requests Strong Customer Authentication. The merchant should retry the transaction after successfully authenticating customer with 3DS first.',
104-
self::CallIssuer => 'Contact card issuer.',
105-
self::PinEntryTriesExceeded => 'Allowable number of PIN tries exceeded.',
106-
self::ToAccountIsInvalidOrNonExistent => 'Invalid OR non-existent \"to account\" specified.',
107-
self::SystemMalfunction => 'A temporary error occurred during the transaction.',
108-
self::GenericError => 'A temporary error occurred during the transaction.',
109-
self::SoftDecline2 => 'The issuer requests Strong Customer Authentication. The merchant should retry the transaction after successfully authenticating customer with 3DS first.',
80+
self::Undefined => 'Undefined.',
81+
self::Incomplete3dsFlow => 'Browser closed before authentication finished.',
82+
self::Failed3DSValidation => 'Wrong password or two-factor auth code entered.',
83+
self::PaymentsPolicyAcquiringRestriction => 'Payments Policy Acquiring Restriction.',
84+
self::ReferToCardIssuer => 'The issuing bank prevented the transaction.',
85+
self::InvalidMerchantNumber => 'Security violation (source is not correct issuer).',
86+
self::PickUpCard => 'The card has been designated as lost or stolen.',
87+
self::DoNotHonor => 'The issuing bank declined the transaction without an explanation.',
88+
self::GeneralError => 'The card issuer has declined the transaction as there is a problem with the card number.',
89+
self::InvalidTransaction => 'The bank has declined the transaction because of an invalid format or field. This indicates the card details were incorrect.',
90+
self::InvalidAmount => 'The card issuer has declined the transaction because of an invalid format or field.',
91+
self::InvalidCardNumber => 'The card issuer has declined the transaction as the credit card number is incorrectly entered or does not exist.',
92+
self::InvalidIssuer => 'The card issuer doesn\'t exist.',
93+
self::FormatError => 'The card issuer does not recognise the transaction details being entered. This is due to a format error.',
94+
self::LostCard => 'The card issuer has declined the transaction as the card has been reported lost.',
95+
self::StolenCard => 'The card has been designated as lost or stolen.',
96+
self::InsufficientFunds => 'The card has insufficient funds to cover the cost of the transaction.',
97+
self::ExpiredCard => 'The payment gateway declined the transaction because the expiration date is expired or does not match.',
98+
self::FunctionNotPermittedToCardholder => 'The card issuer has declined the transaction as the credit card cannot be used for this type of transaction.',
99+
self::FunctionNotPermittedToTerminal => 'The card issuer has declined the transaction as the credit card cannot be used for this type of transaction.',
100+
self::WithdrawalLimitExceeded => 'Exceeds withdrawal amount limit.',
101+
self::RestrictedCard => 'The customer\'s bank has declined their card.',
102+
self::IssuerResponseSecurityViolation => 'Flag raised due to security validation problem.',
103+
self::SoftDecline => 'The issuer requests Strong Customer Authentication. The merchant should retry the transaction after successfully authenticating customer with 3DS first.',
104+
self::CallIssuer => 'Contact card issuer.',
105+
self::PinEntryTriesExceeded => 'Allowable number of PIN tries exceeded.',
106+
self::ToAccountIsInvalidOrNonExistent => 'Invalid OR non-existent \"to account\" specified.',
107+
self::SystemMalfunction => 'A temporary error occurred during the transaction.',
108+
self::GenericError => 'A temporary error occurred during the transaction.',
109+
self::SoftDecline2 => 'The issuer requests Strong Customer Authentication. The merchant should retry the transaction after successfully authenticating customer with 3DS first.',
110110
};
111111
}
112112
}

src/Enums/VivaWalletPaymentMethod.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
enum VivaWalletPaymentMethod: int
66
{
77
case CreditCard = 0;
8-
case PayPal = 23;
9-
case EBanking = 4;
10-
case Cash = 3;
11-
case BitPay = 19;
12-
case EPS = 17;
13-
case giropay = 15;
14-
case iDEAL = 10;
8+
case PayPal = 23;
9+
case EBanking = 4;
10+
case Cash = 3;
11+
case BitPay = 19;
12+
case EPS = 17;
13+
case giropay = 15;
14+
case iDEAL = 10;
1515
case Multibanco = 14;
16-
case P24 = 11;
17-
case PayU = 13;
18-
case Sofort = 16;
19-
case WeChatPay = 18;
20-
case Payconiq = 28;
21-
case BLIK = 12;
22-
case Trustly = 24;
16+
case P24 = 11;
17+
case PayU = 13;
18+
case Sofort = 16;
19+
case WeChatPay = 18;
20+
case Payconiq = 28;
21+
case BLIK = 12;
22+
case Trustly = 24;
2323
}

src/Enums/VivaWalletRequestLang.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
enum VivaWalletRequestLang: string
66
{
7-
case Bulgarian = 'bg-BG';
8-
case Croatian = 'hr-HR';
9-
case Czech = 'cs-CZ';
10-
case Danish = 'da-DK';
11-
case Dutch = 'nl-NL';
12-
case English = 'en-GB';
13-
case Finnish = 'fi-FI';
14-
case French = 'fr-FR';
15-
case German = 'de-DE';
16-
case Greek = 'el-GR';
17-
case Hungarian = 'hu-HU';
18-
case Italian = 'it-IT';
19-
case Polish = 'pl-PL';
7+
case Bulgarian = 'bg-BG';
8+
case Croatian = 'hr-HR';
9+
case Czech = 'cs-CZ';
10+
case Danish = 'da-DK';
11+
case Dutch = 'nl-NL';
12+
case English = 'en-GB';
13+
case Finnish = 'fi-FI';
14+
case French = 'fr-FR';
15+
case German = 'de-DE';
16+
case Greek = 'el-GR';
17+
case Hungarian = 'hu-HU';
18+
case Italian = 'it-IT';
19+
case Polish = 'pl-PL';
2020
case Portuguese = 'pt-PT';
21-
case Romanian = 'ro-RO';
22-
case Spanish = 'es-ES';
21+
case Romanian = 'ro-RO';
22+
case Spanish = 'es-ES';
2323
}

src/Enums/VivaWalletTransactionStatus.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,32 @@
99
*/
1010
enum VivaWalletTransactionStatus: string
1111
{
12-
case PaymentUnsuccessful = 'E';
13-
case PaymentPending = 'A';
14-
case Disputed = 'M';
15-
case DisputeAwaitingResponse = 'MA';
16-
case DisputeInProgress = 'MI';
17-
case DisputeLost = 'ML';
18-
case DisputeWon = 'MW';
19-
case SuspectedDispute = 'MS';
20-
case Cancelled = 'X';
21-
case FullyOrPartiallyRefunded = 'R';
22-
case PaymentSuccessful = 'F';
12+
case PaymentUnsuccessful = 'E';
13+
case PaymentPending = 'A';
14+
case Disputed = 'M';
15+
case DisputeAwaitingResponse = 'MA';
16+
case DisputeInProgress = 'MI';
17+
case DisputeLost = 'ML';
18+
case DisputeWon = 'MW';
19+
case SuspectedDispute = 'MS';
20+
case Cancelled = 'X';
21+
case FullyOrPartiallyRefunded = 'R';
22+
case PaymentSuccessful = 'F';
2323

2424
public function description(): string
2525
{
2626
return match ($this) {
27-
self::PaymentUnsuccessful => 'The transaction was not completed because of an error (PAYMENT UNSUCCESSFUL).',
28-
self::PaymentPending => 'The transaction is in progress (PAYMENT PENDING).',
29-
self::Disputed => 'The cardholder has disputed the transaction with the issuing Bank.',
30-
self::DisputeAwaitingResponse => 'Dispute Awaiting Response.',
31-
self::DisputeInProgress => 'Dispute in Progress.',
32-
self::DisputeLost => 'A disputed transaction has been refunded (Dispute Lost).',
33-
self::DisputeWon => 'Dispute Won',
34-
self::SuspectedDispute => 'Suspected Dispute.',
35-
self::Cancelled => 'The transaction was cancelled by the merchant.',
36-
self::FullyOrPartiallyRefunded => 'The transaction has been fully or partially refunded.',
37-
self::PaymentSuccessful => 'The transaction has been completed successfully (PAYMENT SUCCESSFUL).',
27+
self::PaymentUnsuccessful => 'The transaction was not completed because of an error (PAYMENT UNSUCCESSFUL).',
28+
self::PaymentPending => 'The transaction is in progress (PAYMENT PENDING).',
29+
self::Disputed => 'The cardholder has disputed the transaction with the issuing Bank.',
30+
self::DisputeAwaitingResponse => 'Dispute Awaiting Response.',
31+
self::DisputeInProgress => 'Dispute in Progress.',
32+
self::DisputeLost => 'A disputed transaction has been refunded (Dispute Lost).',
33+
self::DisputeWon => 'Dispute Won',
34+
self::SuspectedDispute => 'Suspected Dispute.',
35+
self::Cancelled => 'The transaction was cancelled by the merchant.',
36+
self::FullyOrPartiallyRefunded => 'The transaction has been fully or partially refunded.',
37+
self::PaymentSuccessful => 'The transaction has been completed successfully (PAYMENT SUCCESSFUL).',
3838
};
3939
}
4040
}

0 commit comments

Comments
 (0)