Skip to content

Commit

Permalink
added mock for CompletePurchaseSuccess
Browse files Browse the repository at this point in the history
  • Loading branch information
tolu-paystack committed May 28, 2020
1 parent abc3f69 commit 87a6bb3
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
}
],
"require": {
"php": "^7.2",
"omnipay/common": "^3.0"
},
"require-dev": {
Expand Down
Empty file.
91 changes: 91 additions & 0 deletions tests/Mock/CompletePurchaseSuccess.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
HTTP/1.1 200 OK
Server: Apache
Date: Sun, 11 May 2014 21:17:31 GMT
Content-Type: application/json; charset=utf-8
Status: 200 OK

{
"status": true,
"message": "Verification successful",
"data": {
"id": 549256454,
"domain": "test",
"status": "success",
"reference": "0rujfjycxi",
"amount": 250000,
"message": null,
"gateway_response": "Successful",
"paid_at": "2020-03-10T15:13:18.000Z",
"created_at": "2020-03-10T15:13:04.000Z",
"channel": "card",
"currency": "NGN",
"ip_address": "154.113.67.70",
"metadata": {
"custom_fields": [
{
"display_name": "Mobile Number",
"variable_name": "mobile_number",
"value": "+2348012345678"
}
]
},
"log": {
"start_time": 1583853195,
"time_spent": 3,
"attempts": 1,
"errors": 0,
"success": true,
"mobile": false,
"input": [],
"history": [
{
"type": "action",
"message": "Attempted to pay with card",
"time": 3
},
{
"type": "success",
"message": "Successfully paid with card",
"time": 3
}
]
},
"fees": 13750,
"fees_split": null,
"authorization": {
"authorization_code": "AUTH_0kp93r4efq",
"bin": "408408",
"last4": "4081",
"exp_month": "12",
"exp_year": "2020",
"channel": "card",
"card_type": "visa DEBIT",
"bank": "Test Bank",
"country_code": "NG",
"brand": "visa",
"reusable": true,
"signature": "SIG_OwXBSHEXaO5yN8mT1PuM",
"account_name": null,
"receiver_bank_account_number": null,
"receiver_bank": null
},
"customer": {
"id": 11155546,
"first_name": null,
"last_name": null,
"email": "[email protected]",
"customer_code": "CUS_psk22uvulqz7cqi",
"phone": null,
"metadata": null,
"risk_action": "deny"
},
"plan": null,
"order_id": null,
"paidAt": "2020-03-10T15:13:18.000Z",
"createdAt": "2020-03-10T15:13:04.000Z",
"requested_amount": 250000,
"transaction_date": "2020-03-10T15:13:04.000Z",
"plan_object": {},
"subaccount": {}
}
}
Empty file added tests/Mock/PurchaseFailure.txt
Empty file.

0 comments on commit 87a6bb3

Please sign in to comment.