cancel
Showing results for 
Search instead for 
Did you mean: 

Make Payment Form Appear Without Clicking link

We are  trying to get the payment form to appear without having to click either the Payment link or Shipping link. Is there a way to circumvent this form so that just the Payment form appears?

 

We start here,

They enter there email, password and select and account type:

 

On SIGN ME UP it runs to Autho.net and creates a record on Autho and they create a token as we are using CIM. That token is then sent back to us and then we auto submit that back to Autho. This page appears briefly when we do that:

 

Again this auto submits back and returns to Autho and displays their form below:

 

 

You then have to click the AD A NEW PAYMENT METHOD link to display the form below:

 

 

Is there anyway to bypass/skip the form with the Add Payment Method/Shipping info links page and just display the ADD PAYMENT METHOD FORM?

 

Please note that this account is currently in test mode.

johnboy6945
Member
8 REPLIES 8

Sure. You can run getCustomerProfile(), get the payment profile ID's and information (code is in PHP):

 

    $response = $request->getCustomerProfile($data['profile']);

    if (!$response->isOk())
        $errors[] = $response->xml->messages->message->text;
    else
        for ($i = 0; $profile = $response->xml->profile->paymentProfiles[$i]; $i++) {
            if ($profile->payment->bankAccount)
                $data['profiles'][] = array($profile->customerPaymentProfileId, "Bank Account {$profile->payment->bankAccount->routingNumber}-{$profile->payment->bankAccount->accountNumber}");
            elseif ($profile->payment->creditCard)
                $data['profiles'][] = array($profile->customerPaymentProfileId, "Credit Card XXXXXXXX{$profile->payment->creditCard->cardNumber}");
        }  

Get a token, and display your own management page, similar to the one in the hosted popup code here for CIM:

http://developer.authorize.net/downloads/samplecode/

 

Essentially, rather than popping up Authorize.net's management page, you'll be making your own. Note that this page should be forwarded to, with some sort of guid in the URL, so it can be refreshed automatically every time the user finishes adding or updating something and you don't have to worry about post variables screwing things up. Again, if using PHP:

 

AuthorizeNetPopup.options.onPopupClosed = function() {
    window.location.href = '{$_SERVER["REQUEST_URI"]}';
};
TJPride
Expert

One more note - if there are no billing profiles yet, you can just make the "Add a Payment Method" form pop up automatically using:

 

<body onload="AuthorizeNetPopup.openAddPaymentPopup();">

(if using the code from the Authorize.net example)

Thanks for the reply but that will not work. We are not trying to extract the data. This is the intial set up of their account. The way Authorize.net has this set up is confusing for the user. It doesn't make any sense to direct a user to a page where they need to click a link and fill out the credit card information. That form should be loaded when they come to that page. This is what we were trying to accomplish:) 

johnboy6945
Member

Maybe I'm confused here. I'm using the iframe popup method, based on the sample code in the Downloads section. Are you using the redirect method? If you're using redirects, there's probably no way to do what you're trying to do. The iframe popups are more complicated but give you more control.

Ok our programmer has clarified what we are trying to do:)

 

When a new person signs up with us, we want to set up CIM to handle payments from him. We have a program that does the following:

 

1. Creates a new investor record on our database, giving us an investor number

2. Passes that new investor number and email address to Authorize.net to acquire a token for setting up the new investor's payment information

 

This call to the API results in a form (form A) on Authorize.net's site that has two small links: one for entering payment information and the other for entering shipping information. Since we never need shipping information, we'd like to bypass that form entirely and go straight to the payment information form (form B). And we'd like the submit button on form B to come back to our site, like the bottom button on form A does. Is that possible?

johnboy6945
Member

Yes, but not using the form you're using now.

What form?

Where do I find it?

As we are using TEST MODE do we need to switch to sandbox to do this? If so, how do we do that?

 

Thanks,

Claude

Try changing manage in the form's post URL to addPayment or addpayment and see if that works. If it doesn't, then your only choice, as far as I can tell, is to implement the iframe instead of the popup. The different options for that are documented in the pdf:

http://www.authorize.net/support/CIM_XML_guide.pdf

 

And for testing, you're always better off using a developer account in live mode than a regular account in test mode. Specifics for how to do that depend on what language you're using and whether you're using the API.