Zen Cart Logo
Forums / PayPal Website Payments Pro support / Micropayments and Credit Cards

Micropayments and Credit Cards

Views: 7,487

Results 1 to 20 of 35
14 Dec 2012, 6:36 PM
#1
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Micropayments and Credit Cards

This one is for Dr Byte.

We have gone through a few scenarios to get the best possible payment pricing over at Paypal and are now using them to do our credit card processing as well with PayPal Website Payments Pro.

We are approved for micropricing and being charged at that rate for all transactions.

Does your code from this thread dated January 2010
Re: Order total threshold for multiple ebay accounts for one shopping cart
http://www.zen-cart.com/showthread.php?145047

work with Express that is coupled with the Website Payments Pro?

Your original Post in that thread:> To integrate micropayments support with Express Checkout, use the following steps:

  1. Edit /includes/modules/payment/paypal/paypal_curl.php
    Around line 460, in the _buildNameValueList class method, add the new lines as indicated here:
    Code:
    if ($this->_signature != '') $commpairs['SIGNATURE'] = trim($this->_signature);

    // Adjustments if Micropayments account profile details have been set
    if (defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD != ''
    && $pairs['AMT'] < strval(MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD)
    && defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME != ''
    && defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD != ''
    && defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE != '') {
    $commpairs['USER'] = str_replace('+', '%2B', trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME));
    $commpairs['PWD'] = trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD);
    $commpairs['SIGNATURE'] = trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE);
    }

    $pairs = array_merge($pairs, $commpairs);

  2. Create a new file: /includes/extra_configures/paypal_micropayments_credentials.php, and insert the following PHP code, substituting your actual API credentials from your Micropayments account:
    Code:

<?php /** * Micropayments Credentials */ define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME', 'insert your API-Username from your Micropayments account here'); define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD', 'insert your micropayments API password here'); define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE', 'insert your micropayments API signature here'); // The following determines the purchase amount threshold under which the Micropayments account will be used for transacting. Transactions over this amount will use regular credentials. define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD', '10'); ** Disclaimer: I apologize that I've not had a chance to actually test this code yet. Feedback appreciated. ** If you choose to use this code update on your site, please consider supporting the code development by making a donation here: <http://www.zen-cart.com/donate>
14 Dec 2012, 7:41 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

Yes. And the first edit is already built-in to v1.5

14 Dec 2012, 7:44 PM
#3
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

