Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

I am all over this message. I mean, it's totally clear what's going on. My only question is, "huh?" I mean, aside from the obvious fact that Alert Unknown would be a great name for a rock band, I am totally lost.

 

Can anyone give me further guidance and instruction as to what I'm supposed to do here?

 

Thanks in advance.

 

Okay, has anyone ever gone off asking for help on something, only to realize on your own that the answer was something really, really, really stupid and right in front of your face breathing down your neck and you end up feeling about as smart as a trail of snail snot?

 

I'm not saying that this has recently happened to me, but I would like to say that I think I may have found my asnwer to the problem stated earlier. Mainly that I...er...was using the wrong certificate. I was using the cert generated for my sandbox test account, but I had everything else set up for the live account.

 

You may commence the berating.

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

In some circumstances, I really can't see the point of sandbox testing.

 

Maybe people should just use the WPP and set up a test item for $1 and use their credit cards to test live transactions - it's better that way.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

In some circumstances, I really can't see the point of sandbox testing.

 

Maybe people should just use the WPP and set up a test item for $1 and use their credit cards to test live transactions - it's better that way.

 

I see your point, Chooch, but I don't necessarily agree with it. I want to make sure that my site will handle realistic values. I'm not just testing the connection between me and PayPal, but I'm testing my site for overall functionality. I want to make sure that I have everything in place to process values that will be more realistic to what I will be selling on my site. I don't have anything that's going to be only $1.00. And while that might be an insignificant amount, over time even $1.00 will add up. Personally, I like the Sandbox.

 

I like it all the way up until the fake credit cards and bank accounts that I'm given by PayPal start running out of fake money, and end up getting rejected. Which, if you ask me, is really weird.

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

Okay, has anyone ever gone off asking for help on something, only to realize on your own that the answer was something really, really, really stupid and right in front of your face breathing down your neck and you end up feeling about as smart as a trail of snail snot?

 

I'm not saying that this has recently happened to me, but I would like to say that I think I may have found my asnwer to the problem stated earlier. Mainly that I...er...was using the wrong certificate. I was using the cert generated for my sandbox test account, but I had everything else set up for the live account.

 

You may commence the berating.

 

Nah... I was just about to point out that the "ca" in the message was important, and would lead you directly to the problem, but you found it already.

 

In case anyone else encounters this error, "ca" stands for Certificate Authority, so the error message is "Alert-Unknown Certificate Authority", which indicates that the certificate isn't recognized.

 

--Glen

Link to comment
Share on other sites

First, thanks to dynamoeffects for this great contrib...

 

Package installed, configured and working.

So far no issues noted.

 

My question...:

 

Back in the old days, when I was using Paypal IPN, if a Paypal payment was refunded, or an ECheck cleared or bounced, the Payment Status in my OSC site would be automagically updated to reflect the Paypal transaction's new status. Is this feature not available here? Or is there a configuration setting I need to tweak? Perhaps it just can't be done due to the nature of the API...

 

I just don't know enough about the WPP API operation to answer that question on my own.

 

Thanks

 

dano1967

Link to comment
Share on other sites

Hi,

 

The first time I installed the module, I was using a beta version, which was probably the reason it wasn't working before. Now I am using the correct version and trying it out in Sandbox mode. It's weird because sometimes the direct payment will work perfectly (although it does take about 1.5 minutes to process) and sometimes it spits back the error message:

 

Your credit card was declined. Please try another card or contact your bank for more info.

No response from PayPal.

No response was received from PayPal. Please contact the store owner for assistance.

 

However, it actually goes through and shows up on the PayPal side and the money is in the account. But on the store side, the order isnt completed. Any ideas?

 

Thanks!

Link to comment
Share on other sites

If it's taking 1.5 minutes, it sounds more like curl's not working and PHP eventually times out. Contact your host to make sure you have the correct permissions to use curl. If you're a GoDaddy customer, you need a proxy address that's been posted in this thread a dozen times and can be found with a search.

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

First, thanks to dynamoeffects for this great contrib...

 

Package installed, configured and working.

So far no issues noted.

 

My question...:

 

