zaakpay_ruby 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83363b2eb3784707015676b2e6fa3d6e16c1b5fb
4
- data.tar.gz: 9fab89df2b7a5b46ce4c9707ece8ab8799af0c53
3
+ metadata.gz: 7d91b904abbd010461c306e6aa51dc9b84d1e991
4
+ data.tar.gz: 53e2ad4faa1ead3eb7ccc74267744454dc27d3e1
5
5
  SHA512:
6
- metadata.gz: e779f84edf0ea0928ba736af982d9ebdca76ed69b7e63bf04a804dd829bb290a38baf52c30dbb9ca99cdc13b349d6490bd83d3396493fb98d6773dd1f836e404
7
- data.tar.gz: 340ad065612e39fac1844fea899ce662a1abb21f9c18ab9b449974ddde4df94b6de38e6869a6a3357823168364e1f0e0d21b34eb6dfee4c006a73a8c1eb2288e
6
+ metadata.gz: 7ab98f1cc9c384516036fdd777eb3723e2ad2c3f5d2a86ec5fdb1a95413b77ac5732e49af2a3312845c59e08d1af8ed159f517865e8fd25d30eb706c09a9f96a
7
+ data.tar.gz: 35551f49cebacc73ae2ddc144279e02a3ec461aaef68b631c4926fdc2654450c70dfba6b2e87bd8fcb3894b2df0c66f730f80e0921444ba7b1f6ebef3cb33adb
data/README.md CHANGED
@@ -45,15 +45,90 @@ Save your settings as per your requirements.
45
45
 
46
46
  For transaction by buyer
47
47
 
48
- First you have to make a request to the zaakpay by:
49
- request = ZaakpayRuby::Request.new(params)
48
+ To Make a transaction using debit card or credit card.
49
+
50
+ result = ZaakpayRuby::Transaction.sale(
51
+
52
+ merchantIdentifier: 'Merchant Id of Zaakpay merchant account',
53
+ orderId: 'Order675786, this must be unique',
54
+ returnUrl: 'url where you want the response',
55
+ buyerEmail: 'a@b.com',
56
+ buyerFirstName: 'First name',
57
+ buyerLastName: 'Last name',
58
+ buyerAddress: 'Address',
59
+ buyerCity: 'city',
60
+ buyerState: 'state',
61
+ buyerCountry: 'country',
62
+ buyerPincode: 'zipcode',
63
+ buyerPhoneNumber: '9874563210',
64
+ txnType: '1',
65
+ zpPayOption: '1',
66
+ mode: '1',
67
+ currency: 'INR',
68
+ amount: '200000, amount should be in Paisa',
69
+ merchantIpAddress: request.remote_ip,
70
+ purpose: '1',
71
+ productDescription: 'Test',
72
+ shipToAddress: 'Shipping Address',
73
+ shipToCity: 'shipping city',
74
+ shipToState: 'shipping state',
75
+ shipToCountry: 'shipping country',
76
+ shipToPincode: 'shipping pincode',
77
+ shipToPhoneNumber: 'shipping phone number',
78
+ shipToFirstname: 'Ship To First Name',
79
+ shipToLastname: 'Ship To Last Name',
80
+ txnDate: '2015-05-11'
81
+ )
50
82
 
51
- Params would be the hash of parameters. Below are the required and optional parameters to pass in the request.
52
83
  For more information about the request parameters, go through the link provided below.
53
84
 
54
- https://www.zaakpay.com/developers#viewA
85
+ https://www.zaakpay.com/developers#viewA
86
+
87
+ After that store the result with checksum from zaakpay api as
88
+
89
+ @zaakpay_data = result
90
+ This @zaakpay_data must pass in the form.
91
+
92
+ For ex:
93
+
94
+ <!DOCTYPE html>
95
+
96
+ <html>
97
+ <head>
98
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
99
+ <title>Zaakpay</title>
100
+ </head>
101
+ <body onload="javascript:submitForm()">
102
+ <center>
103
+ <table width="500px;">
104
+ <tr>
105
+ <td align="center" valign="middle">Do Not Refresh or Press Back
106
+ <br/> Redirecting to Zaakpay</td>
107
+ </tr>
108
+ <tr>
109
+ <td align="center" valign="middle">
110
+ <form action="https://api.zaakpay.com/transact" method="post">
111
+ <% @zaakpay_data.each do |key, value| %>
112
+ <input type="hidden" name="<%= key %>" value="<%= value %>" />
113
+ <% end %>
114
+ </form>
115
+ </td>
116
+ </tr>
117
+ </table>
118
+ </center>
119
+ <script type="text/javascript">
120
+ function submitForm(){
121
+ var form = document.forms[0];
122
+ form.submit();
123
+ }
124
+ </script>
125
+ </body>
126
+ </html>
127
+
128
+
55
129
 
56
130
  Get response by using this method
131
+ This should be in the action of the return Url
57
132
  response = ZaakpayRuby::Response.new(request.raw_post)
58
133
 
59
134
  For response parameters, go to the
@@ -1,3 +1,3 @@
1
1
  module ZaakpayRuby
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/zaakpay_ruby.rb CHANGED
@@ -81,7 +81,7 @@ module ZaakpayRuby
81
81
  end
82
82
 
83
83
  class Transaction
84
- def sale(options={})
84
+ def self.sale(options={})
85
85
  zr = ZaakpayRuby::Request.new(options)
86
86
  return zr.all_params
87
87
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaakpay_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shoaib Malik
@@ -60,6 +60,7 @@ files:
60
60
  - lib/zaakpay_ruby/version.rb
61
61
  - zaakpay_ruby-0.1.0.gem
62
62
  - zaakpay_ruby-0.1.1.gem
63
+ - zaakpay_ruby-0.1.2.gem
63
64
  - zaakpay_ruby.gemspec
64
65
  homepage: https://github.com/shoaibmalik786/zaakpay_ruby
65
66
  licenses: