Skip to content

Commit 833e0c6

Browse files
committed
Add mock data for WCPayChargeMapper without data envelope
1 parent 3147264 commit 833e0c6

File tree

2 files changed

+159
-0
lines changed

2 files changed

+159
-0
lines changed

Networking/Networking.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@
715715
DE50296328C609DE00551736 /* jetpack-user-not-connected.json in Resources */ = {isa = PBXBuildFile; fileRef = DE50296228C609DE00551736 /* jetpack-user-not-connected.json */; };
716716
DE50296528C60A8000551736 /* JetpackUserMapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE50296428C60A8000551736 /* JetpackUserMapperTests.swift */; };
717717
DE5CA111288A3E080077BEF9 /* product-malformed-variations-and-image-alt.json in Resources */ = {isa = PBXBuildFile; fileRef = DE5CA110288A3E080077BEF9 /* product-malformed-variations-and-image-alt.json */; };
718+
DE66C5572976913C00DAA978 /* wcpay-charge-card-present-without-data.json in Resources */ = {isa = PBXBuildFile; fileRef = DE66C5562976913C00DAA978 /* wcpay-charge-card-present-without-data.json */; };
718719
DE6F308727966FEF004E1C9A /* CouponReportListMapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6F308627966FEF004E1C9A /* CouponReportListMapperTests.swift */; };
719720
DE74F29A27E08F5A0002FE59 /* SiteSettingMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE74F29927E08F5A0002FE59 /* SiteSettingMapper.swift */; };
720721
DE74F29C27E0A1D00002FE59 /* setting-coupon.json in Resources */ = {isa = PBXBuildFile; fileRef = DE74F29B27E0A1D00002FE59 /* setting-coupon.json */; };
@@ -1543,6 +1544,7 @@
15431544
DE50296228C609DE00551736 /* jetpack-user-not-connected.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "jetpack-user-not-connected.json"; sourceTree = "<group>"; };
15441545
DE50296428C60A8000551736 /* JetpackUserMapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackUserMapperTests.swift; sourceTree = "<group>"; };
15451546
DE5CA110288A3E080077BEF9 /* product-malformed-variations-and-image-alt.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "product-malformed-variations-and-image-alt.json"; sourceTree = "<group>"; };
1547+
DE66C5562976913C00DAA978 /* wcpay-charge-card-present-without-data.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "wcpay-charge-card-present-without-data.json"; sourceTree = "<group>"; };
15461548
DE6F308627966FEF004E1C9A /* CouponReportListMapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponReportListMapperTests.swift; sourceTree = "<group>"; };
15471549
DE74F29927E08F5A0002FE59 /* SiteSettingMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SiteSettingMapper.swift; sourceTree = "<group>"; };
15481550
DE74F29B27E0A1D00002FE59 /* setting-coupon.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "setting-coupon.json"; sourceTree = "<group>"; };
@@ -2161,6 +2163,7 @@
21612163
B559EBA820A0B5B100836CD4 /* Responses */ = {
21622164
isa = PBXGroup;
21632165
children = (
2166+
DE66C5562976913C00DAA978 /* wcpay-charge-card-present-without-data.json */,
21642167
DE4F2A432975684900B0701C /* site-api-without-data.json */,
21652168
DE4F2A3D29750EF400B0701C /* inbox-note-list-without-data.json */,
21662169
DE4F2A3E29750EF400B0701C /* inbox-note-without-data.json */,
@@ -3025,6 +3028,7 @@
30253028
31A451CC27863A2E00FE81AA /* stripe-account-rejected-fraud.json in Resources */,
30263029
31A451D827863A2E00FE81AA /* stripe-account-restricted-overdue.json in Resources */,
30273030
D865CE69278CA245002C8520 /* stripe-payment-intent-unknown-status.json in Resources */,
3031+
DE66C5572976913C00DAA978 /* wcpay-charge-card-present-without-data.json in Resources */,
30283032
DE42F9652967F34400D514C2 /* refund-single-without-data.json in Resources */,
30293033
0205021C27C86B9700FB1C6B /* inbox-note-without-isRead.json in Resources */,
30303034
24F98C622502EFF600F49B68 /* feature-flags-load-all.json in Resources */,
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"id": "ch_3KMVap2EdyGr1FMV1uKJEWtg",
3+
"object": "charge",
4+
"amount": 1800,
5+
"amount_captured": 1800,
6+
"amount_refunded": 0,
7+
"application": "ca_Ex84e31yMTLaNU5ozQvi5woLclpIDVpX",
8+
"application_fee": "fee_1KMVaw2EdyGr1FMVkom8DN98",
9+
"application_fee_amount": 57,
10+
"authorization_code": "123456",
11+
"balance_transaction": {
12+
"id": "txn_3KMVap2EdyGr1FMV1M2Xw1C4",
13+
"object": "balance_transaction",
14+
"amount": 1800,
15+
"available_on": 1643846400,
16+
"created": 1643280770,
17+
"currency": "usd",
18+
"description": "In-Person Payment for Order #205 for My WordPress Site",
19+
"exchange_rate": null,
20+
"fee": 57,
21+
"fee_details": [
22+
{
23+
"amount": 57,
24+
"application": "ca_Ex84e31yMTLaNU5ozQvi5woLclpIDVpX",
25+
"currency": "usd",
26+
"description": "WooCommerce Payments application fee",
27+
"type": "application_fee"
28+
}
29+
],
30+
"net": 1743,
31+
"reporting_category": "charge",
32+
"source": "ch_3KMVap2EdyGr1FMV1uKJEWtg",
33+
"status": "pending",
34+
"type": "charge"
35+
},
36+
"billing_details": {
37+
"address": {
38+
"city": null,
39+
"country": null,
40+
"line1": null,
41+
"line2": null,
42+
"postal_code": null,
43+
"state": null
44+
},
45+
"email": null,
46+
"name": null,
47+
"phone": null,
48+
"formatted_address": ""
49+
},
50+
"calculated_statement_descriptor": "AwesomeStore",
51+
"captured": true,
52+
"created": 1643280767,
53+
"currency": "usd",
54+
"customer": "cus_L2amf96J6ksaTQ",
55+
"description": "In-Person Payment for Order #205 for My WordPress Site",
56+
"destination": null,
57+
"dispute": null,
58+
"disputed": false,
59+
"failure_code": null,
60+
"failure_message": null,
61+
"fraud_details": [],
62+
"invoice": null,
63+
"level3": {
64+
"customer_reference": "205",
65+
"line_items": [
66+
{
67+
"discount_amount": 0,
68+
"product_code": "simple-payme",
69+
"product_description": "Simple Payments",
70+
"quantity": 1,
71+
"tax_amount": 0,
72+
"unit_cost": 1800
73+
}
74+
],
75+
"merchant_reference": "205",
76+
"shipping_amount": 0,
77+
"shipping_from_zip": "85120"
78+
},
79+
"livemode": false,
80+
"metadata": {
81+
"order_id": "205",
82+
"payment_type": "single",
83+
"paymentintent.storename": "My WordPress Site",
84+
"reader_ID": "STRM26138002546",
85+
"reader_model": "STRIPE_M2",
86+
"site_url": "https:\/\/store.example.com"
87+
},
88+
"on_behalf_of": null,
89+
"order": {
90+
"number": "205",
91+
"url": "https:\/\/store.example.com\/wp-admin\/post.php?post=205&action=edit",
92+
"customer_url": "admin.php?page=wc-admin&path=\/customers&filter=single_customer&customers=0",
93+
"subscriptions": []
94+
},
95+
"outcome": {
96+
"network_status": "approved_by_network",
97+
"reason": null,
98+
"risk_level": "not_assessed",
99+
"seller_message": "Payment complete.",
100+
"type": "authorized"
101+
},
102+
"paid": true,
103+
"payment_intent": "pi_3KMVap2EdyGr1FMV16atNgK9",
104+
"payment_method": "pm_1KMVas2EdyGr1FMVnleuPovE",
105+
"payment_method_details": {
106+
"card_present": {
107+
"amount_authorized": 1800,
108+
"brand": "visa",
109+
"cardholder_name": "CARDHOLDER\/VISA",
110+
"country": "US",
111+
"emv_auth_data": "8A023030",
112+
"exp_month": 3,
113+
"exp_year": 2023,
114+
"fingerprint": "gXsIWYqS9BLUBw0c",
115+
"funding": "credit",
116+
"generated_card": "pm_1KMVas2EdyGr1FMVa2Zzy6lj",
117+
"last4": "9969",
118+
"network": "visa",
119+
"overcapture_supported": false,
120+
"read_method": "contactless_emv",
121+
"receipt": {
122+
"account_type": "credit",
123+
"application_cryptogram": "6B75F6DE4A78CD0A",
124+
"application_preferred_name": "Stripe Credit",
125+
"authorization_code": null,
126+
"authorization_response_code": "3030",
127+
"cardholder_verification_method": "approval",
128+
"dedicated_file_name": "A000000003101001",
129+
"terminal_verification_results": "0000000000",
130+
"transaction_status_information": "0000"
131+
}
132+
},
133+
"type": "card_present"
134+
},
135+
"receipt_email": null,
136+
"receipt_number": null,
137+
"receipt_url": "https:\/\/pay.stripe.com\/receipts\/acct_1Jaefx2EdyGr1FMV\/ch_3KMVap2EdyGr1FMV1uKJEWtg\/rcpt_L2amKKvKwznzyj7VprDFvjt6LVfqpsN",
138+
"refunded": false,
139+
"refunds": {
140+
"object": "list",
141+
"data": [],
142+
"has_more": false,
143+
"total_count": 0,
144+
"url": "\/v1\/charges\/ch_3KMVap2EdyGr1FMV1uKJEWtg\/refunds"
145+
},
146+
"review": null,
147+
"shipping": null,
148+
"source": null,
149+
"source_transfer": null,
150+
"statement_descriptor": "AwesomeStore",
151+
"statement_descriptor_suffix": null,
152+
"status": "succeeded",
153+
"transfer_data": null,
154+
"transfer_group": null
155+
}

0 commit comments

Comments
 (0)