Back in the old days, when I was using Paypal IPN, if a Paypal payment was refunded, or an ECheck cleared or bounced, the Payment Status in my OSC site would be automagically updated to reflect the Paypal transaction's new status. Is this feature not available here? Or is there a configuration setting I need to tweak? Perhaps it just can't be done due to the nature of the API...

 

I just don't know enough about the WPP API operation to answer that question on my own.

 

Thanks

 

dano1967

 

I have been using both the IPN and WPP contributions for over a year, and this is the way it works. The WPP module doesn't specify a Notify URL to handle updates.

 

Brian:

This would be a useful feature for a future release. In fact, it would be helpful if uncleared transactions got set with a different status than ones where the funds have been transmitted to the account (mainline WPP code; examine the return variable PaymentStatus to determine whether to set "Pending" or "Uncleared" (for instance). Then use the Notify URL to update the status to "Pending" when the check clears.

 

The code from the PayPal IPN contribution works okay, but it isn't very smart. It posts an update to the order history and sets the status to "Pending". A better solution would be to use the notification status and current order status to determine whether to change the order status.

 

For instance, I may ship to a known customer before his check clears. I don't want the IPN to change something that has a status of "Shipped" (my equivalent to the default "Delivery" status) back to "Pending", but I do want the history to reflect something that happened at PayPal.

 

I might have a go at coding this stuff up myself, if I have a few spare hours this weekend. It seems to me to be a useful enhancement.

 

--Glen

Link to comment
Share on other sites

In case anyone else encounters this error, "ca" stands for Certificate Authority, so the error message is "Alert-Unknown Certificate Authority", which indicates that the certificate isn't recognized.

 

--Glen

 

Glen,

I did notice that, and my first thought was that ca referred to the certificate authority. However, what really tipped me off was when I went to verify that I had all the configurations correct, and saw that, in fact, I didn't. That's when I said to myself, "hey, you know, maybe the fact that I don't have everything configured correctly here - especially this certificate thing - is the root cause of my problem?"

 

So, anyway, it looks like everything is working great, now. My next task is to break it all again by installing other contributions.

 

Thanks!

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

I might have a go at coding this stuff up myself, if I have a few spare hours this weekend. It seems to me to be a useful enhancement.

 

--Glen

 

I would say that this would not only be useful, but incredibly efficient. If this happened to end up in a future version of this contribution, I would most certainly be greatful. I wish I knew more about PHP to help out with it. But anything that adds automation capabilities to this would be a very good thing, in my opinion.

Brian (Schadeboy) Schade

CIO and Webmaster

Twilight Teez, LLC

 

"Camping is nature's way of promoting the hotel industry."

-Dave Barry

Link to comment
Share on other sites

I called my host (Hostway) and asked and they said that I have the correct permissions to use curl and it should work fine without a proxy address or anything. It's wierd because it works half the time and the other half it doesn't and I can't seem to find a pattern. And like I said, it always works on the PayPal side. The info always reaches them.

 

If it's taking 1.5 minutes, it sounds more like curl's not working and PHP eventually times out. Contact your host to make sure you have the correct permissions to use curl. If you're a GoDaddy customer, you need a proxy address that's been posted in this thread a dozen times and can be found with a search.
Link to comment
Share on other sites

@SteveDallas: Actually, you might be able to rip it out of pbreit's module fairly easily. I referenced and used some of his work when I wrote the modifications to get rid of the pear modules.

 

@tza79: Then it sounds like your host has their firewall a little too tight. It needs to be able to send and receive connections on port 443, not 80.

Edited by dynamoeffects

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

It isnt just Express. I get them itemized 50% of them time.

 

Dear Brian and Austin,

RE: Paypal in OSC (OSCommerce) Layout problem on Payment page

 

I suppose you were reffering to the issue I have posted regarding the payment page where the 2 payment options, Direct Payment (through credit card)and Express Payment (Paypal yellow button) are not really itemized (visually separated in the layout of the payments page).

Immediatly after selecting the type of credit card, we get the Yellow button, in a location where it would be nice to have the button "Contine" to process the credit card option.

In the current context, it means for the customer that no matter which credit card he would select, when/where he expects to press the button Continue to process the credit card, he would actully click in a natural way on the Yellow button which will ignore his initial intentions and take him straight to the Express Payment... That could possbly lead to confusion and frustration of the online buyer.

The present location of the Continue button is at the bottom end of the page, a legacy of the initial version of OSC. Unfortunately because of the sophistication of code in this case, I was not able to move that Continue button in under the Credit card option.

 

 

Some nice fellow from the Paypal forum was suggesting as a workaround to disable in this module, the Express Payment option and instead to add the IPN module as a new payment item... \

It seems like not a bad idea, yet IPN is about instant notification for a Paypal trasaction... and that actually means an unbalanced payment solutions for me, where I would only get a notification if my customers are using the Express payment button, and not for the case where they would use the Direct Payment...

 

Could you please recommend anything in this sense?

I also appologize for posting twice my initial message... it was by mistake.

 

I also had another question, regarding the use of SSL at this stage... is it Paypal that takes care of the secure transaction on the this Payment page for the case of Direct Payment case where the customer actually types in sensitive information?

The way it looks now, it seems to me the Payment pace is not in SSL mode, and it is not clear to me how to enable SSL so that would be a secure transaction.

I did turn the SSL on in the admin page of my web host. Yet, they say that the secure items should be in a "www/ssl" folder which is to be reffered through an alternative url... unfortunately I still have no clue about how to integrate that into the OSC/Paypal contex.

I was wondering where I could find some help in that direction.

 

Many thanks for any input!!!!

best regards,

Theodore :blush:

Link to comment
Share on other sites

RE: Paypal in OSC (OSCommerce) -> Error "2006 - MySQL server has gone away"

 

Dear all,

 

I was wondering if anyone has encountered this error before (see my initial message on page 92)... and possibly where would be the right place to fix this...

 

Many thanks,

Theodore

Link to comment
Share on other sites

This contribution is great! Everything seems to work as documented. I wish my understanding of php was greater. I may be overlooking something simple. I am receiving a paypal error dump because there is no shipping address being sent to paypal. This is only because I am selling downloadable items. When you enable the download feature, it appears that no shipping address is sent because one is not needed. Paypal is kicking the transaction back because it is looking for a shipping address. On all traditional items that need to be mailed, the module is working great!

In function: before_process() - Direct Payment

Did first contact attempt return error? Yes

----------------------------------------------------------------------------------------------------DP_DUMP-------------------------------------------This is the information that was sent to PayPal-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------FINAL_REQ------------------------------------------------This is the response from PayPal---------------------------------------------------------------------------------------

Array

( [security] => [RequesterCredentials] => Array

( [0] => Array

(

[Credentials] => Array

(

[0] => Array

(

[username] =>

[Password] =>

[subject] =>

)

)

)

)

 

[DoDirectPaymentResponse] => Array

( [0] => Array

( [Timestamp] => 2007-01-22T00:21:41Z

[Ack] => Failure

[CorrelationID] => 1486ed47b958a

[Errors] => Array

(

[0] => Array

(

[shortMessage] => Invalid Data

[LongMessage] => There's an error with this transaction. Please enter a complete shipping address.

[ErrorCode] => 10726

[severityCode] => Error

)

[1] => Array

(

[shortMessage] => Invalid Data

[LongMessage] => There's an error with this transaction. Please enter an address1 in the shipping address.

[ErrorCode] => 10727

[severityCode] => Error

)

[2] => Array

(

[shortMessage] => Invalid Data

[LongMessage] => There's an error with this transaction. Please enter a city in the shipping address.

[ErrorCode] => 10728

[severityCode] => Error

)

[3] => Array

(

[shortMessage] => Invalid Data

[LongMessage] => There's an error with this transaction. Please enter a country in the shipping address.

[ErrorCode] => 10731

[severityCode] => Error

)

)

[Version] => 2.000000

[build] => 1.0006

)

)

)

------------------------------------------------------------------------------------------------------TS_REQ--------------------------------------Results of the transaction search if it was executed------------------------------------------------------------------------------

 

 

Thank you again for a great contribution and also in advance for any advice for this.

Link to comment
Share on other sites

This contribution is great! Everything seems to work as documented. I wish my understanding of php was greater. I may be overlooking something simple. I am receiving a paypal error dump because there is no shipping address being sent to paypal. This is only because I am selling downloadable items. When you enable the download feature, it appears that no shipping address is sent because one is not needed. Paypal is kicking the transaction back because it is looking for a shipping address. On all traditional items that need to be mailed, the module is working great!

 

Thank you again for a great contribution and also in advance for any advice for this.

 

I worked around this by just sending the billing information again to Paypal for the shipping. I'd be interested to know if there is a better way.

 

This is paypal_wpp 0.8.2

catalog/includes/modules/payment/paypal_wpp.php

 

$order_info['PAYPAL_SHIPPING_STATE'] = $order->delivery['state'];

$order_info['PAYPAL_SHIPPING_ZIP'] = $order->delivery['postcode'];

$order_info['PAYPAL_SHIPPING_COUNTRY'] = $order->delivery['country']['iso_code_2'];

} else {

// AJJ send billing for shipping for virtual products

/* comment out existing code

$order_info['PAYPAL_SHIPPING_NAME'] = '';

$order_info['PAYPAL_SHIPPING_ADDRESS1'] = '';

$order_info['PAYPAL_SHIPPING_ADDRESS2'] = '';

$order_info['PAYPAL_SHIPPING_CITY'] = '';

$order_info['PAYPAL_SHIPPING_STATE'] = '';

$order_info['PAYPAL_SHIPPING_ZIP'] = '';

$order_info['PAYPAL_SHIPPING_COUNTRY'] = '';

*/

$order_info['PAYPAL_SHIPPING_NAME'] = $order->billing['firstname'] . ' ' . $order->delivery['lastname'];

$order_info['PAYPAL_SHIPPING_ADDRESS1'] = $order->billing['street_address'];

$order_info['PAYPAL_SHIPPING_ADDRESS2'] = $order->billing['suburb'];

$order_info['PAYPAL_SHIPPING_CITY'] = $order->billing['city'];

$order_info['PAYPAL_SHIPPING_STATE'] = $order->billing['state'];

$order_info['PAYPAL_SHIPPING_ZIP'] = $order->billing['postcode'];

$order_info['PAYPAL_SHIPPING_COUNTRY'] = $order->billing['country']['iso_code_2'];

}

 

