Coder Social home page Coder Social logo

prestashopcorp / paypal Goto Github PK

View Code? Open in Web Editor NEW
7.0 35.0 92.0 1.87 MB

[ARCHIVED] This repository contains old code. Development has moved to https://github.com/202-ecommerce/paypal

PHP 79.03% JavaScript 3.87% HTML 1.62% Smarty 14.35% CSS 1.13%
prestashop-module payment-module obsolete

paypal's Introduction

PayPal

About

Let customer pay with PayPal Express Checkout or PayPal Integral Evolution.


Note: This module is maintained by 202 ecommerce. Since 2016, development has moved to another repository.

To avoid confusions, this repository has been archived.


License

Released under the Academic Free License (AFL 3.0).

paypal's People

Contributors

202-ecommerce avatar alexsimple avatar dh42 avatar doekia avatar dpominov avatar firstred avatar gaillafr avatar groussac avatar ibndawood avatar jhoarau avatar joseantgv avatar kevindesousa202 avatar kpodemski avatar m-hume avatar matthieume avatar prestaedit avatar quetzacoalt91 avatar sgodard202 avatar slinkydeveloper avatar tbigueres avatar tchauviere avatar thoma202 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paypal's Issues

Order Confirmation and id_order = 0

Prestashop 1.6.1.9
Paypal Module: 3.11.1

I noticed that even if the id_order, processed by paypal payment is 0, the order is created correctly on backend, because code manages to find id_order, based on id_cart.

Though, the confirmation url call, is called passing id_order = 0:

/module/paypal/submit?id_cart=19&id_module=87&id_order=0&key=4a6617b44f87913235a764d3bb6b743

The result of this is the confirmation page does not show order details:

http://screencast.com/t/3fUMPL8MlcR

I found a workaround, as I posted here :https://www.prestashop.com/forums/topic/565752-paypal-integral-evolution-return-url-with-id-order0-no-order-in-bo/?p=2447951, but I leave you think about the right solution.

Cheers.

Development version

Where is the released version? Is it @thoma202's fork that is the new blessed release? Is it the one that we should use to make Pull Requests? This confusion, especially with fundamental modules like PayPal is not welcome. Shouldn't at least be on a develop branch in the PrestaShop organisation's repo?

Branch 1.7.x: incomplete or what?

The Prestashop italian community, I belong to, complains the fact that the Paypal module for 1.7 does not work. When the module is configured with API credential, on save, every of us receives an error:

An error occurred: check your credentials.

We also dug a bit in code and it seems some parts missing.
Is the released module complete?

SILOVER error message

Hi,

We are using PayPal for a while, and Curl has been installed and enabled some times ago.

Since 2 days, we have this error by mail with version 3.10.2 (latest):

PayPal response:
SILOVER -> name=LIVE6.APIT.1&silo_version=880&app=appdispatcher_apit&TIME=3581240662; domain
TIMESTAMP -> 2015-12-07T12:04:37Z

As Curl is already enabled, we didn't have any other solution.

Have you any suggestion on how to correct this ?

Regards

Delayed Site Response

Hi,

The instantiation of a TLSVerificator object in the PayPal constructor causes a TLS check to be run against https://www.howsmyssl.com/a/check.

