SlideShare una empresa de Scribd logo
1 de 15
2009. 11. 12 Apps Code Bible II
Custom APIs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
일촌 초대하기 –  opensocial. requestShareApp 일촌 초대 팝업  UI  또는 직접 호출을 통해 초대  feed  발송 opensocial.requestShareApp(recipients , message, opt_callback); opensocial.requestShareApp(recipients , null, opt_callback); opensocial.requestShareApp(null , message, opt_callback); opensocial.requestShareApp(null , null, opt_callback); Sample code * Method opensocial.requestShareApp * Parameter recipients :  수신자  IDs, array message : opensocial message  객체 callbackFn :  콜백함수  (optional)
일촌 초대하기 –  opensocial. requestShareApp ⓐ  opensocial.requestShareApp(recipients , message, opt_callback); ⓑ  opensocial.requestShareApp(recipients , null, opt_callback); ⓒ  opensocial.requestShareApp(null , message, opt_callback); ⓓ  opensocial.requestShareApp(null , null, opt_callback); Sample code ,[object Object],[object Object],[object Object],[object Object],[object Object]
openNate  시작하기 <Require feature=&quot;opennate&quot; /> <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> <Module> <ModulePrefs> <Require feature=&quot;opensocial-0.8&quot; /> <Require feature=&quot;opennate&quot; /> </ModulePrefs> <Content type=&quot;html&quot;> <![CDATA[ ]]> </Content> </Module> Sample code
게시물로 저장하기 –  openNate.minihpScrap 앱스에서 생성된 컨텐츠를 미니홈피 게시판에 저장 var params = {}; params[openNate.ScrapParameters.CONTENT] =  &quot;<u> 게시물 </u> 로 저장되는 내용 &quot;; openNate.minihpScrap(params); Sample code * Method openNate.minihpScrap * Parameter openNate.ScrapParameters.CONTENT * Return None
Payment – openNate.dotoriPayment 앱스에서 네이트 도토리 결제시스템 이용 * Method openNate.dotoriPayment * Parameter openNate.PaymentParameters.ITEMTYPE openNate.PaymentParameters.ITEMID openNate.PaymentParameters.ITEMNAME openNate.PaymentParameters.THUMBNAIL openNate.PaymentParameters.DOTORI openNate.PaymentParameters.CALLBACKFN openNate.PaymentParameters.PASSTHROUGH openNate.PaymentParameters.CALLBACKURL * Return object
Payment – openNate.dotoriPayment * Return  객체 paymentKey passthrough status message 동일한 결제에 대한 재요청 발생 네이트 도토리 결제 처리 이후  3rd party  서버 프로세스 실행중 오류  또는  2 단계 통신중 오류 네이트 도토리 결제 처리중 오류 3 rd  party  서버와의 통신상의 오류 1 단계 통신중 오류 및  3 rd  party  프로세스 실행중 오류 결제 성공 설명 Dotori error ERR002 status message true Success ERR001 Communication error ERR003 Payment error ERR004 Expired page
payment –  데이터 흐름 결제 팝업 3 rd  party  앱스 openNate.dotoriPayment  실행 도토리 부족 알림 팝업 네이트 도토리  충전 팝업 ,[object Object],[object Object],-request parameter  및  shared key 를 이용하여  hmac  키 생성 3 rd  party  서버 프로세스 -passthrough  확인 -Mac key  생성 후 비교 - 아이템 정보 임시 저장 등 response HTTP RC 결제 진행 결과 팝업 -  에러 메시지 HTTP RC  확인 ERR001 네이트 도토리 차감 도토리 차감 결과 전송 3rd party  서버 프로세스 -Passthrough, mac key  등 확인 - 사용자 아이템 구매 정보 저장 response HTTP RC HTTP RC  확인 ERR002 ERR003  ( 고객센터 ) 결제 진행 결과 팝업 -  결제 성공 결제 버튼 클릭 Popup UI - 계약정보 확인 callbackFN 1 2 3 4 5 6 7 8 9 10 13 11 12 14 15 16 17 18 19 6 11 파라미터 status –  ready, accepted, failed payment_key passthrough user_id apps_no item_id item_type item_name item_dotori mac
Payment – openNate. dotoriPayment var params = {}; params[openNate.PaymentParameters.ITEMTYPE] = “item_type”; params[openNate.PaymentParameters.ITEMID] = “item_id”; params[openNate.PaymentParameters.ITEMNAME] = “item_name”; params[openNate.PaymentParameters.THUMBNAIL] =  “ image_thumbnail_url”; params[openNate.PaymentParameters.DOTORI] = “dotori”; params[openNate.PaymentParameters.CALLBACKFN] =  &quot;callbackFunction&quot;; params[openNate.PaymentParameters.PASSTHROUGH] =  “ generated passthrough&quot;; params[openNate.PaymentParameters.CALLBACKURL] =  &quot;http://www.thirdparty.com/callback.php&quot;; openNate.dotoriPayment(params); Sample code dotoriPayment API  활용
앱스에서 dotoriPayment 호출시 팝업  UI 네이트컨테이너 결제 프로세스 Payment –  팝업  UI 1 2 3
Payment – 3 rd  party  로의  http request callback URL :  http://www.thirdparty.com/callback parameters :  payment_key=2059ec5f423caac343f6677de784d320&user_id=12345678&apps_no=10&item_id=3&item_type=COIN&item_name=test+item&item_dotori=10&status=ready&passthrough=kjse23fjs52fgsog34 shared key :  opennate_payment_shared_key generated MAC key :  bcd9cf234c6cb711eb14d488ebe5d8e0 http request :  http://www.thirdparty.com/callback?payment_key=2059ec5f423caac343f6677de784d320&user_id=12345678&apps_no=10&item_id=3&item_type=COIN&item_name=test+item&item_dotori=10&status=ready&passthrough=kjse23fjs52fgsog34&mac=bcd9cf234c6cb711eb14d488ebe5d 8e0
Payment – hmac key  생성 C = callbackURL [eg &quot; http://www.thirdparty.com/callback&quot;] P =  파라미터  [eg &quot;param1=value1&param2=value2&...&paramN=valueN&quot;] K = the shared secret key H = md5 M = hash (K,P) = H ((K XOR opad) + H ((K XOR ipad) + P)) opad : outer padding (0x5c5c…5c5c, one-block-long  hexadecimal  constant)  ipad : inner padding (0x3636…3636, one-block-long  hexadecimal  constant)  request (C,P,K) = &quot; http://www.thirdparty.com/callback?param1=value1&param2=value2&...&paramN=valueN&mac=&quot;+ M RFC 2104 HMAC_MD5
Payment – 3 rd  party  서버 프로세스 이것만은 지키자 . ,[object Object],[object Object],[object Object],[object Object],[object Object]
감사합니다 .

Más contenido relacionado

Destacado (10)

Cyworld AppStore Weekly Report 2011-07-26
Cyworld AppStore Weekly Report 2011-07-26Cyworld AppStore Weekly Report 2011-07-26
Cyworld AppStore Weekly Report 2011-07-26
 
Cyworld AppStore Weekly Report 2011-11-22
Cyworld AppStore Weekly Report 2011-11-22Cyworld AppStore Weekly Report 2011-11-22
Cyworld AppStore Weekly Report 2011-11-22
 
Cyworld AppStore Weekly Report 2012-02-07
Cyworld AppStore Weekly Report 2012-02-07Cyworld AppStore Weekly Report 2012-02-07
Cyworld AppStore Weekly Report 2012-02-07
 
2 6 igaworks 마국성
2 6 igaworks 마국성2 6 igaworks 마국성
2 6 igaworks 마국성
 
4. (수정)소셜앱으로 청춘의 꿈을 마이크로소프트2
4. (수정)소셜앱으로 청춘의 꿈을 마이크로소프트24. (수정)소셜앱으로 청춘의 꿈을 마이크로소프트2
4. (수정)소셜앱으로 청춘의 꿈을 마이크로소프트2
 
Cyworld AppStore Weekly Report 2012-02-14
Cyworld AppStore Weekly Report 2012-02-14Cyworld AppStore Weekly Report 2012-02-14
Cyworld AppStore Weekly Report 2012-02-14
 
Cyworld AppStore Weekly Report 2012-01-24
Cyworld AppStore Weekly Report 2012-01-24Cyworld AppStore Weekly Report 2012-01-24
Cyworld AppStore Weekly Report 2012-01-24
 
006. apps pricing guide sk컴즈 박지연 차장
006. apps pricing guide sk컴즈 박지연 차장006. apps pricing guide sk컴즈 박지연 차장
006. apps pricing guide sk컴즈 박지연 차장
 
2 3 user virality-성공_전략(최종)
2 3 user virality-성공_전략(최종)2 3 user virality-성공_전략(최종)
2 3 user virality-성공_전략(최종)
 
Les règles d'or pour réussir sur Twitter - Erwan le Nagard
Les règles d'or pour réussir sur Twitter  - Erwan le NagardLes règles d'or pour réussir sur Twitter  - Erwan le Nagard
Les règles d'or pour réussir sur Twitter - Erwan le Nagard
 

Más de Cyworld AppStore (SK Communications)

008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장
008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장
008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장Cyworld AppStore (SK Communications)
 

Más de Cyworld AppStore (SK Communications) (20)

Cyworld appstore weeklyreport0402
Cyworld appstore weeklyreport0402Cyworld appstore weeklyreport0402
Cyworld appstore weeklyreport0402
 
Cyworld appstore weeklyreport_0327_1
Cyworld appstore weeklyreport_0327_1Cyworld appstore weeklyreport_0327_1
Cyworld appstore weeklyreport_0327_1
 
Cyworld AppStore Weekly Report 2012-03-20
Cyworld AppStore Weekly Report 2012-03-20Cyworld AppStore Weekly Report 2012-03-20
Cyworld AppStore Weekly Report 2012-03-20
 
Cyworld AppStore Weekly Report 2012-03-13
Cyworld AppStore Weekly Report 2012-03-13Cyworld AppStore Weekly Report 2012-03-13
Cyworld AppStore Weekly Report 2012-03-13
 
Cyworld AppStore Weekly Report 2012-03-06
Cyworld AppStore Weekly Report 2012-03-06Cyworld AppStore Weekly Report 2012-03-06
Cyworld AppStore Weekly Report 2012-03-06
 
Cyworld AppStore Weekly Report 2012-01-31
Cyworld AppStore Weekly Report 2012-01-31Cyworld AppStore Weekly Report 2012-01-31
Cyworld AppStore Weekly Report 2012-01-31
 
Cyworld AppStore Weekly Report 2012-01-17
Cyworld AppStore Weekly Report 2012-01-17Cyworld AppStore Weekly Report 2012-01-17
Cyworld AppStore Weekly Report 2012-01-17
 
Cyworld AppStore Weekly Report 2012-01-10
Cyworld AppStore Weekly Report 2012-01-10Cyworld AppStore Weekly Report 2012-01-10
Cyworld AppStore Weekly Report 2012-01-10
 
Cyworld AppStore Weekly Report 2012-01-03
Cyworld AppStore Weekly Report 2012-01-03Cyworld AppStore Weekly Report 2012-01-03
Cyworld AppStore Weekly Report 2012-01-03
 
Cyworld AppStore Weekly Report 2011-12-27
Cyworld AppStore Weekly Report 2011-12-27Cyworld AppStore Weekly Report 2011-12-27
Cyworld AppStore Weekly Report 2011-12-27
 
Cyworld AppStore Weekly Report 2011-12-13
Cyworld AppStore Weekly Report 2011-12-13Cyworld AppStore Weekly Report 2011-12-13
Cyworld AppStore Weekly Report 2011-12-13
 
Cyworld AppStore Weekly Report 2011-11-15
Cyworld AppStore Weekly Report 2011-11-15Cyworld AppStore Weekly Report 2011-11-15
Cyworld AppStore Weekly Report 2011-11-15
 
Cyworld AppStore Weekly Report 2011-11-01
Cyworld AppStore Weekly Report 2011-11-01Cyworld AppStore Weekly Report 2011-11-01
Cyworld AppStore Weekly Report 2011-11-01
 
Korean social game market trend report (2011Q2) Eng
Korean social game market trend report (2011Q2) EngKorean social game market trend report (2011Q2) Eng
Korean social game market trend report (2011Q2) Eng
 
Cyworld AppStore Weekly Report 2011-10-18
Cyworld AppStore Weekly Report 2011-10-18Cyworld AppStore Weekly Report 2011-10-18
Cyworld AppStore Weekly Report 2011-10-18
 
Cyworld AppStore Weekly Report 2011-10-11
Cyworld AppStore Weekly Report 2011-10-11Cyworld AppStore Weekly Report 2011-10-11
Cyworld AppStore Weekly Report 2011-10-11
 
Cyworld AppStore Weekly Report 2011-09-27
Cyworld AppStore Weekly Report 2011-09-27Cyworld AppStore Weekly Report 2011-09-27
Cyworld AppStore Weekly Report 2011-09-27
 
Cyworld AppStore Weekly Report 2011-08-09
Cyworld AppStore Weekly Report 2011-08-09Cyworld AppStore Weekly Report 2011-08-09
Cyworld AppStore Weekly Report 2011-08-09
 
Korean Social Game Market Trend Q1 2011
Korean Social Game Market Trend Q1 2011Korean Social Game Market Trend Q1 2011
Korean Social Game Market Trend Q1 2011
 
008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장
008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장
008. 싸이월드 앱스토어 api 소개 및 활용법 안내 sk컴즈 장원익 과장
 

Último

A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 

Último (6)

A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 

Apps Code Bible II_제2회 Hello, Dev.Square 개발자 세미나 발표자료

  • 1. 2009. 11. 12 Apps Code Bible II
  • 2.
  • 3. 일촌 초대하기 – opensocial. requestShareApp 일촌 초대 팝업 UI 또는 직접 호출을 통해 초대 feed 발송 opensocial.requestShareApp(recipients , message, opt_callback); opensocial.requestShareApp(recipients , null, opt_callback); opensocial.requestShareApp(null , message, opt_callback); opensocial.requestShareApp(null , null, opt_callback); Sample code * Method opensocial.requestShareApp * Parameter recipients : 수신자 IDs, array message : opensocial message 객체 callbackFn : 콜백함수 (optional)
  • 4.
  • 5. openNate 시작하기 <Require feature=&quot;opennate&quot; /> <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> <Module> <ModulePrefs> <Require feature=&quot;opensocial-0.8&quot; /> <Require feature=&quot;opennate&quot; /> </ModulePrefs> <Content type=&quot;html&quot;> <![CDATA[ ]]> </Content> </Module> Sample code
  • 6. 게시물로 저장하기 – openNate.minihpScrap 앱스에서 생성된 컨텐츠를 미니홈피 게시판에 저장 var params = {}; params[openNate.ScrapParameters.CONTENT] = &quot;<u> 게시물 </u> 로 저장되는 내용 &quot;; openNate.minihpScrap(params); Sample code * Method openNate.minihpScrap * Parameter openNate.ScrapParameters.CONTENT * Return None
  • 7. Payment – openNate.dotoriPayment 앱스에서 네이트 도토리 결제시스템 이용 * Method openNate.dotoriPayment * Parameter openNate.PaymentParameters.ITEMTYPE openNate.PaymentParameters.ITEMID openNate.PaymentParameters.ITEMNAME openNate.PaymentParameters.THUMBNAIL openNate.PaymentParameters.DOTORI openNate.PaymentParameters.CALLBACKFN openNate.PaymentParameters.PASSTHROUGH openNate.PaymentParameters.CALLBACKURL * Return object
  • 8. Payment – openNate.dotoriPayment * Return 객체 paymentKey passthrough status message 동일한 결제에 대한 재요청 발생 네이트 도토리 결제 처리 이후 3rd party 서버 프로세스 실행중 오류 또는 2 단계 통신중 오류 네이트 도토리 결제 처리중 오류 3 rd party 서버와의 통신상의 오류 1 단계 통신중 오류 및 3 rd party 프로세스 실행중 오류 결제 성공 설명 Dotori error ERR002 status message true Success ERR001 Communication error ERR003 Payment error ERR004 Expired page
  • 9.
  • 10. Payment – openNate. dotoriPayment var params = {}; params[openNate.PaymentParameters.ITEMTYPE] = “item_type”; params[openNate.PaymentParameters.ITEMID] = “item_id”; params[openNate.PaymentParameters.ITEMNAME] = “item_name”; params[openNate.PaymentParameters.THUMBNAIL] = “ image_thumbnail_url”; params[openNate.PaymentParameters.DOTORI] = “dotori”; params[openNate.PaymentParameters.CALLBACKFN] = &quot;callbackFunction&quot;; params[openNate.PaymentParameters.PASSTHROUGH] = “ generated passthrough&quot;; params[openNate.PaymentParameters.CALLBACKURL] = &quot;http://www.thirdparty.com/callback.php&quot;; openNate.dotoriPayment(params); Sample code dotoriPayment API 활용
  • 11. 앱스에서 dotoriPayment 호출시 팝업 UI 네이트컨테이너 결제 프로세스 Payment – 팝업 UI 1 2 3
  • 12. Payment – 3 rd party 로의 http request callback URL : http://www.thirdparty.com/callback parameters : payment_key=2059ec5f423caac343f6677de784d320&user_id=12345678&apps_no=10&item_id=3&item_type=COIN&item_name=test+item&item_dotori=10&status=ready&passthrough=kjse23fjs52fgsog34 shared key : opennate_payment_shared_key generated MAC key : bcd9cf234c6cb711eb14d488ebe5d8e0 http request : http://www.thirdparty.com/callback?payment_key=2059ec5f423caac343f6677de784d320&user_id=12345678&apps_no=10&item_id=3&item_type=COIN&item_name=test+item&item_dotori=10&status=ready&passthrough=kjse23fjs52fgsog34&mac=bcd9cf234c6cb711eb14d488ebe5d 8e0
  • 13. Payment – hmac key 생성 C = callbackURL [eg &quot; http://www.thirdparty.com/callback&quot;] P = 파라미터 [eg &quot;param1=value1&param2=value2&...&paramN=valueN&quot;] K = the shared secret key H = md5 M = hash (K,P) = H ((K XOR opad) + H ((K XOR ipad) + P)) opad : outer padding (0x5c5c…5c5c, one-block-long hexadecimal constant) ipad : inner padding (0x3636…3636, one-block-long hexadecimal constant) request (C,P,K) = &quot; http://www.thirdparty.com/callback?param1=value1&param2=value2&...&paramN=valueN&mac=&quot;+ M RFC 2104 HMAC_MD5
  • 14.