Zen Follower
- Join Date:
- Jan 2004
- Posts:
- 413
- Plugin Contributions:
- 1
Micropayments and Credit Cards
This one is for Dr Byte.
We have gone through a few scenarios to get the best possible payment pricing over at Paypal and are now using them to do our credit card processing as well with PayPal Website Payments Pro.
We are approved for micropricing and being charged at that rate for all transactions.
Does your code from this thread dated January 2010
Re: Order total threshold for multiple ebay accounts for one shopping cart
http://www.zen-cart.com/showthread.php?145047
work with Express that is coupled with the Website Payments Pro?
Your original Post in that thread:> To integrate micropayments support with Express Checkout, use the following steps:
<?php /** * Micropayments Credentials */ define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME', 'insert your API-Username from your Micropayments account here'); define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD', 'insert your micropayments API password here'); define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE', 'insert your micropayments API signature here'); // The following determines the purchase amount threshold under which the Micropayments account will be used for transacting. Transactions over this amount will use regular credentials. define('MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD', '10'); ** Disclaimer: I apologize that I've not had a chance to actually test this code yet. Feedback appreciated. ** If you choose to use this code update on your site, please consider supporting the code development by making a donation here: <http://www.zen-cart.com/donate>
Edit /includes/modules/payment/paypal/paypal_curl.php
Around line 460, in the _buildNameValueList class method, add the new lines as indicated here:
Code:
if ($this->_signature != '') $commpairs['SIGNATURE'] = trim($this->_signature);// Adjustments if Micropayments account profile details have been set
if (defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD != ''
&& $pairs['AMT'] < strval(MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD)
&& defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME != ''
&& defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD != ''
&& defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE != '') {
$commpairs['USER'] = str_replace('+', '%2B', trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME));
$commpairs['PWD'] = trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD);
$commpairs['SIGNATURE'] = trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE);
}$pairs = array_merge($pairs, $commpairs);
Create a new file: /includes/extra_configures/paypal_micropayments_credentials.php, and insert the following PHP code, substituting your actual API credentials from your Micropayments account:
Code: