Kopiert!
curl https://api.www.paymill.org/v2/transactions \
-u <DEIN_PRIVATE_KEY>: \
-d "amount=4200" \
-d "currency=EUR" \
-d "token=098f6bcd4621d373cade4e832627b4f6" \
-d "description=Test Transaction"
TransactionService srvTx = Paymill.getService(TransactionService.class);
Transaction params = new Transaction();
params.setToken("098f6bcd4621d373cade4e832627b4f6");
params.setAmount(4200);
params.setCurrency("EUR");
params.setDescription("Test Transaction");
Transaction tx = srvTx.create(params);
$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);
curl https://api.www.paymill.org/v2/refunds/tran_023d3b5769321c649435 \
-u <DEIN_PRIVATE_KEY>: \
-d "amount=4200"
TransactionService srvTx = Paymill.getService(TransactionService.class);
String txId = "tran_023d3b5769321c649435";
int amount = 4200;
String description = "Sample Description";
Refund refund = srvTx.refund(txId, amount, description);
$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($transaction);
curl https://api.www.paymill.org/v2/clients \
-u <DEIN_PRIVATE_KEY>: \
-d "[email protected]" \
-d "description=Lovely Client"
ClientService srvClient = Paymill.getService(ClientService.class);
Client params = new Client();
params.setEmail("[email protected]");
params.setDescription("Lovely Client");
Client client = srvClient.create(params);
$client = new Paymill\Models\Request\Client();
$client->setEmail('[email protected]')
->setDescription('Lovely Client')
$response = $request->create($client);
curl https://api.www.paymill.org/v2/clients/client_88a388d9dd48f86c3136 \
-u <DEIN_PRIVATE_KEY>: \
-X DELETE
ClientService srvClient = Paymill.getService(ClientService.class);
srvClient.delete("client_88a388d9dd48f86c3136");
$client = new Paymill\Models\Request\Client();
$client->setId('client_88a388d9dd48f86c3136');
$response = $request->delete($client);
curl https://api.www.paymill.org/v2/offers \
-u <DEIN_PRIVATE_KEY>: \
-d "amount=4200" \
-d "currency=EUR" \
-d "interval=month" \
-d "name=Test Offer"
OfferService srvOffer = Paymill.getService(OfferService.class);
Offer params = new Offer();
params.setAmount(4200);
params.setCurrency("EUR");
params.setInterval(Offer.Interval.MONTH);
params.setName("Test Offer");
Offer offer = srvOffer.create(params);
$offer = new Paymill\Models\Request\Offer();
$offer->setAmount(4200)
->setCurrency('EUR')
->setInterval('1 MONTH')
->setName('Test Offer');
$response = $request->create($offer);
curl https://api.www.paymill.org/v2/subscriptions \
-u <DEIN_PRIVATE_KEY>: \
-d "client=client_64b025ee5955abd5af66" \
-d "offer=offer_40237e20a7d5a231d99b" \
-d "payment=pay_95ba26ba2c613ebb0ca8"
OfferService srvOffer = Paymill.getService(OfferService.class);
Offer offer = new Offer();
offer.setId("offer_40237e20a7d5a231d99b");
Client client = new Client();
client.setId("client_64b025ee5955abd5af66");
Payment pay = new Payment();
pay.setId("pay_95ba26ba2c613ebb0ca8");
Subscription subs = srvOffer.subscribe(offer, client, pay);
$subscription = new Paymill\Models\Request\Subscription();
$subscription->setClient('client_88a388d9dd48f86c3136')
->setOffer('offer_40237e20a7d5a231d99b')
->setPayment('pay_95ba26ba2c613ebb0ca8');
$response = $request->create($subscription);