• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
tappedtech
#1 Posted : Wednesday, March 4, 2015 7:40:59 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

I tested the order submission/processing through the webservice for both PayPal and credit cards today and ran into a few issues.

Credit Card:
The order was processed (I received a confirmation email and there was a pending charge on the card). Ryan checked the admin though and the AVS showed that the CVV wasn't processed:
"Charge Success for order number 7491: This transaction has been approved. [AVS - Address (Street) and 5 digit ZIP match] [CVV - Not Processed]".

Is this an issue? If it is, how do I correct it?

PayPal:
The order was partially processed. I received a confirmation email from the site and PayPal. The site's PayPal account showed the transaction as processed.

The payment type shows PayPal in BVC but the notes only had:
"3/4/2015, Customer IP: 127.0.0.1, Customer Host: 127.0.0.1, Browser:" (Ryan said there should be more processing information)

The admin email notification and site show that the current status for the PayPal order is In Process.

It also shows that nothing was charged (but it was according to PayPal):
Payment Information
Paypal Express-$0.00
Paypal Express-$0.00
Authorized: $0.00
Charged: $0.00
Refunded: $0.00
Amount Due: $25.00
tappedtech
#2 Posted : Thursday, March 5, 2015 5:00:26 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

This is how I'm processing the PayPal payment:

//Get payment info from PayPal's API
TbPaypal payPal = new TbPaypal();
string payerId = payPal.GetPaymentDetails(paymentToken);

//Create the new custom property (for the PayerID)
WebServices3.CustomProperty1 customProperty = new WebServices3.CustomProperty1();
customProperty.DeveloperId = "bvsoftware";
customProperty.Key = "PayerID";
customProperty.Value = payerId;

//Add the new custom property
if (order.CustomProperties == null)
{
order.CustomProperties = new WebServices3.CustomProperty1[1];
order.CustomProperties[0] = customProperty;
}
else
{
WebServices3.CustomProperty1[] orderCustomProps = new WebServices3.CustomProperty1[order.CustomProperties.Count() + 1];

//Copy existing properties
int propIndex = 0;
for (propIndex = 0; propIndex < order.CustomProperties.Count(); propIndex++)
{
orderCustomProps[propIndex] = order.CustomProperties[propIndex];
}

//Copy new property
orderCustomProps[propIndex] = customProperty;

//Replace order's custom properties
order.CustomProperties = orderCustomProps;
}

ws.Orders_Order_Update(ref token, order); //Update the order to include the payerID

order = ws.Orders_Order_FindByBvin(ref token, orderBvin.ToString()); //Refresh the local copy of the order

//Add the payment
WebServices3.OrderPayment payment = new WebServices3.OrderPayment();
payment.OrderID = order.Bvin;
payment.ThirdPartyOrderId = paymentToken;
payment.PaymentMethodId = "33eeba60-e5b7-4864-9b57-3f8d614f8301";
payment.PaymentMethodName = "Paypal Express";

ws.Orders_Order_AddPayment(ref token, order, payment);

//Process the order
WebServices3.OrderTaskContext orderTask = new WebServices3.OrderTaskContext();
orderTask.Order = order;
orderTask.UserId = order.User.Bvin;

ws.BusinessRules_Workflow_RunByName(ref token, orderTask, "Process New Order");
tappedtech
#3 Posted : Monday, March 9, 2015 8:43:42 AM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

I found an issue with the PayPal process. I was adding the custom property to the Order but I wasn't setting the custom property of the Payment. I fixed that and submitted a new order. The order still didn't process completely but it provided more information in the order's notes section in BVC:

"Charge Error for order number 7502: Invalid token.

Paypal Payment Collect Failed"

The payment was processed by PayPal and is visible on the merchant's and purchaser's accounts. I'm setting the ThirdPartyOrderId with the token provided by the mobile SDK. Could this be the issue?
Ryan Groene
#4 Posted : Monday, March 9, 2015 12:25:57 PM(UTC)
Ryan Groene

Rank: Member

Joined: 10/28/2014(UTC)
Posts: 11
United States
Location: Hummelstown, PA

Was thanked: 2 time(s) in 2 post(s)
I looked into the issue that you are having, and the only thing that I can think of is that it may have something to do with the ThirdPartyOrderId. I looked at order # 7502 in the database, and it actually doesn't have any ThirdPartyOrderId set (nor does the corresponding OrderPayment). The ID that should be being set is in the following format: EC- and then a string of 17 letters and numbers. Does that sound like the value you're setting?
Ryan Groene
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#5 Posted : Monday, March 9, 2015 3:41:05 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

