1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PAY.JPを利用した際のtokenとSECRET_KEYとPUBLIC_KEYについて

Posted at

Token

PAYJP側で発行しています。
createTokenメソッドが通った時に発行してもらってます。
カード番号やCVCをクレジット決済代行サービスに渡すさずに、別に登録保存されているカード情報を呼び出す鍵として発行されています。

card.js
      Payjp.createToken(card, (status, response) => {
        if (status == 200) {
          const token = response.id;
          const renderDom = document.getElementById("charge-form");
          const tokenObj = `<input value=${token} name='token' type="hidden"> `;
          renderDom.insertAdjacentHTML("beforeend", tokenObj);
        }

SECRET_KEYとPUBLICキー

これは購入サイトがクレジット代行サービスにデータ提供する際に必要なログイン情報「身分証明書」となっています。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?