OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: PayPal Express Checkout IPN Payment Module
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Payment Modules > Other
Pages: 1, 2, 3, 4, 5, 6, 7, 8
AlexStudio
PayPal Express Checkout IPN Payment Module v0.1 beta
for osCommerce 2.2 MS2 Update 060817 or later

2007/01/11 04:36am GMT+08:00 by alexstudio

Description
Based on PayPal Pro Direct Payments & Express Checkout v0.8.2 by dynamoeffects
and osCommerce PayPal IPN Module v2.0 For 2.2MS2 by Terra (Monika in Germany)

This PayPal Express Checkout Payment Module combined the PayPal SOAP API and IPN feature into one, designed for store owners who have a Premier or Business account at PayPal, including following features:
  • Express Checkout API is an SOAP API provided by PayPal. By introducing this API, transactions no longer pass through user's internet browsers or agents. All connections are established directly between your host and PayPal servers, there for a much higher security level is provided.
  • Payers must sign-up with PayPal. Customer without PayPal account must create one before paying. (required for PayPal Express Checkout API)
  • Pass through customers' personal info to PayPal so they don't need to fill-in account sign-up form at PayPal, all filled up automatically.
  • Review order payment in store (instead of PayPal site) before transaction, there for no need to create pre-mature order records in database.
  • Update order status immediately if the payment transaction result is completed, no need to wait for IPN responses.
  • Built in IPN feature for updating order status automatically once if pending payments (eCheck/Bank Transfer) are cleared, and payments refunded as well.
  • Capable of declining unverified PayPal accounts. (Optional - setup through admin)
  • Capable of complete dumping transaction/IPN detail in debug email, including sent out requests and recieved responses, and optional dumping email for successful transactions as well. (This is for PayPal 3005 error without triggering debug emails)
  • Customers can select verified shipping address from PayPal file, and alter the shipping address set in checkout shipping page. (Express Checkout API built-in feature - This makes seller protection fully eligible possible)
  • Showing per item details in both osCommerce and PayPal receipt, including tax, shipping, low order fee (shown as handling in PayPal receipt).
  • Supported currencies including USD, AUD, CAD, CHF, DKK, EUR, GBP, HKD, JPY, NOK, NZD, SEK, SGD.
Currently I'm working on the install guide. The package will be uploaded to the contributions very soon.
AlexStudio
[Contribution] PayPal Express Checkout IPN v0.1 beta

Please report any bugs/problems/issues in this thread.
AlexStudio
How it works

PayPal Express Checkout payment module first send out a token request to PayPal when the customer reaches the checkout confirmation page. The order total and the shipping address are included in this initial request. PayPal will respond to this request with an unique token string. This is done through SOAP API, directly between your host and PayPal's server. There for the customer has no chance to intercept the transmission. This payment module picks up the token string, and when the customer hits the confirm button, it sends the customer to PayPal along with this token string, for the customer to authorize this payment request at PayPal.

If the customer didn't have a PayPal account, he needs to sign-up a new one with address fields pre-populated (by the shipping address sent with the initial request). The customer can choose an alternate address, which is a confirmed shipping address from the file of his PayPal account. Then PayPal sends the customer back to your store with the token string, so this payment module can send the transaction request later with this token, for PayPal to identify that the payment with this token has been autorized. No transaction has been made yet at this point.

This payment module will send a second request to PayPal to fetch the customer's address info selected at PayPal. If the customer didn't change the address, the original address will be sent back. Then it alters the order with the new address if changed. Along with this payment module there is a new review payment page, the customer can review his order and make necessary changes if he wants to, and then hit the PAY button right in your store.

At this point, the payment has been confirmed by the customer, it takes the customer to checkout process and sends out the transaction request, with the updated order info if the customer changed anything. If the response from PayPal is a successful transaction result, then it log the order in database and update the order status with the payment result, Completed or Pending.

The built-in IPN (Instant Payment Notification) feature will update the order status automatically when the payment status have been updated, eg. from Pending to Completed, or failed...etc.
babenis
Hi there,

trying to set it up but keep on getting the following error:

We're sorry, but we were unable to process your payment.
An error occured when we tried to establish a connection to PayPal's servers.<br><br>



and I also get a PayPal EC Error Dump email with the following content (URLs are changed):


In function: confirmation()



From this request:

[PAYPAL_ORDER_TOTAL] = 16.17
[PAYPAL_CURRENCY] = USD
[PAYPAL_PAGE_STYLE] = PayPal
[PAYPAL_RETURN_URL] = https://www.domain.com/express_checkout.php
[PAYPAL_CANCEL_URL] = https://www.domain.com/checkout_payment.php...error=paypal_ec
[PAYPAL_LOCALE_CODE] = US
[PAYPAL_NO_SHIPPING] = 0
[PAYPAL_ADDRESS_OVERRIDE] = 1
[PAYPAL_NAME] = Alexei Nabokov
[PAYPAL_ADDRESS1] = 123 Pemberton Avenue # 123
[PAYPAL_ADDRESS2] = N/A
[PAYPAL_CITY] = North York
[PAYPAL_STATE] = ON
[PAYPAL_ZIP] = M2M4L1
[PAYPAL_COUNTRY] = CA
[PAYPAL_PHONE] = 123-456-7890
[PAYPAL_EMAIL] = my@email.com