I was setting the ThirdPartyOrderId in the payment, not the order. Is it required in the payment as well, or just the order?

After setting the ThirdPartyOrderId in the order. I get an invalid token note in BVC. The token is in the format of "PAY-", followed by 24 letters and numbers. I don't see an EC-... token in the information I get back from PayPal.

Have you seen a PAY- token?

-

Have you looked into the credit card issue?

tappedtech
#6 Posted : Monday, March 9, 2015 5:47:09 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

I spoke with PayPal's tech support:

The EC- token is only provided when using Express Checkout methods (PAY- tokens are created for all PayPal transactions). There is no way to get an EC- token using the PAY- token.

I'm using their Mobile SDK which only provides the PAY- token. To get an EC- token, the app has to use the Mobile Express Checkout (mobile web page).

Is it possible for BVC to acknowledge the PAY- token? The payment has already been processed at this point by PayPal.

If it's not possible for BVC to use the PAY- token, do you use Mobile Express Checkout? That seems to be the only way to get the EC- token.

Edited by user Monday, March 9, 2015 7:24:55 PM(UTC)  | Reason: Not specified

Aaron
#7 Posted : Tuesday, March 10, 2015 9:01:00 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
I was setting the ThirdPartyOrderId in the payment, not the order. Is it required in the payment as well, or just the order?

Both
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Aaron
#8 Posted : Tuesday, March 10, 2015 9:03:00 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Credit Card:
The order was processed (I received a confirmation email and there was a pending charge on the card). Ryan checked the admin though and the AVS showed that the CVV wasn't processed:
"Charge Success for order number 7491: This transaction has been approved. [AVS - Address (Street) and 5 digit ZIP match] [CVV - Not Processed]".

Is this an issue? If it is, how do I correct it?

You can't process the CVV code through the API because we are not permitted to store the CVV code. As long as the payment gateway permits transactions without a CVV code this should not be an issue.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Aaron
#9 Posted : Tuesday, March 10, 2015 9:04:54 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Is it possible for BVC to acknowledge the PAY- token? The payment has already been processed at this point by PayPal

Our PayPal integration uses Express Checkout, so that is the only kind of token that will work.

Originally Posted by: tappedtech Go to Quoted Post
If it's not possible for BVC to use the PAY- token, do you use Mobile Express Checkout? That seems to be the only way to get the EC- token.

No, we do not use the mobile version because our software is not a mobile application.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#10 Posted : Thursday, March 12, 2015 4:17:26 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Mobile Express Checkout is the same as Express Checkout, it just uses pages optimized for mobile browsers. The handshake between the site and PayPal is the same.

Is is possible to initiate the Express Checkout handshake via the BVC web service? I'm referring to the initial call to SetExpressCheckout (providing the order details) that returns the EC token.

From there I will have to open the Express Checkout url (using the EC token) in the app for the user and catch the PayPal redirect request to determine whether the payment was made or canceled.
Aaron
#11 Posted : Thursday, March 12, 2015 4:26:18 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Is is possible to initiate the Express Checkout handshake via the BVC web service? I'm referring to the initial call to SetExpressCheckout (providing the order details) that returns the EC token.

You should be able to do this by running the "Third Party Checkout Selected" workflow.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#12 Posted : Friday, March 13, 2015 9:41:24 AM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Running a workflow through the web service only returns a bool. How would I get the result/token? Is it stored in the order?
Aaron
#13 Posted : Friday, March 13, 2015 3:15:55 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
Running a workflow through the web service only returns a bool. How would I get the result/token? Is it stored in the order?

Correct. You will need to reload the order after running the workflow and check the ThirdPartyOrderId property of the Order object.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#14 Posted : Monday, March 16, 2015 5:31:29 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

I ran BusinessRules_Workflow_RunByName(ref token, orderTC, "Third Party Checkout Selected") and refreshed the local order but the ThirdPartyOrderId is empty ("").

I attempted this with the same order multiple times.
Aaron
#15 Posted : Tuesday, March 17, 2015 10:30:59 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: tappedtech Go to Quoted Post
I ran BusinessRules_Workflow_RunByName(ref token, orderTC, "Third Party Checkout Selected") and refreshed the local order but the ThirdPartyOrderId is empty ("").

Did the workflow run successfully (i.e. did BusinessRules_Workflow_RunByName return "true")? If it did there should be a ThirdPartyOrderId value once you lookup the order again. You should also be able to look at the private notes of the order to see what happened with the PayPal request.

