Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9062] fix paths for classes in code examples #648

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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