1

this only asks for zip code:

https://www.wepay.com/developer/process_payments/tokenization-custom-checkout

the iframe checkout asks for a lot more things as soon as you select something that is not USA, say you select the next top entry, afghanistan.

https://www.wepay.com/developer/process_payments/iframe-checkout

does that mean the example wepay provides on their page, the top one, only works in the USA?

Toskan
  • 13,911
  • 14
  • 95
  • 185

2 Answers2

2

The example is a US zip-only example, but WePay accepts international cards. See the /credit_card/create documentation here: https://www.wepay.com/developer/reference/credit_card#create

Example json for non-US address:

{ "client_id":187493, "user_name":"Bob Smith", "email":"test@example.com", "cc_number":"5496198584584769", "cvv":"123", "expiration_month":4, "expiration_year":2020, "address": { "address1":"100 Main St", "address2":"", "region":"ON", "city":"Toronto", "postcode":"M4E 1Z5", "country":"CA" } }

y2chaits
  • 755
  • 5
  • 17
  • that's silly of them though isn't it? i mean, they nowhere state that it won't work for outside of us. They seem to have no non-us non-ca visa credit cards. And the code they provide is not a simple example of how to make it work for all countries. I mean... why the hell not? every single developer has to figure this out himself again from the start. Create a country picker, trigger some show hide on select. Why? – Toskan Jun 02 '16 at 06:01
  • note: ur example only works in CA. the interesting reference is probably this one: https://www.wepay.com/developer/reference/structures#address – Toskan Jun 02 '16 at 06:02
  • @Toskan Actually the example does work for all non-US addresses. – y2chaits Jun 03 '16 at 00:38
1

Gateways have address validation settings for certain regions. Hence, if you try to make a payment with US address, it will validate the zip code and the state as well. This is why the example they gave is for a valid US address. You can use any fake address generator to test the integration and payments in the sandbox environment. However, WePay does accepts international cards as well, so you may as well give any random address with random country ( take India for example) and the payment shall go through for you with the test visa card number.