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
sanjuk72 wrote:
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,


The email is sent out when the order is placed (i.e. successfully saved in the database) but before it is handed over for payment processing.

The file '~/Modules/CheckoutConfirm.ascx.cs' calls OrderManager.PlaceOrder() in the btnNextStep_Click event. OrderManager.PlaceOrder() is a very long method, but towards the end, you'll find the following lines of code:
int orderPlacedCustomerNotificationQueuedEmailId = MessageManager.SendOrderPlacedCustomerNotification(order, order.CustomerLanguageId);
if (orderPlacedCustomerNotificationQueuedEmailId > 0)
{
    InsertOrderNote(order.OrderId, string.Format("\"Order placed\" email (to customer) has been queued. Queued email identifier: {0}.", orderPlacedCustomerNotificationQueuedEmailId), false, DateTime.Now);
}

The first line here is the one that queues the email for sending. If you don't want the email to be sent, simply comment out all these lines. Alternatively, you may wish to comment out just the first line, and modify the 'InsertOrderNote()' line to simply state that the 'Order has been placed', which is always useful for audit trail purposes.

HTH.
13 years ago
Paypal Standard auto cancel:

change in PaypalStandardPaymentProcessor.cs


original:
   string cancel_returnURL = CommonHelper.GetStoreLocation(false) + "PaypalCancel.aspx";

changed:
    string cancel_returnURL = CommonHelper.GetStoreLocation(false) + "PaypalCancel.aspx?o=" + Convert.ToString(order.OrderGuid);


and implement auto cancel in PaypalCancel.aspx.cs


        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            string o = Request.QueryString["o"];

            if (o != null)
            {
                Guid orderGuid = Guid.Empty;
                try
                {
                    orderGuid = new Guid(o);
                }
                catch { }
                Order order = OrderService.GetOrderByGuid(orderGuid);
                if (this.OrderService.CanCancelOrder(order))
                {
                    this.OrderService.CancelOrder(order.OrderId, false);
                }
            }
            Response.Redirect(CommonHelper.GetStoreLocation());
        }
12 years ago
sanyi wrote:


                Order order = OrderService.GetOrderByGuid(orderGuid);              


Get an error Unknown namespace on "Order"
12 years ago
k4plus wrote:
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,

The email is sent out when the order is placed (i.e. successfully saved in the database) but before it is handed over for payment processing.

The file '~/Modules/CheckoutConfirm.ascx.cs' calls OrderManager.PlaceOrder() in the btnNextStep_Click event. OrderManager.PlaceOrder() is a very long method, but towards the end, you'll find the following lines of code:
int orderPlacedCustomerNotificationQueuedEmailId = MessageManager.SendOrderPlacedCustomerNotification(order, order.CustomerLanguageId);
if (orderPlacedCustomerNotificationQueuedEmailId > 0)
{
    InsertOrderNote(order.OrderId, string.Format("\"Order placed\" email (to customer) has been queued. Queued email identifier: {0}.", orderPlacedCustomerNotificationQueuedEmailId), false, DateTime.Now);
}

The first line here is the one that queues the email for sending. If you don't want the email to be sent, simply comment out all these lines. Alternatively, you may wish to comment out just the first line, and modify the 'InsertOrderNote()' line to simply state that the 'Order has been placed', which is always useful for audit trail purposes.

HTH.



NICE work. Thanks for this man
12 years ago
monirkbit wrote:


                Order order = OrderService.GetOrderByGuid(orderGuid);              


Get an error Unknown namespace on "Order"


Sorry I managed to solve this by adding

using NopSolutions.NopCommerce.BusinessLogic.Orders;

But the whole thing did not work for some reason. Still I am getting empty cart after returning from paypal page by click cancel on paypal page.

I have uploaded all required file to server from bin directory but not luck at all.
12 years ago
OKPAY Financial Services - Payments made easy for your all Businesses

I would like to introduce you a complete online system ‘OKPAY.com’ that gives you fully control over your finances. Its payment network offers number of payment options for businesses in over 200 countries.

It has all the important features like Globally Accepted Debit Card, Payment Solution for Every Business, Access to All Payment Options and True Internet Banking. I am sure that you can get maximum benefits by registering and using OKPAY.com system.

Here, I will share and explain time to time all the current and upcoming features and events of ‘OKPAY.com’ ; so that you can get maximum benefits of this one of the best Forex system.

Good luck and best wishes for your business success!

Thank you for your interest in OKPAY.
12 years ago
OKPAY Company Receives Registered Trademark for OKPAY® in the European Union.

OKPAY Inc., a rapidly growing payment processing and financial service, announced that the company has received a registered European Community Trade Mark from Office for Harmonisation in the Internal Market (Trade Marks & Designs) – OHIM for the company’s OKPAY® brand. The January 2nd, 2012 issuance of OHIM serial number 010083764 grants OKPAY exclusive Europe-wide rights to use the mark on or in connection with electronic wallet services, credit card transactions, and other financial operations.

In addition to our service mark registered with the United States our company has obtained legal protection of its name in territory of the European Union. From now all our services worldwide will be proudly presented under the registered service mark OKPAY®.
12 years ago
OKPay - okpay.com
Earn up to €500 per referral!

Every one of your new OKPAY payees becomes your referral, which, if they continue to use their account (and also because they will probably invite new members to bring you additional, 2nd-level earnings), gives you an opportunity to earn up to €500 per referred user!
Partnership Opportunities
Get extra income doing your day-to-day business

The OKPAY payment system is interested in cooperating with popular websites and Internet business projects. One thing is quite clear: the more you and your Internet business clients use OKPAY, the more money you earn! Do business with OKPAY!


Independent Exchangers
Exchange Providers

With the help of our Partner Exchanges you can perform all kinds of currency exchanges involving OKPAY e-money. See the list of exchangers who will be happy to buy or sell you OKPAY.

https://www.okpay.com/en/index.html
12 years ago
OKPAY.com Financial Services: debit cards, online banking, accept payments online

    We came to this forum for meeting you the easy-going and not time-wasting service.

    You are probably already familiar with a variety of payment systems, but having faced us closer, you can estimate the amount of features, level of service and convenience, which are the main advantages of OKPAY. Alternative is always a good thing.

    So, OKPAY.com is:

    1) Globally Accepted Debit Card - OKPAY offers an international payment processing payments solution directly to MasterCard® debit card.

    2) True Internet Banking
    * INTERNATIONAL BANK TRANSFERS
    Make international wire transfers to\from any country.
    * ONLINE CURRENCY EXCHANGE
    Instantly convert the world’s major currencies.
    * CHEQUES CASHING
    Accept corporate and bank cheques for cashing.

    3) Access to All Payment Options
    * Accept direct bank transfers and corporate cheques
    * Accept over 10 different e-currencies
    * Accept payments made through various Money Transfer systems
    * Accept credit card payments (coming soon)

    4) Easy to use, competent and courteous staff!

    See for yourself: https://www.okpay.com

    Feel free to ask any questions on this forum, a representative of our payment system is ready to answer all of them.

    I hope you will appreciate our service and we will make our cooperation pleasant in turn!
12 years ago
Okpay is becoming a good payment processor everyday.I love their services but one thing i don't like is the fact that we have to verify our account before we can be transferring money out of our accounts.They should have act like Alertpay.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.