Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass api login key and transaction id in authorize.net sdk for android ?

I am using Authorize.net payment gate way for My android Application. Normally Authorize.net ask for username and password by prompting a login screen so I dont want user to type merchant details so I edited authorize.net sdk and typed password directly instead of prompting screen to user for username and password.

Below I have posted the sdk code like I have did it

/**
     * Load the login ID and password prompt page.
     */
    public void showCredentialsPage() {


        showLoggingInDialog();
        PasswordAuthentication passAuth = PasswordAuthentication
            .createMerchantAuthentication("XXXXXXX",
                "XXXXX", deviceId);
        _merchant = Merchant.createMerchant(env, passAuth);

        new ExecuteTransactionTask().execute();

The problem is for website they use login key and transaction id Which they will get it from sandbox merchant account. If I give that login key and transaction id in the above code it says invalid credentials. If I give username and password directly in my code it works.

like image 979
Ruban Avatar asked Nov 18 '13 12:11

Ruban


People also ask

What is API login and transaction key?

This page allows you to view your Application Programming Interface (API) Login ID and to create or disable your Transaction Key. Your API Login ID and Transaction Key are unique pieces of information specifically associated with your payment gateway account.


1 Answers

The Authorize.Net Android SDK enables developers to create mobile Point of Sale application which are held by the merchant, and not on a customer's own mobile device. A Login ID and Password should be used instead of storing sensitive login credentials on the device. It also allows account owners to remotely approve and disable use of specific devices if they are ever lost or stolen.

like image 101
rhldr Avatar answered Sep 27 '22 23:09

rhldr