Created
September 6, 2012 15:38
-
-
Save chip/3657496 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AN AUTHORIZATION IS CHARGEABLE | |
| ============================== | |
| * It's still valid, which means it's Authorization.state = 'authorized' | |
| * It's not monitored (handled by the backend scripts. Is "monitored" a valid Authorization.state setting?) | |
| * Is completely or partially shipped (at least 1 shipped item) | |
| * Was created at least 2 Business days ago | |
| How to test: | |
| 1. Buy a book on both Cybersource and PlugnPay | |
| 2. Authorization record should be "authorized" | |
| 3. Update authorizations set created_at = (2.days.ago) where authorization.id = ? # 2.days.ago needs to be changed to valid SQL | |
| 4. source_status = 'to_cancel' | |
| 4. Order items state should be "pending" | |
| 5. Run the authorizations script: RAILS_ENV=qa rake authorizations:charge | |
| 6. Authorization should be charged | |
| 7. Cybersource should show a record for Authorizing the transaction, plus a separate record for Settlement | |
| Should the order items state change? | |
| What about Plugnpay ??? | |
| 1. ? | |
| 2. ? | |
| 3. ? | |
| .... | |
| ---------------------------------------------------------------------------------------------------------------------------------- | |
| AN AUTHORIZATION IS CANCELLABLE | |
| =============================== | |
| * Has at least 1 shipped item | |
| * Was created at least 4 Business days ago | |
| * Is less than 14 days old | |
| 1. Buy a book on both Cybersource and PlugnPay | |
| 2. Authorization record should be "authorized" | |
| 3. Order items state should be "pending" | |
| 4. Run the cancellation script: RAILS_ENV=qa rake order_items:process_cancellations | |
| 5. Authorization should be voided | |
| 6. Order items should be "cancelled" | |
| 7. Cybersource should show a record for Authorizing the transaction, plus a separate record for Authorization Reversal | |
| Should the order items state change? | |
| What about Plugnpay ??? | |
| 1. ? | |
| 2. ? | |
| 3. ? | |
| .... | |
| ---------------------------------------------------------------------------------------------------------------------------------- | |
| REFUNDING A SALE (this is different than an Authorization Reversal) | |
| =================================================================== | |
| 1. Buy a book on both Cybersource and PlugnPay | |
| 2. Update authorizations set created_at = (2.days.ago) where authorization.id = ? # 2.days.ago needs to be changed to valid SQL | |
| 3. Run the authorization script: RAILS_ENV=qa rake authorizations:charge | |
| 4. Authorization record should be "charged" | |
| 5. Order items state should be "pending" | |
| 6. Run the cancellation script: RAILS_ENV=qa rake order_items:process_cancellations | |
| 7. Order items should be "cancelled" | |
| 8. Cybersource should show records for Authorizing the transaction and settling it, plus a separate record for Credit | |
| Should the order items state change? | |
| What about Plugnpay ??? | |
| 1. ? | |
| 2. ? | |
| 3. ? | |
| .... | |
| ---------------------------------------------------------------------------------------------------------------------------------- | |
| PARTIALLY REFUNDING A SALE | |
| ========================== | |
| 1. Buy a book on both Cybersource and PlugnPay | |
| 2. Update authorizations set created_at = (2.days.ago) where authorization.id = ? # 2.days.ago needs to be changed to valid SQL | |
| 3. Run the authorization script: RAILS_ENV=qa rake authorizations:charge | |
| 4. Authorization record should be "charged" | |
| 5. Order items state should be "pending", but set 1 of them to "shipped" | |
| 6. Run the cancellation script: RAILS_ENV=qa rake order_items:process_cancellations | |
| 7. Order items that were originally "pending" should now be "cancelled" | |
| 8. Cybersource should show records for Authorizing the transaction and settling it, plus a separate record for Credit of ONLY the cancelled items (not the shipped ones) | |
| Should the order items state change? | |
| What about Plugnpay ??? | |
| 1. ? | |
| 2. ? | |
| 3. ? | |
| .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment