Paypal standard fix - allows showing of items in cart

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Prefilling of Address and shipping amounts

Hi, I have updated the PostProcessPayment method as described. When I test the code the shipping amounts and address information is not transfered to paypal. Where are the parameters the code sends to paypal:

?cmd=_cart
&business=ric_12842_biz%40mybiz.co.uk
&upload=1
&item_name_1=MyProductName
&amount_1=17.56
&quantity_1=1
&custom=eb941c7c-0282-449a-952cb08382715409
&no_note=1
&currency_code=GBP
&invoice=65
&rm=2
&no_shipping=2
&shipping_1=14.9900
&tax_1=5.6900
&return=http%3a%2f%2fmysite.co.uk%2fnop%2fPaypalPDTHandler.aspx
&cancel_return=http%3a%2f%2fmysite.co.uk%2fno%2fPaypalCancel.aspx
&first_name=ric
&last_name=ric
&address1=MyAdd1
&address2=
&city=MyCity
&state=CHS
&country=GB
&Email=ric%40mysite.co.uk
&zip=AB2+2DE

can anyone see what I am missing? I have not modified the code? Could it be to do with the set up of my sandbox account??

Many thanks
13 years ago
I don't see a few things here... let me check my notes and I'll get back to you. It looks like you're not sending the address override, but I'm not sure. It also looks like you're sending shipping as shipping which messes things up sometimes and I'm not sure what no_shipping=2 means... I'll look into it though... just hang tight. Prob this weekend.
13 years ago
Barry,

I placed a dummy order for an item that should be $34.95, shipping $3.95, and tax $3.41. But, it return that error.

Thanks
13 years ago
Hi Bfranklin,

I hope ypu can help me. I'm new in nopcommerce and I'm just trying to set up my Paypal. I already followed all the steps in nopcommerce to config with my API name, password and signature from Paypal, but when i try to make a purchase i receive the following error:

LongMessage: Security header is not valid
ShortMessage: Security error
ErrorCode: 10002

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: NopSolutions.NopCommerce.Common.NopException:
LongMessage: Security header is not valid
ShortMessage: Security error
ErrorCode: 10002


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[NopException:
LongMessage: Security header is not valid
ShortMessage: Security error
ErrorCode: 10002

Could you please help me to solve it? Thanks in advance for your time
13 years ago
Hi bfranklin825,  

Did you find any solution to the problem when a transaction is cancelled in paypal standard?

The shopping cart is clear, the email is sent out etc...

Or is any task on schedule to fix it in any other version?

Thanks,

Jorge Gonzalez
13 years ago
I agree, the Paypal canceled order thing is a big problem. Can someone on the NopCommerce team chime in on this? A work-around is to use Paypal direct for payment processing, but that is an added expense (currently $30 a month).
13 years ago
"Paypal express" places the order only after payment.
13 years ago
jagdeveloper wrote:
Hi bfranklin825,  

Did you find any solution to the problem when a transaction is cancelled in paypal standard?

The shopping cart is clear, the email is sent out etc...

Or is any task on schedule to fix it in any other version?

Thanks,

Jorge Gonzalez


I'm also concerened about this issue but have concluded that I'll probably modify PaypalCancel.aspx.cs with code similar to this:


  var orderCollection = NopContext.Current.User.Orders;
  if (orderCollection.Count == 0)
  {
      Response.Redirect(CommonHelper.GetStoreLocation());
  }
  else
  {
      var lastOrder = orderCollection[0];   // This gives us the last order and the opportunity to do whatever we like.
      // More code here to tell the user how to re-order the items on the cancelled order.
      // Would require "Is re-order allowed" to be activated in Administration-->Global Settings-->Other.
  }


It doesn't solve the empty shopping cart issue, but at least it gives you the opportunity to inform the user that you are aware that they have cancelled their order and there is a way to re-order the items.

It might also be a good idea to implement the Void() method in PayPalStandardPaymentProcessor.cs to mark an order as cancelled and the payment as voided from within PaypalCancel.aspx.cs. Marking an order as cancelled serves the additional purpose of sending out an email telling the customer that their order has been cancelled which negates the original "Order Placed" email.

By the way, I also modified the text in the OrderPlaced.CustomerNotification message template to inform the customer that this is just a notification that the order has been placed and that they should expect a further email if payment is confirmed or the order cancelled.

Just a few thoughts that might help!

Regards.
13 years ago
I have a related issue with PayPal and nopCommerce...my default store currency is not supported by PayPal so I'm looking to convert the order total to GBP before posting to PayPal.

Does anyone know an easy way to do this? I've looked through PriceHelper.cs but none of the methods seem to do the job. Is there some other helper method somewhere that would make this easier to do?

I'm not averse to a bit of additional programming if necessary, I just need to be pointed in the right direction.

Regards.
13 years ago
Ben,

Reading through this topic, I just wanted to ask if you can guide me where to look for the logic that's sending the email before the order is complete. I can look through to see if I can fix it.

My customers are complaining the they are getting an email even before the payment is processed or if they cancel the order.


Thanks,
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.