Interchange
PayPal Pro Payments Module
Overview
PayPal’s Website Payments Pro solution offers an alternative to traditional credit card transaction processing, coupled with the ability to accept PayPal payments using the “Express Checkout” feature.
Prerequisites
- SOAP::Lite
- PayPal Developer Account (sandbox)
- Full rights to the Interchange installation and configuration directories
Integrating with Interchange
Normal credit card transactions (Visa, Mastercard, Amex, and Discover) can be accomplished with the PaypalPro.pm PERL payment module installed in the Interchange lib/Vend/Payment directory.
Express checkout transactions must be used with normal card processing as part of the PayPal merchant agreement (see the PayPal Integration guide for rules on placement and operation). This is treated as a separate payment method, with its own unique entry in order.profile. The UserTag paypal_api.tag communicates with the PayPal API to set the transaction parameters and read responses. The file payment.html can be used for this.
Configuration & Testing
- Download the files (at left) and install PaypalPro.pm in lib/Vend/Payment directory, and paypal_api.tag in the global usertag directory.
- Reqest a PayPal certificate, if you have not already. Also, under “Website Payment Preferences” for your PayPal account, ensure the contact telephone number is required.
- Copy the PayPal SSL certificates into a directory readable by the user that runs Interchange, such as /var/lib/interchange
- Edit the interchange.cfg file, adding the line:
Require module Vend::Payment::PaypalPro
- Edit the catalog.cfg file, adding the following (set
sandbox
andPAYPAL_TEST
to 1 for testing with the sandbox and of course use your assigned API username and password):Route paypalpro user "test_api1.testdomain.com" Route paypalpro secret "password" Route paypalpro keyfile "/var/lib/interchange/paypal_cert.pem" Route paypalpro sandbox 1 Variable PAYPAL_KEY /var/lib/interchange/paypal_cert.pem Variable PAYPAL_USER test_api1.testdomain.com Variable PAYPAL_PASS password Variable PAYPAL_TEST 1
- Setup an order profile in etc/profiles.order as follows:
__NAME__ paypal __COMMON_ORDER_PROFILE__ &fatal = yes email=required email=email &set = prof_mode_accepted [var PAYPAL_ACCEPTED] prof_mode_accepted=required This site doesn't accept paypal orders. [cgi set="" name=no_paypal_token] [if !scratch paypal_token] no_paypal_token=mandatory Please login to PayPal using the Login button. [/if] &set=mv_payment PayPal ID [scratch paypal_payerid] &final = yes &setcheck=mv_email [value email] __END__
- Edit etc/log_transaction for some processing for the paypal order profile:
[elsif value mv_order_profile eq paypal] [tmp paypal_ec_result][paypal_api token="[scratch paypal_token]" action="dorequest" invoiceid="[value mv_order_number]"][/tmp] [if scratch paypal_ec_result] [set paypal_token][/paypal_token] [else] PayPal transaction FAILED. [calc] die errmsg( "PayPal charge could not be completed. %sn", errmsg($Session->{payment_error}), ); [/calc] [/else] [/if] [/elsif]
- Copy the payment.html file into the pages/ord directory and edit settings as needed. Add the “paypal” payment option to the checkout page.
- Foundation-based stores will need to change the global variable MV_PAYMENT_MODE to paypalpro
- Test using the PayPal sandbox.
I’m receiving errors when attempting to download the Paypalpro.pm, paypal_api.tag, and payment.html files mentioned in this article.
Lots of folks write about this topic but you said some true words.
It’s appropriate time to make some plans for the future and it is time to be happy.
I have read this post and if I could I want to suggest you some interesting things or advice.
Perhaps you can write next articles referring to this
article. I wish to read even more things about it!
With havin so much content and articles do you ever run into any problems of plagorism
or copyright infringement? My blog has a lot of unique content I’ve
either created myself or outsourced but it appears a lot of it is
popping it up all over the web without my authorization. Do you know
any solutions to help reduce content from being stolen?
I’d truly appreciate it.
For more info around the new Chrysler Lifetime Powertrain Warranty customers may visit , , and .
Your local mechanic might not understand how you desire your car
or truck modified, in order that is the reason it is necessary that you can look for
your individual parts. Auto industry analysts assert the automaker has to keep coming track of vehicles such
as the Astra, Antara, and Corsa to fit the current lineup.
Start calling them up today making your company rise in almost no time at all.
We’ve witnessed many a company meltdown as a result of
lowered barriers to entry. Unless you manage a large umbrella company, your brand needs to be specific.
Some truly prime posts on this site, saved to bookmarks.