Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 21 2018 19:27
    swelham closed #22
  • Feb 21 2018 19:27

    swelham on master

    Add CodeTriage badge to swelham… Merge pull request #22 from cod… (compare)

  • Feb 21 2018 19:12
    codetriage-readme-bot opened #22
  • Oct 19 2017 20:21

    swelham on overhaul

    (compare)

  • Apr 20 2017 14:07

    swelham on overhaul

    back to the basics removed missed app in mix file added genstage pipeline and 2 more (compare)

  • Feb 14 2017 09:54
    swelham commented #5
  • Feb 14 2017 09:17
    aseigo commented #5
  • Feb 13 2017 14:55

    swelham on master

    added adding missing asserts (compare)

  • Feb 13 2017 14:25

    swelham on master

    normalise paypal bad request re… (compare)

  • Feb 13 2017 12:21

    swelham on master

    small syntax improvement (compare)

  • Feb 12 2017 13:27
    swelham labeled #21
  • Feb 12 2017 13:27
    swelham opened #21
  • Feb 12 2017 13:24

    swelham on master

    bump version to 0.4.0 (compare)

  • Feb 12 2017 13:19

    swelham on master

    fixes #4 - added common error f… (compare)

  • Feb 12 2017 13:19
    swelham closed #4
  • Feb 12 2017 12:25

    swelham on master

    fixed merge issues (compare)

  • Feb 09 2017 10:12

    swelham on design_refactor

    (compare)

  • Feb 09 2017 10:05

    swelham on master

    started genstage experimenting added passing dummy authorize P… converted dummy gateway and 12 more (compare)

  • Feb 09 2017 10:05
    swelham closed #17
  • Feb 09 2017 10:05
    swelham closed #2
Zubair Nabi
@zubairshokh
@swelham
Stuart Welham
@swelham

Hi @zubairshokh
The docs are currently on the todo list as I'm currently thinking about a slightly different overall design for the lib.

I did however see your comment on one of the issues earlier and I have since updated the readme with some very basic usage and config examples.

Let me know how you get on and feel free to ask if you need anything else, I am more than happy to help :smile:

Zubair Nabi
@zubairshokh
@swelham , Thank you for adding the usage in read me. its really great that you added it.
Stuart Welham
@swelham
No problem I hope it helps! If not let me know and I will help how ever I can
Zubair Nabi
@zubairshokh
Thank you, will implement it, its weekend, hopefully i will start doing it from monday
Stuart Welham
@swelham
Cool... let me know how you get on!
Zubair Nabi
@zubairshokh
Hello @swelham
i tried implementing it, but here is what i am stuck on
=INFO REPORT==== 23-Jan-2017::16:29:04 ===
application: logger
exited: stopped
type: temporary
(Mix) Could not start application cashier: Cashier.start(:normal, []) returned an error: shutdown: failed to start child: Cashie
r.Gateways.PayPal
(EXIT) time out
Any idea?
Zubair Nabi
@zubairshokh
@swelham
Stuart Welham
@swelham

Hi @zubairshokh

That looks like something has gone wrong when starting the gateway. Have you set any timeouts in the config?

Zubair Nabi
@zubairshokh
i havnt added any new
used ur config that u added in usage
with my clientid and secret
Stuart Welham
@swelham
Ok, also are you using the git repo as the dep for cashier like so
defp deps do {:cashier, git: "git://github.com/swelham/cashier.git"} end
Zubair Nabi
@zubairshokh
no, i was using the one on HEx
hex*
Stuart Welham
@swelham
Ah ok, I updated the usage examples over the weekend which should help you out here.
I haven't done another release to hex yet so you will need to use the git dep for now
Zubair Nabi
@zubairshokh
oo. great. i used the git deps, it compiled
Great
Thanks
Stuart Welham
@swelham
No prob, let me know if you have any more problems
Zubair Nabi
@zubairshokh
Sure, Thanks @swelham
Stuart Welham
@swelham

@zubairshokh Hi

Just a heads up. I plan on making some breaking changes to the cashier public API in the next few days, which will break any code you have currently written. To combat this I have now published a new version to hex so that you can use this should you not want to update your code to work with the latest in git.

You can now use {:cashier, "~> 0.2.0"} in your deps instead.

Zubair Nabi
@zubairshokh
ok @swelham , thank you for the info
i am already liking your lib. Best of luck
Stuart Welham
@swelham
That's great to hear!
Thank you
Zubair Nabi
@zubairshokh
hello
Zubair Nabi
@zubairshokh
Hello @swelham
hope you are doing good.
i was working on the lib, and wanted to know about the error response format. what i usually get is in this format
"Unexpected status code (400) returned {\"name\":\"VALIDATION_ERROR\",\"details\":[{\"field\":\"transactions[0].amount.details.subtotal\"
,\"issue\":\"Currency amount must be non-negative number and can optionally contain exactly two decimal places separated by '.', optional
thousands separator ',', limited to seven digits before the decimal point.\"},{\"field\":\"transactions[0].amount.total\",\"issue\":\"Cu
rrency amount must be non-negative number and can optionally contain exactly two decimal places separated by '.', optional thousands sepa
rator ',', limited to seven digits before the decimal point.\"}],\"message\":\"Invalid request. See details.\",\"information_link\":\"htt
ps://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR\",\"debug_id\":\"4cade50453b48\"}"
so, i was wondering, even with the error, i get the 200 status, but with the above response
however, what i am concerned of is "Unexpected status code (400) returned", with the response string
Zubair Nabi
@zubairshokh
is it anytime to be fixed, or any procedure for me to work on it.
thanks
Stuart Welham
@swelham
Hi @zubairshokh
There is an issue open on the report (issue #4) that addresses this and it is on my todo list.
I think the only thing you could probably do with that at the moment is to strip the start of the string off which will just leave the json and then you can parse that into a map using something like the poison library.
I should have some time this weekend to improve this to at least return
the parsed json with the error message
Stuart Welham
@swelham
Sorry about the typos I'm currently on my phone and auto correct is playing it's part! :angry:
Stuart Welham
@swelham

I have just pushed a commit that will split out the errors for an http 400 and return them from the cashier module. If you are on the 0.2.0 release you will need to switch your dep to use the master branch from the git repo and this will initially break any code that expects cashier to return {:ok, result}. You will need to update the broken code to expect a 3 element tuple {:ok, id, result}, result in this case is also a tuple that contains the gateway that handled the request and the raw response (e.g. {:paypal, raw_data}). For some further examples I would suggest taking a look at the either of these test files cashier_test or paypal_test.

Otherwise feel free to give me a shout if you have any issues.

Zubair Nabi
@zubairshokh
Thank you @swelham, i got it. please let me know, if there is any major change in implementing the lib.
Thank you for your work
Zubair Nabi
@zubairshokh
i encountered this error
(FunctionClauseError) no function clause matching in Cashier.Gateways.PayPal.handle_response/2