Author Topic: Pivotal Payments  (Read 10478 times)

chrisakin

  • Beginner
  • *
  • Posts: 6
Pivotal Payments
« on: April 21, 2010, 12:41:03 pm »
Hello everyone,

I'm a noob to Virtuemart, and I'm trying to get things going.  I have Pivotal Payments as my credit card processor.  They have their own gateway.  Can someone point me in the right direction as far as what module I need to use/install to process credit cards through Pivotal Payments.  Or...is there a module that's generic where I can plug in a gateway and the related password information to process cards?

Thank you,

Chris Akin
  Akin IT Services
  www.akinitservices.com

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #1 on: April 21, 2010, 17:43:55 pm »
Your question is very timely! Just finished an integration with Pivotal...

Ask them to set up authorize.net emulation, and use the authorize payment module that's included in Virtuemart. Works fine so far, though the portal e-mails don't seem to be working yet - looking into it now.

Cheers,
--Rich

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #2 on: May 06, 2010, 06:39:20 am »
A follow-up on Authorize.net emulation for Pivotal Payments...

The e-mail notification service (which optionally sends an e-mail to the vendor and the end customer) doesn't work, but it's been stable over the past few weeks....

caplinq

  • Jr. Member
  • **
  • Posts: 60
Re: Pivotal Payments
« Reply #3 on: June 07, 2010, 17:20:01 pm »
richsung et al.,

We just got set up with Pivotal Payments and need it integrated into Virtuemart.  I just got off the phone with Pivotal who sent me the link in the Virtuemart forum with these notes.  Bummer that Pivotal Payment can't help directly, but can anyone help us integrate?  I have my username and password for the emulator already, but it doesn't seem to work.

I only changed two files in the root/administrator/components/com_virtuemart/classes/payment folder:
- ps_authorize.php
- ps_authorize.cfg.php

In the ps_authorize.cfg.php file I just changed the username and password, and in the ps_athorize.php file, I just changed changed the URL to point to Pivotal payments on:

Line 52:
Code: [Select]
<input type="text" name="AN_HOSTNAME" value="<?php echo defined('AN_HOSTNAME') ? AN_HOSTNAME 'emulator.pivotalpayments.com' ?>" />Line 395:
Code: [Select]
$host = 'emulator.pivotalpayments.com';Line 633:
Code: [Select]
$host = 'emulator.pivotalpayments.com';
Am I missing something?

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #4 on: June 07, 2010, 22:18:44 pm »
Yes, there was one critical thing I changed in the Pivotal authorize payment system... the problem is the full path to the emulator isn't correct if you just change the HOSTNAME.

In the cfg file, my host is set to:

define ('AN_HOSTNAME', 'emulator.pivotalpayments.com/Emulator/PaymentGateway.aspx');

and in the php file in 2 places (lines 395, 633):

-      $result = vmConnector::handleCommunication( "https://$host:443/gateway/transact.dll", $poststring );
+      $result = vmConnector::handleCommunication( "https://$host", $poststring );

This allows you to set the full path to the payment gateway in the config file.

Hope this helps,
--Rich


savan

  • Beginner
  • *
  • Posts: 3
Re: Pivotal Payments
« Reply #5 on: June 09, 2010, 12:31:32 pm »
hi thanks for your help with the pivotal payment gateway

but even after making all the changes as u have told Still it is not working when I am trying with the testing mode I am getting the below reply

Error: 3--128-R---This transaction cannot be processed.
Error: Failure in Processing the Payment (ps_authorize)

and when I am trying to get with live mode then I am getting the below response

Error: The transaction could not be completed.
Error: Failure in Processing the Payment (ps_authorize)

I think in live mode the pivotal payment is not responding. As I have checked the login details it is fine so I am not getting the further way in which i can get it worked

Please help if u have idea with this issue

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #6 on: June 09, 2010, 13:57:43 pm »
Check this out:
http://forum.virtuemart.net/index.php?topic=63866.0

Make sure you have all of the authorize variables set properly:

- Authorize.net API Login ID should be your store id that has the "emu" word in it as sent over by Pivotal
- and make sure you're using the right transaction key... it should be the one sent over by Pivotal especially for the emu account

If the above doesn't work, call up Pivotal to see what they're seeing on their end.

caplinq

  • Jr. Member
  • **
  • Posts: 60
Re: Pivotal Payments
« Reply #7 on: June 09, 2010, 23:25:07 pm »
Hi richsung,

I'm having the same problem as savan.  I checked the Login API and YES it does have the word emu in it as you mention, and YES I agree that the password is different then for the regular login.  I still get the same error as savan.

Is there anything else I am missing?  I tried making the changes, but then just loaded a fresh copy, and made these same changes but get the same error.  When I contacted Pivotal, they said that my account has not even been accessed yet, which tells me the redirect is not working.  Any chance you can send a copy of the ps_authorize.php file and the ps_authorize.cfg.php file (without the ID and password of course) that we can use to compare?

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #8 on: June 10, 2010, 02:51:34 am »
Ahh.. just going through my e-mail chain with Pivotal...

A couple of observations:

