A problem with PayPal's website is keeping me from applying for a PayPal Pro account in the sandbox, so this patch has not been fully tested. It seems to eliminate error messages in Drupal.
| Comment | File | Size | Author |
|---|---|---|---|
| #64 | paypalpro_4.7.patch.txt | 73.24 KB | recidive |
| #53 | paypalpro_3.patch | 72.79 KB | darren oh |
| #23 | paypalpro_2.patch | 72.85 KB | darren oh |
| #6 | paypalpro.module_4.patch | 8.48 KB | arthurf |
| #1 | 64456.patch.txt | 73.29 KB | neclimdul |
Comments
Comment #1
neclimdulActually, We(mostly me) have broken a lot of things ppp uses. I've had a patch I've been holding onto for a while till I got a chance to test the SSL portion of it but I'll go ahead an put it up. This hasn't been tested redirecting to SSL.
Things accomplished in the patch:
1) Update the last remaining bits to new FAPI
2) moved the rest of the express functions(SOAP and menu hook) to separate module.
3) Address object changes
4) Changed PP logo on payment selction screen to not look like a link to somewhere(different payment logo from paypal)
5) moved _settings to _ec_settings.
6) renamed paypalpro_page to paypalpro_paymentform to avoid confusion with core hook.
7) drupal_goto instead of setting header
8) watchdog errors instead of showing user. give user simple error.
9) added paypalpro curl wrapper function
10) removed ?> from end of files
11) probably more little things.
Apologies for the size of the patch. It's a lot of little fixes I've been putting off posting and some rather large fixes rolled together.
Testing would be appreciated. this should apply cleanly and work with the latest CVS as of this posting.
Comment #2
gordon commentedCheck out what samys has done in the payment module for making the creation of credit card forms much easier.
If you can follow this same format so that all the credit card forms are consistant.
Comment #3
neclimdulI had thought about this but didn't want to implement it until I had read through the paypal rules on credit card forms.
Comment #4
gordon commentedComment #5
neclimdulMarked http://drupal.org/node/68462 as duplicate of this
Comment #6
arthurf commentedThis patch is based off the above, and does a few additional things:
1) groups the form fields into fieldsets
2) fixes the return value on paypalpro_form()
3) fixes $base_path with base_url()
Comment #7
redinkdesign commentedJust trying to clarify a few things...
Is "paypalpro.module_4.patch" based on "paypalpro.module_1.patch" or "64456.patch.txt" ?
I'm guessing the patching process would be similiar to the following:
1. Run either module_1.patch and/or 64456.patch (not sure which one) on CVS of paypalpro.module
2. Run module_4.patch on the result of step 1.
Comment #8
neclimdulI'm a little confused. My patch does group the fields in fieldset.
Also, the return value seems the same but the 3rd parameter for drupal_get_form is a callback name. passing a url path here will break validation and submit functions.
And the base_path() fix wont work. The idea of those lines is to redirect to a secure site. However base_path only returns the path. Example: (h left out of http to break comment parse from making it a url)
Also, url() applies base_path or base_url. check api.drupal.org.
A better solution that I was hoping to add in a later thread was to allow the user to specify the secure url. Many sites use a different server or path for the secure site and this would allow that functionality.
Comment #9
arthurf commentedHi-
Sorry for the confusion that I'm creating. I think I got confused about which patch I applied, which is why I'm causing some malarkey.
I was trying to avoid using $base_url because it's now listed as being optional in the settings.php file. I take your point about why my solution might cause problems. How best to deal with cases where $base_url isn't set?
I will create an admin option for the SSL url in the settings file which should help solve the problem.
Comment #10
darren ohSomeone else should take over this issue, since my knowledge is insufficient to evaluate the patches that have been supplied.
Comment #11
neclimdulI'll take that charge :)
Comment #12
redinkdesign commentedI'm willing to test this thoroughly. Lets go!
Comment #13
redinkdesign commentedI get the following errors when trying to apply 64456.patch.txt. I attempted to apply it on a fresh CVS copy of paypal pro using the following command:
patch -p0 < 64456.patch.txt
patching file contrib/paypalpro/paypalpro.module
Hunk #9 FAILED at 815.
1 out of 9 hunks FAILED -- saving rejects to file contrib/paypalpro/paypalpro.module.rej
patching file contrib/paypalpro/paypalpro_express.module
----------------------------------------
Contents of paypalpro.module.rej
----------------------------------------
***************
*** 1152,1244 ****
$IPAddress
$MerchantSessionId
-
-
-
-
End_Of_Quote;
return $SOAPrequest;
}
-
- /**
- * A simple xml parsing function.
- *
- * @param $xml A text string that contains the xml to be parsed.
- * @param $open_tag The opening xml tag to search for.
- * @param $close_tag The closing xml tag to search for.
- * @return string The string between $open_tag and $close_tag
- */
- function paypalpro_parse_xml($xml, $open_tag, $close_tag) {
- $pos1 = strpos($xml, $open_tag);
- $pos2 = strpos($xml, $close_tag);
- return substr($xml, $pos1 + strlen($open_tag), $pos2 - ($pos1 + strlen($open_tag)));
- }
-
- /**
- * A recursive xml parsing function for obtaining multiple error messages.
- *
- * @param $xml A text string that contains the xml to be parsed.
- * @param $open_tag The opening xml tag to search for.
- * @param $close_tag The closing xml tag to search for.
- * @return array All error messages found in the xml.
- */
- function paypalpro_get_errors($xml) {
- // errors in returned xml are comprised of short and long messages
- define(SHORT_OPEN, '');
- define(SHORT_CLOSE, '');
- define(LONG_OPEN, '');
- define(LONG_CLOSE, '');
- $errors = array();
- // loop through xml to find all error messages
- $loop = TRUE;
- while ($loop) {
- // test if there are any more errors by looking for the SHORT_OPEN string
- if (strpos($xml, SHORT_OPEN)) {
- $error['short'] = paypalpro_parse_xml($xml, SHORT_OPEN, SHORT_CLOSE);
- // there's no need to report the generic "Internal Error"
- if ($error['short'] != 'Internal Error') {
- $error['long'] = paypalpro_parse_xml($xml, LONG_OPEN, LONG_CLOSE);
- $errors[] = $error;
- }
- $xml = substr($xml, strpos($xml, LONG_CLOSE) + strlen(LONG_CLOSE));
- }
- else {
- // no more error messages found
- $loop = FALSE;
- }
- }
- return $errors;
- }
-
- /**
- * Look for an adress in the user's address book that exactly matches the
- * address returned by PayPal. If found, return the aid.
- *
- * @param $edit The $edit array, with address info returned from PayPal.
- * @return $aid The id of the address entry in the database, if match found.
- */
- function paypalpro_address_get_aid($edit) {
- $address = db_fetch_object(db_query("SELECT aid FROM {ec_address} WHERE uid = %d AND firstname = '%s' AND lastname = '%s' AND street1 = '%s' AND street2 = '%s' AND zip = '%s' AND city = '%s' AND state = '%s' AND country = '%s'", $edit->uid, $edit->firstname, $edit->lastname, $edit->street1, $edit->street2, $edit->zip, $edit->city, $edit->state, $edit->country));
- return $address->aid;
- }
-
- /**
- * Save the address returned from PayPal in the local address book, then return
- * the aid. If the address already exists, simply return the aid.
- *
- * @param $edit The $edit array with address info returned from PayPal.
- * @return @aid The id of the address entry in the database.
- */
- function paypalpro_address_save($edit) {
- $aid = paypalpro_address_get_aid($edit);
- if (!$aid) {
- db_query("INSERT INTO {ec_address} (uid, firstname, lastname, street1, street2, zip, city, state, country) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $edit->uid, $edit->firstname, $edit->lastname, $edit->street1, $edit->street2, $edit->zip, $edit->city, $edit->state, $edit->country);
- $aid = paypalpro_address_get_aid($edit);
- }
- return $aid;
- }
-
- ?>
--- 815,827 ----
$IPAddress
$MerchantSessionId
+
+
+
+
End_Of_Quote;
return $SOAPrequest;
}
----------------------------------------
END Contents of paypalpro.module.rej
----------------------------------------
Comment #14
redinkdesign commentedI get the following errors when trying to apply 64456.patch.txt. I attempted to apply it on a fresh CVS copy of paypal pro using the following command:
Contents of paypalpro.module.reg
Comment #15
Fusion_Sushi commentedMy patch of the cvs palpalpro module went well.. no errors... patched the module uploaded it, moced the dir into the base ecommerce, created a product... added it to cart, selected pay with cc confirmed address then got a 404 on this page: http://domain.com/cart/review
so can't go further.
Comment #16
Ian Ward commentedDoes anyone know the status of this? Should I be testing w/ this patch http://drupal.org/node/64456#comment-100105 ?
Thanks,
Ian
Comment #17
Ian Ward commentedIs anyone against me posting full patched files that I hand patched, so people can test? Will this just cause confusion/problems if my two files aren't quite right? They install and turn on ok, and settings comes up, but no testing yet.
Ian
Comment #18
moshe weitzman commentedi thikn it is bad form to post patches that are untested ... would be nice to have paypalpro for 4.7
Comment #19
Fusion_Sushi commentedFrom time to time I'll test patches, however and whenever you can get them to us. I'm really interested in getting this module working.. please don't have me test something that could drop my DB though.. thanks!
Comment #20
mwu commentedI can test if someone can tell me what to test, since it's gotten a bit confusing. (also, if it might destroy my database please warn me but I don't see any reason why it should.)
Comment #21
mwu commentedI'd like to offer $100 bounty or donation to Drupal to anyone who can finish this off quickly (say within 2 weeks).
Comment #22
mwu commentedI'm testing the authorize.net module
I got the same error as the person above
error while loading ...../cart/review
http://drupal.org/node/64456#comment-110331
Perhaps the problem is in product.module or elsewhere in ecommerce core, not in paypalpro.
Comment #23
darren ohI'll claim mariun's bounty if it's still available. I have tested this patch and can confirm that it works. There are two things that would make it work better:
1) Issue 71942 has not been resolved. As a result, PayPal Pro generates an error is shipping or tax is enabled.
2) There is no IPN feature in PayPal Pro, so with PayPal Express there is no way of distinguishing between cleared and uncleared transactions. If IPN is enabled, IPN hits generate Page Not Found errors.
Comment #24
darren ohSpelling error: I meant PayPal Pro generates an error if shipping or tax is enabled.
Comment #25
Fusion_Sushi commentedThanks for your work Darren, I'll test tonight.
Comment #26
darren ohI'm de-assigning myself because I don't have commit access to CVS.
Comment #27
Fusion_Sushi commentedI had trouble testing, something in the CVS of ecommerce was crashing my install and I ran out of time I'll try to test again tonight.
Comment #28
darren ohThis was designed to be used in the 4.7 branch. The only thing you should use from the main CVS branch is the paypalpro directory.
Comment #29
Fusion_Sushi commentedLooks good Darren, maybe I was not the right person to test this... the transaction when through fine and was processed and completed, it noticed when I entered a bogus cc number and when it went through I got an email telling me about it and my role was changed accordingly... 20 minutes though and I have not seen it refected in my account yet.. but that might be my settings I'm only 90% sure that I have them correct.. it would not show completed if the payment did'nt go through?
2 errors reported in the log seem to be unrealted to your work:
Type php
Date Wednesday, 12 July 2006 - 11:02pm
User anon
Location http://domain.com/admin/logs/event/64161
Referrer http://domain.com/admin
Message Invalid argument supplied for foreach() in /home/path/domain.com/httpdocs/modules/ecommerce/store/store.module on line 44.
Severity error
Hostname ip
========================
Date Wednesday, 12 July 2006 - 10:54pm
User anon
Location http://domain.com/admin/store/transaction/edit/17?section=overview&desti...
Referrer http://domain.com/admin/store/transaction/edit/17?section=overview&desti...
Message Table 'dbname.ec_credit_card' doesn't exist query: DELETE FROM ec_credit_card WHERE txnid = 0 in /home/path/domain.com/httpdocs/includes/database.mysql.inc on line 120.
Severity error
Hostname ip
I don't see ec_credit_card anywhere??
Comment #30
darren ohIf you give me the details of the transaction I may be able to help you with the first error message. As for the second error, have you used the update.php script to update your database?
Comment #31
mwu commentedDarren,
thank you very much. Yes, I will pay you the bounty if this all works.
Haven't been able to test it because I had no idea paypal made it so hard to pay by credit card.
(under paypal standard, without pro) apparently buyer is show credit card screen only once. I posted a question at node 73613. can others confirm this is correct?
I wanted to understand how standard functions before I tested pro so I can understand the workflow.
Comment #32
mwu commentedI've installed and enabled paypalpro and paypal express.
I put in the id, password, and path to ssl file. (all in sandbox)
When my user went to pay, she got 2 options: (1) paypal and (2) credit card. (1) clicking paypal leads to the paypal website (looking like paypal standard payments). (2) clicking on credit card leads to "connection to server unexpectedly terminated"
How does buyer get to paypal pro option? I thought maybe there would be a third tab called "pay with credit card via paypal pro" or something.
how is this supposed to work? what is buyer supposed to see as options when she goes to pay?
Comment #33
darren ohWith PayPal Pro the entire transaction takes place on your site. Buyers are not even aware that you are using PayPal to process credit card transactions.
There error may have something to do with the way your PayPal account is configured. You can try the module out on my test site: http://test.sidepotsinternational.com. PayPal Pro and PayPal Express are the only payment options configured. My test site is set up with the PayPal sandbox, so feel free to create as many transactions as you like.
Comment #34
mwu commentedDarren, Thank you. I went to your test site. I picked credit card. It sent me to the paypal dev sandbox. I thought about logging in under my account but I assume it would not work. Does it mean our credit card option is restricted to only paypal then? (if we have say, authorize.net, would we have to configure ecommerce for either paypal pro or for authorize.net?)
Comment #35
mwu commentedBy the way, when I picked user points, it still sent me to the paypal sandbox. I would think that's not the way it's supposed to be.
I was not logged in. I expected to get a message "you must log in" and then "you don't have enough points."
Thank you.
Comment #36
darren ohI have no idea what caused the problem with user points. I tried three different browsers, and all worked as you expected. If that problem continues, you should submit an issue to the User Points project.
If you can't log in to the PayPal sandbox with your own developer account, send me a private email and I will give you access to my account.
Comment #37
mwu commentedThank you.
I've been reading about SSL. It seem that:
1) I need to have an SSL certificate installed on my server (shared hosting) to even test out paypal pro in the sandbox
2) To have SSL, I need a dedicated IP so I need to upgrade my account.
Are these 2 things true to even test paypal pro in the sandbox? Did you install SSL on your server?
Above when I said I installed, all I meant was I uploaded into root and gave the path to the paypal pro module. I didn't do the "installation" which is apparently quite complicated. site5 has a button to install, but it does not have any directions and I could not figure it out.
Comment #38
mwu commentedDarren,
this time the user points option said correctly "you don't have enough points" and credit card option correctly asked me for the credit card. I'll have to use the dummy credit card number from your account. I'll send you a private message for it.
when i put in the dummy credit card for my account, i got this 4 times.
There was an error processing your transaction with PayPal. A message has been logged. We are sorry for the inconvenience
i notice i put in my credit card number at http, not https, so can I assume sandbox does not require https?
Comment #39
mwu commentedby the way, I think it's interesting the url is this, so an observant buyer can deduce they are paying via paypal pro
http://test.sidepotsinternational.com/paypalpro/form/71
Comment #40
darren ohIn answer to #37, your site acts is the client, not the server, in the transaction with PayPal. You just need to download the certificate from PayPal and give the path to the certificate in the paypalpro module settings.
Comment #41
mwu commentedDarren,
thank you. that was helpful.
Is it possible to put asterisks in the password field when there is data in it?
I put in my Paypal API password, I hit submit. The screen says my options have been saved but the password field is still blank. I certainly don't want to type in the 16 digit password every time.
I realized I put in the wrong path last time. It says absolute path. I tried this today:
/home/mysitename/public_html/addondomainname/cert_key_pem.txt.
That's right, right? I don't need to add or remove any /.
Comment #42
mwu commentedWhen I try to pay via credit card, it says connection terminated.
When I try to pay via paypal express, it says, sorry there was an error.
Authentication/Authorization Failed Username/Password is incorrect.
(There's no way to change the API password that I saw. It's hard to ensure that you typed a 16 digit password correctly if you can't see the password. If you know a way to change the password or to make it show on the screen as I type it, please let me know.)
Comment #43
mwu commentedWhen I try to pay via credit card, it says connection terminated.
When I try to pay via paypal express, it says, sorry there was an error.
Authentication/Authorization Failed Username/Password is incorrect.
(There's no way to change the API password that I saw. It's hard to ensure that you typed a 16 digit password correctly if you can't see the password. If you know a way to change the password or to make it show on the screen as I type it, please let me know.)
Comment #44
mwu commentedWhen I try to pay via credit card, it says connection terminated.
When I try to pay via paypal express, it says, sorry there was an error.
Authentication/Authorization Failed Username/Password is incorrect.
(There's no way to change the API password that I saw. It's hard to ensure that you typed a 16 digit password correctly if you can't see the password. If you know a way to change the password or to make it show on the screen as I type it, please let me know.)
Comment #45
mwu commented(sorry about the redundant posts. the screen returned an error.)
I also have authorize.net enabled.
I notice now that my payment screen has 4 options:
1. Pay with credit card
2. Paypal
3. Credit card
4. Paypal Express check out.
I think having both 1 and 3 will be very confusing for the buyer.
Comment #46
mwu commentedI used the dummy data you gave me.
1) As an anonymous user, it let me go all the way through and enter the credit card, and then returned an error. (something not found I think.) It would be good for there to be a warning that anonymous cannot purchase, and they must log in (before putting in their credit card)
2) I then logged in and provided my credit card info all over again. This is the message.
Page not found
Transaction approved. Thank you for your order!
I guess it means it worked. The "page not found" is confusing, but I assume that's merely fixing a setting.
Comment #47
mwu commentedwhich table stores the password for paypalpro? I thought I'd look in mysql for it but I can't find it anywhere. I've looked through every table that starts with ec. I also glanced at all the tables.
Comment #48
mwu commentedDarren,
re: #40
http://drupal.org/node/64456#comment-116130
do I need a dedicated IP address?
Comment #49
mwu commentedhttp://wiki.civicrm.org/confluence/display/CRM/PayPal+Configuration+Guide
Create or locate a directory which can be used for your API Profile files. During this step, your webserver must have read/write access to the path - but for security it should preferably be a directory that is NOT below your web root. Note down the path to this directory - this will be your TEST_CERT_PATH.
I interpret this to mean the ssl certificate from paypal can be placed below your root, but for security reasons should not be.
Comment #50
mwu commentedI've made a little headway. In settings, I turned off SSL. This time when I clicked on credit card, it gave me the entire paypal credit card form to fill out. When I filled it out, it gave this error six times:
There was an error processing your transaction with PayPal. A message has been logged. We are sorry for the inconvenience
Comment #51
mwu commentedJust to clarify, I am using the first party authentification method
Shopping Cart Resources
Print this Page
Note: This page contains information for shopping cart owners who wish to offer PayPal as a payment option with their product. If you are a merchant searching for a shopping cart for your website or application, please visit our Solutions Directory.
Before integrating PayPal into your shopping cart, you must choose which payment options to support.
With Pro, the customer completes the checkout on your merchant's website. With Standard, the customer completes the checkout on the PayPal website. Although Pro is more technically challenging than Standard, it gives customers an improved buying experience because you retain more control of the checkout experience. The table below compares the two options.
Website Payments Pro Website Payments Standard
Monthly Fee Yes No
Core Technology SOAP Web Services HTML / FORM POSTs
Customer Experience Checkout on merchant site Checkout on PayPal's site
Integrating Website Payments Standard
If you choose to integrate your cart with Website Payments Standard, you provide a PayPal payment button on the checkout page of your cart. This button POSTs an HTML FORM to the PayPal website that redirects the customer to PayPal to complete the payment. This form contains the payment details of the transaction. For more details on how to construct this POST, visit the Standard Payment Option page.
Integrating Website Payments Pro
If you choose to integrate your cart with Website Payments Pro, your next choice is to determine if you will use first-party authentication or third-party authentication when submitting API calls. This depends on the way in which customers use your cart. It is possible that you can use both methods.
First-Party Authentication
First-party authentication should be used if your product is downloaded and runs in your customer's environment. With first-party authentication, your customer uses their own API username and password to submit API calls to PayPal.
Third-Party Authentication
If your shopping cart is offered as a hosted solution, that is, if your customers do not download and install your software onto their servers, but instead interact with your cart that is installed on your servers or another managed service provider's service, then you need third-party API authentication.
With third-party authentication, you submit API calls to PayPal on your merchant's behalf. You need to download an API Certificate for your business account, and use your API username and password for every call. You specify the merchant, the third-party for whom you are making the API call, by populating the Subject field of the request with the email address of your merchant's Verified PayPal Business account.
Third-Party Authentication Using the PayPal SDK
Calling PayPal Web Service APIs is easier if you use one of the PayPal SDKs. To use third-party API authentication with the PayPal SDK, set the value of the Subject field in your API Profile object that is in use by the CallerServices object submitting the API call.
Examples of setting the Subject in an API Profile object are shown below:
ASP.NET/C#
IAPIProfile profile = ProfileFactory.CreateAPIProfile();
profile.APIUsername = "Your PayPal API username";
profile.APIPassword = "Your PayPal API password";
profile.Subject = "Merchant's PayPal email address";
profile.Environment = "live" or "sandbox";
Java
APIProfile profile = ProfileFactory.createAPIProfile();
profile.setAPIUsername("Your PayPal API username");
profile.setAPIPassword("Your PayPal API password");
profile.setSubject("Merchant's PayPal email address");
profile.setCertificateFile("Path to your P12 certificate");
profile.setPrivateKeyPassword("Password for P12 certificate");
profile.setEnvironment("live" or "sandbox");
Presenting the PayPal Solutions to Your Customers
When you present your PayPal solutions to your customers, we suggest something similar to the following. This treatment is intended only as a guide for carts offering both Standard and Pro. You should tailor your sign-up process to the services you offer.
Website Payments Pro Setup Instructions for Your Customers
Give instructions similar to the following to your customers on how to configure their PayPal account to work with your cart when they choose Website Payments Pro.
Set Up a Verified PayPal Business account
Customers who don't have an existing PayPal account:
1. Go to https://www.paypal.com/cgi-bin/webscr?cmd=_registration-run&business_onl....
2. Choose country and click Continue. Website Payments Pro is currently only available for US based merchants.
3. Complete Business account sign-up page.
4. Verify your email address by following the instructions sent to your email account.
5. Confirm your address by adding a credit card to your account.
6. Add a bank account to become a Verified member. This process may take several business days. Follow the instructions on the PayPal site to add a bank account.
Customers who already have a Personal or Premier account:
1. Go to https://www.paypal.com/cgi-bin/webscr?cmd=_registration-run&business_onl....
2. Click on the Upgrade your Account link.
3. Click on the Upgrade Now button.
4. Choose to upgrade to a Business account and follow instructions to complete upgrade.
5. If you haven't already, add a bank account to become a Verified member. This process may take several business days. Follow the instructions on the PayPal site to add a bank account.
Apply for Website Payments Pro
1. Go to https://www.paypal.com/us/cgi-bin/webscr?cmd=_smb_signup_entry&featureID=1.
2. Fill out your information. You must enter your Social Security number for the application.
3. Submit your application. Approval takes between 24 and 48 hours.
4. Accept the Pro billing agreement. Check the Getting Started section on the upper left of your account overview page.
Setup API access
First-party authentication: Download API certificate
1. Log in to your PayPal account and click the Profile subtab.
2. Click the API Access link under the Account Information column.
3. Click the API Certificate Request link under the Request an API Certificate header.
4. Complete the API Certificate Request form. Write down the value listed next to Account Name, this is your API Username. Also write down the value you choose for the Password field, this is your API Password. Click the Continue button when complete.
5. Click the Generate Certificate button on the 'API Certificate Request Review' page.
6. Click the Download button on the API Certificate page. You will be prompted to download a file called cert_key_pem.txt. This file is your API Certificate.
I am not using the
Third-party authentication: Grant your cart the appropriate API authentication permissions
1. Log in to your PayPal account and click the Profile subtab.
2. Click the API Access link in the Account Information column.
3. Click the API Access Authorization link.
4. Click the Add button.
5. In the API Account Name field, enter the cart's API username.
6. Check the boxes next to the following APIs:
AddressVerify
SetExpressCheckout
GetExpressCheckoutDetails
DoExpressCheckoutPayment
DoCapture
DoReauthorization
DoVoid
DoDirectPayment
DoAuthorization
7. Click the Save button.
Is this right?
Comment #52
mwu commentedhttps://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=xpt/popup/APIConcep...
method 1
An API certificate is suitable if you have complete control over your own web server.
method 2
An API signature is suitable for use with Microsoft Windows web servers or other shared web server configurations, such as those used by web hosting services.
based on this info, I would think that on a shared host I would need to use method 2, an API signature.
I don't see this option in paypal pro. Am I correct?
Comment #53
darren ohThis patch provides a fix for the "page not found" error in comment 46.
The paypalpro_2.patch would not have generated this error, but I had used the paypalpro.patch by accident. I hate having to keep track of patches! I hope someone gets around to committing this soon.
Anyway, while examining the patch I realized that there was a mistake in the code that was meant to switch from a secure to an unsecure connection, as well as a spelling error in one of the comments.
Comment #54
Fusion_Sushi commentedDarren, should we patch all of these, starting with the first then patch our way to this one, then test??
Thanks
Comment #55
darren ohNo, just use the most recent patch.
Comment #56
Fusion_Sushi commentedyeah, I did that. I'm trying to test this but I ran into the negitive amount bug (there is a patch for this) until ecommerce works it's difficult to get to test your paypalpro patch. But I'll keep trying.
Comment #57
mwu commentedI've written some documentation on what you need in terms of settings and hosting in order to test the module at node 74560
I've filed an issue about password being erased at node 69552
I don't have any issues with the negative amount bug. Actually never heard of it.
Comment #58
mwu commentedI applied patch 3. ran through the procedure.
got this error six times. (same result as patch 2)
There was an error processing your transaction with PayPal. A message has been logged. We are sorry for the inconvenience
The first time I tried to patch, it said it's already been patched. was not quite sure whether it's okay to apply patch 3 after doing 1 and 2. So I redownloaded unpatched copies from cvs.
after patching it said,
patching file paypalpro.module
patching file paypalpro_express.module
it didn't say succeeded or failed. is that the normal message if it succeeded? (i have a memory that if only one file is patched there is no message returned.)
Comment #59
gordon commentedI have taken a look, and this the paypalpro express checkout is complete broken.
This is required as it is a part of T&C for Paypal Pro.
The flow should be something like.
Comment #60
darren ohPayPal Pro Express checkout is not the only broken payment method. I reported this problem with the checkout process in issue 71942.
Comment #61
mwu commentedIs this a problem only if shipping or tax is enabled?
For membership, shipping is not necessary.
Does anyone know if in the U.S. we have to collect tax on website membership? (I would think state taxes do not apply)
I don't have shipping or tax enabled.
Comment #62
darren ohAs far as I know, shipping and tax are the only modules that cause this problem because they are the only modules that modify the transaction amount. I haven't checked the role discount module.
Comment #63
neclimdulThis is really a problem with any module that applies misc charges and the module applies the charges after paypalpro_express redirects.
Paypal also requires that you don't force the user to input an address if they're using the express checkout. This means you can't have the address form before paypalpro redirects and you can't calculate shipping or taxes. Coupons would also be subject to this problem since they are applied on the review screen.
If I remember right paypal treats the amount you send as an *estimate* for exactly this reason. I think it lets you error by a certain amount on the final transaction posted(after the review page for us). I'll review the documentation and confirm if this is correct.
Comment #64
recidive commentedUpdated the patch in #53. I've changed back to the redirectioning to a header() function because drupal_goto() is not working in 4.7. Also I've done a few code cleanup and added a theme function to the paypal express image.
The checkout is being completed fine but not as PayPal requires (I'll be on this if time permits). How the "Screen order" approach can help us with this? Should we override the screen order if PayPal express is enable and create a new address using the data returned from the express checkout?
Comment #65
phildu commentedi have many mistery problems to apply patch this patch ?
maybe because i'm on a macintosh, maybe because 'diff'npatch' the soft i use cannot use this type of file
(i need to separate , the patch in different file , one per patch, don't know why ?)
then could you send file with the patch apply ??
thanks
Comment #66
darren ohphildu, try using the patch command from the Terminal. There are instructions in the Drupal handbook.
Comment #67
darren ohThe original purpose of this issue has been accomplished. With the last patch, the PayPal Pro module has been made compatible with Drupal 4.7. This patch should be committed, and a new issue should be created for the checkout problems.
Comment #68
gordon commentedYes it may have upgraded paypalpro to 4.7, but because of the other issues, it will not get commited to the 4.7 branch.
However I will consider commiting to HEAD
Comment #69
darren ohTrying make the title clearer. Switched version to cvs because PayPal Pro will not be added to the 4.7 branch until checkout issues are resolved.
Comment #70
phildu commentedDaren,
i have do this , but work with the previous
but not work with the last patch file ??
Comment #71
neclimdulPatch seems to be working to me. Good idea with the theme function.
Comment #72
neclimdulCommited with the addition of some comments on the new theme function and a better php function in paypalpro_ec_settings
Comment #73
darren ohCreated issue 81127 to deal with PayPal compliance problems.
Comment #74
redinkdesign commentedIm getting the following error in watchdog..
"Invalid Configuration This transaction cannot be processed. The country listed for your business address is not currently supported"
Referrer: https://www.mysite.com/paypalpro/form/48
Any ideas on where the business address is stored?
Comment #75
darren ohIt's the address item in your store settings menu.
Comment #76
jhporter commentedmodule_exists() function still being used in the paypalpro.module (in the latest version in CVS) - which is an unknown function in 4.7. Commenting out that if{} block solves the problem for now.
Comment #77
darren ohAll you need to do is download revision 1.14 from CVS and use it to replace your paypalpro.module file. The current CVS version is being updated for the next version of Drupal and is no longer compatible with 4.7.
I have created issue 81550 to request that a 4.7 branch of this module be maintained.
Comment #78
jhporter commentedI downloaded 1.15 from CVS - why woudl it be fixed in 1.14 and not in 1.15?
Comment #79
darren oh1.15 is not for Drupal 4.7. It's for the coming version.
Comment #80
scribe27 commentedIs there any update/progress on this?
Comment #81
darren ohIssue 81550 has been created to deal with the loss of 4.7 compatibility.
Comment #82
(not verified) commented