Discussions

Ask a Question

Archive a Link (PHP) is not working

Example Reference Number = FFFFFF Example Auth = Basic 555555676664564543Fer453345' Code: <?php require_once('vendor/autoload.php'); $client = new \\GuzzleHttp\\Client(); $response = $client->request('POST', '<https://api.paymongo.com/v1/links/FFFFFF/archive'>, \[ 'headers' => [ 'accept' => 'application/json', 'authorization' => 'Basic 555555676664564543Fer453345', ], ]); echo $response->getBody(); Result: { "errors": [ { "code": "resource_not_found", "detail": "No such transaction with id FFFFFF." } ] }
ANSWERED

Lessen Customers hassle by supporting query parameter string in Paymongo Link

We have an ecommerce that integrates paymongo Link. Most of our customer are frustrated that they have to input their info again in paymongo link. Is there a way we could just pass a data on URL. Like sample below <https://pm.link/PCWorth/NoXxXhL?first_name=john&last_name=doe>

CRITICAL Uncaught Error: Call to undefined method GuzzleHttp\\Utils::chooseHandler() the path is does not exist

CRITICAL Uncaught Error: Call to undefined method GuzzleHttp\\Utils::chooseHandler() in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wc-paymongo-payment-gateway/vendor/guzzlehttp/guzzle/src/functions.php:61
ANSWERED

Metadata check out session

Hello. How to add metadata in check out session object? In your Create a Checkout Session api, it seems no filed for metadata. Just add directly to request body?
ANSWERED

Paymongo 500 internal server error in Live Server

We are currently in the progress setting up the payment portion of our website, and it seemed straightforward enough to setup in the localhost to which it is working fine. My understanding goes Request from the front end... ``` const url = `${import.meta.env.VITE_API_BASE_URL}/pay?roomName=${roomName}&descriptionData=${descriptionData}&sendTotalAmount=${sendTotalAmount}&payId=${payId}`; window.location.href = url; ``` ``` ``` Then the route.... Route::get('pay', [PaymentControllerCheckOut::class, 'pay']); Then at the Controller public function pay(Request $request) Which works fine in localhost but when deployed it returns with a 500 internal server error Then we tried to make a function that is meant to test and see if Paymongo Check out can occur in the live server, but once again returned with the same error public function test_pay(Request $request) { ``` try { $data = [ 'data' => [ 'attributes' => [ 'line_items' => [ [ 'currency' => 'PHP', 'amount' => 10000, 'name' =>'Custard', 'quantity' => 1, ] ], 'payment_method_types' => [ 'card', 'gcash', ], 'success_url' => 'https://api.sirmatafarm.com/success', 'cancel_url' => 'https://api.sirmatafarm.com/cancelled', 'description' =>'Macha', ], ], ]; $response = Curl::to('https://api.paymongo.com/v1/checkout_sessions') ->withHeader('Content-Type: application/json') ->withHeader('accept: application/json') ->withHeader('Authorization: Basic ' .env('AUTH_PAY')) ->withData($data) ->asJson() ->post(); \Session::put('session_id', $response->data->id); $sessionId = session('session_id'); return redirect()->to($response->data->attributes->checkout_url); } catch (Exception $e) { return response()->json(['error' => 'An error occurred while processing the payment.'], 500); } } public function test_pay(Request $request) { try { $data = [ 'data' => [ 'attributes' => [ 'line_items' => [ [ 'currency' => 'PHP', 'amount' => 10000, 'name' =>'Custard', 'quantity' => 1, ] ], 'payment_method_types' => [ 'card', 'gcash', ], 'success_url' => 'https://api.sirmatafarm.com/success', 'cancel_url' => 'https://api.sirmatafarm.com/cancelled', 'description' =>'Macha', ], ], ]; $response = Curl::to('https://api.paymongo.com/v1/checkout_sessions') ->withHeader('Content-Type: application/json') ->withHeader('accept: application/json') ->withHeader('Authorization: Basic ' .env('AUTH_PAY')) ->withData($data) ->asJson() ->post(); \Session::put('session_id', $response->data->id); $sessionId = session('session_id'); return redirect()->to($response->data->attributes->checkout_url); } catch (Exception $e) { return response()->json(['error' => 'An error occurred while processing the payment.'], 500); } } ``` This is a our first time working with a payment gateway and wondering if there was a vital part we missed setting up?

Error: Do not use the secret key in the browser

I am trying to apply paymongo api on my ionic application. I am using plugin of <https://paymongo.paolotiu.com/>. Create Payment Method and Retrieve Payment Method was successful and running Create Payment Intent was successful but retrieving always got an error. Error using public key - Error: Request failed with status code 404 Error if I user secret key - Error: Do not use the secret key in the browser I always got this error when I use secret key
ANSWERED

Inquiry Regarding Testing Environment for Paymongo Integration

I am currently in the process of developing an application that integrates with payment gateways, and I am interested in using Paymongo's services. Before proceeding with the integration, I wanted to confirm if there is a sandbox or testing environment available where I can simulate transactions and test the functionality of the integration without using actual funds. Could you kindly provide information regarding the availability of such a testing environment? This would greatly assist me in ensuring the smooth and accurate integration of Paymongo's services into my application. Thank you!

Checkout Api

Hi! Good Day! Is there a way for us developers to remove or hide the redirect back to the merchant button after payment success?
ANSWERED

How to simulate "payment.failed" in webhook api?

I've been configuring the webhook api, however I only managed to call source.chargeable and payment.paid. Is there a way to simulate payment.failed?
ANSWERED

How to get the customer input from custom field added to Paymongo Pages?

Hi, Upon successful payment by the customer on Paymongo Pages, the associated endpoint (webhook) received a request body containing the payment details. However, it came to my attention that the customer input provided in the custom field, which I added to Paymongo Pages, was not included in the received request body. Nevertheless, I have observed that the said customer input is visible in Paymongo Payments Dashboard. I would greatly appreciate your guidance on the possibility of obtaining the aforementioned customer data within the request body received from the webhook. Thank you for your attention to this matter. I am looking forward to your assistance and support.