paymentsjs-rails 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -12
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6aac73dd9d34e75fb68a1706a09691280d869dc2
4
- data.tar.gz: 53621e92c217a887ddfe4111b4021554f90510c3
3
+ metadata.gz: c45d3ca2b2f6c28e6416ee706a8e41f52f6bd605
4
+ data.tar.gz: d31208d4f915e551f353a730d066b8adb8361eb1
5
5
  SHA512:
6
- metadata.gz: a4648784deebd524837ee3c96684dbd812b0ce810739f1bb81adc8be7b119a5f46bfc2a1d88645472edf86742f2e82f24ba8c67872d7431fb81cae1032b7eecf
7
- data.tar.gz: 13becf2c30768c59b3fa4047216bd6e7e3bf6b9421fa83f7539ef1394a0cef8b7d04a2112006427a905fd079bcef078e04ebab096633ee1d999d1aeffe8568df
6
+ metadata.gz: f6c92da4b4860c60505b040baa493490a34f4a0714c58d53e09d97e4be903dfeb18960229a815dd9e4c296d85e75f5ccaf413dc7258b1cc0b2d498f923bfdc4d
7
+ data.tar.gz: 073af2bf43a713205e588429cd9bae6881370a6d8e4545ad342659aa9467640b3d30f1af33e98b0dc950cbb0c382beaeefdc9477d8e1e53f6ba9a106c5a89b8a
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Sage PaymentsJS-Rails Gem
2
2
 
3
+ ####NOTE: This gem is not yet finished and has not been extensively tested, be very careful using this gem until v.1.0 is released.
4
+
3
5
  The PaymentsJS-Rails gem simplifies the integration of Sage's PaymentsJS SDK by adding the PaymentsJs model and making configuring environmental variables easy.
4
6
 
5
7
  ##Installation
@@ -32,23 +34,31 @@ Follow the [PaymentsJS GitHub Quick Start guide](https://github.com/SagePayments
32
34
  ```
33
35
  part.
34
36
 
35
- PaymentsJS requires several variables to be added to the `$UI.Initialize()` function in order to work. The Quick Start comes with several variables preloaded. We'll replace these with embedded ruby and the smae preloaded variables:
37
+ PaymentsJS requires several variables to be added to the `$UI.Initialize()` function in order to work. The Quick Start comes with several variables preloaded. We'll replace these with embedded ruby to call the same preloaded variables:
36
38
 
37
39
  ```javascript
38
40
  PayJS(['PayJS/UI'], // the name of the module we want to use
39
41
  function($UI) { // assigning the module to a variable
40
42
  $UI.Initialize({ // configuring the UI
41
43
  apiKey: "<%= PaymentJs.api_key %>", // your developer ID
42
- merchantId: "<%= PaymentJs.mid %>", // your 12-digit account identifier
43
- authKey: "<%= PaymentJs.encrypt %>", // covered in the next section!
44
- requestType: "<%= PaymentJs.request_type %>", // use can use "vault" to tokenize a card without charging it
45
- requestId: "<%= PaymentJs.req_id %>", // an order number, customer or account identifier, etc.
46
- amount: "<%= PaymentJs.amount %>", // the amount to charge the card. in test mode, different amounts produce different results.
44
+ merchantId: "<%= PaymentsJs.mid %>", // your 12-digit account identifier
45
+ authKey: "<%= PaymentsJs.encrypt %>", // covered in the next section!
46
+ requestType: "<%= PaymentsJs.request_type %>", // use can use "vault" to tokenize a card without charging it
47
+ requestId: "<%= PaymentsJs.req_id %>", // an order number, customer or account identifier, etc.
48
+ amount: "<%= PaymentsJs.amount %>", // the amount to charge the card. in test mode, different amounts produce different results.
47
49
  elementId: "paymentButton", // the page element that will trigger the UI
48
- nonce: "<%= PaymentJs.salt %>", // a unique identifier, used as salt
50
+ nonce: "<%= PaymentsJs.salt %>", // a unique identifier, used as salt
49
51
  debug: true, // enables verbose console logging
50
- preAuth: <%= PaymentJs.pre_auth %>, // run a Sale, rather than a PreAuth
51
- environment: "<%= PaymentJs.environment %>" // hit the certification environment
52
+ preAuth: <%= PaymentsJs.pre_auth %>, // run a Sale, rather than a PreAuth
53
+ environment: "<%= PaymentsJs.environment %>", // hit the certification environment
54
+ addFakeData: true,
55
+ billing: {
56
+ name: "Shaka Smart",
57
+ address: "",
58
+ City: "Denver",
59
+ state: "CO",
60
+ postalCode: "80205"
61
+ }
52
62
  });
53
63
  $UI.setCallback(function(result) { // custom code that will execute when the UI receives a response
54
64
  console.log(result.getResponse()); // log the result to the console
@@ -84,6 +94,4 @@ PaymentsJs.request_type = "ORDER REQUEST TYPE"
84
94
  PaymentsJs.pre_auth = boolean
85
95
  PaymentsJs.environment = "ORDER ENVIRONMENT"
86
96
  ```
87
- The other variables are generated by encryption.
88
-
89
- ####NOTE: This gem is not yet finished and has not been extensively tested, be very careful using this gem until v.1.0 is released.
97
+ The other variables are generated by encryption.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paymentsjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Bartlett