forked from elyase/pymill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/attribute_error_when_none
* master: Fix SyntaxError (non-keyword arg after keyword arg) in samples/offers/create_new_offer.py Remove redundant semicolons (they are only needed for compound statements: https://docs.python.org/2/reference/compound_stmts.html) Fix creation of a webhook with multiple events.
- Loading branch information
Showing
55 changed files
with
232 additions
and
233 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ We have released version 1.1.0 which is coded directly to the PAYMILL API v2.1 a | |
|
||
Initialize the library by providing your api key: | ||
```python | ||
paymill_context = paymill.PaymillContext('<YOUR PRIVATE API KEY>'); | ||
paymill_context = paymill.PaymillContext('<YOUR PRIVATE API KEY>') | ||
``` | ||
PaymillContext loads the context of PAYMILL for a single account, by providing a merchants private key. It creates 8 services, which represents the PAYMILL API: | ||
* ClientService | ||
|
@@ -53,15 +53,15 @@ In all cases, you'll use the predefined service classes to access the PAYMILL AP | |
|
||
To fetch a service instance, call *service name* accessor from paymill_context, like | ||
```python | ||
client_service = paymill_context.get_client_service(); | ||
client_service = paymill_context.get_client_service() | ||
``` | ||
Every service instance provides basic methods for CRUD functionality. | ||
|
||
### Creating objects | ||
|
||
Every service provides instance factory methods for creation. They are very different for every service, because every object can be created in a different way. The common pattern is | ||
```python | ||
xxx_service.create_XXX(params...); | ||
xxx_service.create_XXX(params...) | ||
``` | ||
For example: client can be created with two optional parameters: *email* and *description*. So we have four possible methods to create the client: | ||
```python | ||
|
@@ -85,15 +85,15 @@ For example: client can be created with two optional parameters: *email* and *de | |
|
||
You can retrieve an object by using the get() method with with the instance itself: | ||
```python | ||
client_service.detail(client); | ||
client_service.detail(client) | ||
``` | ||
This method throws an PMError if there is no client under the given id. | ||
|
||
### Retrieving lists | ||
|
||
To retrieve a list you may simply use the list() method: | ||
```python | ||
clients = client_service.list(); | ||
clients = client_service.list() | ||
``` | ||
You may provide a filter and order to list method: | ||
```python | ||
|
@@ -107,14 +107,14 @@ This will load only clients with email [email protected], order descending | |
|
||
In order to update an object simply call a service's update() method: | ||
```python | ||
client_service.update(client); | ||
client_service.update(client) | ||
``` | ||
|
||
### Deleting objects | ||
|
||
You may delete objects by calling the service's delete() method with an object instance. | ||
```python | ||
client_service.remove(client); | ||
client_service.remove(client) | ||
``` | ||
|
||
## Changelog | ||
|
@@ -128,7 +128,7 @@ You may delete objects by calling the service's delete() method with an object i | |
|
||
### 1.1 | ||
* Support for Py3 | ||
* FilterList added for filter combination | ||
* FilterList added for filter combination | ||
* Bug fixing & code improvements | ||
|
||
### 1.0 | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
paymill_context = paymill.PaymillContext('< YOUR_PRIVATE_API_KEY >'); | ||
paymill_context = paymill.PaymillContext('< YOUR_PRIVATE_API_KEY >') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
client_service = paymill_context.get_client_service(); | ||
client = client_service.create(email='[email protected]'); | ||
client_service = paymill_context.get_client_service() | ||
client = client_service.create(email='[email protected]') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
client_service = paymill_context.get_client_service(); | ||
client_service = paymill_context.get_client_service() | ||
client_details = client_service.detail(client) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
client_service = paymill_context.get_client_service(); | ||
clients_list = client_service.list(); | ||
client_service = paymill_context.get_client_service() | ||
clients_list = client_service.list() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
client_service = paymill_context.get_client_service(); | ||
client_service.remove(client); | ||
client_service = paymill_context.get_client_service() | ||
client_service.remove(client) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
client_service = paymill_context.get_client_service(); | ||
client.email = '[email protected]'; | ||
client_service.update(client); | ||
client_service = paymill_context.get_client_service() | ||
client.email = '[email protected]' | ||
client_service.update(client) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
offer_service = paymill_context.get_offer_service(); | ||
offer_service = paymill_context.get_offer_service() | ||
offer = offer_service.create( | ||
amount=4200, | ||
currency='EUR', | ||
interval='1 WEEK', | ||
'Nerd Special', | ||
0 | ||
); | ||
name='Nerd Special', | ||
trial_period_days=0 | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
offer_service = paymill_context.get_offer_service(); | ||
offer_details = offer_service.detail(offer); | ||
offer_service = paymill_context.get_offer_service() | ||
offer_details = offer_service.detail(offer) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
offer_service = paymill_context.get_offer_service(); | ||
offers_list = offer_service.list(); | ||
offer_service = paymill_context.get_offer_service() | ||
offers_list = offer_service.list() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
offer_service = paymill_context.get_offer_service(); | ||
offer_service.remove(offer); | ||
offer_service = paymill_context.get_offer_service() | ||
offer_service.remove(offer) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
offer_service = paymill_context.get_offer_service(); | ||
offer.name = 'Extended Special'; | ||
offer.interval = '1 MONTH'; | ||
offer.amount = 3333; | ||
offer.currency = 'USD'; | ||
offer.trial_period_days = '33'; | ||
offer_service = paymill_context.get_offer_service() | ||
offer.name = 'Extended Special' | ||
offer.interval = '1 MONTH' | ||
offer.amount = 3333 | ||
offer.currency = 'USD' | ||
offer.trial_period_days = '33' | ||
|
||
offer_service.update(offer, true); | ||
offer_service.update(offer, true) |
4 changes: 2 additions & 2 deletions
4
samples/payments/create_new_credit_card_payment_with_token.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
payment_with_token = payment_service.create(token='098f6bcd4621d373cade4e832627b4f6'); | ||
payment_service = paymill_context.get_payment_service() | ||
payment_with_token = payment_service.create(token='098f6bcd4621d373cade4e832627b4f6') |
4 changes: 2 additions & 2 deletions
4
samples/payments/create_new_credit_card_payment_with_token_and_client.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
payment_service = paymill_context.get_payment_service() | ||
payment_with_token_and_client = payment_service.create( | ||
token='098f6bcd4621d373cade4e832627b4f6', | ||
client_id='client_33baaf3ee3251b083420' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
payment_with_token = payment_service.create(token='12a46bcd462sd3r3care4e8336ssb4f5'); | ||
payment_service = paymill_context.get_payment_service() | ||
payment_with_token = payment_service.create(token='12a46bcd462sd3r3care4e8336ssb4f5') |
4 changes: 2 additions & 2 deletions
4
samples/payments/create_new_debit_payment_with_token_and_client.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
payment_service = paymill_context.get_payment_service() | ||
payment_with_token_and_client = payment_service.create( | ||
token='12a46bcd462sd3r3care4e8336ssb4f5', | ||
client_id='client_33baaf3ee3251b083420' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
payment_details = payment_service.detail(payment_with_token); | ||
payment_service = paymill_context.get_payment_service() | ||
payment_details = payment_service.detail(payment_with_token) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
payments_list = payment_service.list(); | ||
payment_service = paymill_context.get_payment_service() | ||
payments_list = payment_service.list() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
payment_service = paymill_context.get_payment_service(); | ||
paymentService.remove(payment_with_token); | ||
payment_service = paymill_context.get_payment_service() | ||
paymentService.remove(payment_with_token) |
4 changes: 2 additions & 2 deletions
4
samples/preauthorizations/create_new_preauthorization_with_payment.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
preauthorization_service = paymill_context.get_preauthorization_service(); | ||
preauthorization_service = paymill_context.get_preauthorization_service() | ||
preauthorization_with_payment = preauthorization_service.create_with_payment_id( | ||
payment_id ='pay_3af44644dd6d25c820a9', | ||
amount=4200, | ||
currency='EUR', | ||
description='description example' | ||
); | ||
) |
4 changes: 2 additions & 2 deletions
4
samples/preauthorizations/create_new_preauthorization_with_token.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
preauthorization_service = paymill_context.get_preauthorization_service(); | ||
preauthorization_service = paymill_context.get_preauthorization_service() | ||
preauthorization_with_token = preauthorization_service.create_with_token( | ||
token='098f6bcd4621d373cade4e832627b4f6', | ||
amount=4200, | ||
currency='EUR', | ||
description='description example' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
preauthorization_service = paymill_context.get_preauthorization_service(); | ||
preauthorization_details = preauthorization_service.detail(preauthorization_with_token); | ||
preauthorization_service = paymill_context.get_preauthorization_service() | ||
preauthorization_details = preauthorization_service.detail(preauthorization_with_token) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
preauthorization_service = paymill_context.get_preauthorization_service(); | ||
preauthorizations_list = preauthorization_service.list(); | ||
preauthorization_service = paymill_context.get_preauthorization_service() | ||
preauthorizations_list = preauthorization_service.list() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
preauthorization_service = paymill_context.get_preauthorization_service(); | ||
preauthorization_service.remove(preauthorization_with_token); | ||
preauthorization_service = paymill_context.get_preauthorization_service() | ||
preauthorization_service.remove(preauthorization_with_token) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
refund_service = paymill_context.get_refund_service(); | ||
refund_service = paymill_context.get_refund_service() | ||
refund_transaction = refund_service.refund_transaction( | ||
transaction_id='tran_ca3e7d41fb16d0157a99', | ||
amount=4200 | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
refund_service = paymill_context.get_refund_service(); | ||
refund_service = paymill_context.get_refund_service() | ||
refund_details = refund_service.detail(refund_transaction) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
refund_service = paymill_context.get_refund_service(); | ||
refunds_list = refund_service.list(); | ||
refund_service = paymill_context.get_refund_service() | ||
refunds_list = refund_service.list() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service.cancel(subscription_without_offer); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_service.cancel(subscription_without_offer) |
4 changes: 2 additions & 2 deletions
4
samples/subscriptions/create_new_subscription_with_an_offer.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_with_an_offer = subscription_service.create_with_offer_id( | ||
payment_id='pay_3af44644dd6d25c820a9', | ||
offer_id='offer_bb33ea77b942f570997b' | ||
); | ||
) |
4 changes: 2 additions & 2 deletions
4
samples/subscriptions/create_new_subscription_with_an_offer_and_different_values.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_with_offer_and_different_values = subscription_service.create_with_offer_id( | ||
payment_id='pay_5e078197cde8a39e4908f8aa', | ||
offer_id='offer_b33253c73ae0dae84ff4', | ||
name='Example Subscription', | ||
period_of_validity='2 YEAR', | ||
start_at=1400575533 | ||
); | ||
) |
4 changes: 2 additions & 2 deletions
4
samples/subscriptions/create_new_subscription_without_an_offer.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_without_offer = subscription_service.create_with_amount( | ||
payment_id='pay_5e078197cde8a39e4908f8aa', | ||
amount=3OOO, | ||
currency='EUR', | ||
interval='1 WEEK,MONDAY' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service.remove(subscription_without_offer); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_service.remove(subscription_without_offer) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_details = subscription_service.detail(subscription_without_offer) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_list = subscription_service.list(); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_list = subscription_service.list() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# pause | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service.pause(subscription_without_offer); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_service.pause(subscription_without_offer) | ||
# unpause | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_service.unpause(subscription_without_offer); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_service.unpause(subscription_without_offer) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_without_offer.name = 'Updated Subscription'; | ||
subscription_service.update(subscription_without_offer); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_without_offer.name = 'Updated Subscription' | ||
subscription_service.update(subscription_without_offer) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_without_offer.amount = 1234; | ||
subscription_service.update_with_amount(subscription_without_offer, amount_change_type=1); | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_without_offer.amount = 1234 | ||
subscription_service.update_with_amount(subscription_without_offer, amount_change_type=1) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
subscription_service = paymill_context.get_subscription_service(); | ||
subscription_with_an_offer.offer_id='offer_40237e20a7d5a231d99b'; | ||
subscription_service = paymill_context.get_subscription_service() | ||
subscription_with_an_offer.offer_id='offer_40237e20a7d5a231d99b' | ||
subscription_service.update_with_offer_id( | ||
subscription_with_an_offer, | ||
offer_change_type=2 | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
transaction_service = paymill_context.get_transaction_service(); | ||
transaction_service = paymill_context.get_transaction_service() | ||
transaction_with_token = transaction_service.create_with_token( | ||
token='098f6bcd4621d373cade4e832627b4f6', | ||
amount=4200, currency='EUR', | ||
description='Test Transaction', | ||
fee_amount=4200, | ||
fee_payment_id='pay_3af44644dd6d25c820a8', | ||
fee_currency='EUR' | ||
); | ||
) |
4 changes: 2 additions & 2 deletions
4
samples/transactions/create_new_transaction_with_client_and_payment.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
transaction_service = paymill_context.get_transaction_service(); | ||
transaction_service = paymill_context.get_transaction_service() | ||
transaction_with_client_and_payment = transaction_service.create_with_payment_id( | ||
payment_id='pay_3af44644dd6d25c820a9', | ||
amount=4200, currency='EUR', | ||
description='Test Transaction', | ||
client_id='client_33baaf3ee3251b083420' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
transaction_service = paymill_context.get_transaction_service(); | ||
transaction_service = paymill_context.get_transaction_service() | ||
transaction_with_payment = transaction_service.create_with_payment_id( | ||
payment_id='pay_3af44644dd6d25c820a9', | ||
amount=4200, | ||
currency='EUR', | ||
description='Test Transaction' | ||
); | ||
) |
4 changes: 2 additions & 2 deletions
4
samples/transactions/create_new_transaction_with_preauthorization.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
transaction_service = paymill_context.get_transaction_service(); | ||
transaction_service = paymill_context.get_transaction_service() | ||
transaction_with_preauthorization = transaction_service.create_with_preauthorization_id( | ||
preauthorization_id='preauth_ec54f67e52e92051bd65', | ||
amount=4200, currency='EUR', | ||
description='Test Transaction' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
transaction_service = paymill_context.get_transaction_service(); | ||
transaction_service = paymill_context.get_transaction_service() | ||
transaction_with_token = transaction_service.create_with_token( | ||
token='098f6bcd4621d373cade4e832627b4f6', | ||
amount=4200, | ||
currency='EUR', | ||
description='Test Transaction' | ||
); | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
transaction_service = paymill_context.get_transaction_service(); | ||
transaction_details = transaction_service.detail(transaction_with_token); | ||
transaction_service = paymill_context.get_transaction_service() | ||
transaction_details = transaction_service.detail(transaction_with_token) |
Oops, something went wrong.