AuthorizeNet / sample-code-php

This repository contains working code samples which demonstrate php integration with the Authorize.Net API
MIT License
177 stars 197 forks source link

How can get data key and call id #110

Closed thekingbk90 closed 6 years ago

thekingbk90 commented 6 years ago

I tried to make a payment via authorize.net payment (using visa card) It's error E00027: The transaction was unsuccessfully I used production mode. (development mode worked normally). I have already compared to sample code: https://github.com/AuthorizeNet/sample-code-php/blob/643363a7c1edad4e8029c3033902db4b0a6c07c2/VisaCheckout/create-visa-checkout-transaction.php#L37 There are 2 values which I don't know how to get them.

  1. Data key $op = new AnetAPI\OpaqueDataType(); $op->setDataKey(HOW_TO_GET_THIS VALUE);
  2. Call id $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->setCallId(HOW_TO_GET_THIS VALUE); Anybody can help me?
ashtru commented 6 years ago

hi @thekingbk90

Thanks for raising this issue. We will attempt to come back with an answer very soon.

ashtru commented 6 years ago

Have you enrolled for Visa Checkout in the production merchant interface? After the enrollment, you will get a Visa Checkout Api key , which you can use to place the Visa Checkout button or Lightbox on your website. This Visa Checkout button will allow the customers to login to their Visa Checkout account and select their card (without having to enter card details or shipping address).

Whenever a customer successfully logs into their Visa Checkout account, you are able to obtain:

1- Visa Checkout payment request ID (callId) 2- Encrypted payload (refer the integration guide on using these fields.)

Feel free to reach out to us for questions.

thekingbk90 commented 6 years ago

Thank you. I have already got the Encrypted payload: https://prnt.sc/j11hrp But where's callID? Does it display when customer use the checkout button?

ashtru commented 6 years ago

This is your Visa Checkout API key, which is good.

You need to add the Checkout button now (the code for which will use the key above)

When the customer uses the checkout button

chsriniv9 commented 6 years ago

@thekingbk90, closing this thread based on the procedure provided by @ashtru and that should resolve the reported issue. Please feel free to re-open this, if you are still facing the issue.