Any idea what I might be doing wrong?

Thanks
babenis
Figured it out, I accidentally put my email address in Proxy Server setting.
Works flawlessly.

Thanks.
AlexStudio
PayPal launched the Express Checkout Promotion.

This beta release is NOT eligible for this promotion. I'm working on it for the next beta release to be eligible.

A bug found in the dumping email founction that if the PayPal server was down, the dumping fuction will cause an error because there is no array in the response to be dumped. The fix will be included in the next beta release as well.
AlexStudio
Details about how to be eligible for the Express Checkout Promotion:

Key Points to be eligible:
  1. You need to have a U.S. PayPal Business Account
  2. You need to have PayPal Express Checkout integrated **
  3. You need to fill out the form to sign up for the Promotion
** Key Points for Integration:

The PayPal Express Checkout button must appear on the checkout page
PayPal must be the first payment type presented to the buyer on the checkout page of your shopping cart, this can be in addition to a second checkout button for customers to use if they do not want to use PayPal.
No other payments options can be displayed on the checkout page
PayPal must be displayed as an option along with other payment options
Diagram
Please review section Two (page 17) of the Express Checkout Integration Guide for additional information on the PayPal Button Placement Requirements https://www.paypal.com/en_US/pdf/PP_Express...rationGuide.pdf

Additional Notes:
Express Checkout is part of PayPal's API's. The technical skill level needed to integrate this feature would require: basic HTML, Scripting Language and API Programming.

Basic HTML
Knowledge of Hyper Text Markup Language (HTML) and HTML forms for creation of static web pages.

Scripting Languages
Knowledge of scripting languages such as PHP, Perl, ASP, and ColdFusion for creation of dynamic web pages.

API Programming
Knowledge of Simple Object Access Protocol (SOAP)-based programming.
AlexStudio
PayPal Express Checkout IPN v0.2 released.

Please report bugs/issues/problems in this thread. Please don not PM nor email me unless you have private data not to shown in public.
clothingfactory
Hello!

I just installed the module and after i made the user settings in the adminpage
i tryed to test it but i got this error message at the confirmation checkout:

CODE
Warning: Invalid argument supplied for foreach() in xxxcatalog/includes/modules/payment/paypal_ec.php on line 667

Warning: Cannot modify header information - headers already sent by (output started at xxxxxx/catalog/includes/modules/payment/paypal_ec.php:667) in xxxx/www/catalog/includes/functions/general.php on line 33


I have to idea!
AlexStudio
QUOTE (clothingfactory @ Jan 21 2007, 01:42 AM) *
Hello!

I just installed the module and after i made the user settings in the adminpage
i tryed to test it but i got this error message at the confirmation checkout:

CODE
Warning: Invalid argument supplied for foreach() in xxxcatalog/includes/modules/payment/paypal_ec.php on line 667

Warning: Cannot modify header information - headers already sent by (output started at xxxxxx/catalog/includes/modules/payment/paypal_ec.php:667) in xxxx/www/catalog/includes/functions/general.php on line 33


I have to idea!

Please upgrade to the latest v0.2 release. This bug has been fixed in the new version.
clothingfactory
Thank you! But you did it not only for me?

And sorry, but i have i new problem.

I got this message from Paypal:

CODE
This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow.


But my certificate information that i typed in are correct!

I was trying it in live-Mode!
AlexStudio
QUOTE (clothingfactory @ Jan 21 2007, 02:40 AM) *
Thank you! But you did it not only for me?

And sorry, but i have i new problem.

I got this message from Paypal:

CODE
This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow.


But my certificate information that i typed in are correct!

I was trying it in live-Mode!

Please enable Debug Email and Send Every Transaction's Dumping in admin, then reproduce this test and send me the debug dumping to me via PM, not here.
soeren71
Hi,

this contribution is really great. It nearly works perfect for me, but there is an issue I have.

1. Although shipping costs are calculated in the paypal order confirmation mail after checkout, these do not occur in the OsCommerce order confirmation mail or in OsC order details

Do you have an idea where I went wrong installing the contribution?

Any help is greatly appreciated.

Cheers
Soeren
JakSmit
Hi. What are the advantages+disadvantages of using this contribution instead of:
osCommerce PayPal IPN Module v2.2 For 2.2MS2
which works well for me?

thanks
KevinE07
Below is the error msg I received from PAYPAL.
--------
Authorization Failed

This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow

--

Upon futher review, the errors resides in this line....

[ReturnURL]http://my_store_edited_for_post.com/catalog/express_checkout.php[/ReturnURL]
[CancelURL]checkout_payment.php?payment_error=paypal_ec[/CancelURL] <-- ERROR

[ShortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.
[LongMessage] = CancelURL is invalid.
[ErrorCode] = 10472
[SeverityCode] = Warning

-----

Question
Where should I set the CANCEL URL???
KevinE07
QUOTE (KevinE07 @ Jan 22 2007, 05:52 PM) *
Below is the error msg I received from PAYPAL.
--------
Authorization Failed

This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow

--

Upon futher review, the errors resides in this line....

[ReturnURL]http://my_store_edited_for_post.com/catalog/express_checkout.php[/ReturnURL]
[CancelURL]checkout_payment.php?payment_error=paypal_ec[/CancelURL] <-- ERROR

[ShortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.
[LongMessage] = CancelURL is invalid.
[ErrorCode] = 10472
[SeverityCode] = Warning

-----

Question
Where should I set the CANCEL URL???



I found the error, It resides in this line of paypal_c.php
$order_info['PAYPAL_CANCEL_URL'] = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . FILENAME_CHECKOUT_PAYMENT . "?" . $payment_error_return;


I did not have a HTTPS server configed in oscommerce which was causing this module NOT TO WORK.
AlexStudio
QUOTE (soeren71 @ Jan 22 2007, 11:45 PM) *
1. Although shipping costs are calculated in the paypal order confirmation mail after checkout, these do not occur in the OsCommerce order confirmation mail or in OsC order details

This shouldn't be a problem from this payment module. It doesn't take over the order confirmation email. Below is a sample email in my test:
QUOTE
Products
------------------------------------------------------
1 x Microsoft IntelliMouse Explorer (MSIMEXP) = $64.95
Model PS/2
------------------------------------------------------
Sub-Total: $64.95
Flat Rate (Best Way): $50.00
FL TAX 7.0%: $8.05
Low Order Fee: $20.00
Total: $143.00

I think everything is in there. The checkout process file which actually do this job is not modified by installing this contrib.
AlexStudio
QUOTE (KevinE07 @ Jan 23 2007, 02:09 AM) *
I found the error, It resides in this line of paypal_c.php
$order_info['PAYPAL_CANCEL_URL'] = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . FILENAME_CHECKOUT_PAYMENT . "?" . $payment_error_return;

I did not have a HTTPS server configed in oscommerce which was causing this module NOT TO WORK.

This problem has been taken care of in the latest v0.3 release. Please upgrade to it.
AlexStudio
QUOTE (JakSmit @ Jan 23 2007, 12:15 AM) *
Hi. What are the advantages+disadvantages of using this contribution instead of:
osCommerce PayPal IPN Module v2.2 For 2.2MS2
which works well for me?

thanks

This is a good question, why this Express Checkout IPN module?

Advantages:
Express Checkout IPN module utilized PayPal's Express Checkout API, it sends payment requests and receives PayPal responses through the connection directly between your host and PayPal server. In this way, a much higher security level is provided. The official PayPal IPN module utilized PayPal's Website Payment Standard button code to send out payment request through user's browser, there for a possible security breach exist. To prevent this security breach, you need to setup the complicated SSL features in official IPN module.

Express Checkout API sends payers back to store before they pay, so there is no need to create pre-mature order records in database like the official IPN module does. The issue about customers not returning after pay, which is still exist in the official IPN module, does not exist in this one.

Also, this module doesn't need to do those jobs in checkout process by itself, the official IPN module does. There for it's much more easier to work with other contributions.

And more, for payments to be eligible for PayPal's seller protection, payers should be able to select a confirmed shipping address from PayPal file. Express Checout IPN module fully support this feature, there for a much better chance to be eligible for seller protection is provided. The official IPN module currently can not handle shipping address changing at PayPal, so the chance to be eligible is not really good.

Disadvantages:
Express Checkout API does not support the PayPal Account Optional feature. Payers must sign-up with PayPal before they can pay. However, if you need this feature for customers who don't want to sign-up at PayPal, you can have official IPN module aside by this one. These 2 modules can work side by side.

Express Checkout IPN module requires to modify 3 osCommerce existing files, but the official IPN module doesn't. I did try to develop this module in that way, but it simply can not be achieved.

Express Checkout requires cURL lib installed with PHP 4.x, otherwise it won't work.
JakSmit
ok. interesting. i think i will use but maybe a future release when it has been tested a little bit more. i did read about paypal express on the paypal site and it sounded quite cool.

what sort of files are the 3 that you need to modify and how will that impact the installation of other contributions?

thanks for taking the time to respond.
AlexStudio
QUOTE (JakSmit @ Jan 23 2007, 07:31 AM) *
what sort of files are the 3 that you need to modify and how will that impact the installation of other contributions?

The 3 files required to be modified are:
catalog/checkout_shipping.php
catalog/checkout_payment.php
catalog/includes/filenames.php

Details:
catalog/checkout_shipping.php
Modified to show the Express Checkout Button in the first step of checkout process (required by PayPal).
Modified to handle shipping address error sent back from PayPal.
Modified to handle shipping address changed at PayPal, and update the shipping cost.
Modified to handle 'virtual' orders (download items).
Modified to handle payments cancelled at PayPal.

catalog/checkout_payment.php
Modified to handle transaction error message from PayPal.

catalog/includes/filenames.php
Added 2 lines of filename definitions.

The modifications are all well commented, and it's very easy to identify them when applying other contributions. If you need help for applying other modifications in checkout_shipping.php, you can post in this thread.
celextel
QUOTE (AlexStudio @ Jan 23 2007, 05:37 AM) *
The 3 files required to be modified are:
catalog/checkout_shipping.php
catalog/checkout_payment.php
catalog/includes/filenames.php

Details:
catalog/checkout_shipping.php
Modified to show the Express Checkout Button in the first step of checkout process (required by PayPal).
Modified to handle shipping address error sent back from PayPal.
Modified to handle shipping address changed at PayPal, and update the shipping cost.
Modified to handle 'virtual' orders (download items).
Modified to handle payments cancelled at PayPal.

catalog/checkout_payment.php
Modified to handle transaction error message from PayPal.

catalog/includes/filenames.php
Added 2 lines of filename definitions.

The modifications are all well commented, and it's very easy to identify them when applying other contributions. If you need help for applying other modifications in checkout_shipping.php, you can post in this thread.


Hello,

I have just installed your PayPal Express Checkout IPN Payment Module v0.3 and I am getting the following error message immediately after the chekout at the checkout_shipping.php:
Fatal error: Call to a member function on a non-object in /home/***/public_html/demo/checkout_shipping.php on line 176

Line 176 is:
if (!tep_session_is_registered('paypal_ec_order_info')) $paypal_ec->ec_gen_error('', true, true);

Please let us know as to what to do.

We are having register_globals = Off [with patches as suggested in the contribution register_globals_v1.5]

Thanks,

Lakshmanan S.
celextel
QUOTE (celextel @ Jan 23 2007, 08:40 PM) *
Hello,

I have just installed your PayPal Express Checkout IPN Payment Module v0.3 and I am getting the following error message immediately after the chekout at the checkout_shipping.php:
Fatal error: Call to a member function on a non-object in /home/***/public_html/demo/checkout_shipping.php on line 176

Line 176 is:
if (!tep_session_is_registered('paypal_ec_order_info')) $paypal_ec->ec_gen_error('', true, true);

Please let us know as to what to do.

We are having register_globals = Off [with patches as suggested in the contribution register_globals_v1.5]

Thanks,

Lakshmanan S.


I had missed ! somewhere. It is okay now. Please ignore my earlier message. Thanks, Lakshmanan S.
birchy82
i have a problem with this after i installed it i get this on checkout_payment.php

PayPal Express Checkout IPN module installation incomplete! There should be XML files located in /var/www/vhosts/lse-store.com/httpdocsincludes/ec_xml/ !

what do i do?
AlexStudio
QUOTE (birchy82 @ Jan 24 2007, 11:52 AM) *
i have a problem with this after i installed it i get this on checkout_payment.php

PayPal Express Checkout IPN module installation incomplete! There should be XML files located in /var/www/vhosts/lse-store.com/httpdocsincludes/ec_xml/ !

what do i do?

You didn't upload ALL files in the new files/catalog folder, or your catalog/includes is not defined correctly in your configure.php. The required XML files for API to work are missing.
birchy82
QUOTE (AlexStudio @ Jan 24 2007, 04:02 AM) *
You didn't upload ALL files in the new files/catalog folder, or your catalog/includes is not defined correctly in your configure.php. The required XML files for API to work are missing.



this is the file path in configure.php define('DIR_WS_INCLUDES', 'includes/');

i uploaded all the files and followed the instructions what files for the API could be missing i dont get it?
AlexStudio
QUOTE (birchy82 @ Jan 24 2007, 12:23 PM) *
this is the file path in configure.php define('DIR_WS_INCLUDES', 'includes/');

i uploaded all the files and followed the instructions what files for the API could be missing i dont get it?

Not only that line in the configure.php, the code which is checking for the XML files exist or not also calls to the constant DIR_FS_CATALOG. (defined in catalog/includes/configure.php line 35)

Usually they were setup through the osCommerce installation. So it seems to me that you have some other problem with your host settings, probably your host has register global turned off. In that case, you need to refer to register global patches first.
celextel
Hello,

Thanks for this contribution.

We are using the following function for disabling certain payment modules:
// disable if shipping is less than Rupees 400 - start
if($order->info['total'] < 400){
$this->enabled = false;
}
// disable if shipping is less than Rupees 400 - end

Even though "PayPal Express Checkout IPN Payment Module" does not show up for a total of < 400, it does not go to Paypal website for a total of > 400 even though it is seen as one of the payment option. We are getting the following error message:
-------------------------------------------------------
Please select a payment method for your order.
-------------------------------------------------------

We do not have this problem with other payment modules including "paypal".

Kindly let us know as to what we should do in this regard.

If possible, please add this disabling function in this module configuration itself so that it would be easy and useful.

Thanks,

Lakshmanan S.

---------------------------------------------------------
The function is shown as under:
---------------------------------------------------------

// class methods
function update_status() {
global $order, $shipping;

if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
while ($check = tep_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
}

if ($check_flag == false) {
$this->enabled = false;
}
}
// disable if shipping is less than Rupees 400 - start
if($order->info['total'] < 400){
$this->enabled = false;
}
// disable if shipping is less than Rupees 400 - end

// disable if shipping is free - start
if ($shipping['id']=="free_free") {
$this->enabled = false;
}
// disable if shipping is free - end

}

function javascript_validation() {
---------------------------------------------------------
celextel
Hello,

We have installed this module [one of the earlier versions] and the Order process email does not show up the Shipping Cost and the total amount also does not include that even though Payment Process emails are showing up everything.

Products
------------------------------------------------------
1 x Sudarshana Satakam (CDA143) = $2.30
------------------------------------------------------
Sub-Total: $2.30
Total: $2.30


-----------------------------------
PayPal Shopping Cart Contents
-----------------------------------

Item Name: Sudarshana Satakam
Item Number: 1933 (CDA143)

Quantity: 1

Total: $2.30 USD



Cart Subtotal: $2.30 USD
Shipping: $14.53 USD

Cart Total: $16.83 USD
-----------------------------------


Hope you have done the needful in the newer versions.

Thanks,

Lakshmanan S.
AlexStudio
QUOTE (celextel @ Jan 24 2007, 02:00 PM) *
We have installed this module [one of the earlier versions] and the Order process email does not show up the Shipping Cost and the total amount also does not include that even though Payment Process emails are showing up everything.

Please tell me which version you are using, and check the order record in admin page for the shipping cost. I need to know if the shipping cost was missing only in the email, or the order record also.
celextel
QUOTE (AlexStudio @ Jan 24 2007, 11:57 AM) *
Please tell me which version you are using, and check the order record in admin page for the shipping cost. I need to know if the shipping cost was missing only in the email, or the order record also.


Hello,

Thanks for the quick response.

Shipping cost is missing in the order record also.

Version: paypal_express_checkout_IPN_v0_2a

Just installed the new one. Yet to get new payment through that.

Thanks,

Lakshmanan S.
AlexStudio
QUOTE (celextel @ Jan 24 2007, 01:54 PM) *
Thanks for this contribution.

We are using the following function for disabling certain payment modules:
// disable if shipping is less than Rupees 400 - start
if($order->info['total'] < 400){
$this->enabled = false;
}
// disable if shipping is less than Rupees 400 - end

Even though "PayPal Express Checkout IPN Payment Module" does not show up for a total of < 400, it does not go to Paypal website for a total of > 400 even though it is seen as one of the payment option. We are getting the following error message:
-------------------------------------------------------
Please select a payment method for your order.
-------------------------------------------------------

We do not have this problem with other payment modules including "paypal".

Kindly let us know as to what we should do in this regard.

OK, this is a bit tricky. The Express Checkout Button bypassed the shipping/payment modules so your modification is not working.

I will work on this issue and release a new update.
AlexStudio
QUOTE (celextel @ Jan 24 2007, 02:44 PM) *
Version: paypal_express_checkout_IPN_v0_2a

Just installed the new one. Yet to get new payment through that.

The Express Checkout Button means to bypass shipping/payment selection and send customers to PayPal immediately once the button been hit.

There for I can't find a way to check if the free shipping is selected on page load, because it can only be done after the form submitted. It would be strange to load the checkout shipping page twice to find out if the button should be shown or not. In this case, I would suggest to disable the Express Checkout Button in admin setting. This feature is new in v3.0, when not showing the button, the checkout process will follow the original flow just like other payment modules, thus makes use of you modification to disable EC IPN both on zero shipping and minimum amount not reached conditions.

Regarding the minimum order amount checking, it can be done easily by adding a function call in the checkout shipping page. I will include this in the next version. Here is how to do it:

find in catalog/checkout_shipping.php around line 45 - 51:
CODE
// BOF PayPal Express Checkout IPN v0.3 beta
  $paypal_ec_check = tep_db_query("SELECT configuration_id FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_EC_STATUS' AND configuration_value = 'True'");
  $ec_enabled = (tep_db_num_rows($paypal_ec_check) ? 1 : 0);
  if ($ec_enabled) {
    require(DIR_WS_CLASSES . 'payment.php');
    $payment_modules = new payment;
  }

Replace with:
CODE
// BOF PayPal Express Checkout IPN v0.3 beta
  $paypal_ec_check = tep_db_query("SELECT configuration_id FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_EC_STATUS' AND configuration_value = 'True'");
  $ec_enabled = (tep_db_num_rows($paypal_ec_check) ? 1 : 0);
  if ($ec_enabled) {
    require(DIR_WS_CLASSES . 'payment.php');
    $payment_modules = new payment;
    $paypal_ec->update_status();
    $ec_enabled = (($paypal_ec->enabled)? 1 : 0);
  }

It will now makes use of your minimum amount checking and decides to show the button or not.
AlexStudio
QUOTE (celextel @ Jan 24 2007, 02:44 PM) *
Version: paypal_express_checkout_IPN_v0_2a

Just installed the new one. Yet to get new payment through that.

Regarding the shipping cost missing issue, I need to know if it happens in v0.3. Please let me know if the problem remains.
JakSmit
Hi. Just another q for when you get time. How does the system compare with
PayPal Website Payments Pro by dynamoeffects v0.8.3.2 **BETA** by dynamoeffects. As it seems to be using the same paypal express system? Thanks
AlexStudio
QUOTE (JakSmit @ Jan 24 2007, 07:18 PM) *
Hi. Just another q for when you get time. How does the system compare with
PayPal Website Payments Pro by dynamoeffects v0.8.3.2 **BETA** by dynamoeffects. As it seems to be using the same paypal express system? Thanks

That PayPal Website Payments Pro v0.8.3.2 **BETA** by dynamoeffects is for US business account owners with PayPal Website Payments Pro subscribed (monthly fee US$20.00). The express checkout API is the same. This PayPal Express Checkout IPN module actually is based on the express checkout code developed by dynamoeffects for his WPP + EC module.

The major difference is that the WPP + EC module handles not only PayPal payments via Express Checkout API, but also credit card payments via Direct Payment API.

If you have an US business account and you want to accept credit cards, WPP + EC module is a good choice. If you don't have an US business account, or don't want to pay the monthly fee, EC IPN module is an option for you.
celextel
QUOTE (AlexStudio @ Jan 24 2007, 01:08 PM) *
The Express Checkout Button means to bypass shipping/payment selection and send customers to PayPal immediately once the button been hit.

There for I can't find a way to check if the free shipping is selected on page load, because it can only be done after the form submitted. It would be strange to load the checkout shipping page twice to find out if the button should be shown or not. In this case, I would suggest to disable the Express Checkout Button in admin setting. This feature is new in v3.0, when not showing the button, the checkout process will follow the original flow just like other payment modules, thus makes use of you modification to disable EC IPN both on zero shipping and minimum amount not reached conditions.

Regarding the minimum order amount checking, it can be done easily by adding a function call in the checkout shipping page. I will include this in the next version. Here is how to do it:

find in catalog/checkout_shipping.php around line 45 - 51:
CODE
// BOF PayPal Express Checkout IPN v0.3 beta
  $paypal_ec_check = tep_db_query("SELECT configuration_id FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_EC_STATUS' AND configuration_value = 'True'");
  $ec_enabled = (tep_db_num_rows($paypal_ec_check) ? 1 : 0);
  if ($ec_enabled) {
    require(DIR_WS_CLASSES . 'payment.php');
    $payment_modules = new payment;
  }

Replace with:
CODE
// BOF PayPal Express Checkout IPN v0.3 beta
  $paypal_ec_check = tep_db_query("SELECT configuration_id FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_EC_STATUS' AND configuration_value = 'True'");
  $ec_enabled = (tep_db_num_rows($paypal_ec_check) ? 1 : 0);
  if ($ec_enabled) {
    require(DIR_WS_CLASSES . 'payment.php');
    $payment_modules = new payment;
    $paypal_ec->update_status();
    $ec_enabled = (($paypal_ec->enabled)? 1 : 0);
  }

It will now makes use of your minimum amount checking and decides to show the button or not.



Hello,

Kindly explain as to where we have to enter the minimum order total amount and minimum order weight in this function to enable this module.

Thanks,

Lakshmanan S.
a.niedermann
hi there!!

first of all thanks a lot for your developement!!

after installing newest version (3a) there occurs a problem:

when selecting paypal as payment method in checkout_payment and after pushing continue the shop sends us back to checkout_shipping....

thanks for help!
Andreas
a.niedermann
well....ignore my last mail.....!! I forgot to update the server....!

BUT:

doesn't matter if I use the express checkout or the "normal paypal checkout process"...after finishing all steps on the paypal homepage (zahlung prüfen = checking payment) it redirects the customer back to the checkout_shipping page and not to the checkout_success....

thus, the order has not been placed, the money has not been added to sandbox account, the shopping card has not been erased....
AlexStudio
QUOTE (a.niedermann @ Jan 25 2007, 12:21 AM) *
well....ignore my last mail.....!! I forgot to update the server....!

BUT:

doesn't matter if I use the express checkout or the "normal paypal checkout process"...after finishing all steps on the paypal homepage (zahlung prüfen = checking payment) it redirects the customer back to the checkout_shipping page and not to the checkout_success....

thus, the order has not been placed, the money has not been added to sandbox account, the shopping card has not been erased....

That probably because your previous mistake left an token in session. You can try to continue that process and cancel it once you have a chance, or simply close your browser and kill the session.

This can happen if your installation not completed or broken.
AlexStudio
QUOTE (celextel @ Jan 24 2007, 11:12 PM) *
Kindly explain as to where we have to enter the minimum order total amount and minimum order weight in this function to enable this module.

same as the code you showed in earlier post.

Find in catalog/includes/modules/payment/paypal_ec.php line 51:
CODE
        if ($check_flag == false) {
          $this->enabled = false;
        }
      }

Add after:
CODE
// disable if total amount is less than Rupees 400 - start
if($order->info['total'] < 400){
$this->enabled = false;
}
// disable if toatl amount is less than Rupees 400 - end


Tha's it. You can add more condition check if you want, the function update_status() is where you put them in.
AlexStudio
QUOTE (a.niedermann @ Jan 25 2007, 12:21 AM) *
doesn't matter if I use the express checkout or the "normal paypal checkout process"...after finishing all steps on the paypal homepage (zahlung prüfen = checking payment) it redirects the customer back to the checkout_shipping page and not to the checkout_success....

thus, the order has not been placed, the money has not been added to sandbox account, the shopping card has not been erased....

If the shipping address changed at PayPal, the first page shown when returning to store will be checkout shipping, otherwise you can get a miscalculated shipping cost for the different address.
dano1967
QUOTE (AlexStudio @ Jan 24 2007, 04:22 PM) *
If the shipping address changed at PayPal, the first page shown when returning to store will be checkout shipping, otherwise you can get a miscalculated shipping cost for the different address.


Is there no way to override the shipping address?

I was just testing this module, selected my work address as the ship to, went to Paypal, login, password etc...
Then when it came back, it of course said that the address was changed and put me through the cycle again.

Except that it never goes back to Paypal to allow you to enter a new ship to address in Paypal.
And everytime you go through the cycle it adds the default Paypal address to your address book, over and over.
By the time I cancelled out of the checkout procedure, I had 4 copies of my Paypal address in my address book.

I wish there was an option to ignore the address returned by Paypal, or at least give the option to use Paypal's address vs the one selected to begin with. This should be tied in with the 'Confirmed Address' option somehow.

Other than that, there is a typo in the defined variables - not sure if it's intentional, but it should be MODULE_PAYMENT_PAYPAL_API_CERT_PATH - not MODULE_PAYMENT_PAYPAL_APT_CERT_PATH

dano1967
AlexStudio
First of all, I would like to ask which version you're using.

Answers below are based on v0.3
QUOTE (dano1967 @ Jan 25 2007, 07:10 AM) *
Is there no way to override the shipping address?

set Allow Edit Shipping Address at PayPal? to NO

QUOTE
I was just testing this module, selected my work address as the ship to, went to Paypal, login, password etc...
Then when it came back, it of course said that the address was changed and put me through the cycle again.

Except that it never goes back to Paypal to allow you to enter a new ship to address in Paypal.
And everytime you go through the cycle it adds the default Paypal address to your address book, over and over.
By the time I cancelled out of the checkout procedure, I had 4 copies of my Paypal address in my address book.

This could be something needs to be re-worked. In v0.3 code, it should only add one record in address book if the name and address are not found. Please check this for me to see if those new addresses are identical. If yes, please PM me with that address and I need to do some testing with it.

It's not necessary to send user's back to PayPal once after the user returned. Changing shipping address a second time in store is handled by the code.

QUOTE
I wish there was an option to ignore the address returned by Paypal, or at least give the option to use Paypal's address vs the one selected to begin with. This should be tied in with the 'Confirmed Address' option somehow.

The checkout flow has 2 pattern.
1. Button Checkout: It sends user's default address to PayPal. If a different address sent back (from PayPal after the user returned), it redirects the user to checkout shipping. The continue button in checkout shipping sends the user to Review Payment page.

2. Normal Checkout: It sends user's selected shipping address to PayPal. The rest part is exact the same as Button Checkout flow.

There is no way to ignore the shipping address sent back by PayPal. If you set Allow Edit Shipping Address at PayPal? to No, PayPal would reject it if something wrong in the address. If set to Yes, PayPal would change the address for 2 reasons: Either the address is invalid, or you set Require Confirmed Shipping Address? to Yes, but the address given was not a confirmed one.

The Require Confirmed Shipping Address? option in admin is one thing I can't get different results switching it Yes/No. If you did get different results, please let me know.

QUOTE
Other than that, there is a typo in the defined variables - not sure if it's intentional, but it should be MODULE_PAYMENT_PAYPAL_API_CERT_PATH - not MODULE_PAYMENT_PAYPAL_APT_CERT_PATH

dano1967

I can't find this MODULE_PAYMENT_PAYPAL_APT_CERT_PATH in my code, where did you find it?
celextel
QUOTE (AlexStudio @ Jan 25 2007, 02:38 AM) *
same as the code you showed in earlier post.

Find in catalog/includes/modules/payment/paypal_ec.php line 51:
CODE
        if ($check_flag == false) {
          $this->enabled = false;
        }
      }