Even if you get this to work there could be a potential problem in that we're setting a return URL to the PayPal checkout page in our software, so that may cause a problem. If so, you'll need to make the SetExpressCheckout call to PayPal in your app and then update the ThirdPartyOrderId manually. If you do this, note that we make the SetExpressCheckout call with a invoiceId value made by concatenating the OrderNumber and a new GUID.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#16 Posted : Tuesday, March 17, 2015 4:01:45 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Yes, it returns true. Ryan checked the notes and they're empty too.

I also tried running the workflow by bvin (09739bec-8974-4c38-b026-f6ca8aed615d) and that returned true but failed to update the ThirdPartyOrderId and notes.

Does the workflow rely on anything in the order? The line items, account and addresses have been added and tax has been calculated.

-

I have to catch the redirect to the return URL in the app and close the UIWebView that is displaying the PayPal Express Checkout.

If I end up having to make the request outside of BVC, I'll make sure to provide the invoiceId.
Aaron
#17 Posted : Wednesday, March 25, 2015 9:37:43 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
After doing a little more digging I think I know where the problem lies. When we run that workflow in BVC we set two inputs on the OrderTaskContext object. Take a look at the code sample below:

Code:
WebServices3.Order o = ws.Orders_Order_FindByBvin(ref token, "your_order_id");
WebServices3.OrderTaskContext c = new WebServices3.OrderTaskContext();
c.Order = o;
c.UserId = o.UserID;
c.Inputs = new WebServices3.CustomProperty1[2];

// set inputs
WebServices3.CustomProperty1 cp = new WebServices3.CustomProperty1();
cp.DeveloperId = "bvsoftware";
cp.Key = "Mode";
cp.Value = "PaypalExpress";
c.Inputs[0] = cp;

cp = new WebServices3.CustomProperty1();
cp.DeveloperId = "bvsoftware";
cp.Key = "AddressSupplied";
cp.Value = "1"; // set this to "1" if you have the customer's address; otherwise set it to "0"
c.Inputs[1] = cp;


// now we're ready to run the workflow...
ws.BusinessRules_Workflow_RunByName(ref token, c, "Third Party Checkout Selected");

Edited by user Wednesday, March 25, 2015 9:39:09 AM(UTC)  | Reason: Not specified

Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#18 Posted : Monday, March 30, 2015 4:14:22 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

That fixed the token issue. After adding the two custom properties, the EC token is set in the order after calling the workflow. I confirmed the token is valid by testing it with the PayPal checkout URL.

Calling the workflow is throwing an exception (see below). It appears that the workflow may be attempting to return html relating to paypal (you can see links to paypal images). I tried twice and both tries threw the same exception.

Exception:
{System.ServiceModel.ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html>

<head>
<!-- 0.0.1_20150320170221993.unx Thu Mar 19 2015 13:55:53 GMT-0700 (PDT) -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="robots" content="noindex" />

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://www.paypalobjects.com/webstatic/icon/pp144.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://www.paypalobjects.com/webstatic/icon/pp114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://www.paypalobjects.com/webstatic/icon/pp72.png" />
<link rel="apple-touch-icon-precomposed" href="https://www.paypalobjects.com/webstatic/icon/pp64.png" />
<link rel="shortcut icon" sizes="196x196" href="https://www.paypalobjects.com/webstatic/icon/pp196.png" />
<link rel="shortcut icon" type="image/x-icon" href="https://www.paypalobjects.com/webstatic/'.

Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at WebServices3.WebServices3Soap.BusinessRules_Workflow_RunByBvin(AuthenticationToken& token, TaskContext c, String bvin)
at WebServices3.WebServices3SoapClient.BusinessRules_Workflow_RunByBvin(AuthenticationToken& token, TaskContext c, String bvin)
at TbMobileAppWS.GetCheckoutUrl(String v, String u, String p, String oid)}
Aaron
#19 Posted : Tuesday, March 31, 2015 2:06:42 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
I can see how that would happen. The PayPal workflow step that's run as part of this workflow assumes that it is being run on the website so it actually performs a redirect to the PayPal website. It doesn't look like the error will cause a problem so you will just need to trap it.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
tappedtech
#20 Posted : Monday, April 6, 2015 4:11:37 PM(UTC)
tappedtech

Rank: Member

Joined: 11/21/2014(UTC)
Posts: 66

Ok, I just wanted to make sure that was expected.

PayPal's documentation shows that you can provide redirect URLs for transaction complete and cancel.

Is the URL that the user is redirected to after completing the PayPal checkout different from the URL used after canceling the payment? I saw that canceling the process sends them back to www.teenyb.com/checkout/checkout.aspx?token=x.

I'm currently catching any redirect to teenyb.com and bringing the user back into the app instead of redirecting to teenyb.com.

From there I will pull the transaction details using the EC-x token and provide BVC with the payeeId.
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012