Post by someguy9 » Tue May 08, 2012 3:49 am

Is there anyway to feed Paypal's transaction ID and authorization ID back to Opencart? Similar to how authorize.net does, where it puts the transaction details in the order history.

oh.


User avatar
Newbie

Posts

Joined
Wed Jan 11, 2012 11:14 pm
Location - College Park, MD

Post by Avvici » Tue May 08, 2012 3:56 am

For standard:
-Pay Pal IPN (would need to be integrated)
-Default CALL BACK (add another switch)

PP_PRO:
DoDirectPayment API Response (already installed to get Transaction ID #
IPN (would need to be integrated)
Last edited by Avvici on Tue May 08, 2012 6:03 am, edited 1 time in total.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Avvici » Tue May 08, 2012 5:59 am

Open catalog/controller/payment/pp_standard.php

Find

Code: Select all

switch($this->request->post['payment_status']) {
Man, you have CODES GALORE HERE (in Payment Information Variables)https://cms.paypal.com/us/cgi-bin/?cmd= ... TVariables

Below the first SWITCH ,just use another SWITCH for other variables like this:

Code: Select all

	switch($this->request->post['payer_status']) {
					case 'verified':
						$payer_status= "Verified";
						break;
}
Now just use the variable $payer status to your delight. I haven't looked at all of the variables but I assume TRANSACTION ID is in there somewhere.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Qphoria » Tue May 08, 2012 7:06 pm

(1.4.x and 1.5.x)

1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND:

Code: Select all

$this->model_checkout_order->update($order_id, $order_status_id);
3. REPLACE WITH:

Code: Select all

$this->model_checkout_order->update($order_id, $order_status_id, print_r($_REQUEST, 1));
That will store everything from paypal's IPN message to your order history log

In fact, it is a universal solution. This works the same with EVERY redirect style payment method, not just paypal. Any payment that uses http callback. Server-to-Server based payments would need to be adjusted for the response variable and format over curl.

Attachments

logpaymentmsg.png

logpaymentmsg.png (31.82 KiB) Viewed 4476 times


Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Avvici » Tue May 08, 2012 8:21 pm

I didn't think he wanted the entire array....From what I read he only wanted 1-2 params. Then again he could always parse the array prior to including it as the $comment argument.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by someguy9 » Tue May 08, 2012 9:21 pm

Thanks Qphoria! Gonna implement this asap

Thanks guys, now I know the forums are helpful :)

oh.


User avatar
Newbie

Posts

Joined
Wed Jan 11, 2012 11:14 pm
Location - College Park, MD

Post by someguy9 » Tue May 08, 2012 9:36 pm

Qphoria is there a way to make the response show up without having to interact with paypal? I have it on authorization mode and it seems to only give me comments when I void/interact with the order in paypal

oh.


User avatar
Newbie

Posts

Joined
Wed Jan 11, 2012 11:14 pm
Location - College Park, MD

Post by Avvici » Tue May 08, 2012 10:51 pm

I know the answer to this but since you are asking Q, I will let him answer :)

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by someguy9 » Tue May 08, 2012 11:04 pm

avvici wrote:I know the answer to this but since you are asking Q, I will let him answer :)
Please Avvici give me the launch codes!

oh.


User avatar
Newbie

Posts

Joined
Wed Jan 11, 2012 11:14 pm
Location - College Park, MD

Post by Avvici » Fri May 11, 2012 11:17 pm

It's probably because by default your notify boolean is at FALSE notify = false. Change that to TRUE...and you are good to go.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Qphoria » Sat May 12, 2012 12:58 am

lol dont wait for me to answer :) I come and go

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Avvici » Sat May 12, 2012 1:03 am

I waited long enough. I couldn't contain myself

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by mdastous » Wed Jul 11, 2012 5:39 am

For the non-coders among us, is there a quick patch for this?

All I want is for a PayPal screen to come up in my frame that asks for the user to enter their PayPal user name and password when they checkout.

-OR-

instead of going to http://www.paypal.com/cgi-bin/webscr can I get the Confirm Order button to open a new window automatically?

Thank you for any help you can provide on this matter.

Newbie

Posts

Joined
Sat Jul 07, 2012 11:53 pm

Post by Avvici » Wed Jul 11, 2012 7:39 am

Qphoria wrote:(1.4.x and 1.5.x)

1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND:

Code: Select all

$this->model_checkout_order->update($order_id, $order_status_id);
3. REPLACE WITH:

Code: Select all

$this->model_checkout_order->update($order_id, $order_status_id, print_r($_REQUEST, 1));
That will store everything from paypal's IPN message to your order history log

In fact, it is a universal solution. This works the same with EVERY redirect style payment method, not just paypal. Any payment that uses http callback. Server-to-Server based payments would need to be adjusted for the response variable and format over curl.
THIS IS THE QUICK PATH

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Qphoria » Fri Jul 13, 2012 11:09 pm

mdastous wrote:For the non-coders among us, is there a quick patch for this?

All I want is for a PayPal screen to come up in my frame that asks for the user to enter their PayPal user name and password when they checkout.

-OR-

instead of going to http://www.paypal.com/cgi-bin/webscr can I get the Confirm Order button to open a new window automatically?

Thank you for any help you can provide on this matter.
Paypal Standard does not allow iframe.. their page has framebuster scripts in place to prevent this.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by Avvici » Mon Jul 23, 2012 3:19 am

First may I ask what data you are wanting to receive? If you are using Pay Pal Standard there is quite a bit of data already coming back in the repose. It shows up in the Order History if you look. If you are using Pro then you get the Transaction ID only.
If this is not sufficient for you then you need set up the IPN yourself because it's not hard coded into Open Cart.
It would be something like:

Code: Select all

http://www.yourdomain.com/catalog/controller/payment/ipn
You'll need to extend the core and set up your public function index()

If you wish to use a standard IPN FILE that is outside of the Open Cart Class but still communicates with the Open Cart database check out the attached:

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by peteVA » Mon Jul 23, 2012 4:10 am

Thanks for the reply.

To be honest, I set it up years ago for an early version of CubeCart. I'd actually never paid much attention to it, but today I got a message from PayPal saying it was no longer an active URL, so I needed to do something about it.

From the sound of things, I can just clear it and OpenCart will operate with no problem. I'm happy with what I get now for OC, and it doesn't sound like I need it, so I'll try removing it.

Thanks, again.

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am

Post by Avvici » Mon Jul 23, 2012 4:44 am

Just clear it. The only reason you are going to use IPN is for something like Recurring Payments or Subscription. Open Cart does a good job getting the basic info on the return that will be found in Order History.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by peteVA » Mon Jul 23, 2012 6:06 am

OK, cool.

CubeCart sucked at it. Suspended carts that got to PayPal before they quit would hang up everything for days. Even with IPN and a couple of mods.
Last edited by peteVA on Sat Sep 22, 2012 10:46 pm, edited 1 time in total.

A Trusted Wholesale Dropshipper
Web Hosting Under $ 5.00 Month! FREE Shopping Carts!
25,000+ Real Wholesale & Dropship Sources!


User avatar
Active Member

Posts

Joined
Mon Jul 20, 2009 8:25 am
Who is online

Users browsing this forum: Baidu [Spider] and 76 guests