1) It does fail in "test" mode, so make sure that the setting is OFF
2) Are you also ensuring that you're posting this from a secure URL (https://)?
3) Here are my exact changes as a patch file.

-define ('AN_TEST_REQUEST', 'TRUE');
-define ('AN_LOGIN', 'LoginID344f');
+define ('AN_TEST_REQUEST', 'FALSE');
+define ('AN_LOGIN', 'xxxxxemu1');
+define ('AN_HOSTNAME', 'emulator.pivotalpayments.com/Emulator/PaymentGateway.aspx');
 define ('AN_TYPE', 'AUTH_CAPTURE');
 define ('AN_CHECK_CARD_CODE', 'YES');
-define ('AN_VERIFIED_STATUS', 'P');
-define ('AN_INVALID_STATUS', 'P');
+define ('AN_VERIFIED_STATUS', 'C');
+define ('AN_INVALID_STATUS', 'F');

and

-               $result = vmConnector::handleCommunication( "https://$host:443/g                                                                        ateway/transact.dll", $poststring );
+               // Use full hostname - was https://$host:443/gateway/transact.dl                                                                        l
+               $result = vmConnector::handleCommunication( "https://$host", $po                                                                        ststring );

                if( !$result ) {
                        $vmLogger->err('The transaction could not be completed.'                                                                         );
@@ -633,7 +634,8 @@
                        $host = 'secure.authorize.net';
                }

-               $result = vmConnector::handleCommunication( "https://$host:443/g                                                                        ateway/transact.dll", $poststring );
+               // Allow setting of entire path to authorize.net server... was h                                                                        ttps://$host:443/gateway/transact.dll
+               $result = vmConnector::handleCommunication( "https://$host", $po                                                                        ststring );

--Rich

savan

  • Beginner
  • *
  • Posts: 3
Re: Pivotal Payments
« Reply #9 on: June 10, 2010, 08:39:41 am »
Hi thanks for your reply again

I have done all the setting as u told but the pivotal payment is not responding it is not giving any reply even

So I tried by passing the whole data as get method and put full url in my broswer and the screen was just Blank as it didn't gave any reply,  as I think atleast it should give some reply atleast some error message.

I want to ask that is this url :
https://emulator.pivotalpayments.com/Emulator/PaymentGateway.aspx
is right or any issue is there.

Also the parameter being passed are with the same name as it is in authorize
x_login=String&x_tran_key=String.....
is there any change in parameter names.

Please help as u have done the same thing or should anything be change here,


richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #10 on: June 10, 2010, 09:03:42 am »
Are my settings correct? Absolutely - we're processing transactions on an ongoing basis.

I think you guys probably will have done everything you can on your parts, and the next step is you need to enlist the help of Pivotal's integration guy now (though the one I dealt with doesn't seem to be with the company any more). Since you're paying for their service, they should be able to support you in checking things out on their end (especially with regards to the transaction error).

--Rich

savan

  • Beginner
  • *
  • Posts: 3
Re: Pivotal Payments
« Reply #11 on: June 15, 2010, 08:05:26 am »
hi thanks for your help with the pivotal payment

Still we have issue with it as we asked the support team of pivotal as they told that we have to change the transtype "SALE" that what i want to ask u is have u made any change in transtype?

Also if u can provide the ps_autorize.php (the source code for the pivotal payment) as u have done this so may be your source code file can help us.

Please help us to get out of this.

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #12 on: June 15, 2010, 14:06:45 pm »
Hmm... You appear to have a line missing in the file you sent me...

>$poststring = substr($poststring, 0, -1);
397c397,398

x_method is set to CC
x_type is set to PRIOR_AUTH_CAPTURE

The file is attached...

Best of luck,

--Rich

[attachment cleanup by admin]

caplinq

  • Jr. Member
  • **
  • Posts: 60
Re: Pivotal Payments
« Reply #13 on: June 15, 2010, 16:55:59 pm »
richsung,

Thanks for this.  I assume the only thing to do then is change:
Line 52:
Code: [Select]
<input type="text" name="AN_HOSTNAME" value="<?php echo defined('AN_HOSTNAME') ? AN_HOSTNAME 'emulator.pivotalpayments.com' ?>" />Line 395:
Code: [Select]
$host = 'emulator.pivotalpayments.com';Line 633:
Code: [Select]
$host = 'emulator.pivotalpayments.com';
is that right?

richsung

  • Jr. Member
  • **
  • Posts: 85
Re: Pivotal Payments
« Reply #14 on: June 15, 2010, 17:48:51 pm »
Hey caplinq,

Not sure how better I can explain this. Use the authorize php file I attached in the previous posting, and set your config parameters correctly, as follows;

+define ('AN_TEST_REQUEST', 'FALSE');
+define ('AN_LOGIN', 'xxxxxemu1');
+define ('AN_HOSTNAME', 'emulator.pivotalpayments.com/Emulator/PaymentGateway.aspx');
+define ('AN_VERIFIED_STATUS', 'C');
+define ('AN_INVALID_STATUS', 'F');

This works, and if there are further problems, somebody on the Pivotal side needs to see why the payment request isn't going through.

--Rich