PayPal Gateway possible for Germany based shop?

paypal
braintree
payments

#1

Basically, I would like customers to be able to pay via PayPal.
I’m located in Germany and PayPal is not in the list of my Gateways in Forge. Only braintree, stripe and ayden.

However, braintree also supports paypal payments afaik.

Is it possible to use the php sdk with the braintree gateway to pay via paypal?

If not, is it at all possible for my customers to pay via paypal?


#2

Hey @arminunruh

It appears your question was missed and went unanswered.

I’d like to clarify for you and others thinking the same, that PayPal payments are possible when you use the manual gateway API option.

You’d need to handle the payment your side and then tell moltin via the API that the payment was captured. PayPal also have a client-side library that can handle payments in a popup, similar to how Stripe Checkout does this, so essentially you’d be able to do the full checkout process client-side.

:smile:


#3

I can confirm that this is exactly how it works as I’ve implemented it this week. Simply follow the PayPal button integration process and notify Moltin once you get a feedback from PayPal. Everything until the last step is happening away from Moltin.


#4

Hey Alex, how did you handle marking the payment as captured after a succesful PayPal transaction?
I’ve implemented checkout.js and authorize the payment via the javascript SDK afterwards. However I’d like to also mark the payment as captured. Any hints?


#5

The manual payment gateway allows you to control this process yourself.

Manual gateway docs show how to authorize the payment, you send another request to complete the order after payment has been completed.

Drew has given a very brief little guide here


#6

Can I capture the payment via the Javascript SDK in a nuxt.js frontend app? The docs don’t hold the relevant information it seems.


#7

The following code, results in a 403 error:

 Moltin.Transactions.All(this.orderID).then((response) => {
      console.log(response)
    }).catch((error) => {
      this.$emit("errors", error)
    })

Error: GET https://api.moltin.com/v2/orders/undefined/transactions 403 (Forbidden)

I’m sure that this.orderID is defined. Is this related to authenticating with an implicit token? Would be great if someone could point me in the right direction.


#8

Hi @studioscholz

You’ll only be able to retrieve the order with a valid client_credentials token.

It’s recommended you don’t use client_credentials on any public facing apps, as you’ll expose the token that has full read/write access.

I’d recommend using the token server-side to handle any custom logic :slight_smile:


#9

Currently trying to write a small app with zeit’s micro to run once it receives a PayPal IPN.
For some reason the following code returns a 404 error:

const index = async (req, res) => {

  await Moltin.Transactions.All('7a605f5c-89b8-4c1b-8cb0-3c10bcc72d9b').then((response) => {
    console.log(response)
  }).catch((error) => {
    console.log(error)
  })      

  send(res, 200)
}

module.exports = cors(
    router(get('/', index)
  )
)

Any hints? Can’t seem to figure out what’s wrong. Client and secret id are both set. The order number is copied straight from the panel for testing purposes.


#10

turns out this code works:

await Moltin.Orders.Transactions('7a605f5c-89b8-4c1b-8cb0-3c10bcc72d9b').then((response) => {
    console.log(response)
  }).catch((error) => {
    console.log(error)
  })

However, I’d like to get the other one working, due to the DeprecationWarning thats included in the response. Any help would be greatly appreciated!


#11

Hey @studioscholz :wave:

The All() method on the transactions class accepts a hash of parameters, including the order param.

const transactions = await Moltin.Transactions.All({ order: '7a605f5c-89b8-4c1b-8cb0-3c10bcc72d9b' })

Hope this helps!