Unfortunately, the constructor is run on every page view, both front and backend, thus this causes lots of page delays :(
Especially at the moment when howsmyssl.com is taking between 5 - 35 seconds to respond to requests!

This check need to be removed from PayPal::__construct as a matter of urgency.

To test, please comment out the following line from the bottom of PayPal:: __construct:

$tls_verificator = new TLSVerificator(true, $this);

Logos not displayed correctly in left column

When you hook the paypal module to the left column the logo image cannot be found. The path is incorrect. This is due to an inconsistency between the paths in logos.xml and the code. The result path generated is : /modules/paypal/modules/paypal/views... Either you remove the constant _PS_MODULE_DIR or the prefix "/modules/paypal" in logos.xml in the tag LocalPayPalVerticalSolutionPP.

Note : some languages (tag country) don't have /modules/paypal prepended.

Error.tpl can not override

We are trying to override in our theme but is imposible. I guess the issue is in
return $this->fetchTemplate('error.tpl');

An error occurred. Please check your credentials.

I followed all instructions trying to setup PayPal, but I keep getting the error "An error occurred. Please check your credentials.". What am I doing wrong? I'm using Prestashop 1.7.1.2 and PayPal v4.0.1

Non-static method PaypalPlusPui::getByIdOrder() should not be called statically

  • Last PayPal module version: 3.11.6
  • Last 1.6 PrestaShop version: 1.6.1.23
  • PHP: 5.6.30
  • HTTP server: Apache2

On final payment page, into PayPal popup window, I have this error: "Le système ne fonctionne pas pour le moment."

And from back log:

[Wed Dec 19 17:40:09.130271 2018] [:error] [pid 21061] [client 192.168.100.100:57609] PHP Deprecated: Non-static method PaypalPlusPui::getByIdOrder() should not be called statically, assuming $this from incompatible context in /var/www/html/modules/paypal/paypal.php on line 2625

Error shown to users on all correctly paid orders

Prestashop v1.6.1.0 spanish
PayPal module v3.11.5

On every order, an error like this one is shown to user in frontend when returning from PayPal:

Please try to contact merchant:

  1. An error occurred while processing payment.
    Total of the transaction (taxes incl): 54,41€
    Your order ID is: 575

Message is displayed in english, in a red background box below "Error en el pago" text, so it is not loading language files for some reason.

I have fixed it removing the conditional in express_checkout/submit.php

I've changed from this:
if (!$order || !$order_state || (isset($order_state_message) && ($order_state_message == 'payment_error'))) {

To this:
if (!$order || !$order_state) {

But It doesn't fix the problem, only remove the error message.
I suspect it may be related to the language file, but I can't find where the problem really is.

Can someone tell me why $order_state_message contains "payment_error" in correctly paid orders?

paypal rewrite shipping address.

When payment is confirmed the module rewrites customer shipping address with Paypal account datas.
After that the merchant is unable to ship to the address that the customer has choosen on checkout.

This happens around lines 211 of file /express_checkout/payment.php

Paypal currency conversion not working - MAJOR issue!

I've created an issue here: http://forge.prestashop.com/browse/PSCSX-5398

I'm copy/pasting here too:
Reproducible on a clean 1.6.0.14 installation.
Prices not converted in Paypal payment when Paypal currency is different from the user/shop currency.
The screenshots explain it very well, but steps to reproduce:
admin:

  1. Clean Prestashop install
  2. Install Paypal module
  3. Install USD currency
  4. Set Paypal currency to be shop default (EUR)
    as user:
  5. Select USD as currency
  6. Buy something
  7. Pay with Paypal
    result:
  8. Something that was $27.88 (USD) in the shop becomes €27.88 (EUR) in Paypal!!!
  9. Shipping is not affected so $7.51 (USD) becomes €7.00 (EURO)
    I can't stress this enough but this is MAJOR MAJOR issue!
    cart-summary
    default
    paypal-currency
    paypal

Dutch translations is mainly displayed in French

first 5 lines of nl.php

$_MODULE['<{paypal}prestashop>paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits  (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars)  avec PayPal.';
$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain de vouloir supprimer vos informations ?';
$_MODULE['<{paypal}prestashop>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.';
$_MODULE['<{paypal}prestashop>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.';

Composer package?

Could you please provide a composer package under packagist as you did for most of your modules?

Thanks.

How to install this?

It's not clear how to install this. If someone could point me in the right direction. Would be great!

module not working on multistore for PS 1.6.1.6

Hello,

I'm using Prestashop 1.6.1.6 and activated the multistore. Store A (euro) is working great with paypal. But store B (yen) is not working. We can configure the module without any problem. But when we click on the payment icon, the window that opens just say that the system is not working right now. Without any more information.

Any idea ? Thank you !

Whole English translation file is wrong!

Hi,

there is the en.php file, that doesn't have any english translations! The whole file is in french. Is there any right english translations to find?

Thank you

PHP Notice: Undefined index: RedirectRequired...

Hello,

here is a reccurrent PHP Notice that come back on PHP Error Log:
[16-Jul-2015 17:59:31 Europe/Paris] PHP Notice: Undefined index: RedirectRequired in /home/www/modules/paypal/express_checkout/payment.php on line 317

Apparently an "isset" on the variable result['RedirectRequired'] is missing.
Can you fix it, or tell us how to fix this issue ?
PS 1.6.0.14.

Paypal version 3.10.10

The current version on the repository is 3.10.5.
In Prestashop, I saw a new version (3.10.10) which correct an security issue.

Why this repository is not updated?

Problem with addresses witch contain "(" or ")"

If an address contains parentheses, for example: "Abbey Road (near the station)"

The address will not be transmitted to Paypal (field is empty). This is problematic because the payment is blocked "Unable to process the payment" if address1 became empty due to this bug.

Polish translation

In repository "master" is french translation in file pl.php.
In repository "dev" is correct polish translation.

Incomplete translation files

EN and DE languages seem to be fully translated, but it doesn't happen with the rest of languages (FR, IT, ES, NL, TR...)

Paypal module crashes with "Fatal Error" when Address State not set.

I've created an issue in http://forge.prestashop.com/browse/PNM-3410

I'm copy/pasting here too:

Paypal ExpressCheckout API requires some addresses to include state (link to info at the end). If for some reason such state was not defined in a user's address, Paypal module finishes the payment flow with a "Fatal error" screen with no chance to recover. By default most of those (but not ALL) countries in a new Prestashop 1.6.0.14 installation require state. But this is not true when updating from old installation. I was updating from 1.4 and this is how I experienced the bug.
Steps to reproduce:

  1. Clean Prestashop 1.6.0.14 install
  2. Install Paypal module
  3. Create an user with an address in Brazil (by default Brazil doesn't have states, but they are required in Paypal)
  4. Buy with Paypal
  5. Paypal doesn't complain about the wrong address - just ignores it
  6. When You complete the steps in Paypal.com and you are taken to your store, Paypal doesn't return correct(any) address (as it was ignored). This results in a "Fatal Error".
    When debug mode is enabled you can see some kind of debug info.
    The most reviewing is this:
    Notice: Undefined index: PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE in .../modules/paypal/express_checkout/payment.php on line 91

List of addresses requiring states:
Argentina, Brazil, Canada, China, Indonesia, India, Japan, Mexico, Thailand or USA. Source: https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/#id09BHCD0707U__id107SHG090HS

Paypal log always enabled

paypal api log is enabled in version 3.10.2: this causes security issue. The log file is not protected.

The correction is:

--- a/paypal/api/paypal_lib.php
+++ b/paypal/api/paypal_lib.php
@@ -31,7 +31,7 @@ define('PAYPAL_API_VERSION', '106.0');
 class PaypalLib
 {

-       private $enable_log = true;
+       private $enable_log = false;
        private $_logs = array();
        protected $paypal = null;
        public function __construct()

AuthenticatePaymentMethods.php in 3.10.6

classes/AuthenticatePaymentMethods.php in getPaymentMethodsByIsoCode:
'CZ' => array()
'GB' is completely missing.

Not possible to configure the module - returns 'Your country is not available for this module please go on Prestashop addons to see the different possibilities.' due to this.

undefined index PayPal_in_context_checkout (checkout's first step)

Patch:

diff --git a/paypal.php b/paypal.php
index 7e6bf3d..3ba166b 100644
--- a/paypal.php
+++ b/paypal.php
@@ -638,6 +638,7 @@ public function hookShoppingCartExtra()
                        'PayPal_lang_code' => (isset($values[$this->context->language->iso_code]) ? $values[$this->context->language->iso_code] : 'en_US'),
                        'PayPal_tracking_code' => $this->getTrackingCode((int)Configuration::get('PAYPAL_PAYMENT_METHOD')),
                        'include_form' => true,
+                       'PayPal_in_context_checkout' => false,
                        'template_dir' => dirname(__FILE__).'/views/templates/hook/'));

                return $this->fetchTemplate('express_checkout_shortcut_button.tpl');

Currency unsupported in PayPal's API

Hello developers,

Can you find a fix for this issue.

When I try to checkout with BGN (which is not supported currency by the API of PayPal) it returns me the following error:

PayPal response:
TIMESTAMP -> 2015-06-09T12:06:39Z
L_ERRORCODE0 -> 10605
L_SHORTMESSAGE0 -> Transaction refused because of an invalid argument. See additional error messages for details.
L_LONGMESSAGE0 -> Currency is not supported
L_SEVERITYCODE0 -> Error

Module version - 3.9.0 and every prior version is affected.
PS version - 1.6.0.14

Module settings: standard payments (or every other setting is afected)
Module settings in Payments: customer currency (if I select any other currency the module doesn't convert to the proper amount).

Can we have a settings in module page to choose to which currecy to convert prior payment if the current one is not supported?

Regards!

how to override the file paypal\paypal_orders.php?

I'm trying to override the class PayPalOrder (paypal\paypal_orders.php), I copied the entire file to
\override\modules\paypal\paypal_orders.php

I renamed the class in this way:

class PayPalOrderOverride extends PayPalOrder { .... }

and I modified the content of the function
public static function getTransactionDetails($ppec = false, $payment_status = false);

because I got an error: PHP Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT
when I try to confirm a payment using Paypal.
Alter that I removed all cache directory content but it doesn't work.

what should I do to override this class?

PayPal Order gives 500 Error - Payment received, no order created

Hello
The problem described here - http://forge.prestashop.com/browse/PNM-3843
The comments I have described the reason (I think):
I added logging and found that the record of database does not occur because the data set in parameter "secure_key" no value. And this column could not be empty in the database. Therefore, an error occurs.
Column 'secure_key' cannot be null

UPD: A value of "secure_key" empty because the module was not able to identify the customer id. And transmits the order entry id_customer = 0. It is logical that this user has no secure_key.

PayPaypal logos download is blocked by Paypal server (403) and this causes a big slowdown on each request

When the updatePictures() method is called and it tries to update the logos, it can't succeed here, because Paypal logo locations can't be opened via PHP. Paypal servers seem to be blocking the request with 403 error. Due to that reason this method is called on each request and is slowing the shop a lot (about 6 sec in my case).

This is happening for example at the "shoppingCartExtra" hook. What happens there:

That is slow and is done on each hook call, and not as designed - each week.
My temporary solution was to change the modified dates on the logos to a date in the future.

I can't think of a good longtime solution so that is why I'm reporting this here as an issue.

Prestashop 1.7 - Currency Conversion not working for gift wrapping cost in PayPal module

PayPal express checkout and pay with credit card methods have a strange issue with gift wrapping costs

The store has 4 currencies, all the values in the cart are getting converted correctly except the gift wrapping price.

Did anyone encounter this issue?

PayPal didn't set the "covertPrice" method's parameter convert to true.

public function formatPrice($price)
{
    $context = Context::getContext();
    $context_currency = $context->currency;
    $paypal = Module::getInstanceByName('paypal');
    if ($paypal->needConvert()) {
        $price = Tools::convertPrice($price, $context_currency, false);
    }
    $price = number_format($price, Paypal::getDecimal(), ".", '');
    return $price;
}

If I change it to true, that converts the currency value to selected currency, I get error code 0 the last step of checkout.

Payment received, Order not created

Hello. I installed the PayPal module on a store I built for a friend (from Malaysia). All is done, but when I checkout using Website Payments Standard, PayPal charges the sum on my Credit Card, but the items remain in cart - no order is created! So basically, the entire checkout fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.