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

Micropayments and Credit Cards

Views: 7,487

Results 21 to 35 of 35
10 Jan 2013, 6:24 PM
#21
drbyte avatar

drbyte

Sensei

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

Micropayments and Credit Cards

Oh. Your last post suggests that there isn't a problem with making micropayments, but rather the REGULAR payments suddenly have a problem. Am I understanding that correctly?
I had been interpreting your earlier posts as saying that you couldn't make micropayments, but now you're saying the opposite.

10 Jan 2013, 6:35 PM
#22
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

Sorry, yes I guess that would be the case. I only was saying micro because when we put micro creds php file in, things break.

10 Jan 2013, 7:19 PM
#23
drbyte avatar

drbyte

Sensei

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

Re: Micropayments and Credit Cards

You said you're using v1.3.9h, so I'll try to use line numbers that suit 1.3.9h:

I believe making the following changes to the paypalwpp.php module will help:

~~1. Around line 1509:```
if (!isset($options['AMT'])) $options['AMT'] = number_format($order_amount, 2);
[B] $this->amount_value_for_micropayment_check = $options['AMT'];[/B]


2. line 1622:```
    $response = $doPayPal->GetExpressCheckoutDetails($_SESSION['paypal_ec_token']);

becomes```
$response = $doPayPal->GetExpressCheckoutDetails($_SESSION['paypal_ec_token'][B], array('AMT'=>$this->amount_value_for_micropayment_check)[/B]);

~~
10 Jan 2013, 7:37 PM
#24
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

Added the code where it should go and tested. I get the same response. An order under $10 went through fine.

For an order of $12.98, I check out > log in paypal and pay with balance hit pay now > end back at step 2 of 4 > try again logging in to paypal and paying with balance hit pay now > get shot back to step 2 of 4.

Would you like the debug files? I will pm a link as well.
Thx :)

10 Jan 2013, 7:38 PM
#25
drbyte avatar

drbyte

Sensei

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

Re: Micropayments and Credit Cards

Grrr. Ya, the logs will help.

10 Jan 2013, 7:50 PM
#26
drbyte avatar

drbyte

Sensei

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

Re: Micropayments and Credit Cards

The problem is that Express Checkout transactions happen in 3 stages. And the 2nd stage knows nothing about the "order", such as the purchase amount. As such the 2nd stage doesn't know whether to proceed with micropayments creds or normal creds.
Toying with some possible approaches.

The downside is that my micropayments testing account is acting up so I'm having to fudge a lotta stuff to even do tests, and so I might still give you some untested suggestions. Apologies for that.

10 Jan 2013, 7:54 PM
#27
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

Thank you, Dr. Byte. I have set aside the time to test (and happy to follow orders :) ). Sorry it is giving a fit.

10 Jan 2013, 7:58 PM
#28
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

I do have the payflow module ready to go (installed but not activated), if needed... as well as I can try using the standard IPN in any testing if any of those scenarios work better.

We just need to have pro on to accept credit cards on the payment page.

10 Jan 2013, 8:00 PM
#29
drbyte avatar

drbyte

Sensei

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

Re: Micropayments and Credit Cards

No, there's no code written for using micropayments in any of those modules. It's rare to use either of those modules for production anyway.

10 Jan 2013, 11:04 PM
#30
drbyte avatar

drbyte

Sensei

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

Re: Micropayments and Credit Cards

You can undo the changes I suggested a couple posts ago. They're useless. :)

Instead, change the code in the paypal_curl.php file like this:```
// Adjustments if Micropayments account profile details have been set
if (defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD != ''
&& [B](($pairs['AMT'] > 0 && [/B]$pairs['AMT'] < strval(MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD) [B])
|| ($pairs['METHOD'] == 'GetExpressCheckoutDetails' && isset($_SESSION['using_micropayments']) && $_SESSION['using_micropayments'] == TRUE))[/B]

&& 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);
[B] $_SESSION['using_micropayments'] = ($pairs['METHOD'] == 'DoExpressCheckoutPayment') ? FALSE : TRUE;[/B]
}

10 Jan 2013, 11:24 PM
#31
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

By George! I think we might have it!! I need to check if they went to the right accounts, but no loop. I also would like to test using credit card just to be sure as well... back in just a couple...

10 Jan 2013, 11:36 PM
#32
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

I tested with Credit Card as well!! All is good it would seem (didn't try it with discounts - coupon or gift certificate)

They are filed in the proper accounts and charged at the proper fees!!

Ok... so the only caveat to this system would be. You have to manually do any refunds through your micro account because it isn't directly interfaced with your orders screen (which I am ok with). I successfully refunded from the order screen from an order over $13 because it is hooked up to the standard tier.

Thank you so much!! We will be donating!

11 Jan 2013, 3:36 AM
#33
drbyte avatar

drbyte

Sensei

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

Re: Micropayments and Credit Cards

Whew! Glad we got that sorted out!
Thanks for your patience. Turns out this is the same issue reported by @count in that prior thread, but never fully resolved. I've updated that original post to minimize confusion for others in the future.

We'll build this fix into a future release.

And thanks for the donation. It's always appreciated.

9 Mar 2013, 12:28 AM
#34
nizernoj avatar

nizernoj

New Zenner

Join Date:
Apr 2012
Posts:
21
Plugin Contributions:
0

Re: Micropayments and Credit Cards

Dr. Byte, Not sure I am following this thread properly... Are you saying that we can use 2 separate PayPal accounts on our Zen Cart store? Will Zen Cart choose which one to use based on the order total?

Here is the situation:

  • We are set up with 2 PayPal Accounts (micropayments & Standard payments)
  • When someone purchases an order UNDER $12 we want to process payment through our micropayments account
  • When someone purchases an order OVER $12 we want to process payment through out standard payments account

This would allow us to save the most money on transactions... and would be amazing!

Is this possible? How would I set this up?

Thanks in advance.

9 Mar 2013, 2:01 AM
#35
ksoup avatar

ksoup

Zen Follower

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

Re: Micropayments and Credit Cards

nizernoj:

Dr. Byte, Not sure I am following this thread properly... Are you saying that we can use 2 separate PayPal accounts on our Zen Cart store? Will Zen Cart choose which one to use based on the order total?

Here is the situation:

  • We are set up with 2 PayPal Accounts (micropayments & Standard payments)
  • When someone purchases an order UNDER $12 we want to process payment through our micropayments account
  • When someone purchases an order OVER $12 we want to process payment through out standard payments account

This would allow us to save the most money on transactions... and would be amazing!

Is this possible? How would I set this up?

Thanks in advance.

It is working for us hizernoj! We used the code in post #1 and DrByte's code addition in post #30 and have been double processing for a while now.