Does "requestPayment" method have promise? and return orderId,paymentKey & amount?
Hi Support & @Ayaan!
I need to know that, can i use ".then" & ".catch" with requestPayment method? Please suggest! Thanks
3 Replies
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) :
- 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요.
* 주말/공휴일에는 답변이 늦을 수 있어요.
Thank you @Ayaan 👍
Yes i have verified & both worked with v1. Does these also works with v2?
Appreciate! but i've instructed to use latest version.
All i need right now is, I want to catch these parameters via .then() & save these parameters to relative order & doesn't want to redirect to Success OR Fail URLs.
Can i do that with this library? https://js.tosspayments.com/v2/standard
But I've seen that "successUrl" & "failUrl" parameters are optional in official documentation.
is it mandatory to pass these parameters?
On PC, if you don't pass successUrl / failUrl to the requestPayment method, you will get the parameters that should passed to successUrl is returned as Promise. Hence, you can access those by .then().Yes i've verified this & it works for me (using v1)
It is optional, only in PC. Not Mobile.Does this mean mobile browser OR mobile App? Hmmm... 🤔 Understood! Let me follow above & try! Thank you for this help & detail briefing 🫡 @Ayaan Appreciate 🙏 Can i use webhook to deal with this? in case i don't get response from .then() Acknowledged! Hi @Ayaan, I've used below parameters with succesUrl & failUrl. but i got this error ""successUrl" 또는 "failUrl"을 넘긴 경우 Promise 방식을 지원하지 않습니다." why? I am testing these parameters on desktop browser! Please suggest! Thanks Hi @Ayaan, I've almost done & finished. Thanks for your help! Its working fine at my localhost. when i deploy it on my testing server. the toss payment library is not loading there. https://js.tosspayments.com/v1/payment please suggest! Hi @Ayaan, I am also sorry for delayed response. I just checked it right now! I had resolved it & now library loads fine on all environments. Also I've finished the integration. 🤝 Thanks alot for your help! we may consider this thread as closed!
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.