Discussions
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>
Posted by John Joshua Dablo 4 days ago
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
Posted by errol tudio 5 days ago
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?
Posted by Tak Moonwalker 18 days ago
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?
Posted by Rubean Esguerra 20 days ago
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
Posted by JJ Alcuran about 1 month ago
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!
Posted by Jayson Reales about 1 month ago
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?
Posted by Ej about 2 months ago
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?
Posted by No Job No Honey Dev about 2 months ago
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.
Posted by Tin Saulog 2 months ago
Can I create a checkout session with capture_type as manual?
I would like to take advantage of the pre-built checkout page to pre-authorize a payment prior to reserving an item in my inventory for the customer. If the item is available and the pre-auth is successful, I would capture the payment intent. If not, then I would expire the checkout session/cancel the payment intent.
As an example, Stripe supports this by allowing the developer to nest a `payment_intent_data` object within the `checkout_session` resource object when creating a checkout session.
Is this currently possible? or is there another recommended way of achieving this?
Thanks in advance :)
Posted by John Z 2 months ago