Skip to content

Commit

Permalink
[ECP-9062] fix paths for classes in code examples (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterojo authored Apr 15, 2024
1 parent 22e66c1 commit 84f5017
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ $client->setTimeout(30);
$service = new \Adyen\Service\Checkout\PaymentsApi($client);

// Create PaymentMethod object
$paymentMethod = new CheckoutPaymentMethod();
$paymentMethod = new \Adyen\Model\Checkout\CheckoutPaymentMethod();
$paymentMethod
->setType("scheme")
->setEncryptedBankAccountNumber("test_4111111111111111")
->setEncryptedExpiryMonth("test_03")
->setEncryptedExpiryYear("test_2030")
->setEncryptedSecurityCode("test_737");
// Creating Amount Object
$amount = new Amount();
$amount = new \Adyen\Model\Checkout\Amount();
$amount
->setValue(1500)
->setCurrency("EUR");
// Create the actual Payments Request
$paymentRequest = new PaymentRequest();
$paymentRequest = new \Adyen\Model\Checkout\PaymentRequest();
$paymentRequest
->setMerchantAccount("YOUR MERCHANT ACCOUNT")
->setPaymentMethod($paymentMethod)
Expand Down Expand Up @@ -143,7 +143,7 @@ $client->setTimeout(30);
~~~~ php
...

$service = new \Adyen\Service\Checkout\PaymentsApi($client);
$service = new \Adyen\Service\Checkout\PaymentLinksApi($client);

$params = array(
'merchantAccount' => "YourMerchantAccount",
Expand All @@ -156,7 +156,7 @@ $params = array(
'billingAddress' => array(...),
'deliveryAddress' => array(...),
);
$createPaymentLinkRequest = new CreatePaymentLinkRequest($params);
$createPaymentLinkRequest = new \Adyen\Model\Checkout\PaymentLinkRequest($params);

$result = $service->paymentLinks($createPaymentLinkRequest);

Expand All @@ -170,7 +170,7 @@ $jsonString = 'webhook_payload';
$isValid = $hmac->validateHMAC("YOUR_HMAC_KEY", "YOUR_HMAC_SIGN", $jsonString);

if ($isValid) {
$webhookParser = new BankingWebhookParser($jsonString);
$webhookParser = new \Adyen\Service\BankingWebhookParser($jsonString);
$result = $webhookParser->getGenericWebhook();
}
~~~~
Expand All @@ -182,7 +182,7 @@ $jsonString = 'webhook_payload';
$isValid = $hmac->validateHMAC("YOUR_HMAC_KEY", "YOUR_HMAC_SIGN", $jsonString);

if ($isValid) {
$webhookParser = new ManagementWebhookParser($jsonString);
$webhookParser = new \Adyen\Service\ManagementWebhookParser($jsonString);
$result = $webhookParser->getGenericWebhook();
}
~~~~
Expand Down

0 comments on commit 84f5017

Please sign in to comment.