Add after:
CODE
// disable if total amount is less than Rupees 400 - start
if($order->info['total'] < 400){
$this->enabled = false;
}
// disable if toatl amount is less than Rupees 400 - end


Tha's it. You can add more condition check if you want, the function update_status() is where you put them in.


Hello,

Sorry, the problem is still there.

Even though "PayPal Express Checkout IPN Payment Module" does not show up for a total of < 400, it does not go to Paypal website for a total of > 400 even though it is seen as one of the payment option. We are getting the following error message:
-------------------------------------------------------
Please select a payment method for your order.
-------------------------------------------------------

We do not have this problem with other payment modules including "paypal".

You may kindly check this at our following demo site:
https://celextel.com/demo/index.php

As suggested, we have replaced the codes in the checkout_shipping.php around line 45 - 51:
// BOF PayPal Express Checkout IPN v0.3 beta
$paypal_ec_check = tep_db_query("SELECT configuration_id FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_PAYMENT_PAYPAL_EC_STATUS' AND configuration_value = 'True'");
$ec_enabled = (tep_db_num_rows($paypal_ec_check) ? 1 : 0);
if ($ec_enabled) {
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment;
$paypal_ec->update_status();
$ec_enabled = (($paypal_ec->enabled)? 1 : 0);
}

And added the function exactly in the paypal_ec.php.

