-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
304 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/.idea/ | ||
/build/ | ||
/vendor | ||
phpunit.xml | ||
phpunit.xml | ||
|
||
.DS_Store |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$apiKey = '< YOUR_PRIVATE_KEY >'; | ||
$request = new Paymill\Request($apiKey); |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$client = new Paymill\Models\Request\Client(); | ||
$client->setEmail('[email protected]') | ||
->setDescription('Lovely Client') | ||
|
||
$response = $request->create($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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$client = new Paymill\Models\Request\Client(); | ||
$client->setId('client_88a388d9dd48f86c3136'); | ||
|
||
$response = $request->getOne($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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$client = new Paymill\Models\Request\Client(); | ||
|
||
$response = $request->getAll($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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$client = new Paymill\Models\Request\Client(); | ||
$client->setId('client_88a388d9dd48f86c3136'); | ||
|
||
$response = $request->delete($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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$client = new Paymill\Models\Request\Client(); | ||
$client->setId('client_88a388d9dd48f86c3136') | ||
->setEmail('[email protected]') | ||
->setDescription('Updated Client'); | ||
|
||
$response = $request->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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$offer = new Paymill\Models\Request\Offer(); | ||
$offer->setAmount(4200) | ||
->setCurrency('EUR') | ||
->setInterval('1 WEEK') | ||
->setName('Nerd Special'); | ||
|
||
$response = $request->create($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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$offer = new Paymill\Models\Request\Offer(); | ||
$offer->setId('offer_40237e20a7d5a231d99b'); | ||
|
||
$response = $request->getOne($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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$offer = new Paymill\Models\Request\Offer(); | ||
|
||
$response = $request->getAll($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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$offer = new Paymill\Models\Request\Offer(); | ||
$offer->setId('offer_40237e20a7d5a231d99b') | ||
->removeWithSubscriptions(true); | ||
|
||
$response = $request->delete($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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$offer = new Paymill\Models\Request\Offer(); | ||
$offer->setId('offer_40237e20a7d5a231d99b') | ||
->setName('Extended Special') | ||
->setInterval('1 MONTH') | ||
->setAmount(3333) | ||
->setCurrency('USD') | ||
->setTrialPeriodDays(33) | ||
->updateSubscriptions(true); | ||
|
||
$response = $request->update($offer) |
4 changes: 4 additions & 0 deletions
4
samples/payments/create_new_credit_card_payment_with_token.php
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
$payment->setToken('098f6bcd4621d373cade4e832627b4f6'); | ||
|
||
$response = $request->create($payment); |
5 changes: 5 additions & 0 deletions
5
samples/payments/create_new_credit_card_payment_with_token_and_client.php
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
$payment->setToken('098f6bcd4621d373cade4e832627b4f6') | ||
->setClient('client_88a388d9dd48f86c3136'); | ||
|
||
$response = $request->create($payment); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
$payment->setToken('12a46bcd462sd3r3care4e8336ssb4f5'); | ||
|
||
$response = $request->create($payment); |
5 changes: 5 additions & 0 deletions
5
samples/payments/create_new_debit_payment_with_token_and_client.php
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
$payment->setToken('12a46bcd462sd3r3care4e8336ssb4f5'); | ||
$payment->setClient('client_88a388d9dd48f86c3136'); | ||
|
||
$response = $request->create($payment); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
$payment->setId('pay_3af44644dd6d25c820a8'); | ||
|
||
$response = $request->getOne($payment); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
|
||
$response = $request->getAll($payment); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$payment = new Paymill\Models\Request\Payment(); | ||
$payment->setId('pay_3af44644dd6d25c820a8'); | ||
|
||
$response = $request->delete($payment); |
7 changes: 7 additions & 0 deletions
7
samples/preauthorizations/create_new_preauthorization_with_payment.php
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$preAuth = new Paymill\Models\Request\Preauthorization(); | ||
$preAuth->setPayment('pay_d43cf0ee969d9847512b') | ||
->setAmount(4200) | ||
->setCurrency('EUR') | ||
->setDescription('description example'); | ||
|
||
$response = $request->create($preAuth); |
7 changes: 7 additions & 0 deletions
7
samples/preauthorizations/create_new_preauthorization_with_token.php
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$preAuth = new Paymill\Models\Request\Preauthorization(); | ||
$preAuth->setToken('098f6bcd4621d373cade4e832627b4f6') | ||
->setAmount(4200) | ||
->setCurrency('EUR') | ||
->setDescription('description example'); | ||
|
||
$response = $request->create($preAuth); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$preAuth = new Paymill\Models\Request\Preauthorization(); | ||
$preAuth->setId('preauth_31eb90495837447f76b7'); | ||
|
||
$response = $request->getOne($preAuth); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$preAuth = new Paymill\Models\Request\Preauthorization(); | ||
|
||
$response = $request->getAll($preAuth); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$preAuth = new Paymill\Models\Request\Preauthorization(); | ||
$preAuth->setId('preauth_31eb90495837447f76b7'); | ||
|
||
$response = $request->delete($preAuth); |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$refund = new Paymill\Models\Request\Refund(); | ||
$refund->setId('tran_023d3b5769321c649435') | ||
->setAmount(4200) // e.g. "4200" for 42.00 EUR | ||
->setDescription('Sample Description'); | ||
|
||
$response = $request->create($refund); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$refund = new Paymill\Models\Request\Refund(); | ||
$refund->setId('refund_773ab6f9cd03428953c9'); | ||
|
||
$response = $request->getOne($refund); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$refund = new Paymill\Models\Request\Refund(); | ||
|
||
$response = $request->getAll($refund); |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dea86e5c65b2087202e3'); | ||
->setRemove(false); | ||
|
||
$response = $request->delete($subscription); |
8 changes: 8 additions & 0 deletions
8
samples/subscriptions/create_new_subscription_with_an_offer.php
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setClient('client_81c8ab98a8ac5d69f749') | ||
->setOffer('offer_40237e20a7d5a231d99b'); | ||
->setPayment('pay_5e078197cde8a39e4908f8aa'); | ||
->setPeriodOfValidity('2 YEAR'); | ||
->setStartAt(1400575533); | ||
|
||
$response = $request->create($subscription); |
12 changes: 12 additions & 0 deletions
12
samples/subscriptions/create_new_subscription_with_an_offer_and_different_values.php
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setClient('client_81c8ab98a8ac5d69f749') | ||
->setOffer('offer_40237e20a7d5a231d99b'); | ||
->setAmount(3000); | ||
->setPayment('pay_5e078197cde8a39e4908f8aa'); | ||
->setCurrency('EUR'); | ||
->setInterval('1 week,monday'); | ||
->setName('Example Subscription'); | ||
->setPeriodOfValidity('2 YEAR'); | ||
->setStartAt('1400575533'); | ||
|
||
$response = $request->create($subscription); |
11 changes: 11 additions & 0 deletions
11
samples/subscriptions/create_new_subscription_without_an_offer.php
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setClient('client_81c8ab98a8ac5d69f749') | ||
->setAmount(3000); | ||
->setPayment('pay_5e078197cde8a39e4908f8aa'); | ||
->setCurrency('EUR'); | ||
->setInterval('1 week,monday'); | ||
->setName('Example Subscription'); | ||
->setPeriodOfValidity('2 YEAR'); | ||
->setStartAt('1400575533'); | ||
|
||
$response = $request->create($subscription); |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dea86e5c65b2087202e3'); | ||
->setRemove(true); | ||
|
||
$response = $request->delete($subscription); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dc180b755d10da324864'); | ||
|
||
$response = $request->getOne($subscription); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
|
||
$response = $request->getAll($subscription); |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dea86e5c65b2087202e3'); | ||
->setPause(true); | ||
|
||
$response = $request->update($subscription); |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dea86e5c65b2087202e3'); | ||
->setClient('client_81c8ab98a8ac5d69f749') | ||
->setOffer('offer_40237e20a7d5a231d99b'); | ||
->setAmount(3000); | ||
->setPayment('pay_95ba26ba2c613ebb0ca8'); | ||
->setCurrency('USD'); | ||
->setInterval('1 month,friday'); | ||
->setName('Changed Subscription'); | ||
->setPeriodOfValidity('14 MONTH'); | ||
->setTrialEnd(false); | ||
|
||
$response = $request->update($subscription); |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dea86e5c65b2087202e3'); | ||
->setAmount(1234); | ||
->setAmountChangeType(0); | ||
|
||
$response = $request->update($subscription); |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$subscription = new Paymill\Models\Request\Subscription(); | ||
$subscription->setId('sub_dea86e5c65b2087202e3'); | ||
->setOffer('offer_d7e9813a25e89c5b78bd'); | ||
->setOfferChangeType(2); | ||
|
||
$response = $request->update($subscription); |
10 changes: 10 additions & 0 deletions
10
samples/transactions/create_new_transaction_with_app_fee.php
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setAmount(4200) // e.g. "4200" for 42.00 EUR | ||
->setCurrency('EUR') | ||
->setToken('098f6bcd4621d373cade4e832627b4f6') | ||
->setDescription('Test Transaction') | ||
->setFeeAmount(420) | ||
->setFeePayment('pay_3af44644dd6d25c820a8') | ||
->setFeeCurrency('EUR'); | ||
|
||
$response = $request->create($transaction); |
8 changes: 8 additions & 0 deletions
8
samples/transactions/create_new_transaction_with_client_and_payment.php
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setAmount(4200) // e.g. "4200" for 42.00 EUR | ||
->setCurrency('EUR') | ||
->setClient('client_c781b1d2f7f0f664b4d9') | ||
->setPayment('pay_2f82a672574647cd911d') | ||
->setDescription('Test Transaction'); | ||
|
||
$response = $request->create($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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setAmount(4200) // e.g. "4200" for 42.00 EUR | ||
->setCurrency('EUR') | ||
->setPayment('pay_2f82a672574647cd911d') | ||
->setDescription('Test Transaction'); | ||
|
||
$response = $request->create($transaction); |
7 changes: 7 additions & 0 deletions
7
samples/transactions/create_new_transaction_with_preauthorization.php
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setAmount(4200) // e.g. "4200" for 42.00 EUR | ||
->setCurrency('EUR') | ||
->setPreauthorization('preauth_ec54f67e52e92051bd65') | ||
->setDescription('Test Transaction'); | ||
|
||
$response = $request->create($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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setAmount(4200) // e.g. "4200" for 42.00 EUR | ||
->setCurrency('EUR') | ||
->setToken('098f6bcd4621d373cade4e832627b4f6') | ||
->setDescription('Test Transaction'); | ||
|
||
$response = $request->create($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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setId('tran_023d3b5769321c649435'); | ||
|
||
$response = $request->getOne($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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setId('slv_4125875679'); | ||
|
||
$response = $request->getOne($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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
|
||
$response = $request->getAll($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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$transaction = new Paymill\Models\Request\Transaction(); | ||
$transaction->setId('tran_023d3b5769321c649435') | ||
->setDescription('My updated transaction description'); | ||
|
||
$response = $request->update($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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$webhook = new Paymill\Models\Request\Webhook(); | ||
$webhook->setEmail('<your-webhook-email>') | ||
->setEventTypes(array( | ||
'transaction.succeeded', | ||
'transaction.failed' | ||
)); | ||
|
||
$response = $request->create($webhook); |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$webhook = new Paymill\Models\Request\Webhook(); | ||
$webhook->setUrl('<your-webhook-url>') | ||
->setEventTypes(array( | ||
'transaction.succeeded', | ||
'transaction.failed' | ||
)); | ||
|
||
$response = $request->create($webhook); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Not implemented yet */ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$webhook = new Paymill\Models\Request\Webhook(); | ||
$webhook->setId('hook_40237e20a7d5a231d99b'); | ||
|
||
$response = $request->getOne($webhook); |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$webhook = new Paymill\Models\Request\Webhook(); | ||
$webhook->setFilter(array( | ||
'count' => 2, | ||
'offset' => 0 | ||
)); | ||
|
||
$response = $request->getAll($webhook); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$webhook = new Paymill\Models\Request\Webhook(); | ||
$webhook->setId('hook_40237e20a7d5a231d99b'); | ||
|
||
$response = $request->delete($webhook); |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$webhook = new Paymill\Models\Request\Webhook(); | ||
$webhook->setId('hook_40237e20a7d5a231d99b') | ||
->setUrl('<your-webhook-url>') | ||
->setEventTypes(array( | ||
'transaction.failed', | ||
'subscription.failed' | ||
)); | ||
|
||
$response = $request->update($webhook); |