I'm also using the MVS contribution and found i needed a few other mods where it was not handling

virtual products correctly.

regards

Andrew

Link to comment
Share on other sites

Now that the Paypal API accepts currency other than USD, what are the chances that multi currency or 'Current Currency' support be added in?

 

The ability to select a currency other than USD is in the latest paypal_wpp 0.8.3beta2. From what i understand

in my experience Paypal Pro only allows one currency, so a US Paypal Pro is limited to USD, and

the UK Paypal Pro is limited to GBP transactions. I'd like to know if there is any way around that.

 

regards

Andrew

Link to comment
Share on other sites

The ability to select a currency other than USD is in the latest paypal_wpp 0.8.3beta2. From what i understand

in my experience Paypal Pro only allows one currency, so a US Paypal Pro is limited to USD, and

the UK Paypal Pro is limited to GBP transactions. I'd like to know if there is any way around that.

 

regards

Andrew

 

Actually, as far as I can tell from looking at the code, it's hard coded for USD. I did however add a couple of lines to test CAD and it was accepted and processed by Paypal. Unfortunately, the amounts were all submitted in OSC's baseline currency. The currency conversion isn't being done by the current module.

 

dano1967

Link to comment
Share on other sites

Actually, as far as I can tell from looking at the code, it's hard coded for USD. I did however add a couple of lines to test CAD and it was accepted and processed by Paypal. Unfortunately, the amounts were all submitted in OSC's baseline currency. The currency conversion isn't being done by the current module.

 