Kindly let us know as to what to do in this regard.

Thanking you,

Lakshmanan S.
tranquilsense
Installed the version paypal_express_checkout_IPN_v0_3, and everything went well.
Configured the module.

Then I tried to use it and I recieved this error:

"An error occured when we tried to establish a connection to PayPal's servers"

This is the message that was email to me:

In function: pre_confirmation_check()
Response from PayPal:



>From this request: (WARNING!!) DO NOT expose your API Username/Password to the
public!!

[?xml version="1.0" encoding="utf-8"?]
[soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]***[/Username]
[Password]***[/Password]
[Subject][/Subject]
[/Credentials]
[/RequesterCredentials]
[/soap:Header]
[soap:Body]
[SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI"]
[SetExpressCheckoutRequest]
[Version xmlns="urn:ebay:apis:eBLBaseComponents"]2.0[/Version]
[SetExpressCheckoutRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"]
[OrderTotal currencyID="CAD"]3[/OrderTotal]
[ReturnURL]http://www.tranquilsense.com/osc/catalog/express_checkout.php[/ReturnURL]
[CancelURL]http://www.tranquilsense.com/osc/catalog/checkout_shipping.php?address_error=0[/CancelURL]
[ReqConfirmShipping]1[/ReqConfirmShipping]
[NoShipping]0[/NoShipping]
[AddressOverride]0[/AddressOverride]
[LocaleCode]US[/LocaleCode]
[PageStyle]PayPal[/PageStyle]
[Address]
[Name]David Aschenbrener[/Name]
[Street1]3218 Phanuef Cres E[/Street1]
[Street2][/Street2]
[CityName]Regina[/CityName]
[StateOrProvince]SK[/StateOrProvince]
[PostalCode]S4V 1T9[/PostalCode]
[Country]CA[/Country]
[Phone]***[/Phone]
[/Address]
[BuyerEmail]***[/BuyerEmail]
[/SetExpressCheckoutRequestDetails]
[/SetExpressCheckoutRequest]
[/SetExpressCheckoutReq]
[/soap:Body]
[/soap:Envelope]


Can someone point me in the correct direction to trouble shoot this.

Thanks
AlexStudio
QUOTE (celextel @ Jan 25 2007, 01:53 PM) *
Hello,

Sorry, the problem is still there.

I checked your demo site. It seems to me that you have the payment modules' sort order problem. Please make sure that each payment module has an unique sort order value, otherwise they could override each others.
AlexStudio
QUOTE (tranquilsense @ Jan 25 2007, 02:13 PM) *
Installed the version paypal_express_checkout_IPN_v0_3, and everything went well.
Configured the module.

Then I tried to use it and I recieved this error:

"An error occured when we tried to establish a connection to PayPal's servers"

This is the message that was email to me:

In function: pre_confirmation_check()
Response from PayPal:
>From this request: (WARNING!!) DO NOT expose your API Username/Password to the
public!!

Your initial request looks good to me, but there seems no response from PayPal. Please check your host with the cURL settings and see if it needs to go through a proxy server. Host providers like GoDaddy require the cURL proxy setting for this payment module to work.
celextel
QUOTE (AlexStudio @ Jan 25 2007, 12:08 PM) *
I checked your demo site. It seems to me that you have the payment modules' sort order problem. Please make sure that each payment module has an unique sort order value, otherwise they could override each others.


Hello,

No problem with the sort order as all have unique numbers:
Money Order /DD /Wire Transfer 9
PayPal 4
PayPal Express Checkout 3
Transecute [Visa & Master Card] 1
ICICI Bank Transfer 7
Western Union Money Transfer 6

Must be something else.

Please help.

Thanks,

Lakshmanan S.
AlexStudio
QUOTE (celextel @ Jan 25 2007, 03:11 PM) *
Hello,

No problem with the sort order as all have unique numbers:
Money Order /DD /Wire Transfer 9
PayPal 4
PayPal Express Checkout 3
Transecute [Visa & Master Card] 1
ICICI Bank Transfer 7
Western Union Money Transfer 6

Must be something else.

Please help.

Thanks,

Lakshmanan S.

OK, please show me your checkout_confirmation.php via PM not here, I want to see what you have in there, prior to the first html tag <!doctye html public - ....

If you didn't modify checkout_confirmation.php, there must be something wrong with your condition checkings. Please show me the update_status() function in EC IPN module.

EC IPN has been rejected in checkout confirmation page.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.