shetabit / payment

simple laravel payment package , supports multiple drivers
MIT License
845 stars 142 forks source link

problem with new version of zarinpa get error "اطلاعات ارسال شده ناقص است" #104 #105

Closed mahdisoftdev closed 4 years ago

mahdisoftdev commented 4 years ago

من دارم طبق داکیومنت عمل میکنم ولی بازم ارور اطلاعات ارسال شده ناقص است. رو میده.در زیر کدهام میزارم اول فایل payment.php `'zarinpal' => [ / normal api / 'apiPurchaseUrl' => 'https://ir.zarinpal.com/pg/services/WebGate/wsdl', 'apiPaymentUrl' => 'https://www.zarinpal.com/pg/StartPay/', 'apiVerificationUrl' => 'https://ir.zarinpal.com/pg/services/WebGate/wsdl',

        /* sandbox api */
        'sandboxApiPurchaseUrl' => 'https://sandbox.zarinpal.com/pg/services/WebGate/wsdl',
        'sandboxApiPaymentUrl' => 'https://sandbox.zarinpal.com/pg/StartPay/',
        'sandboxApiVerificationUrl' => 'https://sandbox.zarinpal.com/pg/services/WebGate/wsdl',

        /* zarinGate api */
        'zaringateApiPurchaseUrl' => 'https://ir.zarinpal.com/pg/services/WebGate/wsdl',
        'zaringateApiPaymentUrl' => 'https://www.zarinpal.com/pg/StartPay/:authority/ZarinGate',
        'zaringateApiVerificationUrl' => 'https://ir.zarinpal.com/pg/services/WebGate/wsdl',

        'mode' => 'normal', // can be normal, sandbox, zaringate
        'merchantId' => 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
        'callbackUrl' => 'http://spirutik.com/',
        'description' => 'payment using zarinpal',
    ],`

, و اما در کنترلر: public function Sending_to_zarinpal(Bill $bill){ $invoice = new Invoice; $invoice->amount($bill->price)->via('zarinpal')->transactionId(123); $invoice->detail(['detailName' => 'your detail goes here']); return Payment::purchase($invoice, function($driver, $transactionId) { // Store transactionId in database as we need it to verify payment in the future. })->pay()->render();

khanzadimahdi commented 4 years ago

see below

https://github.com/shetabit/payment/issues/101#issuecomment-694091114