dano1967

 

It isn't the job of an osC payment module to do currency conversion. To support multiple currencies, you must add an additional currency and set an exchange rate relative to your default currency, USD in your case, in the osC admin module. See the osC documentation at <http://www.oscommerce.info/docs/english/e_currencies.html> for details.

 

--Glen

Link to comment
Share on other sites

It isn't the job of an osC payment module to do currency conversion. To support multiple currencies, you must add an additional currency and set an exchange rate relative to your default currency, USD in your case, in the osC admin module. See the osC documentation at <http://www.oscommerce.info/docs/english/e_currencies.html> for details.

 

--Glen

 

I don't want to be rude here, but you should read the posts more carefully.

 

The problem isn't supporting multiple currency, the problem is that the module sends Paypal the totals in USD no matter what currency is selected. If CAD is selected as the display currency, and an item is priced at $100USD in the database (USD is the default currency in the store), what the user sees is an item priced at $119.00CAD. So far so good... But if you select CAD as the currency to submit to Paypal, it will charge $100CAD during the Paypal transaction, not $119 as it is supposed to.

The module should use the $currencies function to do the conversions before creating the totals to send to Paypal during the transaction phase.

 

dano1967

Link to comment
Share on other sites

Hi,

 

I have problem with my Express Checkout. (I'm not sure if I missed it or not, so if this is a repeat question could you please send me to the correct pages that has this question)

 

First I'm using OSC 2.2MS2 with WPP 0.8.2 with the calander update.

I've also installed the diagnostic script and everything says its ok.

I'm not using CVVG as far as I can tell and I have no other payment modules install except the ones that come with OSC 2.2.

 

I've tested the direct payments method in sandbox and in a live setting and that works fine. I've accepted credit cards perfectly.

 

The problem that I've been having is that when a customer tries to use the Express Checkout method it doesn't work properly and I receive a:

Error An error occured when we tried to process your credit card.

 

Transaction cannot complete. (10417)

The transaction cannot complete successfully. Instruct the customer to use an alternative payment method.

 

This is how it happens: After I add my item to a cart and got to checkout, it takes me the sign in page on my OSC site. I click the checkout with paypal at the bottom, it go to paypals site and login, review the payment and return to my OSC site. So far everything looks ok and it returns me to the delivery information page. I click continue and add on my shipping then I am taken to the order confirmation page, it adds shipping, tax, and I click confirm the order. After that I am taken back to the delivery Information page and I receive the Transaction cannot complete. (10417) Error.

 

I've also tired it in sandbox and in a live setting and with different scenarios, being logged in already on my website etc. but If I pay with Express Checkout it always returns with the 10417 error.

 

I contacted paypal and they told me that their is a GET and DO API and (I might be mixing these up) But what I was told is that the Get sends the initial order and login and stuff there and the Do sends the final confirmation to paypal.

 

What we figured out was that the GET and DO have to be the same price and since you return from paypal and add on the shipping and sales Tax (only if you live in MI) then you will always get this error.

 

To make a long story short (I just wanted to make sure I get all the info here)

 

Is there a way that I can add everything up then let the customer go to the payment page and then do express checkout or pay with a credit card so that the SET and DO is the same?

 

My website is Fishynuts.com and you can contact me at [email protected]

 

Please your help would be appreciated. If anyone can help me.

Link to comment
Share on other sites

I don't want to be rude here, but you should read the posts more carefully.

 

The problem isn't supporting multiple currency, the problem is that the module sends Paypal the totals in USD no matter what currency is selected. If CAD is selected as the display currency, and an item is priced at $100USD in the database (USD is the default currency in the store), what the user sees is an item priced at $119.00CAD. So far so good... But if you select CAD as the currency to submit to Paypal, it will charge $100CAD during the Paypal transaction, not $119 as it is supposed to.

The module should use the $currencies function to do the conversions before creating the totals to send to Paypal during the transaction phase.

 

dano1967

 

 

Currently, only the latest beta supports multiple currencies, but it's barely tested.

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

Currently, only the latest beta supports multiple currencies, but it's barely tested.

 

Brian,

I think that dano's problem is that while you support different currencies, (GBP and USD, for instance) the amount sent is always in the database currency. This means that it only works correctly if the payment currency is the same as the database currency; one currency at a time. It will work for a USD only site or a GBP only site, but as soon as you allow the customer to choose among currencies, it breaks.

 

To support multiple currencies, it appears that a payment module must call the currency class to convert between the database units and the payment units. This sounds like yet another undocumented (or poorly documented) feature of the osC payment module requirements.

 

I suppose one should look at a module that works correctly with multiple currencies to determine how to get it right.

 

--Glen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...