WePay error

I have setup WePay gateway in my self hosted install. I have set the “Require client to provide their billing address” in the gateway settings but when I try to do a test charge on my card I get the “address.postal_code parameter is required”. I entered the zip code but it isn’t seeing it or so it seems. Am I missing something? This is a new WePay account, just created yesterday if that matters.

I’m not sure, here’s where the field is set in the code:

https://github.com/hillelcoren/omnipay-wepay/blob/master/src/Message/PurchaseRequest.php#L72

I am at a loss. Nothing pops up in the error logs for apache but this error persists on the page. I was on 3.8.1 but just upgraded to 3.9.0 and same thing. “address.postal_code parameter is required”. My version has the file located here: vendor/collizo4sky/omnipay-wepay/src/Message/ so I’m not sure if it is the same version as the one you linked.

Is there some other logs or something I can dig into to troubleshoot this further?

This is the version we’re using in the app.

https://github.com/hillelcoren/omnipay-wepay/blob/master/src/Message/PurchaseRequest.php#L67

I am using the directions on setting up a self hosted version for two different sites. Both have the same version of the wepay module. How do I change it?

I’m sorry, I don’t understand your question.

You say the proper version is the hill coren one but both my installs have the collizo4sky version. I used the directions for the self hosted installation so I am not sure how I ended up with a different version. So my question is how do I get the correct version of the wepay module on my installs?

Check the actual code, the name of folder should be collizo4sky/omnipay-wepay

The code in my install is a little different from the code on the above github. I tried replacing the file with the one from the github but same error. I also tried 3 different computers and 3 different browsers just to make sure it wasn’t something on my pc. Everything worked fine when I ran Stripe on this install but I am needing to move to something else and WePay looked like an easy to use solution.

What is the best way to troubleshoot this further?

The next step would be to determine why your code is different.

  • Are you using the latest version of the app?
  • Did you get the code from GitHub or are you using the self host zip?

I am using the 3.9.0 version of Invoice Ninja.
I am using the self hosted install instructions located here: http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/

If it makes any difference, since the initial install I have updated using an automatic update bash script that appears to download the zip file.

Please compare your file against the zip

Ok, so I updated to the latest 3.9.1 and downloaded the zip so I can compare the two. Running the diff -r /root/ninja-test/ninja/ /var/www/ninja/ command I get a bunch of files that are in the installed version and not in the zip.

What would be the best way to start from scratch on this but keep my mysql and email settings? I am thinking I just need to backup my .env file and ninja/public folder. That sound about right?

Is src/Message/PurchaseRequest.php different?

diff ninja-zip/ninja/vendor/collizo4sky/omnipay-wepay/src/Message/PurchaseRequest.php /var/www/ninja/vendor/collizo4sky/omnipay-wepay/src/Message/PurchaseRequest.php
Shows no difference.

This is the only difference between the two folders:

diff -r ninja-zip/ninja/vendor/collizo4sky/ /var/www/ninja/vendor/collizo4sky/

Only in /var/www/ninja/vendor/collizo4sky/omnipay-wepay/tests/Message: CancelRequestTest.php

Only in /var/www/ninja/vendor/collizo4sky/omnipay-wepay/tests/Message: CancelResponseTest.php

Only in /var/www/ninja/vendor/collizo4sky/omnipay-wepay/tests/Mock: CancelFailure.txt

Only in /var/www/ninja/vendor/collizo4sky/omnipay-wepay/tests/Mock: CancelSuccess.txt

Check which version of the WePay API you’re using, I think this error is from a change in their API.

Where do I see what version of the API I am using?

In the WePay portal

API Version 2017-05-31

Sorry, I’m out of ideas…