Skip to content

QNB Finans Bank M047 IP kısıtlaması sorunu #302

Description

@alidursuns

Bir süredir Finansbank tarafında M047 hatası almaktaydık. Banka ile görüştüğümüzde şubat itibariyle IT ekibinin yeni bir çalışma yaptığını ve artık ödeme sayfalarına yapılan POST isteklerinin uygulama sunucusundan başlatılması gerektiğini söylediler.

Aynı hatayı alanlar $formData yı, örnek kodlardaki gibi form oluşturup Javascript ile otomatik post etmek yerine aşağıdaki şekilde post ettirebilir.

$formData = $pos->get3DFormData($order, $payType, \Mews\Pos\PosInterface::TX_TYPE_PAY_AUTH, $card);
    
$ch = curl_init($formData['gateway']);

curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => http_build_query($formData['inputs']),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/x-www-form-urlencoded',
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions