Page 1 of 1
Incomplete Paypal Express Payments completing orders
Posted: Mon Jan 18, 2016 8:34 am
by dandersonMLT
Our customer recently teamed with Paypal who switched their payment gateway from Authorize.NET to Paypal Express and PayFlowPro.
This switch was done completely by paypal team without our involvement.
However, the customer is now having issues and has requested that we work with Paypal to resolve it.
The main issue is that AbleCommerce seems to direct to the order complete page, even when paypal payment was not finished.
So if the user clicked to pay with paypal, then clicks cancel and return to site, they are still directed to the order complete page and receive email order confirmation.
Usually this shows that the order was not paid on the admin side, but for the customer side it looks like the order was completed (although it will have a pay with paypal button on the order confirmation page)
The 2nd related issue is that sometimes these orders show up as paid on the admin side as well. So from the admin side of things it looks like the order is complete with no problems and our customer proceeds to ship the order. They do no realize that the order wasn't actually paid until they compare orders with Paypal and notice there is no payment for the order.
I've tried to step through, but from what I can see the paypal module seems to be closed source. I'm not sure why cancelling out of the order seems to indicate to Able Commerce that the order is complete rather than returning to the payment page.
Version AbleCommerce Gold R8.
Re: Incomplete Paypal Express Payments completing orders
Posted: Tue Jan 19, 2016 1:00 pm
by Katie
First, I wanted to address the issue with Paypal standard payments. This payment method works much different from Paypal Express and Payflow Pro. With std PayPal, the order needs to be created. Then it is up to the customer to complete the payment by going to Paypal. If the customer never makes a payment or cancels before making a payment, then you are correct that it will bring them back to the order. The order will not show as paid. They will still have every opportunity to make a payment on that order. This is the drawback to using std Paypal. If you are looking for a checkout procedure where the payment is taken before the order is created, then the Paypal Express or Website Payments pro are your best options.
I would suggest that you modify the trigger on your Order Confirmation email so it is sent with the 'Order with shippable items was fully paid' instead of 'Order was placed'. You could also modify the receipt page and/or my order summary page with a custom text message ( in bright red) indicating that the order is not completed until the Paypal payment is made.
Regarding the second issue. I find it hard to believe that the order would show as fully paid if payment was not processed. You need to check the Order's payment page and take a screenshot of the transaction history. If it was processed through Paypal or any other payment gateway, there will be transaction codes which can be matched up to the transaction within the merchant account. The only other way that an order would show paid is if someone manually collected the payment outside of AbleCommerce or changed the status. I would be interested to get some more information on that issue if you can provide some screenshots showing the discrepancy.
Thanks,
Katie
Re: Incomplete Paypal Express Payments completing orders
Posted: Wed Jan 20, 2016 8:50 am
by dandersonMLT
Thank you Katie.
For now we have disabled Paypal payments completely until this can be resolved.
We don't want any order to be placed without first collecting payment.
The customer caught a few going through as complete and later cancelled them.
The orders seem to show completed for Paypal payment, but there are no transactions listed and Paypal shows nothing on their end.

