In order to generate your payment channel and allow your users to make payment, you will need to use the CCPayment API. Firstly you will need to generate the public key.
You need to run command line from the terminal window to generate your public key. Please follow the steps:
Step 1. Generate private key.
- Type command: openssl genrsa -out rsa_private_key.pem 2048
- Press Enter to execute it and generate your private key. To check your private key:
- Type command: cat rsa_private_key.pem
- Press Enter to execute it to view your private key.
Note: For Java developer, please follow the instructions below to generate private key:
- Upon generating the private key in Step 1, it's necessary to transfer the private key to the format PKCS8
- Type command: openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out rsa_private_key_pkcs8.pem
- Press Enter to execute it and generate your private key.
Step 2. Generate public key.
- Type command: openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
- Press Enter to execute it and generate your public key To check your public key:
- Type command: cat rsa_public_key.pem
- Press Enter to execute it to view your public key.
Step 3: Save your private key. Go to Payment API page and enter your public key here. Once the input has been completed, it will take effect.