1

I am trying to integrate 2checkout API in my reactjs &nodejs project.I reffered the documents which 2co provided.I created an account and in that webhooks&API i have "Merchant Code" and "Secret Key" but there is no "Publishable key" and "Private Key" Why?

what i have is:

             render = () => {
             return(
              <form id="myCCForm" onSubmit={this.Submit}>
                        <input
                          id="token"
                          name="token"
                          type="hidden"
                          value=""
                        ></input>
                        <div>
                          <label>
                            <span>Card Number</span>
                          </label>
                          <input
                            id="ccNo"
                            type="text"
                            size="20"
                            value=""
                            autocomplete="off"
                            required
                          />
                        </div>
                        <div>
                          <label>
                            <span>Expiration Date (MM/YYYY)</span>
                          </label>
                          <input
                            type="text"
                            size="2"
                            id="expMonth"
                            required
                          ></input>
                          <span> / </span>
                          <input
                            type="text"
                            size="2"
                            id="expYear"
                            required
                          ></input>
                        </div>
                        <div>
                          <label>
                            <span>CVC</span>
                          </label>
                          <input
                            id="cvv"
                            size="4"
                            type="text"
                            value=""
                            autocomplete="off"
                            required
                          ></input>
                        </div>
                        <input type="submit" value="Submit Payment"></input>
                      </form>
                     )}
  
             submit=()=>{
                   let args = {
                   sellerId: "",//gave merchant code here
                   publishableKey: "",//as there is no publishable key  what will give here?
                   ccNo: "",
                   cvv: "",
                   expMonth: "",
                   expYear: ""
                };

             window.TCO.loadPubKey("sandbox", () => {
             window.TCO.requestToken(args).then(data => {
                console.log("data");
              });
              });

How can i resolve this problem?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.