Re: Incomplete Paypal Express Payments completing orders
Posted: Wed Jan 20, 2016 8:54 am
by dandersonMLT
Additionally, I did not setup PayPal for this client. Paypal's implementation team configured PayPal with the customer without my involvement.
Because of this, I'm hoping it will be a simple configuration issue that we can resolve easily.
I saw separate payment gateways and methods for PayPal and PayFlow Pro. I didn't see anything different for PayPal Express.
Disabling Paypal removed Paypal and Paypal Express payment.
Ultimately, we need to ensure orders aren't marked as paid without actually being paid.
We'd also like the ability to pay with paypal, but not to complete the order if the user cancels out of paypal or paypal payment fails.
We'd prefer this to return them back to the payment page so they can choose another payment method.
If the order isn't paid, we don't want it complete, send and invoice, or take user to order confirmation page.
Thank you for all of your help.
Re: Incomplete Paypal Express Payments completing orders
Posted: Wed Jan 20, 2016 9:27 am
by Katie
When the user chooses Paypal std as the payment method, they are brought to Paypal's website to make a payment. If they decide to cancel (from Paypal's website), then they are returned to the Order page where the Status shows "Payment Pending" and a large PayPal button that says 'Click here to pay'. The order admin person will see the order status as "Payment Pending" and the payment status as "Unpaid". You should also see a transaction recorded with a note "Waiting for IPN". This is how it works with no customizations.
In your example, the order shows completed with no transaction history. This makes me think that the person processing the order clicked the button 'Mark as Received' which would change the status to paid/completed. About all you can do to prevent this from happening is to train the order admin people so they understand that you can manually show a payment has been received, but not to use this feature unless they know for sure that the payment was actually received.
Paypal Express is configured from the same page where Paypal is configured. There is a section for "Express Checkout and Direct Payment" where you would need to enter the API username, password, and signature.
If you want to change how Paypal std works, then you'll need customize the software. To be honest, I'm not even sure if it's possible...
Re: Incomplete Paypal Express Payments completing orders
Posted: Thu Jan 21, 2016 3:42 pm
by dandersonMLT
Is there no way to return to payment page if PayPal payment is unsuccessful?
To me, taking them to order summary page and hoping they know to click the pay with PayPal button seems like it would confuse customers.
Additionally, if the user clicks PayPal accidentally, then hits cancel because they want to go back and use a different payment method. If they are redirected to order summary page with only a pay with PayPal button, how do they pay with a different payment method without creating a new order from scratch?
Finally, I do not know exactly how orders are getting marked paid without transactions. I can confirm it is happening though and only with the PayPal payment method. We actually found it when I was testing on the live site and my order was marked as paid without me completing payment. Usually, you are correct and the order shows unpaid. But sometimes it is marked as paid and I'm not sure how.
From what I can tell, the PayPal module is closed source so I can't really modify it or step into it to see what it is doing.
Ideally though, on failed payment, the customer should be redirected to the payment choice page and be able to try again or choose a different pay method.
Re: Incomplete Paypal Express Payments completing orders
Posted: Fri Jan 22, 2016 3:44 am
by Katie
I don't know how you could get this to work differently since PayPal IPN doesn't send back a response to AbleCommerce at the payment stage letting us know that something went wrong and the payment wasn't completed.
When the customer makes the Paypal payment selection, they are directed to Paypal's website....leaving the AC website. The only actions by the customer are to make a payment or not make a payment. For both options, the customer is directed back to AbleCommerce's receipt/order page with a paid payment or one that still shows unpaid, in which case the PayPal payment button is still present.
If the PayPal API worked more like a standard pymt gateway, then what you want could easily be accomplished. What you might want to do is ask the Paypal technician if an action where the customer clicks the 'cancel and return..' link from their site can provide an IPN response back to AbleCommerce? If this is possible, then you 'might' be able to customize the software to bring the customer back to the payment page.
Re: Incomplete Paypal Express Payments completing orders
Posted: Fri Jan 22, 2016 10:02 am
by dandersonMLT
Thank you, I will contact PayPal support and let you know their response.
Any other thoughts on order showing paid without transactions?
Re: Incomplete Paypal Express Payments completing orders
Posted: Fri Jan 22, 2016 1:02 pm
by dandersonMLT
Paypal is telling me there is a Cancel URL that can be sent along with the request.
Email Below:
"
Hello Dave,
With PayPal Express Checkout you can in fact specify a Cancel URL when sending the API call from the AbleCommerce cart to PayPal. You simply need to send the parameter CANCELURL= and specify the path to be used in the case of the buyer clicking the ‘Cancel and return to merchants site’ link.
More information on this and other features can be found on the developer site and I’ve provided you with a link below as well as an excerpt from this link that directly reflects the passing of this value.
https://developer.paypal.com/docs/class ... 20checkout
"
Re: Incomplete Paypal Express Payments completing orders
Posted: Sat Jan 23, 2016 6:08 am
by Katie
Ok, but we haven't been talking about PayPal Express Checkout. Please ask him if this is available for standard PayPal payments API. The one that uses IPN (instant payment notification).
Thanks
Katie
Re: Incomplete Paypal Express Payments completing orders
Posted: Mon Jan 25, 2016 5:55 am
by dandersonMLT
The paypal contact sent me this link for traditional paypal:
https://developer.paypal.com/docs/class ... 8A6HI0J0VU
it seems to include a cancel_return parameter.
Re: Incomplete Paypal Express Payments completing orders
Posted: Mon Jan 25, 2016 9:13 am
by Katie
I found the code where this parameter can be changed. It is in the source.
Code: Select all
// sb.Append("<input type=\"hidden\" name=\"cancel_return\" value=\"" + storeUrl + "/Members/MyOrder.aspx?OrderNumber=" + this.Order.OrderNumber.ToString() + "\">");
nvc.Add("cancel_return", storeUrl + "/Members/MyOrder.aspx?OrderNumber=" + this.Order.OrderNumber.ToString());
So, if you changed the url to return the user to the payments page (or one page checkout) depending on which one you use, then it might work. We probably need to get some input from a developer though. Paypal recommends that you send them to a special page indicating the order was canceled.
It seems that you have some specific requirements for std PayPal payments, so it might be a good idea to get a quote from one of our development partners to see if this is feasible.
Re: Incomplete Paypal Express Payments completing orders
Posted: Thu Nov 03, 2016 8:14 am
by dandersonMLT
Where is that logic located? I don't see cancel_return anywhere in the code base.
Re: Incomplete Paypal Express Payments completing orders
Posted: Thu Nov 03, 2016 6:33 pm
by dandersonMLT
I want to clarify things since this ticket is old.
The original client abandoned Paypal payment due to other issues, but I now have a new client requesting paypal.
I probably should have created a new ticket, but I wanted to keep this history.
However, I think my original question may be confusing the current issue.
1) Paypal Express checkout seems to be working as expected. Since they log into paypal and pay first, everything else seems to be working for Paypal Express Checkout.
2) The problem lies in regular paypal checkout. If the customer does a regular checkout, and chooses Paypal as the payment method, they are redirected to the paypal page.
However, if they never complete checkout and instead cancel on the paypal page, They are returned to MyOrder.aspx which shows the receipt for the order.
The receipt does say "Payment Pending" and has a giant button that says "Pay with Paypal", but from what I can tell there isn't a way to change to return to the checkout page to change to a different pay method.
Also, the order is actually created. It shows in Admin section under orders. Again, it does show unpaid, but we'd prefer to have the order never created until paypal is successful.
Ideally what we want is for able to return the customer back to the checkout page so they can choose a different payment method, enter a coupon etc.
From what I can gather, AbleCommerce is sending the cancel url to paypal of MyOrder.aspx, rather than OPC.aspx to return to Checkout page.
It also seems whatever is setting this cancel return url seems to be locked away in a dll, I don't see the code snippet above anywhere in the source code.
Even if it was, it seem that the order is created before sending to Paypal for payment.
One more weird thing to note, if I run on my development server with no break points, I am redirected to paypal for payment when I checkout and choose paypal as payment method.
However, If I set break points to step through and see what is happening, I am never redirected to Paypal.com and am instead taken directly to the MyOrder.aspx.
I'm sure this is a thread issue where my breakpoint is throwing off the timing, but since the paypal code seems to be in a dll somewhere, I'm not sure how this logic works.
I'm concerned that there may be some scenarios in the real world out side of debugging where the user won't be redirected to paypal before seeing the myorder.aspx page.
Re: Incomplete Paypal Express Payments completing orders
Posted: Fri Nov 04, 2016 1:28 am
by Katie
Hello,
The kinds of changes you are proposing will take some effort and you will also need the CommerceBuilder source code. This will give you access to the DLL's for all the gateways. However, if you decide to purchase the source code, this could still be a complicated project and there may not be a simple straight-forward answer to what you are wanting to do.
I would like to mention that we support Paypal's Braintree payment gateway. This should alleviate the problems you are having. It is new and I need to refresh myself on what happens when the payment is cancelled. I will do a test and report back as soon as I am able to. Braintree is only available for Gold R12 SR1.
Thanks
Katie
Incomplete Paypal Payments creating orders
Posted: Fri Nov 04, 2016 2:36 am
by dandersonMLT
The previous customer that this post was originally created for eventually switched to another eCommerce platform so that paypal would work as they expect.
The new client is now wanting paypal, on a much newer version of AbleCommerce, but it appears the problem remains.
I'm really surprised there isn't a solution for this. Surely other AbleCommerce customers user regular paypal checkout and are experiencing the same issue.
Are all of them purchasing the source code and manually programming around this?
I will talk to the client to see if they are interested in purchasing the source code.
That is a major expense though, especially if we are still unable to easily resolve the issue.
Re: Incomplete Paypal Express Payments completing orders
Posted: Fri Nov 04, 2016 3:29 am
by Katie
I think this is going to take some changes to the business logic. Once the order is created, it may not be possible to send them back through the checkout process. Instead, it may be better to VOID the pending payment on the order. This will automatically trigger a link to the 'Pay My Order' page which effectively allows the customer to use any available payment method.
Keep in mind that we typically don't release hot patches that include business logic changes. You are requesting something that I haven't heard before, so that is why I suggested the purchase of source code. I am well aware of complaints about standard Paypal IPN. It's not just the action of 'canceling the order' from Paypal's side either. Sometimes the IPN doesn't work or the customer just abandons the order.
Re: Incomplete Paypal Express Payments completing orders
Posted: Mon Nov 07, 2016 9:02 am
by compunerdy
Since going to Gold it is great that we do not get not paid for credit card orders created as we did in 7.0 but we still do for failed paypal payments. It would be great if that was addressed as well if not already by these proposed changes.