2Checkout / 2checkout-php

2Checkout PHP Library
MIT License
83 stars 66 forks source link

<!-- Bad browser, no cookie --> #34

Open mehedimi opened 5 years ago

mehedimi commented 5 years ago

Class Twocheckout_Api_Requester mathod doCall returns this response . """

404 Not Found

craigchristenson commented 5 years ago

Thank you for reporting this. Please let us know which api method are you calling when getting this error.

mehedimi commented 5 years ago

When i want to create sale then error occurred. I use this lines of code

Twocheckout::privateKey({MY PRIVET KEY}); Twocheckout::sellerId(MY SELLER ID); Twocheckout::sandbox(true);

try {
    $charge = Twocheckout_Charge::auth(array(
        "merchantOrderId" => "123",
        "token" => {MY REQUEST TOKEN},
        "currency" => 'USD',
        "total" => '10.00',
        "billingAddr" => array(
            "name" => 'Testing Tester',
            "addrLine1" => '123 Test St',
            "city" => 'Columbus',
            "state" => 'OH',
            "zipCode" => '43123',
            "country" => 'USA',
            "email" => 'testingtester@2co.com',
            "phoneNumber" => '555-555-5555'
        ),
        "shippingAddr" => array(
            "name" => 'Testing Tester',
            "addrLine1" => '123 Test St',
            "city" => 'Columbus',
            "state" => 'OH',
            "zipCode" => '43123',
            "country" => 'USA',
            "email" => 'testingtester@2co.com',
            "phoneNumber" => '555-555-5555'
        )
    ), 'array');
    if ($charge['response']['responseCode'] == 'APPROVED') {
        echo "Thanks for your Order!";
    }
} catch (Twocheckout_Error $e) {
    $e->getMessage();
}
cuzboo commented 4 years ago

Any updates on this one?