You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing the migration to the new library and I am having dificulty with the refund.
This is the refund logic that I was using with the old library.
`
use com\realexpayments\remote\sdk\RealexClient;
use com\realexpayments\remote\sdk\domain\payment\PaymentRequest;
use com\realexpayments\remote\sdk\domain\payment\PaymentType;
use com\realexpayments\remote\sdk\http\HttpConfiguration;
use com\realexpayments\remote\sdk\RealexServerException;
Sorry for the late reply.
`use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig;
use GlobalPayments\Api\ServicesContainer;
use GlobalPayments\Api\PaymentMethods\RecurringPaymentMethod;
use GlobalPayments\Api\Entities\Exceptions\ApiException;
Hello team,
I am doing the migration to the new library and I am having dificulty with the refund.
This is the refund logic that I was using with the old library.
`
use com\realexpayments\remote\sdk\RealexClient;
use com\realexpayments\remote\sdk\domain\payment\PaymentRequest;
use com\realexpayments\remote\sdk\domain\payment\PaymentType;
use com\realexpayments\remote\sdk\http\HttpConfiguration;
use com\realexpayments\remote\sdk\RealexServerException;
$request = ( new PaymentRequest() )
->addType(PaymentType::PAYMENT_OUT)
->addMerchantId("merchant")
->addAccount( "account")
->addAmount(1900)
->addOrderId("order_id_goes_here")
->addCurrency("EUR")
->addPayerReference("payer_unique_id_goes_here")
->addPaymentMethod("card_ref_unique_id_goes_here")
->addRefundHash(sha1("refund_password"));
$httpConfiguration = new HttpConfiguration();
$httpConfiguration->setEndpoint("https://api.sandbox.realexpayments.com/epage-remote.cgi");
$client = new RealexClient("secret", $httpConfiguration);
try {
$paymentResponse = $client->send($request);
}catch (RealexServerException $e) {
echo $e->getMessage();
}
`
How do I convert this code to PHP-SDK library?
Thank you in advance.
The text was updated successfully, but these errors were encountered: