giz286sim Posted April 6, 2006 Share Posted April 6, 2006 Dynamo, what do you think about adding the feature where when PayPal denies the charge or if there is an error, when it redirects back to checkout_payment.php, that the applicable error message displays? Although I don't know PHP very well, I would be glad to help out and be the tester for a register_globals disabled site. Let me know Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 6, 2006 Author Share Posted April 6, 2006 Dynamo, what do you think about adding the feature where when PayPal denies the charge or if there is an error, when it redirects back to checkout_payment.php, that the applicable error message displays? Although I don't know PHP very well, I would be glad to help out and be the tester for a register_globals disabled site. Let me know It does that already. Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
giz286sim Posted April 6, 2006 Share Posted April 6, 2006 It does that already. Hmm, then this might be another register globals issue. I had two customers with declined cards, and I tested it myself with an incorrect card, and all it does is redirect back to the payment page but does not display any error message. Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 7, 2006 Author Share Posted April 7, 2006 Hmm, then this might be another register globals issue. I had two customers with declined cards, and I tested it myself with an incorrect card, and all it does is redirect back to the payment page but does not display any error message. In checkout_payment.php, try changing these lines: if ($ec_enabled) { if (tep_session_is_registered('paypal_error')) { $checkout_login = true; $messageStack->add('payment', $paypal_error); tep_session_unregister('paypal_error'); } } to this: if ($ec_enabled) { if (tep_session_is_registered('paypal_error')) { $checkout_login = true; $messageStack->add('payment', $_SESSION['paypal_error']); tep_session_unregister('paypal_error'); } } Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
nicirvin Posted April 7, 2006 Share Posted April 7, 2006 I am not quite clear - could you bear with me asking these questions please? PayPal now offers a system in which the customer does not have to become a PayPal member, and transacts their purchase anyway. Is your module handling that? If I interpret it correctly your module automatically signs them up for a PayPal account which is not the same. Whereas your module's last option offered to customers seems to be they can pay without any PayPal involvement i.e. with the direct payment API (bypassing PayPal altogether). Am I correct? My desire... is therefore to implement a system that allows folk to pay via PayPal - without signing up to PayPal. FYI the PayPal system I am describing is outlined here: Buyers Can Checkout Without a PayPal Account https://www.paypal.com/uk/cgi-bin/webscr?cm...hant/WAXLanding -outside Demo available here: https://www.paypal.com/uk/cgi-bin/webscr?cm...verview-outside Or, did I interpret things wrongly, and in fact your module adopts the PayPal system described in those pages? Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 7, 2006 Author Share Posted April 7, 2006 (edited) This module is for PayPal's Website Payment Pro service that you pay $20/month for and allows your customers to pay with their credit cards without ever leaving your site. What you've linked to is part of their standard service. You'll want the PayPal IPN module (the one written by hpdl in the contributions) and you'll also need to set an option in your paypal profile to allow checkouts without needing a paypal account. Edited April 7, 2006 by dynamoeffects Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2006 Share Posted April 7, 2006 I am not quite clear - could you bear with me asking these questions please? My desire... is therefore to implement a system that allows folk to pay via PayPal - without signing up to PayPal. FYI the PayPal system I am describing is outlined here: Demo available here: https://www.paypal.com/uk/cgi-bin/webscr?cm...verview-outside Or, did I interpret things wrongly, and in fact your module adopts the PayPal system described in those pages? nicirvin Following dynamoeffects comments I checked this out at Paypal this module appears to be dedicated to a Paypal service which is only available in the US The service you want to connect to can be done with the one mentioned by dynamoeffects or the shopping cart version is very very popular or the plain old basic version can be used and can be enhanced with certain contributions . Check them out here Paypal Modules Regards Nossum Quote Link to comment Share on other sites More sharing options...
giz286sim Posted April 7, 2006 Share Posted April 7, 2006 In checkout_payment.php, try changing these lines: if ($ec_enabled) { if (tep_session_is_registered('paypal_error')) { $checkout_login = true; $messageStack->add('payment', $paypal_error); tep_session_unregister('paypal_error'); } } to this: if ($ec_enabled) { if (tep_session_is_registered('paypal_error')) { $checkout_login = true; $messageStack->add('payment', $_SESSION['paypal_error']); tep_session_unregister('paypal_error'); } } Nope, still no error messages showing. Just redirects back Quote Link to comment Share on other sites More sharing options...
jlong07 Posted April 8, 2006 Share Posted April 8, 2006 I am having the same or similar problem. EC seems to work correctly, but DP just takes me back to checkout_payment.php. I enabled the error dump feature and here is what is sent to me in email. In function: before_process() - Direct Payment Did first contact attempt return error? Yes --------------------------------------------------------------------- -------------------------------DP_DUMP------------------------------- ------------This is the information that was sent to PayPal---------- --------------------------------------------------------------------- dodirectpaymentrequesttype Object ( [DoDirectPaymentRequestDetails] => dodirectpaymentrequestdetailstype Object ( [_elements] => Array ( [PaymentAction] => Array ( [required] => 1 [type] => PaymentActionCodeType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [PaymentDetails] => Array ( [required] => 1 [type] => PaymentDetailsType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CreditCard] => Array ( [required] => 1 [type] => CreditCardDetailsType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [iPAddress] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [MerchantSessionId] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [PaymentAction] => Sale [PaymentDetails] => paymentdetailstype Object ( [_elements] => Array ( [OrderTotal] => Array ( [required] => 1 [type] => BasicAmountType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [itemTotal] => Array ( [required] => [type] => BasicAmountType [namespace] => urn:ebay:apis:eBLBaseComponents ) [shippingTotal] => Array ( [required] => [type] => BasicAmountType [namespace] => urn:ebay:apis:eBLBaseComponents ) [HandlingTotal] => Array ( [required] => [type] => BasicAmountType [namespace] => urn:ebay:apis:eBLBaseComponents ) [TaxTotal] => Array ( [required] => [type] => BasicAmountType [namespace] => urn:ebay:apis:eBLBaseComponents ) [OrderDescription] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [Custom] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [invoiceID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [buttonSource] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [NotifyURL] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [shipToAddress] => Array ( [required] => [type] => AddressType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [PaymentDetailsItem] => Array ( [required] => [type] => PaymentDetailsItemType [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [OrderTotal] => basicamounttype Object ( [_elements] => Array ( ) [_attributes] => Array ( [currencyID] => Array ( [name] => currencyID [type] => ebl:CurrencyCodeType [use] => required ) ) [_attributeValues] => Array ( [currencyID] => USD ) [_namespace] => urn:ebay:apis:CoreComponentTypes [_value] => 164.99 [_charset] => iso-8859-1 ) [itemTotal] => [shippingTotal] => [HandlingTotal] => [TaxTotal] => [OrderDescription] => [Custom] => [invoiceID] => [buttonSource] => [NotifyURL] => [shipToAddress] => addresstype Object ( [_elements] => Array ( [Name] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [street1] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [street2] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CityName] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [stateOrProvince] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [Country] => Array ( [required] => [type] => [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CountryName] => Array ( [required] => [type] => [namespace] => urn:ebay:apis:eBLBaseComponents ) [Phone] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [PostalCode] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [AddressID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [AddressOwner] => Array ( [required] => [type] => AddressOwnerCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [ExternalAddressID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [internationalName] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [internationalStateAndCity] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [internationalStreet] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [AddressStatus] => Array ( [required] => [type] => AddressStatusCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [Name] => Jason Long [street1] => 4340 Meadow Dr. [street2] => [CityName] => Santa Maria [stateOrProvince] => CA [Country] => US [CountryName] => [Phone] => [PostalCode] => 93455 [AddressID] => [AddressOwner] => [ExternalAddressID] => [internationalName] => [internationalStateAndCity] => [internationalStreet] => [AddressStatus] => ) [PaymentDetailsItem] => ) [CreditCard] => creditcarddetailstype Object ( [_elements] => Array ( [CreditCardType] => Array ( [required] => 1 [type] => CreditCardTypeType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CreditCardNumber] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [ExpMonth] => Array ( [required] => 1 [type] => int [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [ExpYear] => Array ( [required] => 1 [type] => int [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CardOwner] => Array ( [required] => 1 [type] => PayerInfoType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CVV2] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [CreditCardType] => Visa [CreditCardNumber] => 4072 4972 0889 7267 [ExpMonth] => 12 [ExpYear] => 2009 [CardOwner] => payerinfotype Object ( [_elements] => Array ( [Payer] => Array ( [required] => 1 [type] => EmailAddressType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [PayerID] => Array ( [required] => 1 [type] => UserIDType [namespace] => urn:ebay:apis:eBLBaseComponents ) [PayerStatus] => Array ( [required] => 1 [type] => PayPalUserStatusCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [PayerName] => Array ( [required] => 1 [type] => PersonNameType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [PayerCountry] => Array ( [required] => 1 [type] => CountryCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [PayerBusiness] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [Address] => Array ( [required] => [type] => AddressType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [Payer] => [email protected] [PayerID] => [PayerStatus] => [PayerName] => personnametype Object ( [_elements] => Array ( [salutation] => Array ( [required] => [type] => SalutationType [namespace] => urn:ebay:apis:eBLBaseComponents ) [FirstName] => Array ( [required] => [type] => NameType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [MiddleName] => Array ( [required] => [type] => NameType [namespace] => urn:ebay:apis:eBLBaseComponents ) [LastName] => Array ( [required] => [type] => NameType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [suffix] => Array ( [required] => [type] => SuffixType [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [salutation] => [FirstName] => Jason [MiddleName] => [LastName] => Long [suffix] => ) [PayerCountry] => [PayerBusiness] => [Address] => addresstype Object ( [_elements] => Array ( [Name] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [street1] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [street2] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CityName] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [stateOrProvince] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [Country] => Array ( [required] => [type] => [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CountryName] => Array ( [required] => [type] => [namespace] => urn:ebay:apis:eBLBaseComponents ) [Phone] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [PostalCode] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [AddressID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [AddressOwner] => Array ( [required] => [type] => AddressOwnerCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [ExternalAddressID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [internationalName] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [internationalStateAndCity] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [internationalStreet] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [AddressStatus] => Array ( [required] => [type] => AddressStatusCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [Name] => [street1] => 4340 Meadow Dr. [street2] => [CityName] => Santa Maria [stateOrProvince] => CA [Country] => US [CountryName] => [Phone] => [PostalCode] => 93455 [AddressID] => [AddressOwner] => [ExternalAddressID] => [internationalName] => [internationalStateAndCity] => [internationalStreet] => [AddressStatus] => ) ) [CVV2] => 000 ) [iPAddress] => 64.30.208.7 [MerchantSessionId] => ) [_elements] => Array ( [DetailLevel] => Array ( [required] => [type] => DetailLevelCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [ErrorLanguage] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [MessageID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [Version] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [DoDirectPaymentRequestDetails] => Array ( [required] => 1 [type] => DoDirectPaymentRequestDetailsType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:api:PayPalAPI [DetailLevel] => [ErrorLanguage] => [MessageID] => [Version] => 2.0 ) --------------------------------------------------------------------- -------------------------------FINAL_REQ----------------------------- -------------------This is the response from PayPal------------------ --------------------------------------------------------------------- dodirectpaymentresponsetype Object ( [Amount] => [AVSCode] => [CVV2Code] => [TransactionID] => [_elements] => Array ( [Timestamp] => Array ( [required] => [type] => dateTime [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [Ack] => Array ( [required] => 1 [type] => AckCodeType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [CorrelationID] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [Errors] => Array ( [required] => [type] => ErrorType [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [Version] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [build] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents [charset] => iso-8859-1 ) [Amount] => Array ( [required] => 1 [type] => BasicAmountType [namespace] => urn:ebay:api:PayPalAPI ) [AVSCode] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:api:PayPalAPI ) [CVV2Code] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:api:PayPalAPI ) [TransactionID] => Array ( [required] => 1 [type] => TransactionId [namespace] => urn:ebay:api:PayPalAPI ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:api:PayPalAPI [Timestamp] => 2006-04-08T03:08:27Z [Ack] => Failure [CorrelationID] => e7ffb452e60ca [Errors] => Array ( [0] => errortype Object ( [_elements] => Array ( [shortMessage] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [LongMessage] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [ErrorCode] => Array ( [required] => 1 [type] => token [namespace] => urn:ebay:apis:eBLBaseComponents ) [severityCode] => Array ( [required] => 1 [type] => SeverityCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [ErrorParameters] => Array ( [required] => [type] => ErrorParameterType [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [shortMessage] => Invalid Credit Card. [LongMessage] => The credit card entered is either missing, not a valid credit card, or does not match the credit card type in the CardType field [ErrorCode] => 10527 [severityCode] => Error [ErrorParameters] => ) [1] => errortype Object ( [_elements] => Array ( [shortMessage] => Array ( [required] => 1 [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [LongMessage] => Array ( [required] => [type] => string [namespace] => urn:ebay:apis:eBLBaseComponents ) [ErrorCode] => Array ( [required] => 1 [type] => token [namespace] => urn:ebay:apis:eBLBaseComponents ) [severityCode] => Array ( [required] => 1 [type] => SeverityCodeType [namespace] => urn:ebay:apis:eBLBaseComponents ) [ErrorParameters] => Array ( [required] => [type] => ErrorParameterType [namespace] => urn:ebay:apis:eBLBaseComponents ) ) [_attributes] => Array ( ) [_attributeValues] => Array ( ) [_namespace] => urn:ebay:apis:eBLBaseComponents [shortMessage] => Invalid Credit Card. [LongMessage] => The credit card entered is either missing, not a valid credit card, or does not match the credit card type in the CardType field [ErrorCode] => 10527 [severityCode] => Error [ErrorParameters] => ) ) [Version] => 2.000000 [build] => 1.0006 ) --------------------------------------------------------------------- ---------------------------------TS_REQ------------------------------ --------Results of the transaction search if it was executed--------- --------------------------------------------------------------------- I can't figure out what this means so if you could help me out that would be great. I am using a live wpp account and believe I have all the configuration stuff set up right. I am using the test account number from the readme file. I also am not getting any error messages on the checkout_payment page just like the other person who posted above me. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
L!mit Posted April 8, 2006 Share Posted April 8, 2006 I am having the same or similar problem. EC seems to work correctly, but DP just takes me back to checkout_payment.php. I enabled the error dump feature and here is what is sent to me in email. I can't figure out what this means so if you could help me out that would be great. I am using a live wpp account and believe I have all the configuration stuff set up right. I am using the test account number from the readme file. I also am not getting any error messages on the checkout_payment page just like the other person who posted above me. Thanks for your help. If your not able to checkout try removing the "dr" from you address. For some reason paypal direct payment doesn't like, AVE or DR it just returns you to the payment page. Not sure if that's your problem, but I saw that in your paypal dump. ([street1] => 4340 Meadow Dr.) Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 8, 2006 Author Share Posted April 8, 2006 [_namespace] => urn:ebay:apis:eBLBaseComponents[CreditCardType] => Visa [CreditCardNumber] => 4072 4972 0889 7267 [ExpMonth] => 12 [ExpYear] => 2009 I can't believe I didn't add a check on the CC# field. Try entering the CC# without spaces. I'll add better input checking in the next version. That debug feature is the greatest thing I've ever done to this module. Sure makes debugging problems a breeze. Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
jlong07 Posted April 8, 2006 Share Posted April 8, 2006 (edited) I can't believe I didn't add a check on the CC# field. Try entering the CC# without spaces. I'll add better input checking in the next version.That debug feature is the greatest thing I've ever done to this module. Sure makes debugging problems a breeze. I have tried it both with an without the spaces in the cc#, the same thing happens each time. The trouble is that if this is just a problem with the way the credit card info is entered then there should be some sort of error that lets the user know that. I am not receiving any errors at all. I will try the suggestion with the street address, but again that is not a very good option because nine times out of ten a user will put the suffix (dr, ave, etc) in the street name. Also, I read somewhere that you can't use the test credit card number in live mode. If that is correct then how do I test the store? Edited April 8, 2006 by jlong07 Quote Link to comment Share on other sites More sharing options...
jlong07 Posted April 8, 2006 Share Posted April 8, 2006 I tried changing the address and removing the dr and that didn't change anything. I then tried a real credit card and that went through. It looks like the problem is that the credit card is being declined, but it isn't giving me any errors to that effect. Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 8, 2006 Author Share Posted April 8, 2006 Also, I read somewhere that you can't use the test credit card number in live mode. If that is correct then how do I test the store? Oh good point, I forgot to ask that. You'll need to use the Sandbox to test your module out. Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
jlong07 Posted April 8, 2006 Share Posted April 8, 2006 Ok, I think I am getting this figured out. I have figured out how to setup sandbox accounts and have successfully tested the dp portion of the contrib. However, the EC portion is giving me problems. I realized that I do not have an ec buton on the login page so right now the only place ec shows up is on the payment options page. I checked my login in page and it does have the code for wpp added in here is the wpp code plus the code right around it. Released under the GNU General Public License */ require('includes/application_top.php'); //---PayPal WPP Modification START ---// //Assign a variable to cut down on database calls //Don't show checkout option if cart is empty. It does not satisfy the paypal if (tep_paypal_wpp_enabled() && $cart->count_contents() > 0) { $ec_enabled = true; } else { $ec_enabled = false; } if ($ec_enabled) { //If they're here, they're either about to go to paypal or were sent back by an error, so clear these session vars if (tep_session_is_registered('paypal_ec_temp')) tep_session_unregister('paypal_ec_temp'); if (tep_session_is_registered('paypal_ec_token')) tep_session_unregister('paypal_ec_token'); if (tep_session_is_registered('paypal_ec_payer_id')) tep_session_unregister('paypal_ec_payer_id'); if (tep_session_is_registered('paypal_ec_payer_info')) tep_session_unregister('paypal_ec_payer_info'); //Find out if the user is logging in to checkout so that we know to draw the EC box $checkout_login = false; if (sizeof($navigation->snapshot) > 0 || isset($HTTP_GET_VARS['payment_error'])) { if (strpos($navigation->snapshot['page'], 'checkout_') !== false || isset($HTTP_GET_VARS['payment_error'])) { $checkout_login = true; } } } //---PayPal WPP Modification END---// // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started) if ($session_started == false) { tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE)); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']); $password = tep_db_prepare_input($HTTP_POST_VARS['password']); If you want to see the site you can go to http://www.kidzsafetyservices.com/catalog/login.php. I would like to have the ec button show up on the login page and then I can remove it from the payments page. My other problem with EC is that when I click on the ec button on the payment options page it takes me to paypal as it is supposed to, I use my sandbox personal account and everything goes fine. However, once I click complete checkout it takes me back to the shipping options page and the transactions isn't shown on either of the paypal sandbox accounts. Again, there are no errors generated at all during this process. I would really like to see some of the errors show up. I just had a thought about the error problem. Where do the errors show up, is it in the header section because if so I have drastically altered that to fit my design. Anyway, any thoughts or help would be greatly appreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted April 8, 2006 Share Posted April 8, 2006 (edited) Ok, I think I am getting this figured out. I have figured out how to setup sandbox accounts and have successfully tested the dp portion of the contrib. However, the EC portion is giving me problems. I realized that I do not have an ec buton on the login page so right now the only place ec shows up is on the payment options page. I checked my login in page and it does have the code for wpp added in here is the wpp code plus the code right around it. [/quote] There are several blocks of code in the WPP version of login.php that need to be added to yours. I'm assuming that you didn't use the login.php from the contribution because you have made other modifications. Make certain that you add all the code set off by the "//---PayPal WPP Modification START ---//" and "//---PayPal WPP Modification END ---//" markers. [quote]My other problem with EC is that when I click on the ec button on the payment options page it takes me to paypal as it is supposed to, I use my sandbox personal account and everything goes fine. However, once I click complete checkout it takes me back to the shipping options page and the transactions isn't shown on either of the paypal sandbox accounts. Again, there are no errors generated at all during this process. I would really like to see some of the errors show up.[/quote] When you choose the EC button on the payment page, it always sends you back to the shipping page. This is how it's supposed to work, because the customer may have chosen a different shipping address while at PayPal. This causes shipping charges to be recalculated based on the address returned by PayPal. [quote]I just had a thought about the error problem. Where do the errors show up, is it in the header section because if so I have drastically altered that to fit my design. Anyway, any thoughts or help would be greatly appreciated. Thank you.[/quote] Yes, the standard method for displaying errors in osCommerce is to put a block at the top of the page body. The code to display payment errors is in this block of code from checkout_payment.php: [code]<? //---PayPal WPP Modification START ---// ?> <?php if ($ec_enabled && $messageStack->size('payment') > 0) { ?> <tr> <td><?php echo $messageStack->output('payment'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <? //---PayPal WPP Modification END ---// ?> <?php if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice"> <tr class="infoBoxNoticeContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> If you edited that out, you won't see any errors. When debugging a contribution that you are adding to your store, it is a good idea to set up a test store that contains a vanilla osC installation and the contribution of interest to understand what it is supposed to be doing. This way, you can determine whether the problems you are experiencing are with the contribution or with your integration. --Glen Edited April 8, 2006 by SteveDallas Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted April 9, 2006 Share Posted April 9, 2006 I can't believe I didn't add a check on the CC# field. Try entering the CC# without spaces. I'll add better input checking in the next version.That debug feature is the greatest thing I've ever done to this module. Sure makes debugging problems a breeze. Brian, Actually, there is a check, but you aren't updating the card information when you get it. The validate() function in cc_validation.php returns a cleaned up card number, as well as the other card particulars (type, expiry month and year). The only problem is that you go back to the original data when it's time to send it to PayPal. So, it should be pretty simple to get the cleaned up card number to PayPal. To fix it on my site, still running 0.7 with some changes, I changed this: $cc_number = $HTTP_POST_VARS['wpp_cc_number']; to this: $cc_number = ereg_replace('[^0-9]', '', $HTTP_POST_VARS['wpp_cc_number']); This is what the validate function does to strip out non-numerics. --Glen Quote Link to comment Share on other sites More sharing options...
jlong07 Posted April 9, 2006 Share Posted April 9, 2006 OK, I think I figured out a majority of my problems. I have integrated osCommerce into an existing design of mine so I had to copy the wpp code from the included files into my files so as to not destroy my design. In doing this I did not realize that there was more than one code block on several of the pages. I checked this morning and found the pages that I missed the code in. I am surprised it worked at all with all the code I didn't copy over. Anyway, I am now getting error messages and when I try to process an ec transaction from the login page (ie. add item to cart, hit checkot, hit ec on login page) I get sent to paypal and everything goes through there just fine, but when I come back to my site I am sent to the login page and there is an error on top that says "There was a problem validating your account. Please try again." I was very excited to see the error, but now I need to figure out how to fix it. It seems like an account was never created for the ec customer. It looks like I am almost there. Thank you all for your help. Quote Link to comment Share on other sites More sharing options...
jlong07 Posted April 9, 2006 Share Posted April 9, 2006 (edited) sorry this was a duplicate posting of my last comment Edited April 9, 2006 by jlong07 Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 9, 2006 Author Share Posted April 9, 2006 I was very excited to see the error Hah, too bad there aren't more people like you. That error is generated if the email address sent back from paypal doesn't match any emails in the database. It's strange because if the email sent back doesn't match any accounts, it's supposed to create one, so I wonder if Paypal's sending back crap. Are you in the sandbox or testing this live? Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
giz286sim Posted April 9, 2006 Share Posted April 9, 2006 Dynamo, any other ideas for a fix on the redirect to payment page with no error message when register globals are disabled? Quote Link to comment Share on other sites More sharing options...
jlong07 Posted April 9, 2006 Share Posted April 9, 2006 Hah, too bad there aren't more people like you. That error is generated if the email address sent back from paypal doesn't match any emails in the database. It's strange because if the email sent back doesn't match any accounts, it's supposed to create one, so I wonder if Paypal's sending back crap. Are you in the sandbox or testing this live? I am currently in sandbox mode. I created a fake personal account in paypal sandbox and am trying to use that to test the ec functionality. This user does not have an account in my database so that explains that. Is it possible that I screwed up the code that creates the account if there isn't one. Where is that code located? Quote Link to comment Share on other sites More sharing options...
montytx Posted April 9, 2006 Share Posted April 9, 2006 Hello, I still get Fatal error: Call to undefined function: setopt() in /home/yh0p2/public_html/includes/modules/payment/paypal_wpp.php on line 324 - I cheked my pear directory, /home/yh0p2/public_html/pear/ - I called my host and they installed curl_setopt() for me. running out of options.. *sigh* I had a similar error and it turned out that part of my pear install was not installed. I would get new pear zips, unzip them and then make sure to reinstall both parts. That got rid of this error for me. Quote Link to comment Share on other sites More sharing options...
dynamoeffects Posted April 10, 2006 Author Share Posted April 10, 2006 I'm glad you spoke up monty, I completely forgot about the pear modules. The pear modules I uploaded expect a base set of pear modules to already be on the server, so you might try searching google for "base pear modules" and uploading those to your server in the same place as the ones you downloaded from here. jlong: The error message you described is located in the user_login() function, but it only occurs if an account wasn't successfully created. I'm not sure why is would be doing that. I'm guessing some of the info returned from PayPal is fubar'd causing the account creation code to fail. I'll take a look at the code and try to find where it's breaking down at. Quote Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
giz286sim Posted April 10, 2006 Share Posted April 10, 2006 Just did another test: I turned on register globals and removed the register globals contrib and the error messages still do not display when the browser is redirected back to the payment page due to incorrect card information. I definitely get the PayPal error dump with the correct information in it: [shortMessage] => Transaction refused [LongMessage] => The transaction was refused. [ErrorCode] => 10752 [severityCode] => Error So what could be causing the errors not to show? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.