PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

PayPal API inserting code in customer messages

20 replies to this topic
#1
sm3004

    PrestaShop Apprentice

  • Members
  • PipPip
  • 107 posts
When customers order from my site and pay with Paypal API, I get a copy of some code returned from Paypal that is displayed in the customer messages:

Making new connection to 'api-3t.paypal.com/nvp' Connect with CURL method sucessfull Sending this params: METHOD=DoExpressCheckoutPayment&VERSION=53.0&PWD=86WGCYE9BY&USER=sales_api1.aboutagirl.com.au&SIGNATURE=AWX8wp34w7AL

[.........]

CORRELATIONID -> 192f4da2b193 ACK -> Success VERSION -> 53.0 BUILD -> 1179072 TRANSACTIONID -> 1M250933674716134 TRANSACTIONTYPE -> expresscheckout PAYMENTTYPE -> instant ORDERTIME -> 2010-02-09T06:06:28Z AMT -> 87.73 FEEAMT -> 3.28 TAXAMT -> 0.00 CURRENCYCODE -> AUD PAYMENTSTATUS -> Completed PENDINGREASON -> None REASONCODE -> None Order finished with PayPal!



How do I prevent it from being inserted in the customer messages which also are displayed in the email I get registering an order...?

#2
sm3004

    PrestaShop Apprentice

  • Members
  • PipPip
  • 107 posts
Maybe an image will help.

So when people order from paypal, i get an email using the Mail Alerts Module stating that I have received an order. I have my message manager set up to automatically print all emails that are new orders, but unfortunately the orders payed through PayPal all include a ton of code that makes the printouts stretch across the page leaving out the price, quantity, vouchers and totals and as a result, half the order is missing on the printed email.

Attached Files



#3
Seank

    PrestaShop Newbie

  • Members
  • Pip
  • 15 posts
Hi

Did you get this resolved - having exactly the same issue - orders are being processed successfully though!

Thanks

#4
adamus007p

    PrestaShop Apprentice

  • Members
  • PipPip
  • 177 posts
me too, same problem, anybody to help??
Multi Digital Files Download, upload - Sell digital products

pro dj samples for DJs and for music production

#5
glenns

    PrestaShop Apprentice

  • Members
  • PipPip
  • 67 posts
Same here!

First order and everything went ok but I have this code message from PayPal.

Is this sent to the customer, or just shows up in the back office under customer messages?

Can it be eliminated somehow with a setting in PayPal?
Thanks!
----------------------------
http://www.presto-changeo.com/ <- For modules and programming!
----------------------------
http://www.nethercot...structions.com/ <- Prestashop modules & programming!

#6
glenns

    PrestaShop Apprentice

  • Members
  • PipPip
  • 67 posts
Anybody? Is this a bug in Prestashop, or can you just ignore it?
----------------------------
http://www.presto-changeo.com/ <- For modules and programming!
----------------------------
http://www.nethercot...structions.com/ <- Prestashop modules & programming!

#7
Klixin

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
same problem for me too. The problem is it spans out the 'New Order' email that i receive and prints to 4 pages instead of the usual 1.

#8
johnny70

    PrestaShop Newbie

  • Members
  • Pip
  • 9 posts
Has this been solved? I'm getting the same issue.

Thanks,
J

#9
Dan1

    PrestaShop Apprentice

  • Members
  • PipPip
  • 186 posts
I have the same issue. Is there a fix?

#10
Martech

    PrestaShop Newbie

  • Members
  • Pip
  • 1 posts

From 1294197700:

I have the same issue. Is there a fix?


Yes, there is.
Edit the file "paypalapi.php" in your "/modules/paypalapi/" folder. Look for "htmlentities", as in the following lines:

353 // Making log
354 $id_transaction = strval($result['TRANSACTIONID']);
355 $this->_logs[] = $this->l('Order finished with PayPal!');
356 // $message = Tools::htmlentitiesUTF8(strip_tags(implode("\n", $this->_logs)));
357 $message = Tools::htmlentitiesUTF8(strip_tags($id_transaction));
358


Line 356 in this example is the original line; it pastes the whole communications-log into the message. I made a copy of that line, uncommented it, and edited the new line to look like line 357. All I have in the message now is the transaction id.
The downside of this simple solution is of course, that you don't get the error-code, if anything went wrong. On the other hand, if anything did really go wrong, you should never get the new-order-mail anyway, I think.

#11
budsaipan

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts
I'm having this same problem? Is there any real fix for this?

#12
budsaipan

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts
Anyone?? where is everyone?

#13
budsaipan

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts
Paypal guys help?

#14
budsaipan

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts
Really?? nobody knows this?!!! at least come in and say you guys are working on it. Its soooo frustrating.

#15
Fabien Serny

    PrestaShop Fanatic

  • PrestaTeam
  • 1427 posts
Hi budsaipan,

This is not a bug, it's just for your information so there is no need to fix it.
If you want to remove it, just apply the fix from Martech.

Best regards,
[b]Fabien Serny[b] • Developer | DéveloppeurPrestaShop | Twitter

#16
Fabien Serny

    PrestaShop Fanatic

  • PrestaTeam
  • 1427 posts
Hi LerryGeorge,

I don't understand what your problem is.
This message is only readable by the merchant (not the customer) and it is only here to have a backtrace from your PayPal paiement (it helps the day you'll have a problem with the module).

What is your problem exactly ? What do you mean by using this e-mail "to book a packing slip" or by "at the basal there is added accent" ?

Best regards,
[b]Fabien Serny[b] • Developer | DéveloppeurPrestaShop | Twitter

#17
budsaipan

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts
The problem is some merchant rely on the customer message section to get the correct information from the customer as when they need to ship or order their products.

Now Martech solution stops showing the logs on the customer message completely and by doing that also stops showing any customer message. It's not a permanent solution.

#18
C@Miltec

    PrestaShop Newbie

  • Members
  • Pip
  • 5 posts
I'd say it IS a bug as it does get sent to the customer and more so as I've stopped using the PayPal api and it is still being sent, just looks messy and unprofessional!

#19
Fabien Serny

    PrestaShop Fanatic

  • PrestaTeam
  • 1427 posts
@budsaipan It's just some log about the PayPal transaction, I don't understand why it bother you so much.

@C@Miltec The customer does NOT receive this message. I think you're refering to another problem. If you stop to use PayPal API and you still have a mail sent to customer with log, it is the proof that it not the PayPal API module which is doing that
Could you forward me one of this e-mail that your customer received (not on of you received as a merchant) ?

A lot of merchants are using this module without complaining about the log.
[b]Fabien Serny[b] • Developer | DéveloppeurPrestaShop | Twitter

#20
C@Miltec

    PrestaShop Newbie

  • Members
  • Pip
  • 5 posts
Sorry, it's not in the emails to the customer but on the order confirmation page they are directed to after payment and I believe I am referring to the same issue. I agree the log should be saved somewhere but there is something awry if it still being added to orders when the PayPal api has been removed, not necessarily in the PayPal api then but perhaps Prestashop? It is happening in my shop using version 1.4.0.17 but not on the shop using version 1.4.3 so that may fix it, If I update the second shop any time soon I'll post if it solves it.