Alipay
Alipay Elixir SDK
Support API
Installation
If available in Hex, the package can be installed as:
-
Add
alipayto your list of dependencies inmix.exs:
```elixir
def deps do
[{:alipay, "~> 0.0.2"}]
end
```-
Ensure
alipayis started before your application:
```elixir
def application do
[applications: [:alipay]]
end
```Usage
policy = %Alipay.Mapi.Policy{ pid: "", key: "", sign_type: "MD5" }
url = Alipay.Mapi.create_direct_pay_by_user_url(policy, %{
out_trade_no: "no",
subject: "subject",
notify_url: "https://example.com",
return_url: "https://example.com",
total_fee: "10.00"
})
# open the url in a browser