Skip to content

Commit

Permalink
allpaymentWorking
Browse files Browse the repository at this point in the history
  • Loading branch information
cs14rendra authored and ios committed Nov 16, 2017
1 parent 166a6a6 commit e2f9b33
Show file tree
Hide file tree
Showing 33 changed files with 2,376 additions and 1,904 deletions.
27 changes: 15 additions & 12 deletions BrainTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,27 @@ def create_purchase():
json = request.get_json(force=True)
nonce = json["payment_method_nonce"]
ammount = json["amount"]
result = braintree.Transaction.sale({
try:
result = braintree.Transaction.sale({
"amount": ammount,
"payment_method_nonce": nonce,
"options": {
"submit_for_settlement": True
}
})
if result.is_success:
print("success!: " + result.transaction.id)
elif result.transaction:
print("Error processing transaction:")
print(" code: " + result.transaction.processor_response_code)
print(" text: " + result.transaction.processor_response_text)
else:
for error in result.errors.deep_errors:
print("attribute: " + error.attribute)
print(" code: " + error.code)
print(" message: " + error.message)
except result.errors, e:
pass
# if result.is_success:
# print("success!: " + result.transaction.id)
# elif result.transaction:
# print("Error processing transaction:")
# print(" code: " + result.transaction.processor_response_code)
# print(" text: " + result.transaction.processor_response_text)
# else:
# for error in result.errors.deep_errors:
# print("attribute: " + error.attribute)
# print(" code: " + error.code)
# print(" message: " + error.message)
return "success"

#1
Expand Down
5 changes: 2 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
target 'e-shop' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
#pod 'Stripe/ApplePay'
#pod 'Stripe'
pod "SwiftSpinner"
pod 'Braintree', '~> 3.9'
pod 'Braintree'
pod 'Braintree/Apple-Pay'

# Pods for e-shop

Expand Down
61 changes: 28 additions & 33 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
PODS:
- Braintree (3.9.9):
- Braintree/API (= 3.9.9)
- Braintree/Coinbase (= 3.9.9)
- Braintree/Drop-In (= 3.9.9)
- Braintree/Payments (= 3.9.9)
- Braintree/PayPal (= 3.9.9)
- Braintree/UI (= 3.9.9)
- Braintree/Venmo (= 3.9.9)
- Braintree/API (3.9.9)
- Braintree/Coinbase (3.9.9):
- Braintree/API
- Braintree/Drop-In (3.9.9):
- Braintree/API
- Braintree/Coinbase
- Braintree/Payments
- Braintree/PayPal
- Braintree/UI
- Braintree/Venmo
- Braintree/Payments (3.9.9):
- Braintree/API
- Braintree/Coinbase
- Braintree/PayPal
- Braintree/Venmo
- Braintree/PayPal (3.9.9):
- Braintree/API
- Braintree/UI
- Braintree/UI (3.9.9):
- Braintree/API
- Braintree/Venmo (3.9.9):
- Braintree/API
- Braintree (4.9.6):
- Braintree/Card (= 4.9.6)
- Braintree/Core (= 4.9.6)
- Braintree/PayPal (= 4.9.6)
- Braintree/UI (= 4.9.6)
- Braintree/Apple-Pay (4.9.6):
- Braintree/Core
- Braintree/Card (4.9.6):
- Braintree/Core
- Braintree/Core (4.9.6)
- Braintree/PayPal (4.9.6):
- Braintree/Core
- Braintree/PayPalOneTouch
- Braintree/PayPalDataCollector (4.9.6):
- Braintree/Core
- Braintree/PayPalUtils
- Braintree/PayPalOneTouch (4.9.6):
- Braintree/Core
- Braintree/PayPalDataCollector
- Braintree/PayPalUtils
- Braintree/PayPalUtils (4.9.6)
- Braintree/UI (4.9.6):
- Braintree/Card
- Braintree/Core
- SwiftSpinner (1.5.0)

DEPENDENCIES:
- Braintree (~> 3.9)
- Braintree
- Braintree/Apple-Pay
- SwiftSpinner

SPEC CHECKSUMS:
Braintree: a9d35b7d5a8d76267adcb5795d32c20ca5f39a99
Braintree: 56ad3fa47b2f4b047cb50d989d15208690a6cbae
SwiftSpinner: 4c058c7a1d6b444dd2e1d70988ead40783097133

PODFILE CHECKSUM: f9c29c30105959c35827399e9176ba1f78769ee6
PODFILE CHECKSUM: 9de86dd9b06c27d2e08afc4b63293b6cb74359d7

COCOAPODS: 1.3.1
2 changes: 1 addition & 1 deletion Pods/Braintree/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 38 additions & 69 deletions Pods/Braintree/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 28 additions & 33 deletions Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e2f9b33

Please sign in to comment.