Skip to content

Fix/add parameter support cancel payment #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2022

Conversation

khj309
Copy link
Contributor

@khj309 khj309 commented May 12, 2022

๐ŸŒ iamport-rest-client-php PR ๐ŸŒ

PR ์š”์•ฝ

  • ๊ฒฐ์ œ์ทจ์†Œ API ์š”์ฒญ ํŒŒ๋ผ๋ฏธํ„ฐ refund_tel, extra[requester] ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ง€์›ํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

๋ณ€๊ฒฝ๋œ ๋ถ€๋ถ„ ๐Ÿ‘

  • CancelPayment ํด๋ž˜์Šค์— $refund_tel, $extra ๋ฉค๋ฒ„ ์ถ”๊ฐ€
  • extra[] ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ง€์›ํ•˜๊ธฐ ์œ„ํ•œ CancelPaymentExtra ํด๋ž˜์Šค๊ฐ€ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ด€๋ จ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค, ์˜ˆ์ œ ์ˆ˜์ •

์˜ํ–ฅ์„ ๋ฐ›๋Š” ๋‹ค๋ฅธ ์ปดํฌ๋„ŒํŠธ ๐Ÿ•ธ

None

์ง‘์ค‘ํ•ด์„œ ๋ฆฌ๋ทฐํ•  ๊ณณ ๐Ÿ’ก

ํ…Œ์ŠคํŠธ โš’

  • composer test ํ†ต๊ณผ ํ™•์ธ
  • API ๊ฒฝ๋กœ๋ฅผ ๋กœ์ปฌ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ๊ฒฐ์ œ ์‚ญ์ œ api ํ˜ธ์ถœ์‹œ refund, extra[requester] ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์ „๋‹ฌ๋˜๋Š”์ง€ api-iamport์—์„œ ๋กœ๊น…ํ•˜์—ฌ ํ™•์ธ

์ฐธ๊ณ ๋งํฌ ๐ŸŽซ

Due Date: 2022-05-16

@khj309
Copy link
Contributor Author

khj309 commented May 12, 2022

change log์™€ ํŒจํ‚ค์ง€ ๋ฒ„์ „์€ ๋ฆด๋ฆฌ์ฆˆ์— ๋ณ€๊ฒฝํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@@ -39,6 +41,14 @@
$request->refund_holder = 'ํ™˜๋ถˆ๋  ๊ฐ€์ƒ๊ณ„์ขŒ ์˜ˆ๊ธˆ์ฃผ';
$request->refund_bank = 'ํ™˜๋ถˆ๋  ๊ฐ€์ƒ๊ณ„์ขŒ ์€ํ–‰์ฝ”๋“œ';
$request->refund_account = 'ํ™˜๋ถˆ๋  ๊ฐ€์ƒ๊ณ„์ขŒ ๋ฒˆํ˜ธ';

$extra = new CancelPaymentExtra();
if ( in_array($extra_requester, ['admin', 'customer'])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra_requester๋ผ๋Š”๊ฒŒ admin ์•„๋‹ˆ๋ฉด customer๋งŒ ๊ฐ€๋Šฅํ•œ๊ฑฐ๋ฉด Enum( ์ •ํ™•ํžˆ๋Š” Enum์€ ์•„๋‹ˆ์ง€๋งŒ Enum์Šค๋Ÿฝ๊ฒŒ ๋งŒ๋“ค์–ด ๋†“์€ /src/Enum ) ์ฒ˜๋ฆฌ ํ•˜๋Š”๊ฑด ์–ด๋–ค๊ฐ€์š”?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฐธ๊ณ ๋กœ ์ด ๊ฐ’์ด ์ •ํ™•ํžˆ ์–ด๋–ค๊ฑด์ง€ ์ œ๊ฐ€ ๋ชฐ๋ผ์„œ ๊ทธ๋Ÿฐ๋ฐ pg ์‚ฌ๋ณ„๋กœ ํ•ด๋‹น ๊ฐ’์˜ optional ์—ฌ๋ถ€๊ฐ€ ๋‹ค๋ฅด๊ณ  value ํŠน์ •์ด ํž˜๋“ค๋‹ค๋ฉด ์ง€๊ธˆ์ด ๋” ๋‚˜์€๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์•„์ž„ํฌํŠธ API ๋ฌธ์„œ์—์„œ ํ•ด๋‹น ํŒŒ๋ผ๋ฏธํ„ฐ ์‚ฌ์–‘์ด ์•ˆ๋‚ด๋˜์–ด ์žˆ์ง€ ์•Š๊ณ  ๋„ค์ด๋ฒ„์—ฐ๋™๊ฐ€์ด๋“œ์— ์•ˆ๋‚ด๋˜์–ด ์žˆ๋Š”๊ฑธ๋กœ ๋ณด์•„ ๋„ค์ด๋ฒ„ํŽ˜์ด ์ „์šฉ์œผ๋กœ ํŒ๋‹จ๋ฉ๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  ๋„ค์ด๋ฒ„ํŽ˜์ด ์ธก์—์„œ๋„ ํŒŒ๋ผ๋งˆํ‹ฐ ๊ฐ’์„ 1(customer), 2(admin)๋กœ ํŠน์ •ํ•  ์ˆ˜ ์žˆ์–ด์„œ ์˜๊ฒฌ ์ฃผ์‹  enum์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋Š”๊ฒŒ ๋” ์ข‹์€ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ค์ด๋ฒ„ํŽ˜์ด ์ „์šฉ ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ CancelPaymentRequester.php enum ์ถ”๊ฐ€ ํ–ˆ์Šต๋‹ˆ๋‹ค.

@khj309 khj309 requested a review from smc0210 May 13, 2022 09:20
@khj309 khj309 merged commit f8854ce into main May 13, 2022
@khj309 khj309 deleted the fix/add_parameter_support_cancel_payment branch May 20, 2022 01:26
@khj309 khj309 restored the fix/add_parameter_support_cancel_payment branch May 20, 2022 01:26
@khj309 khj309 deleted the fix/add_parameter_support_cancel_payment branch May 23, 2022 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants