본문 바로가기
보드게임 긱 추천 게임
Wizard Thumbnail
BoardGameGeek 사이트에서 인기순위 상위 100개 중 랜덤 3개를 보여줍니다.
BGG
귀펀치토끼는 부서지지 않는다.
주소(D)
영웅은 공부 따원 안 한다네/뷰

iamport 직접 결제

  <!-- 직접 눌러서 결제할 때 -->
  <!-- <div class="wrap_button"> // 카카오페이 결제, 신용카드로 결제 버튼 (사용자가 수동으로)
          <div class="payment kakao" @click="pushPage('payment')">카카오페이로 결제</div>
          <div class="payment" @click="pushPage('iamport')">신용카드로 결제</div>
        </div> -->
// // 카드등록 확인 눌렀을 시
// const pay = async () => {
//   // "/billings" 에 대한 POST 요청을 처리하는 controller
//   // 인증 토큰 발급 받기
//   const getToken = await axios({
//     url: '/users/getToken',
//     method: 'post', // POST method
//     headers: { 'Content-Type': 'application/json' }, // "Content-Type": "application/json"
//     data: {
//       imp_key: '317asd3240', // REST API키
//       imp_secret: 'Y5cUoUasdoMqCCqVgbMjPi' // REST API Secret
//     }
//   });
//   const { access_token } = getToken.data.response; // 인증 토큰
//   console.log(access_token);

//   // 결제(재결제) 요청
//   try {
//     const paymentResult = await axios({
//       url: '/subscribe/payments/again',
//       method: 'POST',
//       headers: { Authorization: access_token }, // 인증 토큰을 Authorization header에 추가
//       data: {
//         customer_uid: 'diasda',
//         merchant_uid: 'diffeasd20', // 새로 생성한 결제(재결제)용 주문 번호
//         amount: 1001,
//         name: '월간 이용권 정기결제123123'
//       }
//     });
//     console.log(paymentResult);
//     if (paymentResult.data.code === -1) {
//       alert(paymentResult.data.message);
//     }
//   } catch (error) {
//     console.log(error);
//   }
// };
완료
내 컴퓨터