Awesome, Thx Dr. Byte (I have 1.5 in beta with our revisions and haven't finalized it yet - soon!!)... and I think I asked backwards...

Instead of .... Does the code work with Express that is coupled with the Website Payments Pro?

It should have read... Does the code work with Website Payments Pro that is coupled with the Express?

14 Dec 2012, 7:55 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

I believe it should work with both express and pro, without any change to the instructions posted.

15 Dec 2012, 5:37 PM
#5
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

I implemented it this morning (the coding was already in the curl file, so I just added the credentials file). When I test, I just get stuck in an infernal loop... confirm the order step three takes me back to step 2 (payment page).

Any Suggestions?

15 Dec 2012, 5:40 PM
#6
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

email says 1 user authentication failed... and the loop only happens on orders under 10. I will doublecheck my api credentials in that file (but I copied and pasted them)

16 Dec 2012, 6:11 PM
#7
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

I double checked api credentials and they are right. I am not sure why it loops. Is there any way to troubleshoot this?

16 Dec 2012, 8:02 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

If PayPal's server is rejecting it and saying the credentials are wrong, then you'll need to sort that out with PayPal. https://www.paypal.com/mts

16 Dec 2012, 8:15 PM
#9
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

I have a conference call with them tomorrow. I will let you guys know what they see on there end.

17 Dec 2012, 8:59 PM
#10
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

The account we have had with them for almost 10 years is a 1.5 and won't work with this, so we are setting up a new one :) so we can use their 2.0 account. :) Then we can test. Still in progress

17 Dec 2012, 10:58 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

I believe Micropayments has always required a second paypal account in order to use it.

So you can keep using your main account for your higher-priced purchases, and use your micropayments account for lower-priced purchases.

2 Jan 2013, 9:12 PM
#12
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

Hi Dr Byte Happy New Year!

This script does not work (was on the phone with paypal for 3 hours today)

with the micropaymets credential file in, the following error is returned after hitting pay now in paypal and returning back to zen

Cart Error Says:
An error occurred when we tried to contact the payment processor. Please try again, select an alternate payment method, or contact the store owner for assistance. (10409 You're not authorized to access this info.)

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_soap_errorcodes
10409
You’re not authorized to access this info.
Express Checkout token was issued for a merchant account other than yours.

It seems like it could be API confusion?

Paypal Integration is always willing to help out on this, but it looks like the issue is in the script.

My set up is...
Paypal Express Checkout (without the PayFlow option enabled) (wouldn't work with it enabled either)
Paypal Website Payments Pro (for accepting credit cards)

In testing, we tried just using the payflow payment plugin along side of website payments standard - IPN as well. No go. We tested so much, but it all came back to... when that micropayments file is in the extra configures folder, I get errors.

9 Jan 2013, 6:16 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

The script simply uses the alternate set of credentials when the micropayments limit applies.
Has PayPal confirmed that they're receiving all the correct credentials when that error appears? Or are they getting a mixed set, such as perhaps the wrong username?

9 Jan 2013, 11:33 PM
#14
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

ksoup:

Hi Dr Byte Happy New Year!

This script does not work (was on the phone with paypal for 3 hours today)

with the micropaymets credential file in, the following error is returned after hitting pay now in paypal and returning back to zen

Cart Error Says:
An error occurred when we tried to contact the payment processor. Please try again, select an alternate payment method, or contact the store owner for assistance. (10409 You're not authorized to access this info.)

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_soap_errorcodes
10409
You’re not authorized to access this info.
Express Checkout token was issued for a merchant account other than yours.

It seems like it could be API confusion?

Paypal Integration is always willing to help out on this, but it looks like the issue is in the script.

My set up is...
Paypal Express Checkout (without the PayFlow option enabled) (wouldn't work with it enabled either)
Paypal Website Payments Pro (for accepting credit cards)

In testing, we tried just using the payflow payment plugin along side of website payments standard - IPN as well. No go. We tested so much, but it all came back to... when that micropayments file is in the extra configures folder, I get errors.

The script is not working. We tested it without the plugin and it worked fine, and when we add the module it didn’t work. We understand that the script is using the alternate set, however when passed through paypal servers it is not recognizing the secure token id required to validate the entire transaction. That’s why the message is returning from our servers as such.

It doesn’t work with Payflow or by itself. Have you been able to test it?

10 Jan 2013, 4:45 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

I already read your prior post. No need to quote it back again.

You haven't said whether PayPal is actually receiving the correct credentials. The error message sounds VERY much like it's getting the wrong combination of credentials, such as a MIX of micro and non-micro creds ... and of course that would be a problem. Only PayPal can tell you what exactly they're receiving on their end.

10 Jan 2013, 5:04 AM
#16
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

I don't know how that got there... I posted what the tech from PayPal said. He was on the phone with me for three hours about 1.5 weeks ago. This was what he said when I let him know your response to my post.


The script is not working. We tested it without the plugin and it worked fine, and when we add the module it didn’t work. We understand that the script is using the alternate set, however when passed through paypal servers it is not recognizing the secure token id required to validate the entire transaction. That’s why the message is returning from our servers as such.

10 Jan 2013, 5:05 AM
#17
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

Further to that, we checked all credentials. I quoted to him exactly what I was entering in the payment module as well as what I put in the credentials file.

10 Jan 2013, 5:36 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Micropayments and Credit Cards

ksoup:

Further to that, we checked all credentials. I quoted to him exactly what I was entering in the payment module as well as what I put in the credentials file.
Right, and that's an important step.
But it's also potentially different from the credentials received on the other end.

What puzzles me is that the same code has worked great for various people who have used it since those posts you quoted from January 2010. Not sure why you're having troubles with it "now".

That said, your prior post indicates that PayPal thinks the "secure token" is wrong, and may not be a problem with the credentials part of it.
Now, that makes it even more puzzling since the secure token is generated by PayPal AFTER the credentials are sent. So, why it's suddenly different or invalid is the next problem that needs to be solved.

Have you turned on Debug Logging in your EC module? If so, please try a transaction again and post the logs (zip and attach, or post a URL where the zip can be downloaded). See this post about logs: http://www.zen-cart.com/showthread.php?61199-Debug-Logging-PayPal I'll remove the attachment or URL from your post after I download the zip.

10 Jan 2013, 5:32 PM
#19
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

We tested three different scenarios. Please let me know which is the one you want me to send you debugging on first.

We have two accounts with Paypal and confirm that both work when we enter the creds for either of them in our payment module. This has been properly tested. If you enter the creds for either, the money/transaction properly goes to the one that is currently entered.

(creds=credentials)

Creds Used for the following scenarios:
paypal_micropayments_credentials.php uses our current micropayment account with PayPal
Payment Modules are using the current standard tier creds from our PayPal standard pricing account
(NO Extra spaces following any entry... check! Copied and pasted with care :) )

First Scenario... Enabled >> Paypal Express Checkout (without Payflow) + Paypal Website Payments Pro USA works properly
Testing Results ..................... Put the micro creds php file in place --

Selecting the PayPal button (not credit card)
Under $10 order - works fine... order goes to the micro payment account.
Over $10 Order - step 2 of 4 - choose paypal > confirm the order > log into paypal and pay with balance > sent back to site to page 2 of 4 > confirm again > log into paypal and pay with balance hit ok > sent back to step 2 of 4.

Will send you debug logs.


Other Scenarios That I Did test with PayPal on Phone... Can Test again giving you whatever information would help.


Second Scenario... Enabled >> Paypal Express Checkout (with Payflow) + Paypal Website Payments Pro USA works properly
Test Results ..................... Put the micro creds php file in place and .... will run testing again with debug and report further

Third Scenario... Enabled >> PayPal Website Payments Standard - IPN (using the proper protocol for IPN) + Paypal Website Payments Pro USA works properly
Test Results ..................... Put the micro creds php file in place and .... will run testing again with debug and report further

Fourth Scenario... Enabled >> PayPal Payflow Pro - Gateway + Paypal Website Payments Pro USA works properly
Test Results ..................... Put the micro creds php file in place and .... will run testing again with debug and report further

10 Jan 2013, 6:11 PM
#20
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Micropayments and Credit Cards

I PMd you with a link to the log file zip. The transaction that was failing for me in the aforementioned testing should be the one with 440x in the filename.

Here is that error I saw when working with PayPal.

[L_ERRORCODE0] => 10409
[L_SHORTMESSAGE0] => You're not authorized to access this info.
[L_LONGMESSAGE0] => Express Checkout token was issued for a merchant account other than yours.
[L_SEVERITYCODE0] => Error
[CURL_ERRORS] => 

)

Thank you for having a look, DrByte. I am not going to do the next round of testing until I hear from you.