Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Paypal DPM Payment Method
 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #31  
Old 11-08-2017, 07:12 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Man
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 2,814
 

Default Re: Paypal DPM Payment Method

Quote:
Originally Posted by mattstyle2
what's the advantage of the new api?

We've updated it to the latest paypal updates and have change how it posts to paypal. It's a bit more robust now.

Thanks,

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #32  
Old 02-27-2018, 12:01 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Man
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 2,814
 

Default Re: Paypal DPM Payment Method

We are TLS 1.2 compliant as well if anyone needs a quick solution.

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #33  
Old 04-09-2018, 07:08 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Man
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 2,814
 

Default Re: Paypal DPM Payment Method

Paypal DPM Blow out sale! $100 off one week only!!

https://www.bcsengineering.com/store...or-x-cart.html

Grab this popular module to make your PCI compliance easier!

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #34  
Old 04-20-2018, 05:54 AM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 51
 

Default Re: Paypal DPM Payment Method

Quote:
Originally Posted by BCSE
Paypal DPM Blow out sale! $100 off one week only!!

https://www.bcsengineering.com/store...or-x-cart.html

Grab this popular module to make your PCI compliance easier!

Carrie

Updated to version 3

did you forget an important element? accounting for coupons, reward points

I had to remove these lines from api.php

'ITEMAMT' => $cart['subtotal'],
'TAXAMT' => $cart['tax_cost'],
'FREIGHTAMT' => $cart['shipping_cost'],


in the post array because kept getting this error:

Field format error: 10413-The totals of the cart item amounts do not match order amounts.

Orders without coupon codes processed fine.. now after removing those three items and telling paypal only the AMT, orders with coupons work.

also got 'not finished' orders again so the new version doesn't seem to fix that either..
--special characters need to be handled when posting to paypal (address, name, city, etc).

-- there was also an ssl issue.. forcing curl to use tls1.2 might fix that one..


--- added a check in finish-order for not-finished orders:
first I had to make it so the module used SECURETOKEN instead of SECURETOKENID in the token.php file
then I added a function to api.php to return the array of secure tokens and orderids
then put a check in finish_order.php in the event the getPaymentRepsonse() returns a blank value.

here's some code..

Code:
require_once $xcart_dir . '/include/payment_wait.php'; $api = bcse_pp_get_api(); //bcse_pp_log_error("api get token\n".print_r ($api->getSecureTokenOrders2(),true)); //bcse_pp_log_error("orderid: $orderid token: $token ids $orderids"); //exit; $response = $api->getPaymentResponse(); //bcse_pp_log_error("RESPONSE:\n".print_r ($api->getPaymentResponse(),true)."setting to blank!\n"); //for testing //$response=''; //for testing if (empty($response)) { //matt add - if response is empty perform an inquiry using the secure token or custref bcse_pp_log_error("Empty response found in finish_order.php\n"); $tokens=$api->getSecureTokenOrders2(); //new function foreach ($tokens as $k=>$v) { $token=$k; $orderid=addslashes($v[0]); break; } bcse_pp_log_error("acquired token: $token and orderid: $orderid\n"); //perform inquiry on token if ($token!='' && $orderid!='' && is_numeric($orderid)) { $orderids=array(); $orderids[]=$orderid; $response = $api->tokenInquire($token); //new function bcse_pp_log_error("Token-Inquire RESPONSE:\n".print_r ($response,true)."\n"); if ($response['RESULT']==99){ $response = $api->custRefInquire($orderid); //new function requires CUSTREF to be set in the orderdetails POST bcse_pp_log_error("custRef-Inquire RESPONSE:\n".print_r ($response,true)."\n"); } . . . comparison code to check silent post .. I use some custom-code and a dbase table to handle silentposts.. . . . if (isset($silent['amount']) && isset($response['AMT']) && $silent['orderid']==$response['CUSTREF'] && $silent['amount']==$response['AMT'] && $silent['transaction']==$response['ORIGPNREF']) { $response['RESULT']=$response['ORIGRESULT']; $response['PNREF']=$response['ORIGPNREF']; if (!isset($response['AUTHCODE'])) { $response['AUTHCODE']=''; } } else { $response=''; bcse_pp_log_error("ERROR: could not match inquiry with empty response!\n"); } $api->clearSecureTokenOrders($token); //cleanup - new function } else { //done with an empty result $orderids = $api->getSecureTokenOrders($response['SECURETOKEN']); //changed to use securetoken - normalshit }
in this case, the module will now perform an inquiry on the SECURETOKEN and compare results with silent post values..
if it fails to get anything from the securetoken it'll perform an inquiry on CUSTREF



was a bi*tch to setup and took many hours but I feel as this should solve a majority of the "not finished" errors.

hope that helps someone..

please send tips:
BTC: 17jAfPFZ9waexTbGdtCZM4LgAn56qZ7bZh
__________________
4.7.7.
php7.1, AWS RDS database
memcache, reboot theme AWS EC2 load balancer, 2 c5.large instances CDSEO Shop By Filters,
AC onepage checkout and checkout tools,
altercart cash rewards, bcse DPM for paypal
Reply With Quote
  #35  
Old 04-20-2018, 10:37 AM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 51
 

Default Re: Paypal DPM Payment Method

nice.. breaks amazon payments advanced too..

blah!

people need to test modules..


fix:

in /skin/common_files/modules/BCSE_Paypal_DPM/service_head.tpl

change the first if statement to this:

{if $main eq 'checkout' AND $checkout_module ne 'Amazon_Payments_Advanced'}

please send tips:
BTC: 17jAfPFZ9waexTbGdtCZM4LgAn56qZ7bZh
__________________
4.7.7.
php7.1, AWS RDS database
memcache, reboot theme AWS EC2 load balancer, 2 c5.large instances CDSEO Shop By Filters,
AC onepage checkout and checkout tools,
altercart cash rewards, bcse DPM for paypal
Reply With Quote
  #36  
Old 04-23-2018, 05:23 AM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Man
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 2,814
 

Default Re: Paypal DPM Payment Method

Could you please email this in to us so I can have my staff review? I do not believe we are aware of any issues like this and we'd like to review them to make sure they are fixed.

Thank you!

Carrie




Quote:
Originally Posted by mattstyle2
Updated to version 3
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:44 AM.

   

 
X-Cart forums © 2001-2018