Skip to content

Commit 412ac4a

Browse files
feat: Added additional support for local Korean payment methods (#145)
1 parent c2f4f4c commit 412ac4a

19 files changed

+361
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx
1010

1111
### Added
1212

13+
- Added additional support for local Korean payment methods. See [related changelog](https://developer.paddle.com/changelog/2025/improved-korean-payment-methods?utm_source=dx&utm_medium=paddle-php-sdk)
1314
- Support for payout reconciliation reports and `remittance_reference`, see [changelog](https://developer.paddle.com/changelog/2025/payout-reconciliation-report?utm_source=dx&utm_medium=paddle-php-sdk)
1415
- Added `location` value for `price.tax_mode`, see [changelog](https://developer.paddle.com/changelog/2025/default-automatic-tax-setting?utm_source=dx&utm_medium=paddle-php-sdk)
1516

17+
### Deprecated
18+
19+
- `korea_local` payment method type is deprecated. Use `south_korea_local_card`, `kakao_pay`, `naver_pay`, `payco`, or `samsung_pay` instead.
20+
- `underlying_details` is deprecated on payment `method_details` and saved payment method responses. Use specific payment method fields such as `south_korea_local_card`.
21+
1622
## [1.13.1] - 2025-11-03
1723

1824
_No functional change — aligns versioning metadata with release_

src/Entities/PaymentMethod.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Paddle\SDK\Entities\Shared\Paypal;
1717
use Paddle\SDK\Entities\Shared\SavedPaymentMethodOrigin;
1818
use Paddle\SDK\Entities\Shared\SavedPaymentMethodType;
19+
use Paddle\SDK\Entities\Shared\SouthKoreaLocalCard;
1920

2021
class PaymentMethod implements Entity
2122
{
@@ -26,6 +27,8 @@ private function __construct(
2627
public SavedPaymentMethodType $type,
2728
public Card|null $card,
2829
public Paypal|null $paypal,
30+
public SouthKoreaLocalCard|null $southKoreaLocalCard,
31+
/** @deprecated */
2932
public PaymentMethodUnderlyingDetails|null $underlyingDetails,
3033
public SavedPaymentMethodOrigin $origin,
3134
public \DateTimeInterface $savedAt,
@@ -42,6 +45,9 @@ public static function from(array $data): self
4245
type: SavedPaymentMethodType::from($data['type']),
4346
card: isset($data['card']) ? Card::from($data['card']) : null,
4447
paypal: isset($data['paypal']) ? Paypal::from($data['paypal']) : null,
48+
southKoreaLocalCard: isset($data['south_korea_local_card'])
49+
? SouthKoreaLocalCard::from($data['south_korea_local_card'])
50+
: null,
4551
underlyingDetails: isset($data['underlying_details'])
4652
? PaymentMethodUnderlyingDetails::from($data['underlying_details'])
4753
: null,

src/Entities/Shared/AvailablePaymentMethods.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
* @method static AvailablePaymentMethods Card()
2222
* @method static AvailablePaymentMethods GooglePay()
2323
* @method static AvailablePaymentMethods Ideal()
24+
* @method static AvailablePaymentMethods SouthKoreaLocalCard()
25+
* @method static AvailablePaymentMethods KakaoPay()
26+
* @method static AvailablePaymentMethods NaverPay()
27+
* @method static AvailablePaymentMethods Payco()
28+
* @method static AvailablePaymentMethods SamsungPay()
2429
* @method static AvailablePaymentMethods MbWay()
2530
* @method static AvailablePaymentMethods Offline()
2631
* @method static AvailablePaymentMethods Paypal()
@@ -38,6 +43,11 @@ final class AvailablePaymentMethods extends PaddleEnum
3843
private const Card = 'card';
3944
private const GooglePay = 'google_pay';
4045
private const Ideal = 'ideal';
46+
private const SouthKoreaLocalCard = 'south_korea_local_card';
47+
private const KakaoPay = 'kakao_pay';
48+
private const NaverPay = 'naver_pay';
49+
private const Payco = 'payco';
50+
private const SamsungPay = 'samsung_pay';
4151
private const MbWay = 'mb_way';
4252
private const Offline = 'offline';
4353
private const Paypal = 'paypal';

src/Entities/Shared/MethodDetails.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class MethodDetails
1616
private function __construct(
1717
public PaymentMethodType $type,
1818
public Card|null $card,
19+
public SouthKoreaLocalCard|null $southKoreaLocalCard,
20+
/** @deprecated */
1921
public PaymentMethodUnderlyingDetails|null $underlyingDetails,
2022
) {
2123
}
@@ -25,6 +27,9 @@ public static function from(array $data): self
2527
return new self(
2628
PaymentMethodType::from($data['type']),
2729
isset($data['card']) ? Card::from($data['card']) : null,
30+
isset($data['south_korea_local_card'])
31+
? SouthKoreaLocalCard::from($data['south_korea_local_card'])
32+
: null,
2833
isset($data['underlying_details'])
2934
? PaymentMethodUnderlyingDetails::from($data['underlying_details'])
3035
: null,

src/Entities/Shared/PaymentMethodType.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@
2121
* @method static PaymentMethodType Card()
2222
* @method static PaymentMethodType GooglePay()
2323
* @method static PaymentMethodType Ideal()
24+
* @method static PaymentMethodType KakaoPay()
2425
* @method static PaymentMethodType KoreaLocal()
2526
* @method static PaymentMethodType MbWay()
27+
* @method static PaymentMethodType NaverPay()
2628
* @method static PaymentMethodType Offline()
29+
* @method static PaymentMethodType Payco()
2730
* @method static PaymentMethodType Paypal()
2831
* @method static PaymentMethodType Pix()
32+
* @method static PaymentMethodType SamsungPay()
33+
* @method static PaymentMethodType SouthKoreaLocalCard()
2934
* @method static PaymentMethodType Unknown()
3035
* @method static PaymentMethodType Upi()
3136
* @method static PaymentMethodType WireTransfer()
@@ -39,11 +44,16 @@ final class PaymentMethodType extends PaddleEnum
3944
private const Card = 'card';
4045
private const GooglePay = 'google_pay';
4146
private const Ideal = 'ideal';
47+
private const KakaoPay = 'kakao_pay';
4248
private const KoreaLocal = 'korea_local';
4349
private const MbWay = 'mb_way';
50+
private const NaverPay = 'naver_pay';
4451
private const Offline = 'offline';
52+
private const Payco = 'payco';
4553
private const Paypal = 'paypal';
4654
private const Pix = 'pix';
55+
private const SamsungPay = 'samsung_pay';
56+
private const SouthKoreaLocalCard = 'south_korea_local_card';
4757
private const Unknown = 'unknown';
4858
private const Upi = 'upi';
4959
private const WireTransfer = 'wire_transfer';

src/Entities/Shared/PaymentMethodUnderlyingDetails.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
use Paddle\SDK\Entities\Entity;
1515

16+
/**
17+
* @deprecated
18+
*/
1619
class PaymentMethodUnderlyingDetails implements Entity
1720
{
1821
private function __construct(

src/Entities/Shared/SavedPaymentMethodType.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@
1919
* @method static SavedPaymentMethodType Blik()
2020
* @method static SavedPaymentMethodType Card()
2121
* @method static SavedPaymentMethodType GooglePay()
22+
* @method static SavedPaymentMethodType KakaoPay()
2223
* @method static SavedPaymentMethodType KoreaLocal()
2324
* @method static SavedPaymentMethodType MbWay()
25+
* @method static SavedPaymentMethodType NaverPay()
26+
* @method static SavedPaymentMethodType Payco()
2427
* @method static SavedPaymentMethodType Paypal()
2528
* @method static SavedPaymentMethodType Pix()
29+
* @method static SavedPaymentMethodType SamsungPay()
30+
* @method static SavedPaymentMethodType SouthKoreaLocalCard()
31+
* @method static SavedPaymentMethodType Payco()
2632
* @method static SavedPaymentMethodType Upi()
2733
*/
2834
final class SavedPaymentMethodType extends PaddleEnum
@@ -32,9 +38,14 @@ final class SavedPaymentMethodType extends PaddleEnum
3238
private const Blik = 'blik';
3339
private const Card = 'card';
3440
private const GooglePay = 'google_pay';
41+
private const KakaoPay = 'kakao_pay';
3542
private const KoreaLocal = 'korea_local';
43+
private const MbWay = 'mb_way';
44+
private const NaverPay = 'naver_pay';
45+
private const Payco = 'payco';
3646
private const Paypal = 'paypal';
3747
private const Pix = 'pix';
38-
private const MbWay = 'mb_way';
48+
private const SamsungPay = 'samsung_pay';
49+
private const SouthKoreaLocalCard = 'south_korea_local_card';
3950
private const Upi = 'upi';
4051
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* |------
7+
* | ! Generated code !
8+
* | Altering this code will result in changes being overwritten |
9+
* |-------------------------------------------------------------|.
10+
*/
11+
12+
namespace Paddle\SDK\Entities\Shared;
13+
14+
class SouthKoreaLocalCard
15+
{
16+
private function __construct(
17+
public SouthKoreaLocalCardType $type,
18+
public string $last4,
19+
) {
20+
}
21+
22+
public static function from(array $data): self
23+
{
24+
return new self(
25+
type: SouthKoreaLocalCardType::from($data['type']),
26+
last4: $data['last4'],
27+
);
28+
}
29+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* |------
7+
* | ! Generated code !
8+
* | Altering this code will result in changes being overwritten |
9+
* |-------------------------------------------------------------|.
10+
*/
11+
12+
namespace Paddle\SDK\Entities\Shared;
13+
14+
use Paddle\SDK\PaddleEnum;
15+
16+
/**
17+
* @method static SouthKoreaLocalCardType BC()
18+
* @method static SouthKoreaLocalCardType Citi()
19+
* @method static SouthKoreaLocalCardType Hana()
20+
* @method static SouthKoreaLocalCardType Hyundai()
21+
* @method static SouthKoreaLocalCardType Jeju()
22+
* @method static SouthKoreaLocalCardType Jeonbuk()
23+
* @method static SouthKoreaLocalCardType KakaoBank()
24+
* @method static SouthKoreaLocalCardType KBank()
25+
* @method static SouthKoreaLocalCardType KDBBank()
26+
* @method static SouthKoreaLocalCardType Kookmin()
27+
* @method static SouthKoreaLocalCardType Kwangju()
28+
* @method static SouthKoreaLocalCardType Lotte()
29+
* @method static SouthKoreaLocalCardType Mg()
30+
* @method static SouthKoreaLocalCardType NH()
31+
* @method static SouthKoreaLocalCardType Post()
32+
* @method static SouthKoreaLocalCardType Samsung()
33+
* @method static SouthKoreaLocalCardType SavingsBank()
34+
* @method static SouthKoreaLocalCardType Shinhan()
35+
* @method static SouthKoreaLocalCardType Shinhyup()
36+
* @method static SouthKoreaLocalCardType Suhyup()
37+
* @method static SouthKoreaLocalCardType TossBank()
38+
* @method static SouthKoreaLocalCardType Unknown()
39+
* @method static SouthKoreaLocalCardType Woori()
40+
*/
41+
final class SouthKoreaLocalCardType extends PaddleEnum
42+
{
43+
private const BC = 'bc';
44+
private const Citi = 'citi';
45+
private const Hana = 'hana';
46+
private const Hyundai = 'hyundai';
47+
private const Jeju = 'jeju';
48+
private const Jeonbuk = 'jeonbuk';
49+
private const KakaoBank = 'kakaobank';
50+
private const KBank = 'kbank';
51+
private const KDBBank = 'kdbbank';
52+
private const Kookmin = 'kookmin';
53+
private const Kwangju = 'kwangju';
54+
private const Lotte = 'lotte';
55+
private const MG = 'mg';
56+
private const NH = 'nh';
57+
private const Post = 'post';
58+
private const Samsung = 'samsung';
59+
private const SavingsBank = 'savingsbank';
60+
private const Shinhan = 'shinhan';
61+
private const Shinhyup = 'shinhyup';
62+
private const Suhyup = 'suhyup';
63+
private const TossBank = 'tossbank';
64+
private const Unknown = 'unknown';
65+
private const Woori = 'woori';
66+
}

src/Notifications/Entities/Shared/AvailablePaymentMethods.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
* @method static AvailablePaymentMethods Card()
2222
* @method static AvailablePaymentMethods GooglePay()
2323
* @method static AvailablePaymentMethods Ideal()
24+
* @method static AvailablePaymentMethods SouthKoreaLocalCard()
25+
* @method static AvailablePaymentMethods KakaoPay()
26+
* @method static AvailablePaymentMethods NaverPay()
27+
* @method static AvailablePaymentMethods Payco()
28+
* @method static AvailablePaymentMethods SamsungPay()
2429
* @method static AvailablePaymentMethods MbWay()
2530
* @method static AvailablePaymentMethods Offline()
2631
* @method static AvailablePaymentMethods Paypal()
@@ -38,6 +43,11 @@ final class AvailablePaymentMethods extends PaddleEnum
3843
private const Card = 'card';
3944
private const GooglePay = 'google_pay';
4045
private const Ideal = 'ideal';
46+
private const SouthKoreaLocalCard = 'south_korea_local_card';
47+
private const KakaoPay = 'kakao_pay';
48+
private const NaverPay = 'naver_pay';
49+
private const Payco = 'payco';
50+
private const SamsungPay = 'samsung_pay';
4151
private const MbWay = 'mb_way';
4252
private const Offline = 'offline';
4353
private const Paypal = 'paypal';

0 commit comments

Comments
 (0)